Displaying 20 results from an estimated 36 matches for "lars52r".
2009 Mar 17
3
Non-Linear Optimization - Query
Dear All,
I couple of weeks ago, I’ve asked for a package recommendation for nonlinear
optimization. In my problem I have a fairly complicated non-linear objective
function subject to one non-linear equality constrain.
I’ve been suggested to use the *Rdonlp2* package, but I did not get any
results after running the program for 5 hrs. Is it normal to run this type
of programs for hours? Also,
2009 Jul 03
2
Error using the Rdonlp2 Package
Dear experts,
I'm attempting to solve a constrained optimization problem using the Rdonlp2
package.
I created a Lagrange function (L=f(x)-lambda(g(x)-c)), where x is a vector
of 16 parameters. This is what I'm using as objective function in the code
below. In addition, I set bounds on these parameters (par.u and par.l). When
I run the code, I get the error message shown below. Any idea
2010 Dec 31
4
Sweave for "big" data analysis
Hi,
Maybe I'm missing the point here...but let's suppose you are working with
"large" data sets and using functions that take a significant amount of time
to run in R. I woulnd't like to run these functions every time I call
Sweave("myfile.Rnw") within R. What is the "common" practice to use Sweave
in these situations. I would just run the function once,
2013 Oct 12
2
Order of factors with facets in ggplot2
Hello,
I'd like to produce a ggplot where the order of factors within facets is
based on the average of another variable.
Here's a reproducible example. My problem is that the factors are ordered
similarly in both facets. I would like to have, within each facet of `f1',
boxplots for 'x' within each factor `f2', where the boxplots are ordered
based on the average of x
2017 Sep 09
0
Avoid duplication in dplyr::summarise
...X1:X4)%>%
group_by(f1,f2,X_name)%>%
do(describe(.$X_value))%>%
select(mean)%>%# You select only mean value
spread(X_name,mean)#
Vincent
Med venlig hilsen/ Best regards
Edjabou Maklawe Essonanawe Vincent
Mobile: +45 31 95 99 33
On Sat, Sep 9, 2017 at 12:30 PM, Lars Bishop <lars52r at gmail.com> wrote:
> Dear group,
>
> Is there a way I could avoid the sort of duplication illustrated below?
> i.e., I have the same dplyr::summarise function on different group_by
> arguments. So I'd like to create a single summarise function that could be
> applied to...
2011 Jul 30
3
Problem with effects package
Dear List,
Several times I use this package I get the error message shown below.
When I work out simple examples, it turns out to be fine, but when
working with real and moderate size data sets I always get the same
error.
Do you know what could be the cause of the problem?
Error in apply(mod.matrix[, components], 1, prod) :
subscript out of bounds
Error in
2017 Sep 09
2
Avoid duplication in dplyr::summarise
Dear group,
Is there a way I could avoid the sort of duplication illustrated below?
i.e., I have the same dplyr::summarise function on different group_by
arguments. So I'd like to create a single summarise function that could be
applied to both. My attempt below fails.
df <- data.frame(matrix(rnorm(40), 10, 4),
f1 = gl(3, 10, labels = letters[1:3]),
f2 =
2017 Sep 09
1
Avoid duplication in dplyr::summarise
...scribe(.$X_value))%>%
> select(mean)%>%# You select only mean value
> spread(X_name,mean)#
>
> Vincent
>
> Med venlig hilsen/ Best regards
>
> Edjabou Maklawe Essonanawe Vincent
> Mobile: +45 31 95 99 33
>
> On Sat, Sep 9, 2017 at 12:30 PM, Lars Bishop <lars52r at gmail.com> wrote:
>
> > Dear group,
> >
> > Is there a way I could avoid the sort of duplication illustrated below?
> > i.e., I have the same dplyr::summarise function on different group_by
> > arguments. So I'd like to create a single summarise function t...
2010 Aug 03
1
Penalized Gamma GLM
Hi,
I couldn't find a package to fit a penalized (lasso/ridge) Gamma regression
model. Does anybody know any?
Thanks in advance,
Lars.
[[alternative HTML version deleted]]
2011 Apr 05
1
Help in splitting a list
Dear R users,
Let's say I have a list with components being 'm' matrices (as exemplified
in the "mylist" object below). Now, I'd like to subset this list based on an
index vector, which will partition each matrix 'm' in 2 sub-matrices. My
questions are:
1. Is there an elegant way to have the results shown in mylist2 for an
arbitrary number of matrices in mylist?
2009 Mar 13
1
Help with Function!
Dear All,
I need to write 'n' functions on 'm' variables. The functions should be
constructed according to the values of an (nxm) matrix of '1/0' values as
follows. For example,
if row1 is equal to ,say [1 0 .......0 0] then f1 <- (1+x1)
if row 2 is equal to, say [1 1 1 0...0 1] then f2
<-(1+x1)*(1+x2)*(1+x3)*(1+xm)
if row n is equal to [0 1 0 1 1 0 ..... 0] then
2011 May 20
1
Contrasts in Penalized Package
Hi,
The "penalized" documentation says that "Unordered factors are turned
into as many dummy variables as the factor has levels". This is done
by a function in the package called contr.none. I'm trying to figure
out how exactly is a model matrix created with this contrast option
when the user calls the function with a formula. I typed
"library(penalized) ;
2017 Sep 16
1
Help with shiny::reactiveFileReader()
Hello,
Is it possible to execute functions (outside the ui and server shiny
environments) after reading data using reactiveFileReader() ?
For example, I'd like to fit a linear model on data read using
reactiveFileReader() outside ui/server.
library(shiny)
library(dplyr)
bigData <- reactiveFileReader(1000, NULL, 'data.csv', read.csv)
fit <- lm(y ~., data = bigData())
ui
2010 Aug 12
2
R 64-bit and Revolution
Dear users,
The company where I work is considering getting a license for Revolution
Enterprise - Windows 64-bit. I'll appreciate for those familiar with the
product if can share your experiences with it? In particular, how does it
compare to the "free" version of R 64-bit?
Thanks in advance.
Regards,
Lars.
[[alternative HTML version deleted]]
2011 May 21
3
Simple R Question...
Let's say I have the data frame 'dd' below. I'd like to select one
column from this data frame (say 'a') and keep its name in the
resulting data frame. That can be done as in #2. However, what if I
want to make my selection based on a vector of names (and again keep
those names in the resulting data frame). My attempt is #4 but doesn't
work.
dd <- data.frame(a =
2011 Jul 16
2
(unclassified?) Help Question
Dear List,
I'd appreciate you guidance for obtaining the desired result shown
below, by combining tapply(x, g, mean) and g in the example.
Basically, I'm trying to create a vector whose values are based on the
result from tapply(x, g, mean) but that follow the pattern and length
given by the factor g. Of course I'm looking for a generic solution
(i.e, not something that just work
2010 Feb 28
1
Gradient Boosting Trees with correlated predictors in gbm
Dear R users,
I’m trying to understand how correlated predictors impact the Relative
Importance measure in Stochastic Boosting Trees (J. Friedman). As Friedman
described “ …with single decision trees (referring to Brieman’s CART
algorithm), the relative importance measure is augmented by a strategy
involving surrogate splits intended to uncover the masking of influential
variables by others
2010 Feb 24
4
R Graphics into Latex
Hi,
I'm new in Latex and I'm trying to include an R chart into a Latex document.
This is what I'm doing:
1) In R: save the chart as a a Postcript in a folder C:/xxx/Density.eps
2) In Latex (using TexWorks on windows xp) :
In the preambule:
\documentclass[11pt]{article}
\usepackage{graphicx}
\begin{document}
blah..blah…blah
\begin{figure}
\centering
2011 Apr 26
7
Second largest element from each matrix row
Hi,
I need to extract the second largest element from each row of a
matrix. Below is my solution, but I think there should be a more efficient
way to accomplish the same, or not?
set.seed(1)
a <- matrix(rnorm(9), 3 ,3)
sec.large <- as.vector(apply(a, 1, order, decreasing=T)[2,])
ans <- sapply(1:length(sec.large), function(i) a[i, sec.large[i]])
ans
Thanks in advance for your
2009 May 28
1
Package for Clustering - Query
Dear R users,
Is there any package for Latent Class Analysis (to be used in a clustering
application) which supports mixed indicator variables (categorical and
continuous)?
Alternatively, is there any other clustering algorithm available that
supports this type of data?
Thanks in advance for your help.
Regards,
Lars.
[[alternative HTML version deleted]]