similar to: Question about glmnet

Displaying 20 results from an estimated 20000 matches similar to: "Question about glmnet"

2011 Oct 27
1
Question about .Fortran in glmnet package
Hi, My apologies for asking this question, but could not find the answer elsewhere. I understand the glmnet package uses Fortran code. For example, the lognet.R file includes the lines of code shown below. But how can I see the Fortran code that is being referenced in the code below? Is that provided somewhere in the package source code? .Fortran("lognet",
2013 Jul 17
1
glmnet on Autopilot
Dear List, I'm running simulations using the glmnet package. I need to use an 'automated' method for model selection at each iteration of the simulation. The cv.glmnet function in the same package is handy for that purpose. However, in my simulation I have p >> N, and in some cases the selected model from cv.glmet is essentially shrinking all coefficients to zero. In this case,
2011 Feb 12
2
Predictions with missing inputs
Dear users, I'll appreciate your help with this (hopefully) simple problem. I have a model object which was fitted to inputs X1, X2, X3. Now, I'd like to use this object to make predictions on a new data set where only X1 and X2 are available (just use the estimated coefficients for these variables in making predictions and ignoring the coefficient on X3). Here's my attempt but, of
2016 Apr 01
3
TensorFlow in R
Hi All, I didn't have much success through my Google search in finding any active R-related projects to create a wrapper around TensorFlow in R. Anyone know if this is on the go? Thanks, Axel. [[alternative HTML version deleted]]
2016 Apr 01
3
TensorFlow in R
Hi All, I didn't have much success through my Google search in finding any active R-related projects to create a wrapper around TensorFlow in R. Anyone know if this is on the go? Thanks, Axel. [[alternative HTML version deleted]]
2017 Sep 21
0
Add wrapper to Shiny in R package
Dear Axel, I've used environment for such problems. assign("xs", xs, envir = my.env) in the myApp function get("xs", envir = my.env) in the server function Best regards, ir. Thierry Onkelinx Statisticus/ Statiscian Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND FOREST Team Biometrie &
2017 Sep 21
1
Add wrapper to Shiny in R package
Thank you Thierry. I'm trying to following your suggestion in the example below, but getting: Error in get("xs", envir = my.env) : object 'my.env' not found. library(shiny) library(shinydashboard) myApp <- function(x, ...) { xs <- scale(x) my.env <- new.env() assign("xs", xs, envir = my.env) shiny::runApp(app) } app = shinyApp( ui =
2014 Jan 18
6
My first package
Hi All, I'm planning to submit my first package to R, and although I read all the documentation, I'm not very clear on the following 2 items, from which I'd appreciate your guidance: 1)I understand it is suggested to use the R dev version to build the package. Which one specifically should I use to build a package on a Mac OS? How about package dependencies, which version should I
2011 Feb 26
2
Reproducibility issue in gbm (32 vs 64 bit)
Dear List, The gbm package on Win 7 produces different results for the relative importance of input variables in R 32-bit relative to R 64-bit. Any idea why? Any idea which one is correct? Based on this example, it looks like the relative importance of 2 perfectly correlated predictors is "diluted" by half in 32-bit, whereas in 64-bit, one of these predictors gets all the importance
2013 Feb 10
3
Constrained Optimization in R (alabama)
Dear List, I'm trying to solve this simple optimization problem in R. The parameters are the exponents to the matrix mm. The constraints specify that each row of the parameter matrix should sum to 1 and their product to 0. I don't understand why the constraints are not satisfied at the solution. I must be misinterpreting how to specify the constrains somehow. library(alabama) ff <-
2010 Feb 21
4
R on 64-Bit…
Dear R users, I know this issue came up in the list several times. I’m currently running R on 32-bit on Windows and due to memory limitation problems would like to move to a 64-bit environment. I’m exploring my options and would appreciate your expertise: 1) Windows 64-bit: Prof. Brian Ripley recently posted the experimental built of R for win 64-bit. I’ll appreciate any feedback on
2017 Sep 21
3
Add wrapper to Shiny in R package
Dear List, I'm trying to add a function that calls a Shiny App in my R package. The issue is that within my function, I'm creating objects that I'd like to pass to the app. For instance, from the example below, I'm getting "Error: object 'xs' not found". How can I pass "xs" explicitly to shinyApp()? *Under R directory:* myApp <- function(x, ...) {
2017 Sep 08
2
quote()/eval() question
Dear list, For a reason it would take me long to explain, I need to do something along the lines of what's shown below -- i.e., create an object from dplyr::summarise, and then evaluate it on a data frame. I know I could directly do: df %>% dplyr::summarise(x1_mean = mean(x1)) but this is not what I'm looking for. library(dplyr) df <- data.frame(x1 = rnorm(100), x2 =
2011 Mar 17
2
Help with Time Series Plot‏
Dear List, This is an embarrassing question, but I can seem to make this work…How do I change the font size on the xlab and on the numbers shown in the x-axis on the time series plot below. The arguments cex.lab and cex.axis do not seem to be 'passing' to the plot function. plot(ts(rnorm(100), start=2004, freq=12), ylab="RQI", xlab="My X lab",
2010 Mar 14
7
R on Linux - a primer
Hi, I'm looking to move from Windows into a 64-bit Linux environment. Which is the best Linux Flavor to use within R? To install R on this environment, do I need to do any compiling? Thanks all! Axel. [[alternative HTML version deleted]]
2017 Sep 17
2
Shiny App inside R Package
Dear List, I have a wrapper function that creates a Shiny App, as illustrated below. I'd like to include the function myApp() inside a package. I'd appreciate your guidance here, as I could not find good instructions on this online. myApp <- function(x) { require(shiny) shinyApp( ui = fluidPage( sidebarLayout( sidebarPanel(sliderInput("n",
2010 Jul 16
2
Creating functions of "many" arguments
Dear users, My apologies for the simple question. I'd like to create a function where the number of arguments is as big as the size of my data set. Supose I have n observations in my data, how can I write a function like fun <- function (x1,x2,....,xn) {x1*x2*.......*xn} Thanks in advance for your help! Axel. [[alternative HTML version deleted]]
2011 Oct 20
1
Problem installing tweetR on Ubuntu
Dear List, When I try to install tweetR on Ubuntu, I get the error message below. It is a problem with the dependency RCurl. This package is not available for Windows on CRAN, but I would assume that I should have no problem with linux. Any help is much appreciated. R version: 2.12.1 Platform: x86_64-pc-linux-gnu (64-bit) * installing *source* package ‘RCurl’ ... checking for curl-config... no
2011 Jan 25
1
Predictions with 'missing' variables
Dear List, I think I'm going crazy here...can anyone explain why do I get the same predictions in train and test data sets below when the second has a missing input? y <- rnorm(1000) x1 <- rnorm(1000) x2 <- rnorm(1000) train <- data.frame(y,x1,x2) test <- data.frame(x1) myfit <- glm(y ~ x1 + x2, data=train) summary(myfit) all(predict(myfit, test) == predict(myfit, train))
2011 Apr 03
1
Help in splitting ists into sub-lists
Dear List, Let's say I have a list whose components are 2 matrices (as exemplified in the "mylist" object below). I'd like to create a list with components being 4 matrices based on an logical index vector. is there a way to simplify what I'm doing to obtain the results in "mylist2"? I'd like something that would work on an arbitrary number of elements in