similar to: Abstract classes

Displaying 20 results from an estimated 4000 matches similar to: "Abstract classes"

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 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
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 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 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
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 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.   >
2003 Jun 06
3
writing comments within a function
Hi R lovers! I would like to know how you can write comments inside the code of a function is it latex style % ? or any other language style? thanks a lot ************************************************************************* Ce message et toutes les pieces jointes (ci-apres le "message") sont confidentiels et etablis a l'intention exclusive de ses destinataires. Toute
2004 Jul 29
2
chan_sccp2 testers needed
Dear Skinny/SCCP lovers :-) I've just completed & uploaded to the cvs the newest version with fixed redial key AND implementation of speed dials. please test extensively and report any bugs. i know that the display is not yet set correctly but the buttons are working as expected. Enjoy testing... --jan (*1) http://chan-sscp.sf.net (*2) yes, bugtracker is down at the moment, will fix
2003 Apr 24
3
Missing Value And cor() function
Hi r lovers! I 'd like to apply the cor() function to a matrix which have some missing values As a matter of fact and quite logically indeed it doesn't work Is there a trick to replace the missing value by the mean of each variable or by any other relevant figures ? Or should I apply a special derivate of the cor() function, (I don't have any idea if it exists and have some trouble to
2003 Jun 05
4
counting missing values
Hello R lovers I have written a little cute function to count the number of missing value per row in a matrix and return the percentage of missing value it takes a lot of time to run with a 1000 rows matrix I'd like to know if there is a function already implemented to count the number of occurence of a given values in a vector For information, here is the function count<-0 for (i in
2003 Jun 24
2
R and Latex's tables
Hi R lovers! I have discovered recently that graph can be exported from R in a Latex compatible file thanks to the pictex command I would like to know if there is the equivalent while exporting datas. Let's say I have a matrix, a data.frame or a list that I would like to export as a flat text file that is immediatly transcripted into a table into latex Is there a macro or package that could
2003 Nov 24
2
merging variable and character
Hi R lovers! I'd like to know the trick to get a plot with a title associating variable and text I'd like to plot something like for (i in 1:10) plot(x[,i],ylab="Serie" & i) to get Serie 1 Serie 2 so on and so forth... of course it doesn't work. If somebody could give me an idea, it would be very nice thank you very much and long life to R Vincent
2003 Jul 25
5
named list 'start' in fitdistr
Hi R lovers! I'd like to know how to use the parameter 'start' in the function fitdistr() obviously I have to provide the initial value of the parameter to optimize except in the case of a certain set of given distribution Indeed according to the help file for fitdistr " For the following named distributions, reasonable starting values will be computed if `start'
2003 Apr 25
3
Code bug unresolved involving if condition
Hi R lovers! I am a beginner in coding with R so my question may be very easily solved but I don't know how. I have written the following function in a .txt file ClearDelta <- function(Matrix) { ncol<-ncol(Matrix);nrow<-nrow(Matrix); for (i in 1:nrow) { for (j in 1:(ncol-1)) {if (Matrix[i,j]==NA) (NA->Matrix[i,j+1])} }