If a data.frame (r4) does not exist in my R environment, I would like to create
it before I move on to the next step in my script. How do I make that happen?
Here is what I want to do from a code perspective:
if (exists(r4))
{
is.data.frame(get(r4))
}
else
{
a <- 0, b <- 0, c <- 0, d <- "x", r4
Thanks very much for your detailed reply to my post. Very helpful/useful
tool(s) you’ve provide me. Best wishes, B.
From: William Dunlap [mailto:wdun...@tibco.com]
Sent: Wednesday, September 21, 2016 10:48 AM
To: Crombie, Burnette N
Cc: r-help@r-project.org
Subject: Re: [R] if/else help
If
ishes - B
-Original Message-
From: MacQueen, Don [mailto:macque...@llnl.gov]
Sent: Wednesday, September 21, 2016 11:26 AM
To: Crombie, Burnette N ; r-help@r-project.org
Subject: Re: [R] if/else help
Hopefully this is not a homework question.
The other responses are fine, but I would sugges
eers.
-Original Message-
From: PIKAL Petr [mailto:petr.pi...@precheza.cz]
Sent: Thursday, June 18, 2015 10:56 AM
To: Crombie, Burnette N; r-help@r-project.org
Subject: RE: [R] How to round only one df row & how to keep 3rd sigdif if zero
Hi
You need to distinguish between an object and printing a
ssage-
From: Boris Steipe [mailto:boris.ste...@utoronto.ca]
Sent: Thursday, December 18, 2014 5:29 AM
To: Crombie, Burnette N
Cc: r-help@r-project.org
Subject: Re: [R] Make 2nd col of 2-col df into header row of same df then
adjust col1 data display
What you are describing sounds like a very spre
ve time. I'll update everyone then. -- BNC
-Original Message-
From: John Kane [mailto:jrkrid...@inbox.com]
Sent: Friday, December 19, 2014 8:44 AM
To: Sven E. Templer; Chel Hee Lee
Cc: R Help List; Crombie, Burnette N
Subject: Re: [R] Make 2nd col of 2-col df into header row of same
Oh, also thanks for the speed comparisons. Missed that in my first
read-through. Very interesting and informative. BNC
-Original Message-
From: Crombie, Burnette N
Sent: Thursday, July 11, 2013 4:40 PM
To: 'arun'
Cc: R help
Subject: RE: [R] create new matrix from us
Thanks very much for your contribution, Siraaj. I appreciate you taking the
time to help me learn loops, etc. BNC
-Original Message-
From: Siraaj Khandkar [mailto:sir...@khandkar.net]
Sent: Wednesday, August 14, 2013 9:08 PM
To: Crombie, Burnette N
Cc: r-help@r-project.org
Subject: Re
Thanks, Arun. I will study this as soon as possible. I really appreciate your
time and R mentoring.
Try this:
res1<-sapply(vec3,function(x) length(vec2New[grep(x,vec2New)]) )
dat1<-data.frame(res1,Name=names(vec3))
dat1$Name<-factor(dat1$Name,levels=c(
ied a couple of modifications, but obviously don't know what I'm doing
because I haven't fixed it. If anything comes to you in the meantime, please
advise. Thanks.
-Original Message-
From: arun [mailto:smartpink...@yahoo.com]
Sent: Tuesday, February 18, 2014 2:28 AM
To:
The script works nicely, Arun. You were right, I pasted code from email
instead of Rhelp and didn't reformat properly in R. I appreciate your time
with this!
-Original Message-
It seems like part of the next line is also being run (in the end 'colnames').
For e.g.
res2 <- within(as.dat
11 matches
Mail list logo