From: Rodney S. <rsp...@mc...> - 2007-09-11 18:33:25
|
> Hi! > > This will make Ben happy! I have modified the use of Wine emulator so > that now default argument values work also on Linux - try running the > example in bugs help page. The old behaviour still works i.e. > bugs.directory can be specified in Unix or Windows style path. I have > also unified all calls to wine related functions so that possible move > to embedded OpenBUGS will be easier. Thanks Ben for naging ;) > > Can anyone please test the default behaviour on Mac OS X using Intel > processor? > > Dawn, can you please test my changes on S-PLUS. It should work without > problems, but just in case I screwed up something. I have removed S-PLUS > part in native2win as it did not had any sense. Additionally, is there > any particular reason you use of name splus.file.copy instead > of just file.copy for copying file function. This would IMHO lead to > "cleaner" code. > > Hi Gregor: I can now confirm that the example that recently appeared on BUGS-L works with R2WinBUGS 2.1-4, DarWINE 0.9.42 and WinBUGS 1.4.3 if I do the following first: Sys.setenv(DISPLAY=":0.0") However, it does not work with OpenBUGS 3.0.1 or 3.0.2. Also, DarWINE 0.9.43 and 0.9.44 have some problems as well. Now, how do I install the latest trunk to do the same test? I've downloaded it, but there does not appear to be a .tgz file. Rodney |
From: Gorjanc G. <Gre...@bf...> - 2007-09-12 06:55:52
|
Hi Rodney > I can now confirm that the example that recently appeared on > BUGS-L works with R2WinBUGS 2.1-4, > DarWINE 0.9.42 and WinBUGS 1.4.3 if I do the following first: > > Sys.setenv(DISPLAY=3D":0.0") I tried to unset the DISPLAY variable on my Ubunutu box and I also was not able to run the example (R2WinBUGS 2.1-6). Setting it back to :0.0 worked. > However, it does not work with OpenBUGS 3.0.1 or 3.0.2. Also, It can not work, since OpenBUGS has slightly different model syntax. rbugs has implemented it and I would like to port that to R2WinBUGS - though we might just go via BRugs since Bob announced that OpenBUGS should now work also under Linux. Stay tunned ;) > DarWINE 0.9.43 and 0.9.44 have some problems as well. Any meaningful error message? > Now, how do I install the latest trunk to do the same test? > I've downloaded it, but there does not appear to be a .tgz file. Just build it. I guess mac side should not be much different from R CMD build R2WinBUGS Regards, Gregor |
From: Rodney S. <rsp...@mc...> - 2007-09-12 14:36:28
|
Gorjanc Gregor wrote: > >> DarWINE 0.9.43 and 0.9.44 have some problems as well. >> > > Any meaningful error message? > > Not really. And, it's very surprising. OpenBUGS had a pretty good track record with DarWINE. v. 2.2.0 started working with DarWINE 0.9.12 and worked for every version that I tried after that. WinBUGS was far more tempermental. v. 1.4.3 is the first that I have ever been able to run with DarWINE. >> Now, how do I install the latest trunk to do the same test? >> I've downloaded it, but there does not appear to be a .tgz file. >> > > Just build it. I guess mac side should not be much different from > > R CMD build R2WinBUGS > > Ah, didn't think of that. I'll give it a try. But, it would probably be easier to just include the .tgz in the repository. In any case, I was looking around in R2WinBUGS and I noticed that fitbugs is not included. Is there any reason for this? I'd like to see a version of fitbugs that returns the object and also allows WINE to be used. The version of fitbugs that I found doesn't appear to have either of these. But, maybe there is a later version somewhere? Here's the one I've been looking at http://www.stat.columbia.edu/~kerman/td/fitbugs.R Of course, I'm willing to work on this. But, I didn't want to re-invent the wheel. Lastly, one thing that I forgot to mention. When I ran the BUGS-L example, a new WinBUGS window opens, performs the analysis, creates some graphics, and then closes, before you have a chance to actually look at the graphics. The posterior/summary is returned, but I'm wondering why the window closes. Is this supposed to happen? Or is this a problem only on Mac? Rodney |
From: Uwe L. <li...@st...> - 2007-09-12 15:59:36
|
Rodney Sparapani wrote: > Gorjanc Gregor wrote: >>> DarWINE 0.9.43 and 0.9.44 have some problems as well. >>> >> Any meaningful error message? >> >> > Not really. And, it's very surprising. OpenBUGS had a pretty > good track record with DarWINE. v. 2.2.0 started working > with DarWINE 0.9.12 and worked for every version that I tried after > that. WinBUGS was far more tempermental. v. 1.4.3 > is the first that I have ever been able to run with DarWINE. >>> Now, how do I install the latest trunk to do the same test? >>> I've downloaded it, but there does not appear to be a .tgz file. >>> >> Just build it. I guess mac side should not be much different from >> >> R CMD build R2WinBUGS >> >> > Ah, didn't think of that. I'll give it a try. But, it would > probably be easier to just include the .tgz in the repository. > > In any case, I was looking around in R2WinBUGS and I noticed that > fitbugs is not included. Is there any reason for this? I'd like to see > a version of fitbugs that returns the object and also allows WINE to be > used. The version of fitbugs that I found doesn't appear to have either > of these. But, maybe there is a later version somewhere? Here's the > one I've been looking at http://www.stat.columbia.edu/~kerman/td/fitbugs.R > Of course, I'm willing to work on this. But, I didn't want to > re-invent the wheel. > > Lastly, one thing that I forgot to mention. When I ran the > BUGS-L example, a new WinBUGS window opens, performs the > analysis, creates some graphics, and then closes, before you > have a chance to actually look at the graphics. The posterior/summary > is returned, but I'm wondering why the window closes. Is this supposed > to happen? Or is this a problem only on Mac? It stays open if you choose debug=TRUE Uwe Ligges > Rodney > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Bugs-r-devel mailing list > Bug...@li... > https://lists.sourceforge.net/lists/listinfo/bugs-r-devel |
From: Sparapani, R. <rsp...@mc...> - 2007-09-13 01:17:33
|
Hi Gang: Ok. The latest trunk works, but I'm not sure if I tried all the new = features. Here's what I did: > Sys.setenv(DISPLAY=3D":0.0") > = Sys.setenv(WINE=3D"/Applications/Darwine/Wine.bundle/Contents/bin/wine") > = Sys.setenv(WINEPATH=3D"/Applications/Darwine/Wine.bundle/Contents/bin/win= epath") > schools.sim <- bugs (data=3Ddata, + inits=3Dinits, + parameters.to.save=3Dparameters, + model.file=3D"schools.txt", + n.chains=3D3, + n.iter=3D1000, + bugs.directory=3D"/Applications/WinBUGS14", + debug=3DFALSE) Thanks,=20 Rodney -----Original Message----- From: Gorjanc Gregor [mailto:Gre...@bf...] Sent: Wed 9/12/2007 1:54 AM To: Sparapani, Rodney; bug...@li... Subject: RE: [Bugs-r-devel] Recent changes =20 Hi Rodney > I can now confirm that the example that recently appeared on > BUGS-L works with R2WinBUGS 2.1-4, > DarWINE 0.9.42 and WinBUGS 1.4.3 if I do the following first: > > Sys.setenv(DISPLAY=3D":0.0") I tried to unset the DISPLAY variable on my Ubunutu box and I also was = not able to run the example (R2WinBUGS 2.1-6). Setting it back to :0.0 = worked. > However, it does not work with OpenBUGS 3.0.1 or 3.0.2. Also, It can not work, since OpenBUGS has slightly different model syntax. = rbugs has implemented it and I would like to port that to R2WinBUGS - though = we might just go via BRugs since Bob announced that OpenBUGS should now work also under Linux. Stay tunned ;) > DarWINE 0.9.43 and 0.9.44 have some problems as well. Any meaningful error message? > Now, how do I install the latest trunk to do the same test? > I've downloaded it, but there does not appear to be a .tgz file. Just build it. I guess mac side should not be much different from R CMD build R2WinBUGS Regards, Gregor |
From: Gregor G. <gre...@bf...> - 2007-09-17 09:32:17
|
Sparapani, Rodney wrote: > Hi Gang: > > Ok. The latest trunk works, but I'm not sure if I tried all the new features. Here's what I did: > >> Sys.setenv(DISPLAY=":0.0") >> Sys.setenv(WINE="/Applications/Darwine/Wine.bundle/Contents/bin/wine") >> Sys.setenv(WINEPATH="/Applications/Darwine/Wine.bundle/Contents/bin/winepath") >> schools.sim <- bugs (data=data, > + inits=inits, > + parameters.to.save=parameters, > + model.file="schools.txt", > + n.chains=3, > + n.iter=1000, > + bugs.directory="/Applications/WinBUGS14", > + debug=FALSE) > OK. Can you also try Sys.setenv(DISPLAY=":0.0") schools.sim <- bugs (data=data, inits=inits, parameters.to.save=parameters, model.file="schools.txt", n.chains=3, n.iter=1000, bugs.directory="/Applications/WinBUGS14", debug=FALSE) i.e. without explicit setting WINE and WINEPATH? I would like to know if search for wine and winepath binaries is successful on mac. Is the /Applications/WinBUGS14 path on Mac as standard as C:\Program Files\WinBUGS14 on Windows? If yes, then we could use it as default on mac. On Linux/unix OS we assume that WinBUGS is installed (under wine) as in windows. Gregor |
From: Sparapani, R. <rsp...@mc...> - 2007-09-13 14:32:39
|
I replied again last night, but it never got to the list. I HATE = OUTLOOK WEB ACCESS!!!! =20 Ok, 2.1-6 does work. Here's what I tested: > = Sys.setenv(WINE=3D"/Applications/Darwine/Wine.bundle/Contents/bin/wine") > = Sys.setenv(WINEPATH=3D"/Applications/Darwine/Wine.bundle/Contents/bin/win= epath") > schools.sim <- bugs (data=3Ddata, inits=3Dinits, parameters.to.save=3Dparameters, model.file=3D"schools.txt", n.chains=3D3, n.iter=3D1000, bugs.directory=3D"/Applications/WinBUGS14", debug=3DFALSE) However, fitbugs() does not work. Since bugs() no longer needs = WINE/WINEPATH/etc., that should not be the issue. It seems like fitbugs does not know about = bugs.directory!?! Here's what it looks like: > source("fitbugs.R") > .schools.bugs.model <- function () { # data : J, y, sigma.y # param : theta, mu.theta, sigma.theta # theta =3D rnorm(1) # mu.theta =3D rnorm(1) # sigma.theta =3D runif(1) for (j in 1:J){ y[j] ~ dnorm (theta[j], tau.y[j]) theta[j] ~ dnorm (mu.theta, tau.theta) tau.y[j] <- pow(sigma.y[j], -2) } mu.theta ~ dnorm (0, 1.0E-6) tau.theta <- pow(sigma.theta, -2) sigma.theta ~ dunif (0, 1000) } > fitbugs(.schools.bugs.model, = bugs.directory=3D"/Applications/WinBUGS14") Error in file(con, "rb") : unable to open connection In addition: Warning message: cannot open file '/Users/rsparapa/.wine/dosdevices/c:/Program = Files/WinBUGS14/System/Rsrc/Registry.odc', reason 'No such file or = directory' in: file(con, "rb")=20 Error in bugs.run(n.burnin, bugs.directory, WINE =3D WINE, useWINE =3D = useWINE, :=20 WinBUGS executable does not exist in = /Users/rsparapa/.wine/dosdevices/c:/Program Files/WinBUGS14 In addition: Warning message: list.files: '/Users/rsparapa/.wine/dosdevices/c:/Program = Files/WinBUGS14' is not a readable directory in: = list.files(bugs.directory)=20 Any ideas? I tried to add bugs.directory to fitbugs.R, but I'm not = getting the syntax right. Rodney -----Original Message----- From: Gorjanc Gregor [mailto:Gre...@bf...] Sent: Wed 9/12/2007 1:54 AM To: Sparapani, Rodney; bug...@li... Subject: RE: [Bugs-r-devel] Recent changes =20 Hi Rodney > I can now confirm that the example that recently appeared on > BUGS-L works with R2WinBUGS 2.1-4, > DarWINE 0.9.42 and WinBUGS 1.4.3 if I do the following first: > > Sys.setenv(DISPLAY=3D":0.0") I tried to unset the DISPLAY variable on my Ubunutu box and I also was = not able to run the example (R2WinBUGS 2.1-6). Setting it back to :0.0 = worked. > However, it does not work with OpenBUGS 3.0.1 or 3.0.2. Also, It can not work, since OpenBUGS has slightly different model syntax. = rbugs has implemented it and I would like to port that to R2WinBUGS - though = we might just go via BRugs since Bob announced that OpenBUGS should now work also under Linux. Stay tunned ;) > DarWINE 0.9.43 and 0.9.44 have some problems as well. Any meaningful error message? > Now, how do I install the latest trunk to do the same test? > I've downloaded it, but there does not appear to be a .tgz file. Just build it. I guess mac side should not be much different from R CMD build R2WinBUGS Regards, Gregor |
From: Gregor G. <gre...@bf...> - 2007-09-17 08:52:00
|
Sparapani, Rodney wrote: > I replied again last night, but it never got to the list. I HATE OUTLOOK WEB ACCESS!!!! > Ok, 2.1-6 does work. Here's what I tested: > >> Sys.setenv(WINE="/Applications/Darwine/Wine.bundle/Contents/bin/wine") >> Sys.setenv(WINEPATH="/Applications/Darwine/Wine.bundle/Contents/bin/winepath") >> schools.sim <- bugs (data=data, > inits=inits, > parameters.to.save=parameters, > model.file="schools.txt", > n.chains=3, > n.iter=1000, > bugs.directory="/Applications/WinBUGS14", > debug=FALSE) > > However, fitbugs() does not work. Since bugs() no longer needs WINE/WINEPATH/etc., > that should not be the issue. It seems like fitbugs does not know about bugs.directory!?! > Here's what it looks like: As stated before, fitbugs() is not part of R2WinBUGS and you are right that fitbugs() does not obey bugs.directory. I do not know what should be fixed. Gregor |
From: Gregor G. <gre...@bf...> - 2007-09-17 08:29:34
|
Hi Rodney. Sorry for late response. Rodney Sparapani wrote: > Gorjanc Gregor wrote: >>> DarWINE 0.9.43 and 0.9.44 have some problems as well. >>> >> Any meaningful error message? >> > Not really. And, it's very surprising. OpenBUGS had a pretty > good track record with DarWINE. v. 2.2.0 started working > with DarWINE 0.9.12 and worked for every version that I tried after > that. WinBUGS was far more tempermental. v. 1.4.3 > is the first that I have ever been able to run with DarWINE. Can not help here. But it is good to have some feedback on which versions are happy with each other. >>> Now, how do I install the latest trunk to do the same test? >>> I've downloaded it, but there does not appear to be a .tgz file. >>> >> Just build it. I guess mac side should not be much different from >> >> R CMD build R2WinBUGS >> > Ah, didn't think of that. I'll give it a try. But, it would > probably be easier to just include the .tgz in the repository. Tarball is available from CRAN for published packages. If we would provide tarball in the repository for each commit, the the size of SVN databse would probably blow up. I think that R CMD build is not that hard to do. > In any case, I was looking around in R2WinBUGS and I noticed that > fitbugs is not included. Is there any reason for this? I'd like to see > a version of fitbugs that returns the object and also allows WINE to be > used. The version of fitbugs that I found doesn't appear to have either > of these. But, maybe there is a later version somewhere? Here's the > one I've been looking at http://www.stat.columbia.edu/~kerman/td/fitbugs.R > Of course, I'm willing to work on this. But, I didn't want to > re-invent the wheel. fitbugs() was written by Jouni Kerman and Uwe has implemented part of it as write.model(). Maybe he can comment on why only writing a model from an R function was implemented. > Lastly, one thing that I forgot to mention. When I ran the > BUGS-L example, a new WinBUGS window opens, performs the > analysis, creates some graphics, and then closes, before you > have a chance to actually look at the graphics. The posterior/summary > is returned, but I'm wondering why the window closes. Is this supposed > to happen? Or is this a problem only on Mac? |
From: Uwe L. <li...@st...> - 2007-09-17 09:32:08
|
Gregor Gorjanc wrote: > Hi Rodney. > > Sorry for late response. > > Rodney Sparapani wrote: >> Gorjanc Gregor wrote: >>>> DarWINE 0.9.43 and 0.9.44 have some problems as well. >>>> >>> Any meaningful error message? >>> >> Not really. And, it's very surprising. OpenBUGS had a pretty >> good track record with DarWINE. v. 2.2.0 started working >> with DarWINE 0.9.12 and worked for every version that I tried after >> that. WinBUGS was far more tempermental. v. 1.4.3 >> is the first that I have ever been able to run with DarWINE. > > Can not help here. But it is good to have some feedback on which > versions are happy with each other. > >>>> Now, how do I install the latest trunk to do the same test? >>>> I've downloaded it, but there does not appear to be a .tgz file. >>>> >>> Just build it. I guess mac side should not be much different from >>> >>> R CMD build R2WinBUGS >>> >> Ah, didn't think of that. I'll give it a try. But, it would >> probably be easier to just include the .tgz in the repository. > > Tarball is available from CRAN for published packages. If we would > provide tarball in the repository for each commit, the the size of SVN > databse would probably blow up. I think that R CMD build is not that > hard to do. > >> In any case, I was looking around in R2WinBUGS and I noticed that >> fitbugs is not included. Is there any reason for this? I'd like to see >> a version of fitbugs that returns the object and also allows WINE to be >> used. The version of fitbugs that I found doesn't appear to have either >> of these. But, maybe there is a later version somewhere? Here's the >> one I've been looking at http://www.stat.columbia.edu/~kerman/td/fitbugs.R >> Of course, I'm willing to work on this. But, I didn't want to >> re-invent the wheel. > > fitbugs() was written by Jouni Kerman and Uwe has implemented part of it > as write.model(). Maybe he can comment on why only writing a model from > an R function was implemented. Easy: fitbugs() makes very though assumptions that the user is very careful with environments and data. It is extremely dangerous to use fitbugs() within other functions, because scoping issues will arise almost certainly. If you have variable (=node) names such as N, T, a and x in your BUGS model and in your R environmants (which is quite probable), then you will have conflicts. If you do want to circumvent this, just use the meta function BRugsFit(), which does it all in a clean way! So the way is to call a) write.model() and after that b) BRugsFit() and you have finished What we could do is: let BRugsFit() decide if model.file is a function and call write.model() automatically to write into a temporary model file in that case. Uwe >> Lastly, one thing that I forgot to mention. When I ran the >> BUGS-L example, a new WinBUGS window opens, performs the >> analysis, creates some graphics, and then closes, before you >> have a chance to actually look at the graphics. The posterior/summary >> is returned, but I'm wondering why the window closes. Is this supposed >> to happen? Or is this a problem only on Mac? > > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Bugs-r-devel mailing list > Bug...@li... > https://lists.sourceforge.net/lists/listinfo/bugs-r-devel |
From: Gregor G. <gre...@bf...> - 2007-09-17 09:31:38
|
Hi! Uwe Ligges wrote: ... >> fitbugs() was written by Jouni Kerman and Uwe has implemented part of it >> as write.model(). Maybe he can comment on why only writing a model from >> an R function was implemented. > > Easy: fitbugs() makes very though assumptions that the user is very ... > What we could do is: let BRugsFit() decide if model.file is a function > and call write.model() automatically to write into a temporary model > file in that case. Yes, that would be great. Will you please do that for BRugsFit() and bugs()? Thanks! Gregor |
From: Uwe L. <li...@st...> - 2007-09-17 09:20:44
|
Gregor Gorjanc wrote: > Hi! > > Uwe Ligges wrote: > ... >>> fitbugs() was written by Jouni Kerman and Uwe has implemented part of it >>> as write.model(). Maybe he can comment on why only writing a model from >>> an R function was implemented. >> >> Easy: fitbugs() makes very though assumptions that the user is very > ... >> What we could do is: let BRugsFit() decide if model.file is a function >> and call write.model() automatically to write into a temporary model >> file in that case. > > Yes, that would be great. Will you please do that for BRugsFit() and > bugs()? > Done. BTW: Any objections on this list regarding a BRugs release? I'd try to do it today or tomorrow. Uwe > Thanks! > > Gregor |
From: Gregor G. <gre...@bf...> - 2007-09-17 10:04:06
|
Uwe Ligges wrote: ... >> Yes, that would be great. Will you please do that for BRugsFit() and >> bugs()? >> > Done. > Great, thank you. That was really fast. > BTW: Any objections on this list regarding a BRugs release? I'd try to > do it today or tomorrow. None from my side, though I did not preform much testing. I will try the linux side, but I am swamped at the moment. Gregor |
From: Uwe L. <li...@st...> - 2007-09-17 10:12:28
|
Gregor Gorjanc wrote: > Uwe Ligges wrote: > ... >>> Yes, that would be great. Will you please do that for BRugsFit() and >>> bugs()? >>> >> Done. >> > > Great, thank you. That was really fast. > >> BTW: Any objections on this list regarding a BRugs release? I'd try to >> do it today or tomorrow. > > None from my side, though I did not preform much testing. I will try the > linux side, but I am swamped at the moment. Well, Linux side of BRugs still does not work for me, I still get BlackBox traps, even if Andrew thought it could work. Uwe > Gregor |
From: Anon. <bob...@he...> - 2007-09-17 10:32:22
|
Uwe Ligges wrote: > > Gregor Gorjanc wrote: >> Hi! >> >> Uwe Ligges wrote: >> ... >>>> fitbugs() was written by Jouni Kerman and Uwe has implemented part of it >>>> as write.model(). Maybe he can comment on why only writing a model from >>>> an R function was implemented. >>> Easy: fitbugs() makes very though assumptions that the user is very >> ... >>> What we could do is: let BRugsFit() decide if model.file is a function >>> and call write.model() automatically to write into a temporary model >>> file in that case. >> Yes, that would be great. Will you please do that for BRugsFit() and >> bugs()? >> > > > Done. > > > BTW: Any objections on this list regarding a BRugs release? I'd try to > do it today or tomorrow. > Andrew was talking about having another release of BUGS this week (Wednesday?). I think the main changes will be to making it work with Linux. Or at least making it not work in new ways. Anyway, I thought I'd let you know, in case you want to delay the release until this happens. Bob -- Bob O'Hara Dept. of Mathematics and Statistics P.O. Box 68 (Gustaf Hällströmin katu 2b) FIN-00014 University of Helsinki Finland Telephone: +358-9-191 51479 Mobile: +358 50 599 0540 Fax: +358-9-191 51400 WWW: http://www.RNI.Helsinki.FI/~boh/ Journal of Negative Results - EEB: http://www.jnr-eeb.org |
From: Uwe L. <li...@st...> - 2007-09-17 11:10:09
|
Anon. wrote: > Uwe Ligges wrote: >> >> Gregor Gorjanc wrote: >>> Hi! >>> >>> Uwe Ligges wrote: >>> ... >>>>> fitbugs() was written by Jouni Kerman and Uwe has implemented part >>>>> of it >>>>> as write.model(). Maybe he can comment on why only writing a model >>>>> from >>>>> an R function was implemented. >>>> Easy: fitbugs() makes very though assumptions that the user is very >>> ... >>>> What we could do is: let BRugsFit() decide if model.file is a function >>>> and call write.model() automatically to write into a temporary model >>>> file in that case. >>> Yes, that would be great. Will you please do that for BRugsFit() and >>> bugs()? >>> >> >> >> Done. >> >> >> BTW: Any objections on this list regarding a BRugs release? I'd try to >> do it today or tomorrow. >> > Andrew was talking about having another release of BUGS this week > (Wednesday?). I think the main changes will be to making it work with > Linux. Or at least making it not work in new ways. > > Anyway, I thought I'd let you know, in case you want to delay the > release until this happens. Good idea! I just got an e-mail by Andrew as well, so let's wait and see. Uwe |
From: Sparapani, R. <rsp...@mc...> - 2007-09-17 15:38:18
|
>> Sys.setenv(DISPLAY=3D":0.0") >> schools.sim <- bugs (data=3Ddata, > + inits=3Dinits, > + parameters.to.save=3Dparameters, > + model.file=3D"schools.txt", > + n.chains=3D3, > + n.iter=3D1000, > + bugs.directory=3D"/Applications/WinBUGS14", > + debug=3DFALSE) >=20 Doesn't work: sh: line 1: no: command not found sh: line 1: no: command not found sh: line 1: no: command not found sh: line 1: no: command not found sh: line 1: no: command not found sh: line 1: no: command not found sh: line 1: no: command not found sh: line 1: no: command not found sh: line 1: no: command not found sh: line 1: no: command not found Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, = na.strings, :=20 scan() expected 'a real', got 'WinBUGS' And you are correct. /Applications is the standard place to install GUI = applications such as R. Command-line only applications can be installed anywhere. Rodney |
From: Gregor G. <gre...@bf...> - 2007-09-18 09:19:01
|
Hi! Sparapani, Rodney wrote: >>> Sys.setenv(DISPLAY=":0.0") >>> schools.sim <- bugs (data=data, >> + inits=inits, >> + parameters.to.save=parameters, >> + model.file="schools.txt", >> + n.chains=3, >> + n.iter=1000, >> + bugs.directory="/Applications/WinBUGS14", >> + debug=FALSE) >> > Doesn't work: > > sh: line 1: no: command not found ... > Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : > scan() expected 'a real', got 'WinBUGS' WINE and WINEPATH arguments can be NULL and findUnixBinary() in R/wineutils tries to find corresponding binaries. Can you copy the following (slightly modified findUnixBinary()) into your R. I would like to know which command has not been found on mac, is it either which or locate. findUnixBinary <- function(x) { ## --- Environmental variable --- cat("env\n") tmp <- Sys.getenv(toupper(x)) if(nchar(tmp) != 0) return(tmp) ## else ## --- Standard place --- cat("/usr/bin\n") tmp <- paste("/usr/bin", x, sep="") if(file.exists(tmp)) return(tmp) ## else ... ## --- Which --- cat("which\n") tmp <- system(paste("which ", x, sep=""), intern=TRUE) if(length(tmp) != 0) return(tmp) ## else .. ## --- Locate --- cat("locate\n") tmp <- system(paste("locate ", x, " | grep bin/", x, "$", sep=""), intern=TRUE) tmp <- tmp[length(tmp)] ## keep only last hit if(length(tmp) > 0) return(tmp) stop(paste("couldn't find", x, "binary file")) } findUnixBinary(x="wine") findUnixBinary(x="winepath") > And you are correct. /Applications is the standard place to install GUI applications > such as R. Command-line only applications can be installed anywhere. How do you install WinBUGS on Mac? Do you choose /Aplications folder or ... I just want to be sure that /Applications is a safe default as C:\Program Files is on MS Windows. Additionally, how can we know if R is running on Mac? I guess that .Platform$OS.type has value "unix" as for Linux/Unix. -- Lep pozdrav / With regards, Gregor Gorjanc ---------------------------------------------------------------------- University of Ljubljana PhD student Biotechnical Faculty www: http://www.bfro.uni-lj.si/MR/ggorjan Zootechnical Department blog: http://ggorjan.blogspot.com Groblje 3 mail: gregor.gorjanc <at> bfro.uni-lj.si SI-1230 Domzale fax: +386 (0)1 72 17 888 Slovenia, Europe tel: +386 (0)1 72 17 861 ---------------------------------------------------------------------- |
From: Sparapani, R. <rsp...@mc...> - 2007-09-18 14:44:19
|
> findUnixBinary(x=3D"wine") env WINE=20 "/Applications/Darwine/Wine.bundle/Contents/bin/wine"=20 > findUnixBinary(x=3D"winepath") env WINEPATH=20 "/Applications/Darwine/Wine.bundle/Contents/bin/winepath"=20 > .Platform$OS.type [1] "unix" >=20 I'm just going to elaborate on /Applications... GUI (Cocoa/Carbon) apps must be in the /Applications tree or a bad = things happen=20 (an exception is made for /Developer, but most people don't use/know = about that). =20 For any other apps, like command-line tools or X11, Mac OS X doesn't = care where you put them and it doesn't matter. Command-line tools are generally in /usr/local = unless they come with a GUI app which means that they are in a bundle like = wine/winepath. So, there is no standard place for DarWINE, but most likely it will be found = in /Applications. That's the directory that has the correct permissions for installing = system-wide apps and where everything else is going to be put by habit. Similarly, when = you install WinBUGS it tries to place it on your C: drive. However, if you do that, = then no one else will be able to use it. So, you choose z:\Applications\WinBUGS14. Rodney -----Original Message----- From: Gregor Gorjanc [mailto:gre...@bf...] Sent: Tue 9/18/2007 6:18 AM To: Sparapani, Rodney Cc: bug...@li... Subject: MacOS and wine and bugs.directory arguments (was: Recent = changes) =20 Hi! Sparapani, Rodney wrote: >>> Sys.setenv(DISPLAY=3D":0.0") >>> schools.sim <- bugs (data=3Ddata, >> + inits=3Dinits, >> + parameters.to.save=3Dparameters, >> + model.file=3D"schools.txt", >> + n.chains=3D3, >> + n.iter=3D1000, >> + bugs.directory=3D"/Applications/WinBUGS14", >> + debug=3DFALSE) >> > Doesn't work: >=20 > sh: line 1: no: command not found ... > Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, = na.strings, : > scan() expected 'a real', got 'WinBUGS' WINE and WINEPATH arguments can be NULL and findUnixBinary() in=20 R/wineutils tries to find corresponding binaries. Can you copy the=20 following (slightly modified findUnixBinary()) into your R. I would like = to know which command has not been found on mac, is it either which or=20 locate. findUnixBinary <- function(x) { ## --- Environmental variable --- cat("env\n") tmp <- Sys.getenv(toupper(x)) if(nchar(tmp) !=3D 0) return(tmp) ## else ## --- Standard place --- cat("/usr/bin\n") tmp <- paste("/usr/bin", x, sep=3D"") if(file.exists(tmp)) return(tmp) ## else ... ## --- Which --- cat("which\n") tmp <- system(paste("which ", x, sep=3D""), intern=3DTRUE) if(length(tmp) !=3D 0) return(tmp) ## else .. ## --- Locate --- cat("locate\n") tmp <- system(paste("locate ", x, " | grep bin/", x, "$", sep=3D""),=20 intern=3DTRUE) tmp <- tmp[length(tmp)] ## keep only last hit if(length(tmp) > 0) return(tmp) stop(paste("couldn't find", x, "binary file")) } findUnixBinary(x=3D"wine") findUnixBinary(x=3D"winepath") > And you are correct. /Applications is the standard place to install = GUI applications > such as R. Command-line only applications can be installed anywhere. How do you install WinBUGS on Mac? Do you choose /Aplications folder or = ... I just want to be sure that /Applications is a safe default as=20 C:\Program Files is on MS Windows. Additionally, how can we know if R is running on Mac? I guess that .Platform$OS.type has value "unix" as for Linux/Unix. --=20 Lep pozdrav / With regards, Gregor Gorjanc ---------------------------------------------------------------------- University of Ljubljana PhD student Biotechnical Faculty www: http://www.bfro.uni-lj.si/MR/ggorjan Zootechnical Department blog: http://ggorjan.blogspot.com Groblje 3 mail: gregor.gorjanc <at> bfro.uni-lj.si SI-1230 Domzale fax: +386 (0)1 72 17 888 Slovenia, Europe tel: +386 (0)1 72 17 861 ---------------------------------------------------------------------- |
From: Gregor G. <gre...@bf...> - 2007-09-19 13:38:13
|
Sparapani, Rodney wrote: >> findUnixBinary(x="wine") > env > WINE > "/Applications/Darwine/Wine.bundle/Contents/bin/wine" >> findUnixBinary(x="winepath") > env > WINEPATH > "/Applications/Darwine/Wine.bundle/Contents/bin/winepath" >> .Platform$OS.type > [1] "unix" > That is weird. When you used Sys.setenv(WINE=...) Sys.setenv(WINEPATH=...) Sys.setenv(DISPLAY=":0.0") schools.sim <- bugs (data=data, ... it worked, when you used Sys.setenv(DISPLAY=":0.0") schools.sim <- bugs (data=data, ... you got an error something like "sh: line 1: no: command not found", but findUnixBinary(x="wine") and findUnixBinary(x="winepath") works. This can not be the case, as findUnixBinary is used when WINE/WINEPATH is NULL. Are you sure your reports are OK? Do you have WINE and WINEPATH variables set by default? -- Lep pozdrav / With regards, Gregor Gorjanc ---------------------------------------------------------------------- University of Ljubljana PhD student Biotechnical Faculty www: http://www.bfro.uni-lj.si/MR/ggorjan Zootechnical Department blog: http://ggorjan.blogspot.com Groblje 3 mail: gregor.gorjanc <at> bfro.uni-lj.si SI-1230 Domzale fax: +386 (0)1 72 17 888 Slovenia, Europe tel: +386 (0)1 72 17 861 ---------------------------------------------------------------------- |
From: Gorjanc G. <Gre...@bf...> - 2007-09-19 13:41:11
|
> I'm just going to elaborate on /Applications... > > GUI (Cocoa/Carbon) apps must be in the /Applications tree or a bad things= happen > (an exception is made for /Developer, but most people don't use/know abou= t that). > For any other apps, like command-line tools or X11, Mac OS X doesn't care= where you put them > and it doesn't matter. Command-line tools are generally in /usr/local un= less they > come with a GUI app which means that they are in a bundle like wine/winep= ath. So, > there is no standard place for DarWINE, but most likely it will be found = in /Applications. > That's the directory that has the correct permissions for installing syst= em-wide apps > and where everything else is going to be put by habit. Similarly, when y= ou install > WinBUGS it tries to place it on your C: drive. However, if you do that, = then no one > else will be able to use it. So, you choose z:\Applications\WinBUGS14. OK. Btw, is it /Applications or z:\Applications\? Now I need to figure out how to know if R is running on a Mac. Will try on = R-devel. Gregor |
From: Sparapani, R. <rsp...@mc...> - 2007-09-20 00:17:20
|
One more time ... env /usr/bin which [1] "no wine in /usr/bin /bin /usr/sbin /sbin /usr/local/bin" > findUnixBinary(x=3D"winepath") env /usr/bin which [1] "no winepath in /usr/bin /bin /usr/sbin /sbin /usr/local/bin" I guess that's where it's barfing. It's getting "no" as the command = name. -----Original Message----- From: Gregor Gorjanc [mailto:gre...@bf...] Sent: Wed 9/19/2007 10:38 AM To: Sparapani, Rodney Cc: bug...@li... Subject: Re: MacOS and wine and bugs.directory arguments =20 Sparapani, Rodney wrote: >> findUnixBinary(x=3D"wine") > env > WINE > "/Applications/Darwine/Wine.bundle/Contents/bin/wine" >> findUnixBinary(x=3D"winepath") > env > WINEPATH > "/Applications/Darwine/Wine.bundle/Contents/bin/winepath" >> .Platform$OS.type > [1] "unix" >=20 That is weird. When you used Sys.setenv(WINE=3D...) Sys.setenv(WINEPATH=3D...) Sys.setenv(DISPLAY=3D":0.0") schools.sim <- bugs (data=3Ddata, ... it worked, when you used Sys.setenv(DISPLAY=3D":0.0") schools.sim <- bugs (data=3Ddata, ... you got an error something like "sh: line 1: no: command not found", but findUnixBinary(x=3D"wine") and findUnixBinary(x=3D"winepath") works. = This=20 can not be the case, as findUnixBinary is used when WINE/WINEPATH is=20 NULL. Are you sure your reports are OK? Do you have WINE and WINEPATH=20 variables set by default? --=20 Lep pozdrav / With regards, Gregor Gorjanc ---------------------------------------------------------------------- University of Ljubljana PhD student Biotechnical Faculty www: http://www.bfro.uni-lj.si/MR/ggorjan Zootechnical Department blog: http://ggorjan.blogspot.com Groblje 3 mail: gregor.gorjanc <at> bfro.uni-lj.si SI-1230 Domzale fax: +386 (0)1 72 17 888 Slovenia, Europe tel: +386 (0)1 72 17 861 ---------------------------------------------------------------------- |
From: Rodney S. <rsp...@mc...> - 2008-09-09 17:58:41
|
Hi Gang: Recent versions of WINE (1.1.3 and 1.1.4) actually work on Solaris 10 and OpenSolaris. And, R2WinBUGS works as well with WinBUGS. However, there seem to be 2 bugs. 1. The working.directory is assumed to be the same directory as the model.file and setting working.directory to something else doesn't help. 2. Attempting to use OpenBUGS fails due to a requirement for the BRugs package. However, no such package exists on CRAN. There is the rbugs package. But, loading that package doesn't help. The same error message is displayed. What/where is the BRugs package? It will be exciting to see R2WinBUGS running on the Solaris platform after these are fixed! Our students are just starting a year-long course in Bayesian indoctrination and they will benefit immensely from your efforts. -- Rodney Sparapani Center for Patient Care & Outcomes Research (PCOR) Sr. Biostatistician Department of Medicine Was 'Name That Tune' rigged? Medical College of Wisconsin (MCW) WWLD: What Would Lombardi Do Milwaukee, WI, USA |
From: Uwe L. <li...@st...> - 2008-09-09 18:02:31
|
Rodney Sparapani wrote: > Hi Gang: > > Recent versions of WINE (1.1.3 and 1.1.4) actually work on Solaris 10 > and OpenSolaris. And, R2WinBUGS works as well with WinBUGS. However, > there seem to be 2 bugs. > > 1. The working.directory is assumed to be the same directory as the > model.file and setting working.directory to something else doesn't help. Working directory and model.file can be in separate directories, you can you tell me an example where it does not work. > 2. Attempting to use OpenBUGS fails due to a requirement for the BRugs > package. However, no such package exists on CRAN. There is the rbugs > package. But, loading that package doesn't help. The same error message > is displayed. What/where is the BRugs package? BRugs is avaibale from CRANextras hosted by Brian Ripley. A Windows version of R will install BRugs from there automatically if you say install.packages("BRugs") The package won't run under Solaris (there is no toolchain to compile ComponentPascal under Solaris, as far as IO know). Best wishes, Uwe Ligges > It will be exciting to see R2WinBUGS running on the Solaris platform after > these are fixed! Our students are just starting a year-long course in > Bayesian indoctrination and they will benefit immensely from your efforts. > |
From: Rodney S. <rsp...@mc...> - 2008-09-09 18:07:11
|
Uwe Ligges wrote: > > > Rodney Sparapani wrote: >> Hi Gang: >> >> Recent versions of WINE (1.1.3 and 1.1.4) actually work on Solaris 10 >> and OpenSolaris. And, R2WinBUGS works as well with WinBUGS. However, >> there seem to be 2 bugs. >> 1. The working.directory is assumed to be the same directory as the >> model.file and setting working.directory to something else doesn't help. > > > Working directory and model.file can be in separate directories, you > can you tell me an example where it does not work. > Doesn't work. See below: > schools.sim <- bugs (data, inits, parameters, "/usr/local/doc/r2winbugs/schools.bug", + n.chains=3, n.iter=1000, working.directory=".") Warning message: In file.create(to[okay]) : cannot create file '/usr/local/doc/r2winbugs/schools.txt', reason 'Permission denied' -- Rodney Sparapani Center for Patient Care & Outcomes Research (PCOR) Sr. Biostatistician Department of Medicine Was 'Name That Tune' rigged? Medical College of Wisconsin (MCW) WWLD: What Would Lombardi Do Milwaukee, WI, USA |