search for: roskam

Displaying 20 results from an estimated 38 matches for "roskam".

2009 Dec 16
3
R & very large files
Hi,   I very recently started using R (as in: last week) and I was wondering if anyone could point me to website(s) with sample code to deal with large datasets (length- and/or breadthwise). I understood that R was never designed to work with datasets larger than, say, a couple of hundred Mb. One way is (as I also read) to let R work in conjunction with SQL. That's one interesting approach
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
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 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 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 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 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
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 Aug 05
1
Sciviews-K -- object 'httpdPort' not found
Hi, I'm trying to install Sciviews-K on Linux Ubuntu 9.10 (karmic) but I'm not able to establish the connection between Komodo and R. Here;s the error I get, plus some diagnostic info: R version 2.9.2 (2009-08-24) R is SciViews ready! Error in get(name, envir = asNamespace(pkg), inherits = FALSE) :   object 'httpdPort' not found > ls() [1] "svStart" > Sys.info()
2011 Feb 03
1
mapply question (?)
Hi, I have a function myFun which I want to call multiple times, using different argument lists. myFun("v1", "2009", 1) myFun("v2", "2008", 1) myFun("q", "2001") How can I easily do this in R? Should I use mapply? I unsuccessfully tried something like: x <- list(c("v1", "2009", 1), c("v2",
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
2011 Sep 06
1
list of all methods winthin an S4 class
Hello,   How can I generate an overview/vector of all the methods winthin an S4 class? Similar to dir() in this Python code: >>> class SomeClass():  def some_method_1(self):   pass  def some_method_2(self):   pass   >>> dir(SomeClass) ['__doc__', '__module__', 'some_method_1', 'some_method_2'] >>>   Thanks in advance! Cheers!! Albert-Jan
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 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
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 Apr 25
1
method dispatching vs inheritance/polymorphism (re-post)
Hi, I'm having trouble seeing the added value over functions defined by setGeneric vis-a-vis methods defined by inheritance and polymorphism. setGeneric offers a 'clean' call to a generic function, ie. no need to call new(), so less typing to do for the user. But such explicit calls can also be avoided by functions like f <- function(x, y) new(Class = SomeClass, x=x, y=y). Then