The "why" is that you haven't got the path correct yet.
Assuming you are running R.app or R64.app (running the R Console),
one way to find the correct path is to type
file.choose()
Navigate to your file and choose it. It will then tell you the correct
path.
You can also do things like
source( file.path( 'path.to.folder', 'filename' ) )
if you want to keep the folder name and the filename separate.
You could also open Terminal (in the Utilities folder) and type
find . -name filename
and it should tell you the path relative to your home folder. This assumes
that the file is somewhere below
/Users/gban
-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
On 4/24/13 8:46 AM, "Gitte Brinch Andersen" <GITTEBA at
hum-gen.au.dk> wrote:
>Hi
>
>I am really sorry for this probably quite simple question.
>I am new to R, and I am running a pipeline that has already been made.
>All I have to do is give the paths for different folders, where the
>pipeline can find the files with my data.
>
>But every time I try to run the pipeline it returns with the message,
>that it cannot find the file. And I really don't know why. I have found
>the path by going to the folder and finding the info about the folder,
>where the location of this is stated. I copy-paste this into the source
>command.
>
>The path for the folder is:
>
>When found with the "info about the folder":
>/Users/gban/Desktop/Methylation analysis/MethylationDataAnalysis
>
>But I think it should be:
>/Users/gban/Desktop/Methylation
>analysis/MethylationDataAnalysis/1.Normalization_raw_data/
>as it is the folder 1.Normalization_raw_data where my data are in.
>
>I have tried both paths but it returns with this message every time:
>
>> source('/Users/gban/Desktop/Methylation
>>analysis/MethylationDataAnalysis/1.Normalization_raw_data/pipelineIllumin
>>aMethylation.main.R')
>Fejl i file(filename, "r", encoding = encoding) :
> cannot open the connection
>In addition: Advarselsbesked:
>In file(filename, "r", encoding = encoding) :
> cannot open file '/Users/gban/Desktop/Methylation
>analysis/MethylationDataAnalysis/1.
>450K_pipeline_Nov2012release./SRC/loadMethylumi2.R': No such file or
>directory
>
>
>Do you have any idea why?
>I know this is probably more a question of how to type the path on a mac,
>than it is a question of how R works.
>
>But I am really frustrated about this, and thought it might be possible
>for you to help?
>
>Thank you in advance, and again sorry for the quite stupid question.
>
>Best
>
>Gitte Brinch Andersen
>
>E-mail: gitteba at hum-gen.au.dk
>
>______________________________________________
>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.