Displaying 20 results from an estimated 40000 matches similar to: "Adding dash-lines in R tables"
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
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 &
2012 Jan 27
1
Conditional cumulative sum
Dear List,
I'll appreciate your help on this. I'm trying to create a variable as in
"cumsum_y.cond1" below, which should compute the cumulative sum of "y"
conditional on the value of cond==1.
set.seed(1)
d <- data.frame(y= sample(c(0,1), 10, replace= T),
cond= sample(c(0,1), 10, replace= T))
y cond cumsum_y.cond1
1 0 0 0
2 0 0
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, ...) {
2011 Apr 09
2
Orthoblique rotation on eigenvectors (SAS VARCLUS)
Hi All,
I'd like to build a package for the community that replicates the output
produced by SAS "proc varclus". According to the SAS documentation, the
first few steps are:
1. Find the first two principal components.
2. Perform an orthoblique rotation (quartimax rotation) on eigenvectors.
3. Assign each variable to the rotated component with which it has the
higher
squared
2011 May 18
1
Need expert help with model.matrix
Dear experts:
Is it possible to create a new function based
on stats:::model.matrix.default so that an alternative factor coding is used
when the function is called instead of the default factor coding?
Basically, I'd like to reproduce the results in 'mat' below, without having
to explicitly specify my desired factor coding (identity matrices) in the
'contrasts.arg'.
dd
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",
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
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",
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]]