Hey Bing,
Reshape's the ticker -- ?reshape.
For example, reshape(myFrame, idvar = ID, timevar = TEST.A) should
do most of the trick.
Kevin
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Bing Ho
Sent: Monday, September 19, 2005 10:04 PM
To:
Hi Jan-Paul,
You definitely want to be careful with na.omit in randomForest -- that
wipes out any row with even one NA. If NAs are sprawled throughout your
dataset, na.omit might end up killing a lot of rows. Here's my usual MO
for missing values:
1) impute in Hmisc fills in gaps with the mean,
Can you show us the first line of the file?
The error means that in one of the values you specified as numeric (first,
second, third, fourth, fifth, seventh, eighth, ninth), it found the character
value it displayed.
Otherwise, this looks like a good use of scan.
Kevin
-Original
These two lines worked for me:
rst - tapply(mydata$income, mydata$education, median)
mydata$md - rst[mydata$education]
Here's my cheesy example:
mydata - data.frame(income= round(rnorm(3, 55000, 1)),
+ education = letters[rbinom(3, 4, 1/2)+1])
rst -
Actually, what you want is sapply.
sapply(tst.list, [[, VAL)
Kevin
Alexandre Sanchez Pla wrote:
Hi,
I am working with lists whose terms are lists whose terms are lists. Although
the real ones contain locuslink identifiers and GO annotations (I work with the
Bioconductor GO) package, I have
Andreas Buness wrote:
Hello,
I like to save the complete state of R, i.e. including
all environments, objects/workspaces, loaded packages etc..
This wish has arisen since I am not able to reproduce
an error which occurs when running R CMD check.
Many thanks for your advice in advance.
Best Regards
Yayira har wrote:
I started to learn the R language, but I didn't suceed to use an external file.
Let say that I have an excel file called test1.xls in the directory
C:/program files/R/rw2000/external_files that looks like that:
name mark
yair 80
yosi 70 ...
In the
Fan wrote:
WHAT CAN I DO FOR YOU, SIR ?
Perhaps you're expecting some sort of congratulations for that new
release ? I've taken time to download it, test it, and
I've said what I've got to say.
You're helping nobody with that sort of process of intention.
--
Fan
Liaw, Andy wrote:
From: Fan
After
Roger Bivand wrote:
On Fri, 1 Oct 2004, Vikas Rawal wrote:
I want to read data from a number of files into R.
Reading individual files one by one requires writing enormous amount of
code that will look something like the following.
maptools:::dbf.read(wb-01vc.dbf)-dist1
[EMAIL PROTECTED] wrote:
Dear all,
I'm trying to produce 2 png files, one consisting of an image plot and a
color-table (also an image plot) and the other one consisting of 4 image
plots and a color table. I'd like the color table to be exactly the same.
The way I proceded is the following:
for
Vikas Rawal wrote:
Is there a linux-based/free command line tool for converting dbf files
into txt? Conceptually, it is not a great way of doing things. We have a
dbf file with a well defined structure. We convert it into a text file,
which has a loose structure, undefined variables types etc.
This worked very well for me:
do.call([, c(list(a), jj))
What about you?
Kevin
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Robin Hankin
Sent: Wednesday, September 08, 2004 7:08 AM
To: [EMAIL PROTECTED]
Subject: [R] do.call([, ...) question
Hi
The problem is that most base plotting functions first wipe the graphics
device clean. To do what you want, you need to use par(new = T) liberally
between plots. Does that work for you?
Kevin
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Sean Davis
Hi Paul,
I think lattice's histogram will do what you want, and in a friendlier
manner. Take a look at this example:
require(lattice)
a - data.frame(draw = as.vector(mapply(rnorm, rep(100, 4), rep(0, 4),
1:4)),
sd = factor(paste(sd =, rep(1:4, each = 100
Go ahead and
I'm afraid you need to modify your approach. You're trying to pass latex an
lm object, which latex doesn't know how to handle. Also, latex isn't
supposed to produce a full .tex file; it generates just a core that's
loaded into a shell when you run dvi.
Here's an example of how you might use it
The easiest way to do that is
subset(dataframe, rate == slow).
Please let me know if you have any more questions.
Kevin
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Randy Zelick
Sent: Monday, August 16, 2004 10:49 AM
To: R list server posting
Hello R world! I'm building a bundle of four packages, but I don't always
want to build the whole bundle. Usually I just want to tweak one function in
one of the packages and rebuild just that package. As such, I have
DESCRIPTION and DESCRIPTION.in files sitting in all the package folders.
Yes. See the mvtnorm package on CRAN. It implements Genz's algorithm, the
fastest method in town. (I have a version I converted to S-PLUS as well, if
you, or anyone, might need it.)
Kevin
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Trenkler, Dietrich
Hello everyone! I'm having the dreaded repeated rows problem in RODBC.
Specifically, when I have a NULL value in a column, odbcFetchRows reads the
value not as NULL or NA but as the most recent non-NULL value in the column.
If there is no such non-NULL column, odbcFetchRows reads the value as 0.
Hi everyone! I know segmentation faults are awfully hard to diagnose, but
I'm experiencing a fairly regular pattern of seg. faults when plotting using
map in the maps package. Starting R fresh, I run:
require(maps)
for (i in 1:50) {
cat(i, \n)
map(state)
}
I always get the same result:
1
2
Dr. Ripley, you are the master. That fix worked like a charm! All the way to
50, with no problems. Thanks again,
Kevin
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 01, 2004 10:07 AM
To: Kevin Bartz
Cc: [EMAIL PROTECTED]
Subject: Re: [R] Seg
What did you try with apply? It seems to work for me. I did
x2[!apply(is.na(x2), 1, any),]
and got the desired results.
Kevin
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Laura Holt
Sent: Tuesday, June 29, 2004 9:26 AM
To: [EMAIL PROTECTED]
Subject:
The problem is that you've instructed R to place lines at the values 91.55,
99.39, 97.04, 92.37 and 88.02, but these values do not correspond to the
user coordinates of the x-axis (which you've specified to be dates).
Luckily, the dates where you need lines are in the rownames of zi. You do
need
Hello! I first would like to compliment the authors of grid on what has been
a wonderfully useful package for me. Now, my question: Is there any way I
can specify the size of some grid.text using grid units?
I must label the regions of a plot. The regions can be either very small or
very large,
When you do latex from the command line (Run - cmd), what does DOS say?
Maybe latex isn't in your PATH.
Kevin
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Laura Holt
Sent: Monday, June 21, 2004 9:59 AM
To: [EMAIL PROTECTED]
Subject: [R] question about
match the return type of a gcc2
|builtin and then its argument prototype would still apply. */
| char rl_callback_read_char ();
| int
| main ()
| {
| rl_callback_read_char ();
| ;
| return 0;
| }
configure:21338: result: no
Any ideas? Thanks for any help you can provide.
Kevin
To: Liaw, Andy
Cc: 'Roger D. Peng'; 'Peter Dalgaard'; Kevin Bartz; [EMAIL PROTECTED]
Subject: Re: [R] Readline on R-1.9.1a
Liaw, Andy [EMAIL PROTECTED] writes:
From: Roger D. Peng
People who compile from source still need to install the
necessary rpms.
Sure, but apparently one can
27 matches
Mail list logo