> On Mar 2, 2016, at 10:00 AM, John Hillier <[email protected]> wrote:
>
>
> Dear All,
>
>
> I am a relative newbie to R, and am struggling to install packages on my
> laptop (although I have managed to on my desktop and a borrowed departmental
> laptop).
>
The words "my laptop" is rather uninformative. Based on the path below I
guessing OSX.
>
> I have tried various packages with the same result. Illustration for
>
>> install.packages("outliers")
>
>
> .... leads to .....
>
>
> Error in file(con, "r") : cannot open the connection
> Calls: <Anonymous> -> sub -> grep -> readLines -> file
> In addition: Warning message:
> In file(con, "r") :
> cannot open file
> '/sw/Library/Frameworks/R.framework/Versions/3.2/Resources/etc/Makeconf': No
> such file or directory
Installing R inside /sw/.. directory is not a standard location. What does this
return:
Sys.getenv( "R_HOME" )
On my version of OSX 10.11 with R installed from the "standard" binary
installer package, it returns
[1] "/Library/Frameworks/R.framework/Resources"
>
> I have tried in both the R environment on command line, and in RStudio, with
> the same result, and reinstalled and updated both r-base and rstudio-desktop
> via fink.
fink ,,,, That's probably the reason (again if this is a Mac.) The default
installation location is not being chosen. I don't understand why you are not
using the binary installer. I've never seen anyone use fink for installation on
a Mac but have heard of attempts with MacPorts and homebrew. Simon Urbanek says
if you use one of those package installers you are "on your own". That's a
route you should only consider if you have serious NIX-skills.
> Both using a CRAN mirror and using a download (outliers_0.14.tar.gz) seem to
> produce the same result, and I think they're both working as the output says
> 'downloaded' (see below)
>
>
>> install.packages("outliers")
> Installing package into �
> (as � is unspecified)
> --- Please select a CRAN mirror for use in this session ---
> trying URL 'https://mirrors.ebi.ac.uk/CRAN/src/contrib/outliers_0.14.tar.gz'
> Content type 'application/x-gzip' length 15090 bytes (14 KB)
> ==================================================
> downloaded 14 KB
>
>
>> From looking aroud on the web it seems that the message "In file(con, "r") :
>> cannot open file" just means that R cannot find a file it thinks it needs.
>> However, I've looked in
>> /sw/Library/Frameworks/R.framework/Versions/3.2/Resources/etc/ both on this
>> machine and the other laptop that is able to install packages, and
>> 'Makeconf' is not in ether of them.
I do have a copy of that program in:
/Library/Frameworks/R.framework/Versions/3.2/Resources/etc/Makeconf
>
>
> So, I'm thoroughly confused and have run out of ideas.
The correct place to post questions about Mac installations is:
[email protected]
>Please help.
>
>
> I hope that this is something simple that I'm missing. If so, a pointer to a
> manual page or instructions would be gratefully received.
https://cran.rstudio.com/bin/macosx/
>
>
> John
>
>
> p.s - Full output in sequence in case it's useful.
>
>
>> install.packages("outliers")
> Installing package into �
> (as � is unspecified)
> --- Please select a CRAN mirror for use in this session ---
> trying URL 'https://mirrors.ebi.ac.uk/CRAN/src/contrib/outliers_0.14.tar.gz'
> Content type 'application/x-gzip' length 15090 bytes (14 KB)
> ==================================================
> downloaded 14 KB
>
> Error in file(con, "r") : cannot open the connection
> Calls: <Anonymous> -> sub -> grep -> readLines -> file
> In addition: Warning message:
> In file(con, "r") :
> cannot open file
> '/sw/Library/Frameworks/R.framework/Versions/3.2/Resources/etc/Makeconf': No
> such file or directory
>
> The downloaded source packages are in
> �
> Warning message:
> In install.packages("outliers") :
> installation of package � had non-zero exit status
>
>
>
>
>
> -------------------------
> Dr John Hillier
> Senior Lecturer - Physical Geography
> Loughborough University
> 01509 223727
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> [email protected] 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.
David Winsemius
Alameda, CA, USA
______________________________________________
[email protected] 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.