similar to: Speed of for loops

Displaying 20 results from an estimated 3000 matches similar to: "Speed of for loops"

2006 Oct 25
1
Cross-compilation
Hi everyone, I am trying to cross-compile a package I wrote using the Yan and Rossini tutorial "Building Microsoft Windows versions of R and R packages using Intel Linux". I have got reasonably far with this but when doing the linking using the line: i586-mingw32-g++ -shared -s -o mylibrary.dll mylibrary.def mylibrary.o mylibrary_res.o
2006 Nov 17
2
Data table in C
After getting one list done, I am now struggling to form a data frame in C. I tried to do a list of lists which gives me : $<NA> $<NA>[[1]] [1] "BID" $<NA>[[2]] [1] 0.6718 $<NA>[[3]] [1] 3e+06 $<NA> $<NA>[[1]] [1] "BID" $<NA>[[2]] [1] 0.6717 $<NA>[[3]] [1] 5e+06 $<NA> $<NA>[[1]] [1] "BID"
2006 Nov 09
2
Retrieving function name
Hi, Does anyone know how I can retrieve a function name, for example If I have a function f as follows: f <- function( myfunc ) { print( name_of(myfunc) ); } I want to know what I should have as "name_of" such that I could call this with : f( median ) and it would print "median" or f( my_function_name ) and it would print "m_function_name". So far all I
2006 Nov 21
1
dyn.load
Hi everyone, Now I know there is information on this in the help files - which I have read. I am very close to implementing this but can't quite get how to remove this final hurdle. I have a DLL called "X.DLL" which I have no original code for, just the DLL. I have created a wrapper C file for the calls in X.DLL, and have successfully (I think) created a wrapper DLL for X
2006 Nov 14
2
String to list and visa versa
Hi, I need to collapse a list into a string and then reparse it back into the list. Normally when I need to do this I simply use write.csv and read.csv, but I need to do this in memory within R rather than writing out to file. Are there any bespoke commands that any knows of that does something like this or any tips for doing this that anyone can suggest? I basically don't care
2009 Jan 13
2
particulars of importing/loading libraries
Dear List: Sorry for posting maybe a trivial question, but I have a basic understanding problem. If I have say pack1 and pack2, two R packages, and pack2 depends on and imports pack1 fully (as in the code below), is there a way to make all the functionality of pack1 available for the global and other environments (not only for the functions called from withing pack2) by loading pack2 only? I
2006 Nov 22
1
Ralloc clash
Hi everyone, Have been trying to include windows.h (from MinGW) and R.h into a package and have found that Ralloc is coming up as a clash no matter which include ordering I use. In windows it has 2 arguments and is defined in objidl.h and in R.h it is 3 arguments. Any ideas of how to work round this? Have checked the web and have not seen anyone else comment on this. Many thanks Tom
2008 Feb 12
4
assigning NULLs to elements of a list
Dear developers: I have just came across an (unexpected to me) behaviour of lists when assigning NULLs to list elements. I understand that a NULL is a valid R object, thus assigning a NULL to a list element should yield exactly the same result as assigning any other object. So I was surprised when assigning a NULL in fact removed the element from the list. Is this an intended behaviour? If
2005 Feb 25
5
[Rdev] any way to generate "bitmap" (tif, jpeg, png etc) files in R CMD BATCH
Hi Community, here is the problem, Linux problem (reported to work on Windows). I need to generate graphical output in any of bitmap format under the 'R CMD BATCH'. Whereas the script generating png-s works perfectly in the R session, such things as X11, png and jpeg are not usable in BATCH (they cannot be switched on by --gui-X11 etc) and X11 is prompted to be required for png. At
2005 Feb 25
5
[Rdev] any way to generate "bitmap" (tif, jpeg, png etc) files in R CMD BATCH
Hi Community, here is the problem, Linux problem (reported to work on Windows). I need to generate graphical output in any of bitmap format under the 'R CMD BATCH'. Whereas the script generating png-s works perfectly in the R session, such things as X11, png and jpeg are not usable in BATCH (they cannot be switched on by --gui-X11 etc) and X11 is prompted to be required for png. At
2006 Nov 07
1
variable problem
Hi everyone, I am not sure this is possible so I would be interested in your responses. Say I have a variable 'v' with the string "myargument" in and I have a function 'f' that takes this argument as follows; f <- function( myargument=5 ) { ... does something... } Is there anyway I can say something like; f( v=10 ) such that it will be evaluated as f(
2006 Dec 09
2
Floating point maths in R
Hi, I am not sure if this is just me using R (R-2.3.1 and R-2.4.0) in the wrong way or if there is a more serious bug. I was having problems getting some calculations to add up so I ran the following tests: > (2.34567 - 2.00000) == 0.34567 <------- should be true [1] FALSE > (2.23-2.00) == 0.23 <------- should be true [1] FALSE > 4-2==2 [1] TRUE > (4-2)==2 [1] TRUE >
2006 Nov 17
1
Manipulating R lists in C
Hi, I have been studying the R manual on lists but cannot seem to create a simple R list in C - I keep on getting "'dimnames' applied to non-array" whenever I attempt to assign names to the list elements: Wanted output a list structure something like [ type="Bid", price=2.0, volume=1000 ] I can get up to a list of [ "Bid2, 2.0, 1000 ] But for the life of
2005 Feb 25
3
passing command line arguments to 'R CMD BATCH myScript.R'
Hi Community, I have a question about how to pass command line parameters to R script running in the batch mode. The problem is: there is a banch of data files which are to be processed by R script called from a web-server, i.e. in the batch mode. The web server generates data files and passes their names calling 'R CMD BATCH' one by one for every file. Now the question is how to
2008 Apr 07
3
Overriding axis formatting with custom Axis method, Axis.numeric etc
Dear list: I would like to override the default way R formats plot axes with a custom method(s). Obviously I would prefer to define it as general as possible avoiding writing a custom method for each individual class where possible. The plot.default method (and I assume other methods as well) calls Axis(...) to produce the axis layout depending on data. In this sense it seems reasonable to
2008 Jan 07
3
Finding windows DLLs
The XML package relies on libxml2.dll (e.g., bundled with the CRAN binary) installed in library/XML/libs. Unfortunately, c:/WINDOWS/system32/libxml2.dll will be found and loaded before this. Is there any programatic solution? Thanks, Martin -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold
2008 May 04
1
texi2dvi instead of pdflatex in R2.7.0? and related bioc 2.2 builds
Dear lists: I am somewhat puzzled by the use of texi2dvi/pdflatex in R2.7.0. When building EBImage (bioconductor) with 2.7.0 I get the same error both in Windows and Linux, which reads the following: ** building package indices ... * DONE (EBImage) * creating vignettes ... ERROR /usr/bin/texi2dvi: pdflatex exited with bad status, quitting. Error in texi2dvi(file = bft, pdf = TRUE, clean =
2007 Jun 12
1
bug in R environments? Was: [BioC] 'recursive default argument' error...
Dear developers, has anyone experienced the problem described below? Is it a bug in handling interrupts in R? Best, Oleg -------- Original Message -------- Subject: Re: [BioC] 'recursive default argument' error in GOENTREZID2GO From: Diego Diez <diez at kuicr.kyoto-u.ac.jp> ...steps that use to reach me to that point. It happens with any environment, or at least annotation
2007 Aug 30
1
suggesting \alias* for Rd files (in particular for S4 method documentation)
Hi, I do not know if everybody finds index pages of the html-formatted R help useful, but I know I am at least not the only one who uses them extensively to get the overview of functions and methods in a package (even for my own package). Problems arise, however, if a lot of S4 methods need to be documented blowing out the index with (generally irrelevant) entries like:
2007 Feb 20
2
Problem with types on 64-bit
Hi Everyone, I have a problem using some working 32-bit R code with 64-bit machine ( I am using version R-2.4.1 ). The problem occurs when I am trying to detect a NULL STRSXP type. ( Perhaps I am doing this detection in the wrong way? ) On 32-bit the following works, and correctly identifies if I am passing NULL or a valid string object: if ( v_dta_start != R_NilValue && STRING_ELT(