Help on Histogram ~ Barplot
Unless I have missed something somewhere, the object is named "graph" not
"RData" . Further, the call to by() is complete nonsense, with arguments
misspecified -- there is no "names.arg" argument to by() (the 2nd argument
is named "INDICES")
It appears that some people need to spend some time with R tutorials before
further posting (or replying) on this list.
Cheers,
Bert
graph<- read.csv("RData.csv", header = TRUE)
On Thu, May 28, 2015 at 7:08 AM, Kristina Wolf <kmwolf at ucdavis.edu> wrote:
I don't know why that doesn't work, but try adding in sep="," In your read.csv() That shouldn't matter as to whether or not it recognizes your object though, but it will matter in how your object is read. Other simple things might be to make sure the file is saved and then close it out to make sure there is no open dialog box preventing the save from occurring. Then run the read.csv again and see if the object shows up in R. ~ Kristina Kristina Wolf PhD Candidate, Graduate Group in Ecology M.S. Soil Science, B.S. Animal Science KristinaMWolf.com Restoration Ecology Lab Department of Plant Sciences University of California, Davis (530) 750-9771
On May 28, 2015, at 6:13 AM, Shivi82 <shivibhatia at ymail.com> wrote: HI David, So if I understand from your post below, when we import a file in R- we
need
to make sure that the variable names do not have any space nor they
should
be in special characters or not in comma format. Please correct me I am wrong. Now I have changed the file to a new file as RData.csv file and now when
I
use the below code it gives me an error
graph<- read.csv("RData.csv", header = TRUE)
MonthlyWeight<-by(RData$Weight,names.arg = RData$Month,sum)
The error is : Error in by(RData$Weight, names.arg = RData$Month, sum) :
object 'RData' not found. Whereas I checked using "getwd()" this file is
saved in the working directory.
Please suggest.
--
View this message in context:
Sent from the R help mailing list archive at Nabble.com.
______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. ______________________________________________ R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.