[R] Option "-shared" not being passed to gcc when installing packages

2023-09-20 Thread Simon Knapp
When installing packages, the option "-shared" is not being passed to gcc which hence fails, complaining that it cannot find main. When installing "mgcv", for example, I get the output listed below, in which the last call to gcc should contain the option "-shared". This problem occurs for all of s

Re: [R] Could you manually replicate execution of a R function

2023-09-20 Thread Jorgen Harmse via R-help
There may be collisions between variables in .GlobalEnv and variables in the function-call environment, and the parent of the function-call environment probably includes functions & other variables not available in .GlobalEnv. (If the function calls substitute or anything like that then the prob

[R] Unable to manually replicate execution of a R function

2023-09-20 Thread Brian Smith
Hi, ** In may earlier post there were some typo, so reposting the same after correction** I am trying to replicate a function from rugarch package manually. Below is the calculation based on the function, library(rugarch) data(dji30ret) spec = ugarchspec(mean.model = list(armaOrder = c(1,1), inc

Re: [R] apply a function to a list of lists

2023-09-20 Thread Ivan Krylov
On Tue, 19 Sep 2023 17:14:58 +0200 arnaud gaboury wrote: > non_empty_df <- function(l) { > lapply(l, function(df) df[sapply(df, function(df) nrow(df) !=0)]) > } > If I test this way: non_empty_df(my.list[1]) it does the job. It will > return the data.frame from the first list of my_list with