[R] Dummies: Call function or script

David Winsemius dwinsemius at comcast.net
Sat Apr 18 13:50:40 CEST 2009


"xyz" does not look to me like a valid directory for Windows. Try a  
complete directory string:

setwd("C://username/My Documents/r-work/") # might be something more  
likely

Note the forward slashes. Backslashes are special characters in R. The  
interpreter would need to see each backslash doubled in ourder to  
succeed.

(You might reconsider whether you want to address the group as  
"Dummies".)


On Apr 18, 2009, at 5:28 AM, Ali Faisal wrote:

>
> Hello all,
> I am new to R and therefore this question is sort of very basic.  
> Could you
> kindly let me know how can I call a function or script from R  
> GUI(Windows),
> my directory where these functions/scripts are located is suppose  
> xyz and I
> have tried setwd("xyz") but still it gives me the "Error: object abc  
> not
> found" where abc is the script/function name...
>
> Would appreciate any guidance,
> Thanks,
> Ali

David Winsemius, MD
Heritage Laboratories
West Hartford, CT



More information about the R-help mailing list