Re: [R] /usr/local/lib/R/site-library is not writable

2021-04-07 Thread Dirk Eddelbuettel


Hi Gene,

"It's complicated". (Not really, but listen for a sec...)

We need to ship a default policy that makes sense for all / most
situations.  So

- users cannot write into /usr/local/lib/R/site-library -- unless they are
  set up to, but adding them to the 'group' that owns that directory

- root can (but ideally one should not run as root as one generally does not
  now what code you might get slipped in a tar.gz); but root can enable users

- so we recommend letting (some or all) users write there by explicitly
  adding them to an appropriate group.

Personally, I do not think personal libraries are a good idea on shared
machines because you can end up with a different set of package (versions)
than your colleague on the same machine.  And or you running shiny from $HOME
have different packages than shiny running as server. And on and on. Other
people differ, and that is fine. If one wants personal libraries one can.

I must have explained the reasoning and fixes a dozen times each on
r-sig-debian (where you could have asked this too) and StackOverflow. At
least the latter can be searched so look at this set:
https://stackoverflow.com/search?q=user%3Ame+is%3Aanser+%2Fusr%2Flocal%2Flib%2FR%2Fsite-library

Happy to take it offline too, and who knows, we even get to meet for a coffee
one of these days.

Hope this helps, Dirk

-- 
https://dirk.eddelbuettel.com | @eddelbuettel | e...@debian.org

__
R-help@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.


Re: [R] R Language on Windows 2019

2021-04-07 Thread Jeff Newmiller
There is one volunteer-supported installer for all Windows versions, and it is 
not built as a Windows Service. I highly doubt that any of those volunteer 
developers have access to Windows Server 2019... if it doesn't work there 
interactively then you may need to enable some level of compatibility using OS 
configuration tools.

On April 7, 2021 11:49:38 AM PDT, Tammy Regalado  wrote:
>
>What versions of Windows can R Language be installed on?  Specifically,
>is Windows Server 2019 a supported platform?
>__
>R-help@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.

-- 
Sent from my phone. Please excuse my brevity.

__
R-help@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.


Re: [R] /usr/local/lib/R/site-library is not writable

2021-04-07 Thread Jeff Newmiller
1. Use a personal library. Mucking with the default library puts you at risk of 
changing file permissions on your personal files inadvertently and making them 
unusable by your normal user. Even if you did alter your user permissions so 
you could mess with it without elevating privileges, POSIX is designed as a 
multi-user system and the other users will generally not like having shared 
packages changed without their knowledge.

2. The default library is where R goes looking if you don't have the desired 
package in your personal package. It is normally updated only when the R 
software is updated.

On April 7, 2021 12:40:04 PM PDT, Gene Leynes  wrote:
>Hello R Community,
>
>I've been using R for a long time, and this is a question that still
>makes
>me think twice every single time I install R, which is more and more
>often .
>
>The first search hit is this StackOverflow question:
>https://stackoverflow.com/questions/32540919/library-is-not-writable
>
>The warning message hasn't changed over the years:
>
>install.packages("randomForest")
>Installing package into ‘/usr/local/lib/R/site-library’
>(as ‘lib’ is unspecified)
>Warning in install.packages :
>  'lib = "/usr/local/lib/R/site-library"' is not writable
>
>In this question they suggest using the personal library, which is what
>I
>end up doing as well, but some people suggest changing your group. 
>This
>actually seems like the right answer to me, but others say they had
>problems when they changed groups, which also sounds about right.
>
>Can someone please tell me (or tell StackOverflow) the real best
>practice?
>
>I've gotten into some very thorny issues with installations that can't
>find
>any library when I deploy jobs using cron or other users, and it's hard
>to
>remember / figure out how to install (if missing) libraries in the
>script
>because it's hard to remember the mirror syntax.
>
>I know there's a packrat  package, and I've invented some workarounds,
>but
>I normally just need two or three stable packages for a particular
>project.
>I'd bet that .libPaths would be implemented differently today, but
>maybe
>with the right library path none of that would be necessary to
>understand?
>
>My final simplified questions are:
>
>  1. What is the best practice to install libraries so that the current
>   user (Linux) can always find them?
>  2. Why is the default library path not writable by default, should we
>   change that?
>
>Hope everyone's doing well out there, and I hope to see some of you at
>conferences when things get back to normal.
>
>Thank you,
>
>Gene
>
>   [[alternative HTML version deleted]]
>
>__
>R-help@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.

-- 
Sent from my phone. Please excuse my brevity.

__
R-help@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.


Re: [R] R Language on Windows 2019

2021-04-07 Thread Rui Barradas

Hello,

Yes, it is.
I have worked with R on Windows Server for many years with no problems 
except for the usual ones, users make something wrong, configurations, 
tool chains needing upgrading, etc. But nothing unsolvable.
Give it a try and I'm sure that you will be find it that R is great 
software with no real Windows Server 2019 compatibility problems.


Hope this helps,

Rui Barradas

Às 19:49 de 07/04/21, Tammy Regalado escreveu:


What versions of Windows can R Language be installed on?  Specifically, is 
Windows Server 2019 a supported platform?
__
R-help@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.



__
R-help@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.


Re: [R] /usr/local/lib/R/site-library is not writable

2021-04-07 Thread Jim Lemon
Hi Gene,
This is probably not best practice, but I install packages as root,
which allows me to write into the default library. The restriction on
non-root users being blocked from making changes to appications is
pretty standard.

Jim

On Thu, Apr 8, 2021 at 8:18 AM Gene Leynes  wrote:
>
> Hello R Community,
>
> I've been using R for a long time, and this is a question that still makes
> me think twice every single time I install R, which is more and more often .
>
> The first search hit is this StackOverflow question:
> https://stackoverflow.com/questions/32540919/library-is-not-writable
>
> The warning message hasn't changed over the years:
>
> install.packages("randomForest")
> Installing package into ‘/usr/local/lib/R/site-library’
> (as ‘lib’ is unspecified)
> Warning in install.packages :
>   'lib = "/usr/local/lib/R/site-library"' is not writable
>
> In this question they suggest using the personal library, which is what I
> end up doing as well, but some people suggest changing your group.  This
> actually seems like the right answer to me, but others say they had
> problems when they changed groups, which also sounds about right.
>
> Can someone please tell me (or tell StackOverflow) the real best practice?
>
> I've gotten into some very thorny issues with installations that can't find
> any library when I deploy jobs using cron or other users, and it's hard to
> remember / figure out how to install (if missing) libraries in the script
> because it's hard to remember the mirror syntax.
>
> I know there's a packrat  package, and I've invented some workarounds, but
> I normally just need two or three stable packages for a particular project.
> I'd bet that .libPaths would be implemented differently today, but maybe
> with the right library path none of that would be necessary to understand?
>
> My final simplified questions are:
>
>1. What is the best practice to install libraries so that the current
>user (Linux) can always find them?
>2. Why is the default library path not writable by default, should we
>change that?
>
> Hope everyone's doing well out there, and I hope to see some of you at
> conferences when things get back to normal.
>
> Thank you,
>
> Gene
>
> [[alternative HTML version deleted]]
>
> __
> R-help@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.

__
R-help@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.


[R] /usr/local/lib/R/site-library is not writable

2021-04-07 Thread Gene Leynes
Hello R Community,

I've been using R for a long time, and this is a question that still makes
me think twice every single time I install R, which is more and more often .

The first search hit is this StackOverflow question:
https://stackoverflow.com/questions/32540919/library-is-not-writable

The warning message hasn't changed over the years:

install.packages("randomForest")
Installing package into ‘/usr/local/lib/R/site-library’
(as ‘lib’ is unspecified)
Warning in install.packages :
  'lib = "/usr/local/lib/R/site-library"' is not writable

In this question they suggest using the personal library, which is what I
end up doing as well, but some people suggest changing your group.  This
actually seems like the right answer to me, but others say they had
problems when they changed groups, which also sounds about right.

Can someone please tell me (or tell StackOverflow) the real best practice?

I've gotten into some very thorny issues with installations that can't find
any library when I deploy jobs using cron or other users, and it's hard to
remember / figure out how to install (if missing) libraries in the script
because it's hard to remember the mirror syntax.

I know there's a packrat  package, and I've invented some workarounds, but
I normally just need two or three stable packages for a particular project.
I'd bet that .libPaths would be implemented differently today, but maybe
with the right library path none of that would be necessary to understand?

My final simplified questions are:

   1. What is the best practice to install libraries so that the current
   user (Linux) can always find them?
   2. Why is the default library path not writable by default, should we
   change that?

Hope everyone's doing well out there, and I hope to see some of you at
conferences when things get back to normal.

Thank you,

Gene

[[alternative HTML version deleted]]

__
R-help@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.


[R] R Language on Windows 2019

2021-04-07 Thread Tammy Regalado


What versions of Windows can R Language be installed on?  Specifically, is 
Windows Server 2019 a supported platform?
__
R-help@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.


Re: [R] R does not start from (Debian) linux command line - error with doWithOneRestart() - segmentation fault

2021-04-07 Thread Ashim Kapoor
On Wed, Apr 7, 2021 at 12:51 PM Martin Maechler
 wrote:
>
> > Ashim Kapoor
> > on Wed, 7 Apr 2021 10:35:14 +0530 writes:
>
> > Dear R experts,
>
> > Here is my problem :
>
> > R startup FAILS with an error message. The error message
> > is more meaningful when I do invoke R via sudo OR as
> > root. I attach the startup messages when I invoke R as :
>
> > 1. as non root user 2. with sudo 3. as Root user.
>
> > The error messages ( mentioned in snippets below ) are
> > more meaningful to me in the above mentioned order.
>
> Thank you, Ashim.
>
> Yes, the messages point to something really bad.
>
> OTOH ("On the other hand"), what we *can* see is that you try to
> start R version 3.6.3.
>

My apologies for not being clear.

I would like to clarify :

1. The error message from the incantation `R` is not very informative.

2. The error message from the incantation `sudo R` says (among other
things which don't seem significant to me):
Error in doWithOneRestart(return(` \\x82\\x0ccPV`), restart) :
  not a proper file name

3. The error message from invoking R as a root user says:

Error: not a proper file name
Fatal error: unable to initialize the JIT

I found this on the internet :
https://stackoverflow.com/questions/19512165/error-in-dowithonerestart

The error messages and the above link point to issues with JAVA, but
it does not say how to fix them.

That is why I thought : there is an .xlsx file which has non english
characters which is messing with
Java.

Query : is there a way to do JAVA garbage collection when R is not starting ?

> While that is not extremely old, it may well be older than
> several other pieces of software (or even hardware) that you are
> running with.
>
> I very very  *strongly* recommend to use an R version 4.0.x ... and why not
> use the latest  4.0.5 ?
>

We upgraded to 4.0.5 but it did not make a difference. We restarted
the computer and that fixed the error.
I think the JAVA garbage collection kicked in when we reset the
computer and that is why it was fixed on rebooting. Not sure though.

> Then, it may also be caused by a mismatch of system libraries
> and your oldish version of R. ... but there I'd strongly
> recommend consulting with other Debian users, notably as there
> is a dedicated  mailing list  R-SIG-Debian --> do subscribe
> there, and ask -- with more details on how you got your R: Is it
> the default R on your Debian, which version of Debian,  etc.
>
> Last but not least, Dirk Eddelbuettel, the maintainer of the
> official R Debian package maintains a nice web page -- part of
> the official CRAN web pages, but unfortunately a bit hidden
> nowadays, (not the least because CRAN still uses frames (würg!!)):
>
>   https://cloud.r-project.org/bin/linux/debian/
>
> A very nice and useful page,  much underrated and underused,
> probably.
>

Thank you for this.

> Best regards,
>
> Martin Maechler
> ETH Zurich  and  R Core Team
>
>
> > When I google around for the error message, it looks like
> > there is an .xlsx file which has non english characters
> > which is messing with Java.
>
> > I do not know how to fix this. I tried :-
>
> > R --vanilla
>
> > so that it would not use any startup scripts but that also
> > does not work.
>
> > - snip
> > 
> 
>
> > When I try to start R from the command line :
>
> > ~$ R
>
> >  *** caught segfault *** address (nil), cause 'unknown'
>
> > Traceback: 1: NextMethod(.Generic) 2:
> > Ops.numeric_version(R_version_built_under, "3.0.0") 3:
> > testRversion(pkgInfo, package, pkgpath) 4:
> > library(package, lib.loc = lib.loc, character.only = TRUE,
> > logical.return = TRUE, warn.conflicts = warn.conflicts,
> > quietly = quietly, mask.ok = mask.ok, exclude = exclude,
> > include.only = include.only, attach.required =
> > attach.required) 5: doTryCatch(return(expr), name,
> > parentenv, handler) 6: tryCatchOne(expr, names, parentenv,
> > handlers[[1L]]) 7: tryCatchList(expr, classes, parentenv,
> > handlers) 8: tryCatch(library(package, lib.loc = lib.loc,
> > character.only = TRUE, logical.return = TRUE,
> > warn.conflicts = warn.conflicts, quietly = quietly,
> > mask.ok = mask.ok, exclude = exclude, include.only =
> > include.only, attach.required = attach.required), error =
> > function(e) e) 9: require(pkg, quietly = TRUE,
> > warn.conflicts = FALSE, character.only = TRUE) 10:
> > .OptRequireMethods()
>
> > Possible actions: 1: abort (with core dump, if enabled) 2:
> > normal R exit 3: exit R without saving workspace 4: exit R
> > saving workspace Selection: Segmentation fault
>
> > - snip
> > 
> 

Re: [R] R does not start from (Debian) linux command line - error with doWithOneRestart() - segmentation fault

2021-04-07 Thread Martin Maechler
> Ashim Kapoor 
> on Wed, 7 Apr 2021 10:35:14 +0530 writes:

> Dear R experts,

> Here is my problem :

> R startup FAILS with an error message. The error message
> is more meaningful when I do invoke R via sudo OR as
> root. I attach the startup messages when I invoke R as :

> 1. as non root user 2. with sudo 3. as Root user.

> The error messages ( mentioned in snippets below ) are
> more meaningful to me in the above mentioned order.

Thank you, Ashim.

Yes, the messages point to something really bad.

OTOH ("On the other hand"), what we *can* see is that you try to
start R version 3.6.3.

While that is not extremely old, it may well be older than
several other pieces of software (or even hardware) that you are
running with.

I very very  *strongly* recommend to use an R version 4.0.x ... and why not
use the latest  4.0.5 ?

Then, it may also be caused by a mismatch of system libraries
and your oldish version of R. ... but there I'd strongly
recommend consulting with other Debian users, notably as there
is a dedicated  mailing list  R-SIG-Debian --> do subscribe
there, and ask -- with more details on how you got your R: Is it
the default R on your Debian, which version of Debian,  etc.

Last but not least, Dirk Eddelbuettel, the maintainer of the
official R Debian package maintains a nice web page -- part of
the official CRAN web pages, but unfortunately a bit hidden
nowadays, (not the least because CRAN still uses frames (würg!!)):

  https://cloud.r-project.org/bin/linux/debian/

A very nice and useful page,  much underrated and underused,
probably.

Best regards,

Martin Maechler
ETH Zurich  and  R Core Team


> When I google around for the error message, it looks like
> there is an .xlsx file which has non english characters
> which is messing with Java.

> I do not know how to fix this. I tried :-

> R --vanilla

> so that it would not use any startup scripts but that also
> does not work.

> - snip
> 


> When I try to start R from the command line :

> ~$ R

>  *** caught segfault *** address (nil), cause 'unknown'

> Traceback: 1: NextMethod(.Generic) 2:
> Ops.numeric_version(R_version_built_under, "3.0.0") 3:
> testRversion(pkgInfo, package, pkgpath) 4:
> library(package, lib.loc = lib.loc, character.only = TRUE,
> logical.return = TRUE, warn.conflicts = warn.conflicts,
> quietly = quietly, mask.ok = mask.ok, exclude = exclude,
> include.only = include.only, attach.required =
> attach.required) 5: doTryCatch(return(expr), name,
> parentenv, handler) 6: tryCatchOne(expr, names, parentenv,
> handlers[[1L]]) 7: tryCatchList(expr, classes, parentenv,
> handlers) 8: tryCatch(library(package, lib.loc = lib.loc,
> character.only = TRUE, logical.return = TRUE,
> warn.conflicts = warn.conflicts, quietly = quietly,
> mask.ok = mask.ok, exclude = exclude, include.only =
> include.only, attach.required = attach.required), error =
> function(e) e) 9: require(pkg, quietly = TRUE,
> warn.conflicts = FALSE, character.only = TRUE) 10:
> .OptRequireMethods()

> Possible actions: 1: abort (with core dump, if enabled) 2:
> normal R exit 3: exit R without saving workspace 4: exit R
> saving workspace Selection: Segmentation fault

> - snip
> 

> When I try to start R with sudo it gives a more clear
> message :-

> ~$ sudo R

>  *** caught segfault *** address (nil), cause 'unknown'

> Traceback: 1: NextMethod(.Generic) 2:
> Ops.numeric_version(R_version_built_under, "3.0.0") 3:
> testRversion(pkgInfo, package, pkgpath) 4:
> library(package, lib.loc = lib.loc, character.only = TRUE,
> logical.return = TRUE, warn.conflicts = warn.conflicts,
> quietly = quietly, mask.ok = mask.ok, exclude = exclude,
> include.only = include.only, attach.required =
> attach.required) 5: doTryCatch(return(expr), name,
> parentenv, handler) 6: tryCatchOne(expr, names, parentenv,
> handlers[[1L]]) 7: tryCatchList(expr, classes, parentenv,
> handlers) 8: tryCatch(library(package, lib.loc = lib.loc,
> character.only = TRUE, logical.return = TRUE,
> warn.conflicts = warn.conflicts, quietly = quietly,
> mask.ok = mask.ok, exclude = exclude, include.only =
> include.only, attach.required = attach.required), error =
> function(e) e) 9: require(pkg, quietly = TRUE,
> warn.conflicts = FALSE, character.only = TRUE) 10:
> .OptRequireMethods()

> Possible actions: 1: abort (with core dump, if enabled) 2:
> normal R exit 3: exit R without saving workspace 4: exit R
> saving workspace Selection: