Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-31 Thread Ivan Krylov
В Thu, 31 Aug 2023 14:59:07 + Christophe Bousquet пишет: > So I get no output for tools::Rcmd('SHLIB --version'). > > I tried to run tools::Rcmd('SHLIB --help') or tools::Rcmd('check > --help'), but no output neither. > > I had more success with tools::Rcmd('BATCH --help'): The job of

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-31 Thread Christophe Bousquet via R-help
> This can be considered good news. You have just successfully performed > the job that is normally done by R CMD SHLIB when installing source > packages or running inline C++ code. The environment variables, at > least inside your running R session, are completely fine. > > Now we need to find

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-31 Thread Ivan Krylov
В Thu, 31 Aug 2023 14:01:54 + Christophe Bousquet пишет: > So when I run the commands, I get this output. I honestly have no > clue whether this can be considered as something useful or not :-/ > > ``` > > tools:::.shlib_internal(c('-n', 'hello.c')) > make cmd is > make -f

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-31 Thread Christophe Bousquet via R-help
> So starting a new Rcmd.exe process fails for some reason. > > If you take the same R session where the environment variables are > right and Sys.which() resolves Make and GCC and try to run > tools:::.shlib_internal(c('-n', 'hello.c')) or > tools:::.shlib_internal('hello.c'), does it do

Re: [R] simulating future observations from heteroscedastic fits

2023-08-31 Thread Spencer Graves
On 8/31/23 1:27 AM, Spencer Graves wrote: Hello, All:   I want to simulate future observations from fits to heteroscedastic data. A simple example is as follows: (DF3_2 <- data.frame(y=c(1:3, 10*(1:3)), gp=factor(rep(1:2, e=3 # I want to fit 4 models #

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-31 Thread Ivan Krylov
В Thu, 31 Aug 2023 11:57:06 + Christophe Bousquet пишет: > > tools::Rcmd('SHLIB -n hello.c') > > tools::Rcmd('SHLIB hello.c') > > > > What do the commands print? Does the second command fail? > > I basically get no output from the two commands, apart from a new > blank R prompt. So

Re: [R] Problems with installing R packages from source and running C++ in R, even on fresh R installation

2023-08-31 Thread Christophe Bousquet via R-help
> When installing packages containing code to compile, R eventually calls > R > CMD SHLIB. Same thing happens with inline C++: it gets stored in a > temporary file, compiled into a *.dll using R CMD SHLIB and then loaded > using dyn.load(). > > Write the following into a file named hello.c: > >

Re: [R] How to create an R input

2023-08-31 Thread Ebert,Timothy Aaron
Add a break. Something like: If (is.character(x)) break If you have nested loops then a similar statement is needed for each level. "break" only exits the innermost loop. Tim -Original Message- From: R-help On Behalf Of Jeff Reichman Sent: Wednesday, August 30, 2023 9:46 PM To:

Re: [R] Book Recommendation

2023-08-31 Thread Stephen H. Dawson, DSL via R-help
Thanks, Greg. I appreciate your helpful assistance. Kindest Regards, *Stephen Dawson, DSL* /Executive Strategy Consultant/ Business & Technology +1 (865) 804-3454 http://www.shdawson.com On 8/30/23 16:52, Greg Snow wrote: Stephen, I see lots of answers with packages and resources, but not

[R] simulating future observations from heteroscedastic fits

2023-08-31 Thread Spencer Graves
Hello, All: I want to simulate future observations from fits to heteroscedastic data. A simple example is as follows: (DF3_2 <- data.frame(y=c(1:3, 10*(1:3)), gp=factor(rep(1:2, e=3 # I want to fit 4 models # and simulate future observations from all 4: fit11