similar to: How to create R package

Displaying 20 results from an estimated 3000 matches similar to: "How to create R package"

2008 Oct 14
3
gWidgets install
Hi, I wanted to install the gWidgets package and ran the following code: ------------------------------------------ > install.packages("gWidgets") trying URL 'http://www.ibiblio.org/pub/languages/R/CRAN/bin/windows/contrib/2.7/gWidgets_0.0-30.zip' Content type 'application/zip' length 1354268 bytes (1.3 Mb) opened URL downloaded 1.3 Mb package 'gWidgets'
2009 Feb 06
3
Sweave and backslashes
Hello Everyone, I am an avid Sweave user and I am trying to pretty print floating point numbers for latex output. For example in my document, I would like: 4.2\cdot 10^-{8} Instead of: 4.2e-08 The Hmisc package has a nice function for doing this- but Hmisc has a ton of dependencies and has proved very unportable to the various machines I work on. So, I set out to write my own function that
2009 Nov 16
3
Error on reading an excel file
Hello everybody, here is the code I use to read an excel file containing two rows, one of date, the other of prices: library(RODBC) z <- odbcConnectExcel("SPX_HistoricalData.xls") datas <- sqlFetch(z,"Sheet1") close(z) It works pretty well but the only thing is that the datas stop at row 7530 and I don?t know why datas is a data frame that contains 7531 rows with the
2009 Oct 29
5
R crashes
My R crashes frequently when run with huge data. -- View this message in context: http://www.nabble.com/R-crashes-tp26110355p26110355.html Sent from the R help mailing list archive at Nabble.com.
2009 Jul 19
4
space in column name
I read a table from Microsoft Access using RODBC. Some of the variables had a name with a space in it. R has no problem with it but I do. I cannot find out how to specify the space names(alltime) [1] "ID" "LVL7" "Ref Pv No" "Ref Pv Name" "DOS" "Pt Last Name" "Pt First Name" "MRN"
2010 Oct 18
1
Incorrect positioning of raster images on Windows
I am working on dumping raster data from R into PNG files using rasterImage(). I am working with a test matrix from the rasterImage() example and using it to produce a PNG image with the following code: # From the example for rasterImage(). A 3 pixel by 5 pixel b/w checkerboard. testImage <- as.raster(0:1, nrow=3, ncol=5) testImage [,1] [,2] [,3] [,4] [,5] [1,]
2010 Oct 18
1
Incorrect positioning of raster images on Windows
I am working on dumping raster data from R into PNG files using rasterImage(). I am working with a test matrix from the rasterImage() example and using it to produce a PNG image with the following code: # From the example for rasterImage(). A 3 pixel by 5 pixel b/w checkerboard. testImage <- as.raster(0:1, nrow=3, ncol=5) testImage [,1] [,2] [,3] [,4] [,5] [1,]
2010 Mar 26
4
Creating a vector of categories
Hi, I have a column in a data frame looking something like: $sex $language $count male english 0 male english 0 female english 32 male spanish 154 female english 11 female norweigan 7 and so on. What I want to do is to order these in to categories, for instance one category where count>=0 & count<10 and so on.. I want my data to turn out looking something like: male
2009 Oct 13
2
splitting dataframe, assign to new dataframe, add new rows to new dataframe
Hi, all, My objective is to split a dataframe named "cmbine" according to the value of "classes". After the split, I will take the first instance from each class and bin them into a new dataframe, "df1". In the 2nd iteration, I will take the 2nd available instance and bin them into another new dataframe, "df2". >cmbine$names apple tiger pencil chicken
2007 Nov 01
3
Curry: proposed new functional programming, er, function.
Hi all (especially R-core) I suppose, With the introduction of the new functional programming functions into base I thought I'd ask for a Curry() function. I use a simple one that looks this: Curry = function(FUN,...) { .orig = list(...);function(...) do.call(FUN,c(.orig,list(...))) } This comes in really handy when using say, heatmap():
2012 Jan 11
1
Inconsistencies in device_Raster when axes are reflected
I noticed some undocumented and inconsistent behavior in device_Raster when a plot is produced with reflected axes such as: image(volcano, xlim = c(1,0), useRaster = TRUE) image(volcano, ylim = c(1,0), useRaster = TRUE) The `pdf` device will perform horizontal and vertical reflections, while `quartz` will ignore the transformations when plotting to the screen, but when plotting to a
2009 Sep 14
4
Location of Packages?
Sorry, one more: on OSX, I deleted my old 2.9.2 R.app, and installed the 64 bit version of 2.9.0. I then did an "install.packages("car")" under my new 2.9.0. It seems to have worked, but alas, I still get an error that package 'car' was built under R version 2.9.2 . Where exactly does R under OSX install its packages? (is it a bug that another car is loaded?) PS:
2010 Apr 22
1
Rtools for building 64 bit windows packages
Hello R developers, I sincerely apologize if the answer to this question is clearly documented somewhere, but I was unable to figure it out over my morning coffee. I just downloaded today's release of R 2.11.0 and installed it on my Windows 7 64 bit VM. I also downloaded the latest version of Rtools211 from Professor Murdoch's site. The first thing I attempted to do was build some of
2011 Apr 07
1
R 2.13.0-beta for Windows, file.copy() throws suspicious errors due to default value of copy.mode
While checking packages against R 2.13.0-beta on Windows, I have run into a few strange error messages related to copying files. The errors all relate to file.copy() and have the form of: Error in Sys.chmod(to[okay], file.info(from[okay])$mode, TRUE) : 'mode' must be of length at least one After half a day of tinkering, the best reproducible example I can come up with involves using
2008 Oct 07
11
Creating GUIs for R
Hi all, I have looked around for help on creating GUIs for R, but haven't found anything. I would be interested in any advice or webpages that have information on the best language, tutorials etc. for creating simple GUIs. Mainly I want to do this as a heuristic exercise. Thanks for any help. Wade Wall [[alternative HTML version deleted]]
2010 Apr 09
5
SSH Through R Script
Hi, I am trying to SSH to a remote server through R script. In other words, I would like to know how I can get a SSH connection to the remote server and then execute commands on that server with the R script. So in bash, I would normally type ssh -lusername remoteserver.com; press enter and then wait for the password prompt to key in my password. I have tried system("ssh
2009 Aug 10
1
R to MATLAB translation
Hi, Is there any package out there that might help me with translating R code into MATLAB? Using RSiteSearch I found a bunch of "MATLAB stuff" but it all seems to go in the opposite direction, i.e., emulating MATLAB functions in R. Thanks in advance, Andy __________________________________ Andy Jaworski 518-1-01 Process Laboratory 3M Corporate Research Laboratory ----- E-mail:
2009 Sep 18
1
inconsistency in attaching attributes to NULL
In R-devel (svn 49628) and back to at least R 2.7.0 we get inconsistent results when attempting to attach attributes to a variable with the value NULL. If we use attributes<- it finishes but changes the value to list(). > a<-NULL > attributes(a)<-list(attr1="First attribute", attr2=2+2i) > a list() attr(,"attr1") [1] "First
2009 May 15
1
About the efficiency of R optimization function
Hi all! The objective function I want to minimize contains about 10 to 20 variables, maybe more in the future. I never solved such problems in R, so I had no idea about the efficiency of R's optimization functions. I know doing loop in R is quite slow, so I am not sure whether this shortage influences the speed of R's optimization functions. I would be very appreciated if anyone could
2009 May 17
1
Kumar quantile
can someone please help me with this problem. i found the density and distribution for the Kumar~(2.3,3.2), but now im stuck on the quantile. how do i determine the quantile for kumar with Inverse F(0.5). im trying to use qkumar(_,2.3,3.2). but im stuck on determing the probability vector. thanks :) -- View this message in context: http://www.nabble.com/Kumar-quantile-tp23580613p23580613.html