[R] Discussion board

David Winsemius dwinsemius at comcast.net
Sun Jan 19 21:45:27 CET 2014


On Jan 18, 2014, at 7:33 PM, F. Keshavarz wrote:

> Hi
> 
> 1-I cannot find a way to add a topic in the discussion board.

 Rhelp is NOT a discussion board. It is a mailing list to which you have emailed a question. You should use an informative subject line.

> 2-I have written and tested the script gemonitor.R in RGUI and it works
> fine; however when I run the
> 
> source("http://spark-public.s3.amazonaws.com/compdata/scripts/getmonitor-test.R")
> getmonitor.testscript()
> 
> I get the following error message
> Error in data$sulfate : $ operator is invalid for atomic vectors
> In addition: Warning message:
> In getmonitor.testscript() : NAs introduced by coercion
> 
> I cannot understand why.

You obviously have run something more than just that R script. I get:

> getmonitor.testscript()
Error in checkSanity() : 
  directory 'specdata' not found; please change your working directory

>  My gmonitor.R script is as follows.
> 
> # "getmonitor.R"
> getmonitor<- function(id, directory,summerize=FALSE) {
>    xid<-toString(id)
>    xid<-paste("000",xid,sep="")
>    xid<-substr(xid, nchar(xid)-2,nchar(xid))
>    f<-sub(" ","",paste(xid,".csv",sep=""))
>    f<-sub(" ","",paste(directory, "/",f,sep=""))
>    ff<-read.csv(f)
>    print(ff)
>    if (summerize == TRUE){
>        print(summary(ff))
> 
>    }
> }
> 
> 3-What should I submit, the output file or the code?

You should provide a) enough background in English to let us know what you are trying to do, and b) enough code to determine what packages need to be installed and loaded, and c) enough data to allow these packages to do a) and b)

> 	[[alternative HTML version deleted]]

And please ....  do post in plain text as the Posting Guide requests. As I said above, Rhelp is an old-style mailing list, not one of those new-fangled web discussion boards.

and as noted at the bottom of all postings ...\/\/\/\/\/\/\/\/\//\
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
^^^^^^^^^^^^^^^^^^^^^

and further ...\/\/\/\/\/\/\
> and provide commented, minimal, self-contained, reproducible code.
^^^^^^^^^^^^^

-- 

David Winsemius
Alameda, CA, USA




More information about the R-help mailing list