Re: [Rd] segfault after .C call.
Have you ever tried to use .Call instead of .C? my segfault-problem was solved by using .Call but I am just a beginner and can not explain why this is Alex -- View this message in context: http://r.789695.n4.nabble.com/segfault-after-C-call-tp3872557p3881461.html Sent from the R devel mailing list archive at Nabble.com. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] scan after seek in text files (PR#12640)
Full_Name: Dr. Alex Sheppard Version: 2.7.1 OS: Linux Debian Lenny Submission from: (NULL) (79.73.224.62) After scanning from an open (text) connection, then seeking, then scanning again, the second scan returns incorrect result. It looks like the first byte scanned was from the pre-seek file position, then it continues to read from the post-seek file position. To reproduce: #Put 3x3 matrix in a file > write.matrix(t(matrix(1:9,nrow=3)),file="TEST.txt",sep="\t") #Open file as text > fd <- file("TEST.txt",open="rt") #scan a couple of fields - this looks fine so far > scan(file=fd,what=double(),n=2) Read 2 items [1] 1 2 #seek back to start of file > seek(con=fd,where=0,origin="start") [1] 5 #scan fields again - this doesn't work properly > scan(file=fd,what=double(),n=2) Read 2 items [1] 31 2 This happens when either n or nmax arguments are used to control number of fields read. Problem does not occur when using nlines argument instead. The seek appears to work ok, as doing readChar(fd,n=1) after the seek operation correctly returns "1". Also, if the file is opened as binary, i.e. fd=file("TEST.txt",open="rb") , all works fine. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] tcltk resizing when using tkgrid for layout
I've been able to figure out on my own how to do what I need in the largely undocumented tcltk package, but I've finally hit a wall. I can't even think of any sufficiently specific search terms to use for this. I'm trying to make the widgets in my tk window resize when the window is resized by clicking and dragging on its corners or edges. Instead they stay exactly where they are, and parts of them get cut off when the window is made smaller and reveal large empty spaces when the windows is made bigger. Looks terrible. I've tried doing tkconfig(mywidget,sticky='news') and all that does is stretch the widget out to the original window dimensions, but this doesn't help at all when the window is resized. From reading the TclTK documentation, it seems like the 'rowconfigure' and 'columnconfigure' methods of the grid are supposed to solve this problem by setting the 'weight' grid option. There exists a tkgrid.rowconfigure() command and the following invocation did not produce any errors... tkgrid.rowconfigure(mywidget,0,weight=1) ...but it didn't make the widget dynamically resize with the parent window either. Either I'm invoking it incorrectly, or it doesn't actually do what I think it does. Rather than posting my lengthy and complicated code, I'll post this example instead from bioinf.wehi.edu.au/~wettenhall/RTclTkExamples/ (a very helpful site without which I would never have been able to use the tcltk package at all). require(tcltk) tt<- tktoplevel() xscr<- tkscrollbar(tt, repeatinterval=5,orient="horizontal", command=function(...)tkxview(txt,...)) yscr<- tkscrollbar(tt, repeatinterval=5, command=function(...)tkyview(txt,...)) txt<- tktext(tt,bg="white",font="courier", xscrollcommand=function(...)tkset(xscr,...),yscrollcommand=function(...)tkset(yscr,...), wrap="none") tkgrid(txt,yscr) tkgrid(xscr) tkgrid.configure(yscr,sticky="ns") tkgrid.configure(xscr,sticky="ew") for (i in (1:100)) tkinsert(txt,"end",paste(i,"^ 2 =",i*i,", ")) tkconfigure(txt, state="disabled") tkfocus(txt) This creates a scrollable text window, and it suffers from exactly the problem I described above. My question is: what needs to be changed in order to make the tktext widget and its scrollbars automatically resize with the parent window? Thank you. [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] tcltk resizing when using tkgrid for layout
On 07/21/2010 09:36 AM, Alex Bokov wrote: > I've been able to figure out on my own how to do what I need in the > largely undocumented tcltk package, but I've finally hit a wall. I > can't even think of any sufficiently specific search terms to use for > this. Oops. Murphy's Law-- the answer only comes to you after you already send off an email to the experts. Sorry to bother you, I figured it out already. Here's how to make the code example I posted earlier... > require(tcltk) > tt<- tktoplevel() > xscr<- tkscrollbar(tt, repeatinterval=5,orient="horizontal", > command=function(...)tkxview(txt,...)) > yscr<- tkscrollbar(tt, repeatinterval=5, > command=function(...)tkyview(txt,...)) > txt<- tktext(tt,bg="white",font="courier", > > xscrollcommand=function(...)tkset(xscr,...),yscrollcommand=function(...)tkset(yscr,...), > wrap="none") > tkgrid(txt,yscr) > tkgrid(xscr) > tkgrid.configure(yscr,sticky="ns") > tkgrid.configure(xscr,sticky="ew") > for (i in (1:100)) tkinsert(txt,"end",paste(i,"^ 2 =",i*i,", ")) > tkconfigure(txt, state="disabled") > tkfocus(txt) > ...resize dynamically. All I had to do was add the following lines to the end of it: tkgrid.columnconfigure(tt,0,weight=1) tkgrid.rowconfigure(tt,0,weight=1) tkgrid.rowconfigure(txt,0,weight=1) tkgrid.columnconfigure(txt,0,weight=1) tkgrid.configure(txt,sticky='nswe') I had been so close before, I just didn't realize that if you have a complicated frame structure enclosing the widget, then the weight needs to be set on every enclosing frame, not just the widget itself. The hard part is figuring out which row and column a column-spanning widget really belongs to-- so far it seems to belong to the left-most and top-most one. Anyway, thanks to anybody who was going to answer this, hopefully I'm sending this soon enough to save you the effort of composing a reply. Have a great day! [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] RStudio Calling C++ Visual Studio DLL
All, I'm a newbie to R and I am interested in seeing a simple example of calling a 3rd party Visual Studio generated DLL from RStudio. Does anyone have a simple example which also walks through the preliminary steps of setting up the INCLUDE path and the library path to either a DLL or LIB file ? I have tried to find an easy example, but thus far had no luck finding an example using Rcpp to communicate to a 3rd party visual studio DLL. Many Thanks in Advance, Alex [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] do_fileinfo / file.info test for file IS directory during package load pointlessly stresses NIS by getting username / group info
*Summary: * During package loading the library function calls file.info to determine if a file is a directory. This uselessly invokes getpwuid and getgrgid which can be expensive if the user/group database are held on a network. Note that file_test ALSO uses file.info for the same purpose Suggest rebuilding file_test to use stat based call for directory search, and using file_test in function library. Note that functions like R_unlink uses stat calls to determine if something is a directory. -Alex Brown *Detail:* While developing an application using Shiny my (large fortune500) company started to have network issues and NIS performance issues in particular. Shiny will relatively frequently restart R, which entails loading a small handful of packages. I noticed that R startup time went down the drain, and my shiny server started failing with timeouts in other parts of the server (apache mod_proxy and shinys node components have 60s timeouts) I narrowed this down to long latency calls on NIS due to calls to libcs getpwent and getgrgid; always to the same user but why? *Strace:* bind(5, {sa_family=AF_INET, sin_port=htons(994), sin_addr=inet_addr("0.0.0.0")}, 16) = -1 EACCES (Permission denied) setsockopt(5, SOL_IP, IP_RECVERR, [1], 4) = 0 close(4)= 0 sendto(5, "_*n\230\0\0\0\0\0\0\0\2\0\1\206\244\0\0\0\2\0\0\0\3\0\0\0\0\0\0\0\0"..., 76, 0, {sa_family=AF_INET, sin_port=htons(776), sin_addr=inet_addr("10.3.147.16")}, 16) = 76 poll([{fd=5, events=POLLIN}], 1, 5000) = 1 ([{fd=5, revents=POLLIN}]) *gdb (break on bind)* #0 0x76ee3c00 in bind () from /lib64/libc.so.6 #1 0x76f069b3 in bindresvport () from /lib64/libc.so.6 #2 0x76f08a0f in __libc_clntudp_bufcreate_internal () from /lib64/libc.so.6 #3 0x758ddd37 in yp_bind_client_create () from /lib64/libnsl.so.1 #4 0x758dde06 in yp_bind_file () from /lib64/libnsl.so.1 #5 0x758de043 in __yp_bind () from /lib64/libnsl.so.1 #6 0x758de47c in do_ypcall () from /lib64/libnsl.so.1 #7 0x758de569 in do_ypcall_tr () from /lib64/libnsl.so.1 #8 0x758df0a2 in yp_match () from /lib64/libnsl.so.1 #9 0x75af5f79 in _nss_nis_getpwuid_r () from /lib64/libnss_nis.so.2 #10 0x76eb040c in getpwuid_r@@GLIBC_2.2.5 () from /lib64/libc.so.6 #11 0x76eafc6f in getpwuid () from /lib64/libc.so.6 #12 0x77905262 in do_fileinfo (call=, op=, args=, rho=) at platform.c:946 #13 0x77894f62 in bcEval (body=, rho=, useCache=) at eval.c: *R: trace(file.info,browser) where* where 7: file.info(lib.loc)$isdir %in% TRUE where 8: library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, warn.conflicts = warn.conflicts, quietly = quietly) *R: library* lib.loc <- lib.loc[file.info(lib.loc)$isdir %in% TRUE] if (!character.only) -Alex Brown [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] R & Java
I think you are looking for something like RServe. http://rosuda.org/Rserve/. It sets up R as a server which you talk to via TCP/IP. It has client APIs for Java and a number of other languages. Alex On Thu, May 14, 2009 at 10:39 AM, Philippe Lamote wrote: > Hey guys, > > I'm a (Java) integration architect. > We are currently stuck with SAS but I'd be happy to switch that to R! (of > course ;-). > Now, a big argument for the latter, is that we can integrate it seamlessly > with all our existing (java) apps. > Therefore: has anyone heard of a java API (like SAS has it's Java API for > enterprise integration) or a Service we can call (e.g. a web service, a http > invoker service , ...), ... ? > > The ideal solution -to my view- would be to integrate it with ESB > functionality (e.g. Mule: http://www.mulesource.org/display/COMMUNITY/Home). > It allows you to stitch/knit/... together what/how/where you want. > > Has anyone ever done such a thing? > Thx for advice, > > Regards, > Philippe > > __ > > Philippe Lamote > Technology Lead @TSSC - Johnson & Johnson Pharmaceutical R&D > > > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Recommendations for a quick UI.
Hi. This is my first post to this list, I seem to be graduating to from the r-help list. :-) I'm trying to wrap my R package in a GUI such that when the user launches the app, they see my GUI window and never interact with the R console at all. I don't have any fancy requirements for the GUI itself-- all it needs to do is collect input from the user and pass the input as arguments to an R function, which writes the results to a file. I read the R Extensions Manual section about GUIs, and it seems like overkill to write the thing in a compiled language and link against R as a library when there are dozens of different interpreted cross-platform GUI toolkits out there. Does anybody know of any functioning examples of packages (or other add-ons) with GUIs that run R silently in the background which I can study? Do they use the "R CMD BATCH" mechanism, or something else? Thanks. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] How to create a permanent dataset in R.
Say your dataset is stored in variable "dat". Type: > save(dat, file="mydatfile.RData") Next time you start the session, call: load("mydatfile.RData") And you can reload your dataset. Is this what you meant? HTH, Alex On Fri, Jul 24, 2009 at 2:11 AM, Albert EINstEIN wrote: > > > Hi everybody, > > Actually, we know that If we create a dataset in R ,after closing the > session the dataset automatically is closed. I tried for creating dataset > permanently in R.I am facing the problem of creating permanent dataset. > can we create dataset permanently If possible? > Could somebody help me out in this aspect,plz? Any help would be > appreciated. > > Thanks in advance. > -- > View this message in context: > http://www.nabble.com/How-to-create-a-permanent-dataset-in-R.-tp24639146p24639146.html > Sent from the R devel mailing list archive at Nabble.com. > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] How to create a permanent dataset in R.
Please see http://cran.r-project.org/doc/manuals/R-exts.html. On Mon, Jul 27, 2009 at 1:50 AM, Albert EINstEIN wrote: > > Hi, > Thanks for your valuable reply. > can you provide me some more information regarding . Here we are reloading > the data when we start the R, In R there are some default packages with > datasets can we create a dataset permanently in any packages so that we can > get the dataset without reloading,like creating dataset in a permanent > library in SAS . > > can we create our own packages in R. It would be very helpful for us, if > you provide any information regarding this. > > Thanks for your reply in advance > -- > View this message in context: > http://www.nabble.com/How-to-create-a-permanent-dataset-in-R.-tp24639146p24673895.html > Sent from the R devel mailing list archive at Nabble.com. > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] lm combined with splines
Hello, In the following I tried 3 versions of an example in R help. Only the two first predict command work. After : library(splines) require(stats) 1) fm1 <- lm(weight ~ bs(height, df = 5), data = women) ht1 <- seq(57, 73, len = 200) ph1 <- predict(fm1, data.frame(height=ht1)) # OK plot(women, xlab = "Height (in)", ylab = "Weight (lb)") lines(ht1, ph1) 2) height <- women$height# 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 weight <- women$weight# 115 117 120 123 126 129 132 135 139 142 146 150 154 159 164 fm2 <- lm(weight ~ bs(height, df = 5)) ht2 <- seq(57, 73, len = 200) ph2 <- predict(fm2, data.frame(height=ht2)) # OK plot(women, xlab = "Height (in)", ylab = "Weight (lb)") lines(ht2,ph2) 3) height <- women$height# 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 weight <- women$weight# 115 117 120 123 126 129 132 135 139 142 146 150 154 159 164 fb3 <- bs(height, df = 5) fm3 <- lm(weight ~ fb3) ht3 <- seq(57, 73, len = 200) ph3 <- predict(fm3, data.frame(height=ht3)) # Error message about newdata. Why ? plot(women, xlab = "Height (in)", ylab = "Weight (lb)") lines(ht3,ph3) # no line Thanks for the reason of this message. Alex Randria [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] ICONV error installing R-2.10.1 on HP-UX B.11.23 U ia64
Hi, I have the following error during the ./configure phase checking iconv.h usability... yes checking iconv.h presence... yes checking for iconv.h... yes checking for iconv... in libiconv checking whether iconv accepts "UTF-8", "latin1" and "UCS-*"... no configure: error: a suitable iconv is essential I have installed GNU libiconv-1.13.1 without success. I have also installed gettext-0.17 per iconv installation instructions. Still no success and I feel I currently heading down the wrong path. Can anyone help? Thanks, Alex //**** // Alex Bryant // Software Developer // Integrated Clinical Systems, Inc. // 908-996-7208 Confidentiality Note: This e-mail, and any attachment to...{{dropped:13}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R 2.10.0 or R 2.10.1 installation fails on HP-UX B.11.23 U ia64
Hi Folks, I can find any hits anywhere for the following compilation error: eigen.f external subroutine BALANC external subroutine BALBAK external subroutine CBABK2 external subroutine CBAL external subroutine CDIV external subroutine COMQR external subroutine COMQR2 external subroutine CORTH external subroutine CSROOT external subroutine ELMHES external subroutine ELTRAN external function EPSLON external subroutine HQR external subroutine HQR2 external subroutine HTRIBK external subroutine HTRIDI external function PYTHAG external subroutine TQL1 external subroutine TQL2 external subroutine TQLRAT external subroutine TRED1 external subroutine TRED2 external subroutine RG external subroutine RS external subroutine CG external subroutine CH 3502 Lines Compiled Make: Don't know how to make #. Stop. *** Error exit code 1 Stop. *** Error exit code 1 Stop. *** Error exit code 1 Stop. Has anyone seen this make error before? Make: Don't know how to make #. Stop. Thanks for any thoughts. //**** // Alex Bryant // Software Developer // Integrated Clinical Systems, Inc. // 908-996-7208 Confidentiality Note: This e-mail, and any attachment to...{{dropped:13}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] unable to compile Recommended packages
Hi folks, I'm having a problem with installing R on Solaris. Has anyone seen a similar issue? I don't find any hits on the search engines. Thanks. Environment: SunOS 5.10 Generic_118822-25 sun4u sparc SUNW,Sun-Fire-280R During the installation/compilation of R-2.10.1 I get the following error: begin installing recommended package boot ERROR: cannot extract package from 'boot.tgz' *** Error code 1 The following command caused the error: MAKE="make" R_LIBS= ../../../bin/R CMD INSTALL --no-lock -l "../../../library" boot.tgz > boot.ts.out 2>&1 || (cat boot.ts.out && exit 1) make: Fatal error: Command failed for target `boot.ts' Current working directory /home/ireview/R-2.10.1/src/library/Recommended *** Error code 1 The following command caused the error: make stamp-recommended make: Fatal error: Command failed for target `recommended-packages' Current working directory /home/ireview/R-2.10.1/src/library/Recommended *** Error code 1 The following command caused the error: (cd src/library/Recommended && make) make: Fatal error: Command failed for target `stamp-recommended' -Alex // // Alex Bryant // Software Developer // Integrated Clinical Systems, Inc. // 908-996-7208 Confidentiality Note: This e-mail, and any attachment to...{{dropped:13}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] unable to compile Recommended packages
Thank you for your responses. It turns out the problem was my version of 'tar' on solaris. I downloaded the latest Gnu tar and the install completed successfully. Who would of know ;) Thanks again, Alex -Original Message- From: dmba...@gmail.com [mailto:dmba...@gmail.com] On Behalf Of Douglas Bates Sent: Tuesday, March 09, 2010 1:48 PM To: Alex Bryant Cc: r-devel@r-project.org Subject: Re: [Rd] unable to compile Recommended packages Did you run $RHOME/src/tools/rsync-recommended to obtain the most recent versions of the recommended packages before trying to compile them? On Fri, Mar 5, 2010 at 3:01 PM, Alex Bryant wrote: > Hi folks, I'm having a problem with installing R on Solaris. Has anyone > seen a similar issue? I don't find any hits on the search engines. Thanks. > > > Environment: > SunOS 5.10 Generic_118822-25 sun4u sparc SUNW,Sun-Fire-280R > > During the installation/compilation of R-2.10.1 I get the following error: > > begin installing recommended package boot > ERROR: cannot extract package from 'boot.tgz' > *** Error code 1 > The following command caused the error: > MAKE="make" R_LIBS= ../../../bin/R CMD INSTALL --no-lock -l > "../../../library" boot.tgz > boot.ts.out 2>&1 || (cat boot.ts.out && exit 1) > make: Fatal error: Command failed for target `boot.ts' > Current working directory /home/ireview/R-2.10.1/src/library/Recommended > *** Error code 1 > The following command caused the error: > make stamp-recommended > make: Fatal error: Command failed for target `recommended-packages' > Current working directory /home/ireview/R-2.10.1/src/library/Recommended > *** Error code 1 > The following command caused the error: > (cd src/library/Recommended && make) > make: Fatal error: Command failed for target `stamp-recommended' > > > -Alex > > > // > // Alex Bryant > // Software Developer > // Integrated Clinical Systems, Inc. > // 908-996-7208 > > > > Confidentiality Note: This e-mail, and any attachment to...{{dropped:13}} > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Problems compiling a simple source package on MacOS X
Hello. I wrote a package (that contains C source) that I've been compiling and running on both Linux and Windows for about a year. However, that same source package fails to compile on MacOS (10.4.11, PowerPC G4, Xcode installed, gcc version 4.0.1, make version 3.80, ld version cctools-590.23.2.obj~17). There is nothing platform-specific in the code-- just numerical functions that I wrote in C so they would run faster. It's been a while since I hacked Macs... perhaps there is some preliminary step I'm overlooking that's so obvious to Mac R developers that nobody even bothers to mention it? I would greatly appreciate any suggestions on where I should look in order to troubleshoot this problem. Thank you kindly. PS: I get the following message when trying to compile either via R CMD INSTALL or via the "Packages & Data" menu within the R console: * installing to library '/Users/barshop_lab/Library/R/2.10/library' * installing *source* package 'Survomatic' ... ** libs ** arch - i386 gcc -arch i386 -std=gnu99 -I/Library/Frameworks/R.framework/Resources/include -I/Library/Frameworks/R.framework/Resources/include/i386 -I/usr/local/include-fPIC -g -O2 -c haz.c -o haz.o gcc -arch i386 -std=gnu99 -dynamiclib -Wl,-headerpad_max_install_names -mmacosx-version-min=10.4 -undefined dynamic_lookup -single_module -multiply_defined suppress -L/usr/local/lib -o Survomatic.so haz.o -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation ld: /Library/Frameworks/R.framework/../R.framework/R load command 17 unknown cmd field /usr/bin/libtool: internal link edit command failed make: *** [Survomatic.so] Error 1 ERROR: compilation failed for package 'Survomatic' * removing '/Users/barshop_lab/Library/R/2.10/library/Survomatic' * restoring previous '/Users/barshop_lab/Library/R/2.10/library/Survomatic' __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Problems compiling a simple source package on MacOS X
Simon Urbanek wrote: In addition, please consider looking at R-SIG-Mac where Mac-related discussion takes place and this has been discussed before (stuffing the error in google gives exactly the relevant hit on the list...) Thank you, that was helpful. I'll try upgrading to Xcode 2.5. Very sorry to have bothered the list with a Google-able problem. I did try Googling first, but I was using "/usr/bin/libtool: internal link edit command failed" as the search term rather than the ld error above it. When I did the latter, I immediately found the post you referred to. I'll see if this fixes the problem. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] Build R static
Hi, I am having trouble building R static on Solaris 5.10. I have a requirement to run R within a specific user account on Solaris 5.10 and I do not have access to compilers and or shared libraries on the target machine. I thought I could build R static ( I've build it locally on Solaris with shared libraries) and just ftp the build to the target Solaris box. Can any help with what ./configure & Make flags need to be set for this, assuming it is possible? Here is what my currently built ./bin/exec/R executable is using. $ ldd R libRblas.so => (file not found) libg2c.so.0 => /usr/local/lib/libg2c.so.0 libm.so.2 => /usr/lib/libm.so.2 libreadline.so.6 => /usr/local/lib/libreadline.so.6 libcurses.so.1 =>/usr/lib/libcurses.so.1 libnsl.so.1 => /usr/lib/libnsl.so.1 libsocket.so.1 =>/usr/lib/libsocket.so.1 libdl.so.1 =>/usr/lib/libdl.so.1 libiconv.so.2 => /usr/local/lib/libiconv.so.2 libicuuc.so.3 => /usr/lib/libicuuc.so.3 libicui18n.so.3 => /usr/lib/libicui18n.so.3 libc.so.1 => /usr/lib/libc.so.1 libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 libmp.so.2 =>/usr/lib/libmp.so.2 libmd5.so.1 => /usr/lib/libmd5.so.1 libscf.so.1 => /usr/lib/libscf.so.1 libicudata.so.3 => /usr/lib/libicudata.so.3 libpthread.so.1 => /usr/lib/libpthread.so.1 libCrun.so.1 => /usr/lib/libCrun.so.1 libdoor.so.1 => /usr/lib/libdoor.so.1 libuutil.so.1 => /usr/lib/libuutil.so.1 /platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1 /platform/SUNW,Sun-Fire-280R/lib/libmd5_psr.so.1 Thanks for your help, Alex // // Alex Bryant // Software Developer // Integrated Clinical Systems, Inc. // 908-996-7208 Confidentiality Note: This e-mail, and any attachment to...{{dropped:13}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Build R static
Does anyone know if it's possible to create a static build of R? Thanks, From: Alex Bryant Sent: Monday, May 10, 2010 2:50 PM To: 'r-devel@r-project.org' Subject: Build R static Hi, I am having trouble building R static on Solaris 5.10. I have a requirement to run R within a specific user account on Solaris 5.10 and I do not have access to compilers and or shared libraries on the target machine. I thought I could build R static ( I've build it locally on Solaris with shared libraries) and just ftp the build to the target Solaris box. Can any help with what ./configure & Make flags need to be set for this, assuming it is possible? Here is what my currently built ./bin/exec/R executable is using. $ ldd R libRblas.so => (file not found) libg2c.so.0 => /usr/local/lib/libg2c.so.0 libm.so.2 => /usr/lib/libm.so.2 libreadline.so.6 => /usr/local/lib/libreadline.so.6 libcurses.so.1 =>/usr/lib/libcurses.so.1 libnsl.so.1 => /usr/lib/libnsl.so.1 libsocket.so.1 =>/usr/lib/libsocket.so.1 libdl.so.1 =>/usr/lib/libdl.so.1 libiconv.so.2 => /usr/local/lib/libiconv.so.2 libicuuc.so.3 => /usr/lib/libicuuc.so.3 libicui18n.so.3 => /usr/lib/libicui18n.so.3 libc.so.1 => /usr/lib/libc.so.1 libgcc_s.so.1 => /usr/local/lib/libgcc_s.so.1 libmp.so.2 =>/usr/lib/libmp.so.2 libmd5.so.1 => /usr/lib/libmd5.so.1 libscf.so.1 => /usr/lib/libscf.so.1 libicudata.so.3 => /usr/lib/libicudata.so.3 libpthread.so.1 => /usr/lib/libpthread.so.1 libCrun.so.1 => /usr/lib/libCrun.so.1 libdoor.so.1 => /usr/lib/libdoor.so.1 libuutil.so.1 => /usr/lib/libuutil.so.1 /platform/SUNW,Sun-Fire-280R/lib/libc_psr.so.1 /platform/SUNW,Sun-Fire-280R/lib/libmd5_psr.so.1 Thanks for your help, Alex // // Alex Bryant // Software Developer // Integrated Clinical Systems, Inc. // 908-996-7208 Confidentiality Note: This e-mail, and any attachment to...{{dropped:13}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] mk5check crashed on Windows
Hi, When I was trying to use md5check.exe in R on Windows, I found that it is actually crashed for R-2.7.2 and R-2.6.2 (R-2.5.1 seems to be ok). As I looked into the code (src/gnuwin32/front-ends/md5check.c), I think that there might be several bugs in the code: (1) A "segmentation fault" occurred in read_unist_file("unins000.dat"). I guess that the file pointer didn't stop when it reached EOF. (2) For some reason, the lastest version of "snprintf" appended '\0' to the string, so the following line: for(j = 0; j < 16; j++) snprintf (out+2*j, 2, "%02x", resblock[j]); produced a (MD5) strings with '\0' at every even position. (3) When there is no unins000.dat file, md5check.exe won't report any missing files. I think the last two "bugs" can be fixed by the following minor changes: = --- R-2.7.2/src/gnuwin32/front-ends/md5check.c (revision 167) +++ R-2.7.2/src/gnuwin32/front-ends/md5check.c (working copy) @@ -157,7 +157,7 @@ #ifdef DEBUG printf("missing\n"); #endif - if(found) { + if(found||nnames==0) { fprintf(stderr, "file %s: missing\n", line+34); miss++; } @@ -171,7 +171,7 @@ #endif continue; } else { - for(j = 0; j < 16; j++) snprintf (out+2*j, 2, "%02x", resblock[j]); + for(j = 0; j < 16; j++) snprintf (out+2*j, 3, "%02x", resblock[j]); out[32] = '\0'; if(strcmp(onfile, out) == 0) { #ifdef DEBUG = I didn't fix the first one, because I am not familiar with the format of unins000.dat. Thanks, Alex ### Alex Chen, Ph.D. REvolution Computing 1100 Dexter Ave. N, Suite 200 Tel: 206-577-4778 ### [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] proposed simulate.glm method
There is functionality similar to this included in the Zelig package with it's "sim" method. The "sim" method goes a step further and replicates the fitted model's analysis on the generated datasets as well. I would suggest taking a look -- Zelig supports most (if not all) glm models and a wide range of others. The Zelig maintainers' site can be found at: http://gking.harvard.edu/zelig/. Full disclosure: I am an employee of the Institute for Quantitative Social Science, which performs most of the development and support for the Zelig package. Best, Alex D'Amour Statistical Programmer Harvard Institute for Quantitative Social Science 2009/2/12 Ben Bolker : > > I have found the "simulate" method (incorporated > in some packages) very handy. As far as I can tell the > only class for which simulate is actually implemented > in base R is lm ... this is actually a little dangerous > for a naive user who might be tempted to try > simulate(X) where X is a glm fit instead, because > it defaults to simulate.lm (since glm inherits from > the lm class), and the answers make no sense ... > > Here is my simulate.glm(), which is modeled on > simulate.lm . It implements simulation for poisson > and binomial (binary or non-binary) models, should > be easy to implement others if that seems necessary. > > I hereby request comments and suggest that it wouldn't > hurt to incorporate it into base R ... (I will write > docs for it if necessary, perhaps by modifying ?simulate -- > there is no specific documentation for simulate.lm) > > cheers >Ben Bolker > -- > Ben Bolker > Associate professor, Biology Dep't, Univ. of Florida > bol...@ufl.edu / www.zoology.ufl.edu/bolker > GPG key: www.zoology.ufl.edu/bolker/benbolker-publickey.asc > > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Managing DLLs with the same names in an R session
Hi, Patrick, We have ported Rgraphviz to Win64, and we had the same issue. Basically we have to compile graphviz from the scratch (because there is no graphviz binaries on Win64) and rename graph.dll to graphviz-graph.dll. Thanks, Alex On Fri, Apr 24, 2009 at 11:07 AM, Patrick Aboyoun wrote: > Thanks Brian. I'll stop trying to hack the code to work and opt for the dll > rename option. > > Patrick > > > > Prof Brian Ripley wrote: > >> On Fri, 24 Apr 2009, Patrick Aboyoun wrote: >> >> I am having a problem using two DLLs with the same name, but obviously >>> located in different directories, in an R session. The troublesome package >>> is the (Bioconductor) Rgraphviz package. It relies on (3rd party software) >>> graphviz and imports functions from (Bioconductor) package graph. >>> Unfortunately, the current stable release of graphviz for Windows >>> >>> http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.22.2.msi >>> >>> contains a graph.dll in its bin directory. The situation is that >>> Rgraphviz needs to link to the graph.dll from graphviz, >>> >>> E:\paboyoun>..\biocbld\bbs-2.4-bioc\R\bin\R CMD build Rgraphviz >>> [...omitting output...] >>> ** libs >>> making DLL ... >>> [...omitting output...] >>> gcc -shared -s -o Rgraphviz.dll tmp.def LL_funcs.o Rgraphviz.o >>> RgraphvizInit.o agopen.o agread.o agwr >>> ite.o bezier.o buildEdgeList.o buildNodeList.o doLayout.o >>> graphvizVersion.o init.o -LC:/Graphviz2.22/ >>> bin -lgvc -lgraph -lcdt -Le:/biocbld/bbs-2.4-bioc/R/bin -lR >>> [...omitting output...] >>> >>> but at run time R dispatches to the graph.dll from the graph package to >>> resolve the symbols. >>> >>> R-2.9> Sys.which("graph.dll") >>> graph.dll >>> "C:\\GRAPHV~1.22\\bin\\graph.dll" >>> R-2.9> library(Rgraphviz) >>> Loading required package: graph >>> Loading required package: grid >>> >>> << Message box appears: The procedure entry point agclose could not be >>> located in the dynamic link library graph.dll >> >>> >>> Running Rterm.exe through the DependencyWalker software, I see that the >>> gvc.dll and cdt.dll graphviz libraries are properly loaded, but the >>> graph.dll dependency of Rgraphviz.dll links to the graph.dll library from >>> the graph package. I tried passing the DLLpath for graphviz to the >>> library.dynam function call when loading Rgraphviz.dll in the .onLoad >>> function within Rgraphviz and it had no effect. I also tried >>> library.dynam.unload/dyn.unload-ing the graph.dll from the graph package and >>> then loading the Rgraphviz.dll followed by the reloading of the graph.dll >>> from the graph package and the graph.dll dependencies become broken to the >>> point that a call out to a graph.dll results in a GPF. >>> >>> Is is possible to manage DLLs with the same name from R or do I need to >>> rename one of the DLL names to make them unique? >>> >> >> On Windows, the latter is the only completely reliable solution that we >> know of. We've been here with iconv.dll, and had to rename the R copy to >> Riconv.dll as a result. (Unfortunately, it depends on the version of >> Windows and even the service pack installed. AFAICS some versions of Windows >> only allow one DLL of a given name to be loaded by a single process, here >> the R process.) >> >> There are (older?) Unix-alike OSes with similar issues. >> >> > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Alex Chen, Ph.D. Software Engineer & Research Scientist REvolution Computing 1100 Dexter Avenue N, Suite 250 Seattle, WA 98109 P: 206-577-4778 x3209 | www.revolution-computing.com [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] sort() generic? [Re: Suspicious behaviour of sort on POSIXct ..]
With all due respect, I don't think that the change to the sort function is "a good change". New versions should be backward compatible whenever possible, i.e. unless there's a very compelling reason to force large amounts of old code to break. In this case, the sort function could have had an additional "unclass" argument with a default value of FALSE. That way, old code wouldn't break and new code could be written with unclass set to TRUE for speed. I hope this will be the case for 2.3.4 ___ Alexander Dannenberg Geode Capital Management, LLC 53 State Street . Boston . MA . 02109 Tel 617.392.8123 Cell 617.372.6805 [EMAIL PROTECTED] This e-mail, and any attachments hereto, are intended for us...{{dropped}} __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] How to create the couple of files .rdb and .rdx
Dear all, I would like to create new version (for R >= 2.0.0) of my old libraries (under Windows XP). The conversion of FORTRAN source to dll file is OK (via Rcmd SHLIB ) but the command Rcmd.exe build pkgdirs did not create the two files .rdb and .rdx of the R functions (Warning message .../R is empty). How can I manually create them ? With the command save(list=..., compress=TRUE, ascii=FALSE) only one binary file is created. Thanks in advance for any help. Alex __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] R 'base' returning 0 as sum of NAs
Dear R Team The following line returns 0 (zero) as answer: sum(c(NA_real_, NA_real_, NA_real_, NA_real_), na.rm = TRUE) One would, however, have expected it to return 'NaN', as is the case with function 'mean': > mean(c(NA_real_, NA_real_, NA_real_, NA_real_), na.rm = TRUE) [1] NaN The problem in other words: I have a vector filled with missing numbers. I run the 'sum' function on it, but instruct it to remove all missing values first. Consequently, the sum function is left with an empty numeric vector. There is nothing to sum over, so it shouldn't actually be able to return a concrete numeric value? Shouldn't it thus rather return either NA ('unknown'/'missing') or - in the fashion of the mean function - NaN ('not a number')? With the current state of affairs, the sum function poses the grave danger of introducing zeros to one's data (and subsequently other values as well, as soon as the zeros get taken up in further calculations). I hope my e-mail finds you well and I wish the R team all of the best for 2017 :) Kind regards Alex I. Howard Web: www.nova.org.za Phone: +27 (0) 44 695 0749 VoiP: +27 (0) 87 751 3490 Fax: +27 (0) 86 538 7958 [[alternative HTML version deleted]] __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
[Rd] erroneous warning in hist (PR#9408)
Full_Name: Alex Deckmyn Version: 2.4.0 OS: linux Submission from: (NULL) (193.190.63.62) specifying the "right" option in hist results in a warning when plot=F. The option is taken into account correctly, but a warning is issued anyway. When plot=T there is no warning. > hist(c(1,1.5),breaks=0:4)$counts [1] 1 1 0 0 > hist(c(1,1.5),breaks=0:4,right=T)$counts [1] 1 1 0 0 > hist(c(1,1.5),breaks=0:4,plot=F)$counts [1] 1 1 0 0 > hist(c(1,1.5),breaks=0:4,right=T,plot=F)$counts [1] 1 1 0 0 Warning message: argument 'right' is not made use of in: hist.default(c(1, 1.5), breaks = 0:4, right = T, plot = F) > hist(c(1,1.5),breaks=0:4,right=F,plot=F)$counts [1] 0 2 0 0 Warning message: argument 'right' is not made use of in: hist.default(c(1, 1.5), breaks = 0:4, right = F, plot = F) > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel