Displaying 20 results from an estimated 10000 matches similar to: "R & very large files"
2010 Mar 08
1
setClass or setValidity?
Hi,
I'm reading up on S4 classes *). There seem to be at least two ways of input validation:
setClass() (using the 'validity' argument) and setValidity(). Is it a matter of taste which function is used? Or should more complex validation code better be put in a setValiditity call?
*) A (Not So) Short Introduction to S4 Object Oriented Programming in R
V0.5.1 Christophe Genolini
2010 Mar 09
2
rcom package
Hi,
I would like to make a program that reads excel files, and writes the cells of which contents is not a formula to another file. I don't think this is possible with RODBC, but it may be possible with rcom.
I read the documentation of the rcom package, but I was hoping somebody knows a good web resource for more eleborate info. I tried Googling, but alas (did you know rcom also is a
2010 Jan 03
2
plot question
Hi,
I am new to R so forgive me if the following query is somewhat simple. I have a small tab-separated file with n records of glucose values, one record per day, seven measurements per day. It looks like this:
date sober no vm nm va na vs
20091229 NA 6.8 NA 2.7 11.7 2.7 6.2
I'd like to make a graph on which the glucose day curves are plotted
2009 Dec 21
1
an IDE for R... JGR perhaps?
Hi,
I've just been browsing for IDEs for R, see e.g. http://www.linuxlinks.com/article/20080413133953606/R.html
It's probably highly subjective, but which free IDE is the best one around? For the Python language, I've always been using IDLE. I like the syntax highlighting and the syntax suggestions the user gets while typing a function name. Ideally, the IDE should run on any
2010 Mar 02
1
simple data transformation question
Hi all,
I have a (hopefully) simple newbie-level question.
# I have data like this:
dtf <- data.frame(read.table(textConnection("var value
company 9887.1
company 91117.0
blaah 91.1
etc 11
etc 97111"), header=TRUE))
# I would like to have output like this (the index number may vary):
var value.1 value.2
company 9887.1 91117.0
blah 91.1 NA
etc 11 97111
# I
2010 Feb 04
2
no write access for help files
Hi
I'm using R v2.8 under Windows*) and I'm trying to install a new package (local zip file), but I get the message below. I followed some advice at http://cran.r-project.org/bin/windows/base/rw-FAQ.html (4.2 onwards), but to no avail. How can I tell R to save the help files to an alternative location? I don't have write access to the default location.
>
2010 Mar 02
4
two questions for R beginner
>>> What were your biggest misconceptions or
>>> stumbling blocks to getting up and running
>>> with R?
Easy. I terms of materials I have been unable to find good books that
introduce users to R from the perspective of someone familiar only
with packages like SPSS or STATA, or not familiar with statistics
packages at all. Even introduction texts use jargon
2010 Mar 25
1
Abstract classes
Hi R lovers,
I'm looking for more information about, and implementations of abstract classes. After reading "Head First Design Patterns" (O'Reilly). I want to know whether I could use this to build an interface, i.e. a placeholder for all possible methods in the underlying subclasses. The final goal is to end up with a more flexible/extensible design than could be achieved with
2009 Jul 16
2
Problems generating image from tiff file
I imported the attached tiff file and converted the coordinate system to
long lat and graphed it:
californiatiff<- readGDAL("california1.tif")
proj4string(californiatiff)
> rasterprojection <- spTransform(californiatiff, CRS("+proj=longlat")
however, when using the plot command for rasterprojection, I get a blob. I
can see the outline of the state of california and
2011 May 26
2
NaN, Inf to NA
Hi,
I want to recode all Inf and NaN values to NA, but I;m surprised to see the
result of the following code. Could anybody enlighten me about this?
> df <- data.frame(a=c(NA, NaN, Inf, 1:3))
> df[is.infinite(df) | is.nan(df)] <- NA
> df
a
1 NA
2 NaN
3 Inf
4 1
5 2
6 3
>
Thanks!
Cheers!!
Albert-Jan
2011 May 26
2
NaN, Inf to NA
Hi,
I want to recode all Inf and NaN values to NA, but I;m surprised to see the
result of the following code. Could anybody enlighten me about this?
> df <- data.frame(a=c(NA, NaN, Inf, 1:3))
> df[is.infinite(df) | is.nan(df)] <- NA
> df
a
1 NA
2 NaN
3 Inf
4 1
5 2
6 3
>
Thanks!
Cheers!!
Albert-Jan
2010 Jul 22
1
check menu button (tcltk)
Hi,
I am making a mock user interface in tcltk and I would like to add a 'check menu button' such as shown here: http://zetcode.com/tutorials/pygtktutorial/images/checkmenuitem.png
Does anybody know how to do this? I am quite new to R.
Cheers!!
Albert-Jan
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
All right, but apart from the sanitation, the medicine,
2010 Apr 29
1
UpdateLinks = FALSE
Hi,
I'm reading 100s of excel files and many of them contain links to external files (I hate that, but that aside). Every time such a file is opened, a menu pops up asking if I want to update the links. I never want to update the links. I used the macro recorder to see what code would be needed to suppress that message, but to no avail (I tried more variations, but one attempt is shown
2011 May 04
2
first occurrence of a value?
Hello,
A simple question perhaps, but how do I, within each row, find the first
occurence of the number 1 in the df below? I want to use this position to
programmatically create the variable 'year'. I'v come up with a solution, but I
find it downright ugly. Is there a simpler way? I was hoping for a useful
built-in function that I don;t yet know about.
df <-
2010 Apr 21
1
VERY basic question about S4 classes
Hi,
I'm new to R and S4 classes. I defined a class with two methods (myMethod1 and myMethod2). I want to call myMethod1 within myMethod2. Why does the code below not work? The name 'myMethod1' doesn't appear to have meaning inside myMethod2, even though the two methods belong to the same class.
setClass(Class="SomeClass",
representation=representation(
2010 May 20
1
getSubClasses()?
Hi,
Is there a built in function that returns a character vector of all subclasses of a given superclass?
showClass(Class = "SomeClass") contains the info that I want, but I don't know how to access it.
getSubClasses <- function(superClass) return(setdiff(getClasses(.GlobalEnv), superClass)) wíll only work if the global enviroment isn;t filled with other class definitions.
2011 May 31
1
reshape::cast: invalid 'yinds' argument
Hi,
I'm using reshape to cast molten data. When I use the following command, R
either crashes (when I use Notepad++) or gives an error (when I use Rgui or
source()), BUT the error occurs not always, maybe only on half the attempts:
w <- cast(v, id + code + productname + year + begin + end + specificDesc +
specificDesc2 ~ type)
Error in merge.data.frame(data, all.combinations, by =
2011 May 03
1
Rodbc quesion: how to reliably determine the data type?
Hello,
How can I tell RODBC to scan all the records of an xls file to determine the
data type? If the first n records happen to be empty Rodbc assumes a character,
and any numbers are made <NA>. And if, for instance, the first n records contain
numbers, and later they also contain characters, those characters become NA.
Cheers!!
Albert-Jan
2010 Apr 19
1
Equivalent to Python os.walk?
Hi,
I would like to recursively loop through al subfolders of a directory and do stuff with certain file types in those dirs. Is there a package/function that could do this? So it's more than Sys.glob. I'm looking for equivalent of Python's os.walk *) and I don't want to reinvent the wheel.
Thank you.
Cheers!!
Albert-Jan
*)
2010 Apr 27
1
sprintf() and return() oddity
Hi,
If I use sprintf and return inside a function, sprintf doesn't print anything anymore. See the non-sense example below.
> x <- function() { a <- 888
+ sprintf("xxx %s", a) }
> x()
[1] "xxx 888"
> x <- function() { a <- 888
+ sprintf("xxx %s", a)
+ return(a) }
> x()
[1] 888
Is this a bug?
Cheers!!
Albert-Jan