[R] Error not found - for file retrieval with head()
jim holtman
jholtman at gmail.com
Fri Oct 5 03:03:46 CEST 2012
Couple of things:
1. 'head' it to look at objects, not files
2. you specified 'turtlehatch.csv' without quotes which told R to look
for an object by that name
3. you probably want to use 'file.show'
On Thu, Oct 4, 2012 at 5:47 PM, Jhope <jeanwaijang at gmail.com> wrote:
> Hi R-listers,
>
> I am in plyr and using the script below and when I try to pull up the .csv
> file with head() it does not show up. I am not sure where I am going wrong.
> I have also checked the file box for turtlehatch.csv and it still does not
> show up when I head(turtlehatch.csv). Am I missing a command?
>
> Please advise, Jean
>
>
>
>> devel.index <- function(values, weights=c(1, 2, 3, 4, 5, 6)) {
> + foo <- values*weights
> + return(apply(foo, 1, sum) / apply(values, 1, sum))
> + }
>> data.to.analyze$DevelopIndex <-
>> devel.index(data.to.analyze[,c("ST0","ST1", "ST2", "ST3", "ST4",
>> "MaxHatch")])
>> write.csv(data.to.analyze, "turtlehatch.csv", row.names=FALSE)
>> head(turtlehatch.csv)
> Error in head(turtlehatch.csv) : object 'turtlehatch.csv' not found
>
>
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/Error-not-found-for-file-retrieval-with-head-tp4645091.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org mailing list
> 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.
--
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
More information about the R-help
mailing list