search for: fomcl

Displaying 20 results from an estimated 37 matches for "fomcl".

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 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
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   *)
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
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
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 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 Dec 18
1
maptools/spatial analysis question
Hi, I am using maptools to plot air quality data on a map. Each measurement point is mapped to a postal code area. This yields pictures with discrete borders, like so: http://dl.dropbox.com/u/27415200/baincome.png The problem is that the size of a postal code area doesn't mean much in this context. Moreover, only a small minority of all the postal code areas has a measurement sation. Are
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 Apr 30
1
re.findall equivalent?
Hi, The regular expression (grep) below does not behave at all like the equivalent in Python. Also, I would be happy if somebody could tell me what the R equivalent for Python's re.findall is. The regex filters out any numbers not enclosed by square brackets, including fractions (with either comma or dot as the separator) and percentages. How should the R code below be modified so it does the
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
2011 Aug 25
1
Question about object permanence/marshalling
Hello,   I am trying to write some code that dumps R objects to the harddisk in a binary format so they can be quickly re-used later. Goal is to save time. The objects may be quite large (e.g. classes for a GUI). I was thinking that save() and load() would be suitable for this (until now I only thought it could be used for 'real' data, e.g. matrices, data.frames etc), but I am hoping any
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 Jan 11
1
sorting question
Hi, I have a data frame with variables a, b, c (character vars) and t (time var, could be represented as POSIXct or character, depending on which is most useful. The format is "yyyy-mm-dd hh:mm:ss CET"). Now, I want to sort the data frame in ascending order by a, b, c and then in descending order by t. Here's what I've got, but I'm not sure how to put the
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
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