[R] problem with system.file

peter dalgaard pdalgd at gmail.com
Mon May 22 14:53:16 CEST 2017


> On 22 May 2017, at 14:43 , Pau Marc Muñoz Torres <paumarc at gmail.com> wrote:
> 
> Hello everybody
> 
> I am trying to use system.file but it returns not file found
> 
> what I have done is
> 
>> sample <- system.file("results.xlsx","estdata", package =
> "readxl",mustWork = TRUE)
> Error in system.file("results.xlsx", "estdata", package = "readxl",
> mustWork = TRUE) :
>  no file found
> 
> i have checked the path was correct and the file exists with
> 
> FILES <- file.path("results.xlsx")
> present <- file.exists(FILES)
> 
> and it returned a true values. Anyone can tell me which can be the problem ?

Not if you don't tell us WHERE you expect to find the file... 

Where is it located, and what is the value of FILES above?

It is not unlikely that you misunderstande what system.file() is supposed to do.

-pd


> 
> thanks
> 
> Pau Marc Muñoz Torres
> skype: pau_marc
> http://www.linkedin.com/in/paumarc
> http://www.researchgate.net/profile/Pau_Marc_Torres3/info/
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> 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.

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com



More information about the R-help mailing list