Displaying 20 results from an estimated 10000 matches similar to: "Fast string comparison"
2010 Mar 02
16
Three most useful R package
Hi R-fans,
I would like put out a question to all R users on this list and hope
it will create some feedback and discussion.
1) What are your 3 most useful R package? and
2) What R package do you still miss and why do you think it would make
a useful addition?
Pulling answers together for these questions will serve as a guide for
new users and help people who just want to get a hint where to
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():
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 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 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 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 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
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,]
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 Jul 05
1
Fast String operations in R ? Cost of String operations
Hi experts,
currently developing some code that checks a large amount of Strings
for the existence of sub-strings and pattern (detecting sub-strings
within URLs). I wonder if there is information about how well
particular String operations work in R together with comparisons. Are
there recommendations (based on such information) regarding what
operations should be used and what should be
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
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
2010 Mar 24
3
string problems in R
Hello all
I have been working on my thesis using R. I am a newbie to R and met a problem
that bothered me for a while due to my lack of acquaintance of R.
I am using R to query from SQL. I got a list of crsp_fundno of G-style mutual
funds which is still alive. I use the following codes and got what I want:
library(RODBC)
channel<-odbcConnect("CRSPFUND")
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
2010 Jun 24
8
Install package automatically if not there?
Hi fans,
is it possible for a script to check if a library has been installed?
I want to automatically install it if it is missing to avoid scripts
to crash when running on a new machine...
Ralf
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
2010 Apr 28
1
How to create R package
Hi,
Can you tell me how to create R package in Windows, and give me an
example that works ? Thanks.
[[alternative HTML version deleted]]