Displaying 20 results from an estimated 5000 matches similar to: "Making a patch"
2006 Jul 23
1
How to pass eval.max from lme() to nlminb?
Dear R community,
I'm fitting a complex mixed-effects model that requires numerous
iterations and function evaluations. I note that nlminb accepts a
list of control parameters, including eval.max. Is there a way to
change the default eval.max value for nlminb when it is being called
from lme?
Thanks for any thoughts,
Andrew
--
Andrew Robinson
Department of Mathematics and Statistics
2006 Mar 14
1
Internal codes of the factor
Hello!
I am writing some functions and I repeatedly acces internal factor
codes. I figured out that internal codes are 1:n where 1 represents 1st
level, 2 2nd level etc. This is not documented and I wonder if this is
on purpose and subject to change or would be a good idea to add this to
documentation for factor? I can prepair a pacth if this is accepted.
--
Lep pozdrav / With regards,
2009 Jan 22
1
convergence problem gamm / lme
Hope one of you could help with the following question/problem:
We would like to explain the spatial
distribution of juvenile fish. We have 2135 records, from 75 vessels
(code_tripnr) and 7 to 39 observations for each vessel, hence the random effect
for code_tripnr. The offset (‘offsetter’) accounts for the haul duration and
sub sampling factor. There are no extreme outliers in lat/lon. The model
2006 Mar 31
1
Odd anova(lm()) order phenomenon, looking for an explanation
Hi everyone,
I'm witnessing an odd modelling phenomenon that I can't explain. If
anyone has seen this before, or can explain what's going on would let
me know, I'd be very grateful! Especially if I'm just being dim.
I'm fitting a pair of continuous variates and their interaction to
some residuals from another model. The sequential anova statement
changes with the term
2010 Apr 01
2
pdf files in loops
I need to make a bunch of PDF files of histograms. I tried
gatelist = unique(mdf$ArrivalGate)
for( gate in gatelist) {
outfile = paste("../", airport, "/", airport, "taxiHistogram", gate,
".pdf", sep="")
pdf(file = outfile, width = 10, height=8, par(lwd=1))
title=paste("Taxi time for Arrival Gate", gate, "by
2009 Feb 12
1
Setting optimizer in lme
I am using R 2.7.0 on a linux platform.
I am trying to reproduce a 2002 example using lme from the nlme library.
I want to change the otimizer from the default (nlminb) to optim.
Specifically, this is what I am trying to do:
R> library(nlme)
R> library(car) # for data only
R> data(Blackmoor) # from car
R> Blackmoor$log.exercise <- log(Blackmoor$exercise + 5/60, 2)
R>
2005 Jul 13
2
Kronecker matrix product
Hi
I want to write a little function that takes a matrix X of size
m-by-n, and a list L of length "m", whose elements are matrices all
of which have
the same number of columns but possibly a different number of rows.
I then want to get a sort of dumbed-down kronecker product in which
X[i,j] is replaced by X[i,j]*L[[j]]
where L[[j]] is the j-th of the "m" matrices. For
2005 Dec 02
3
extracting rows of a dataframe
Hi
look at the following session, in which I have a dataframe,
and I want to extract the second row, without the first column.
Everything works as expected until the last line, where I set
the names of x to NULL, and get a non-desired object (I
want c(4,3).).
Three questions:
(1) why is as.vector(a[2,-1]) not a vector?
(2) How come setting names to NULL gives me bad weirdness?
(3) Can I
2006 Feb 18
3
Bug in Sweave? -- scoping problem? (PR#8615)
I have found a strange scoping problem in Sweave. The following Rnw
file doesn't produce the same output in Sweave as it does if I produce
an R file using Stangle and execute that:
\documentclass[12pt]{article}
\begin{document}
<<R>>=
election <- data.frame(A=1:3, B=9:7, C=rep(0,3))
partytotal <- rep(0, ncol(election))
for (i in 1:ncol(election)) {
partytotal[i] <-
2003 Oct 27
3
(PR#4806)
This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.
------_=_NextPart_000_01C39C9F.B5DABBD0
Content-Type: text/plain;
charset="iso-8859-1"
# Your mailer is set to "none" (default on Windows),
# hence we cannot send the bug report directly from R.
# Please copy the bug report (after finishing
2003 Oct 06
4
Apply and its friends
Hi,
Forgive a very basic question...
I need to take two lists-of-lists, and apply a function to each pair of elements in the lists to return a single list...
For example
l1 <- list(1:5,6:10,2:15)
l2 <- list(1:8,4:12,1:19,4:20)
I could easily do an lapply across each of them, but is there a function that does a sort-of pairwise-apply across both together?
Does anybody know of a good
2020 Feb 08
4
Development version of R fails tests and is not installed
G'day all,
I have daily scripts running to install the patched version of the
current R version and the development version of R on my linux box
(Ubuntu 18.04.4 LTS).
The last development version that was successfully compiled and
installed was "R Under development (unstable) (2020-01-25 r77715)" on
27 January. Since then the script always fails as a regression test
seems to fail.
2003 Jun 13
1
lars - lasso problem
hello
I tried to use lars() but neither with my own data nor with the sample data it
works. I get in both cases the following error prompt:
> data(diabetes)
> par(mfrow=c(2,2))
> attach(diabetes)
> x<-lars(x,y)
Error in one %*% x : requires numeric matrix/vector arguments
> x<-lars(x,y, type="lasso")
Error in one %*% x : requires numeric matrix/vector arguments
2016 Jan 12
3
Small inaccuracy in the Writing R Extensions manual
G'day all,
In Chapter 1.4 (Writing package vignettes) the Writing R Extensions
manual states:
By default @code{R CMD build} will run @code{Sweave} on all
Sweave vignette source files in @file{vignettes}. If
@file{Makefile} is found in the vignette source directory, then
@code{R CMD build} will try to run @command{make} after the
@code{Sweave} runs, otherwise @code{texi2pdf} is run on
2024 Feb 16
1
Packages sometimes don't update, but no error or warning is thrown
Hey everyone,
Thanks for all the input. It's happening again. This time for the packages "DBI", "parallelly", "segmented", "survival", "V8". So, RStudio shows updates for those and updating them via RStudio leads to this output:
```
> install.packages(c("DBI", "parallelly", "segmented", "survival",
2005 Sep 29
2
how to fix the level-1 variances in lme()?
Dear all,
Edmond Ng (http://multilevel.ioe.ac.uk/softrev/reviewsplus.pdf) provides
an example to fit the mixed effects meta-analysis in Splus 6.2. The
syntax is:
lme(fixed=d~wks, data=meta, random=~1|study, weights=varFixed(~Vofd),
control=lmeControl(sigma=1))
where d is the effect size, study is the study number, Vofd is the
variance of the effect size and meta is the data frame.
2011 Aug 03
1
expand.gird with constraints?
Hi, R users,
Here is an example.
k <- c(1,2,3,4,5)
i <- c(0,1,3,2,1)
if k=1, then j=0 from i
if k=2, then j=0, 1 from i
if k=3, then j=0, 1, 2, 3 from i
if k=4, then j=0, 1, 2 from i
if k=5, then j=0, 1 from i
so i'd like to create a list like below.
> list
k j
1 1 0
2 2 0
3 2 1
4 3 0
5 3 1
6 3 2
7 3 3
8 4 0
9 4 1
10 4 2
11 5 0
12 5 1
I tried expand.grid, but I
2023 May 18
1
suprising behaviour of tryCatch()
G'day Federico,
On Wed, 17 May 2023 10:42:17 +0000
"Calboli Federico (LUKE)" <federico.calboli at luke.fi> wrote:
> sexsnp = rep(NA, 1750)
> for(i in 1:1750){tryCatch(sexsnp[i] = fisher.test(table(data[,3],
> data[,i + 38]))$p, error = function(e) print(NA))} Error: unexpected
> '=' in "for(i in 1:1750){tryCatch(sexsnp[i] ="
Try:
R> for(i in
2023 Aug 12
1
geom_smooth
G'day Thomas,
On Sat, 12 Aug 2023 04:17:42 +0000 (UTC)
Thomas Subia via R-help <r-help at r-project.org> wrote:
> Here is my reproducible code for a graph using geom_smooth
The call "library(tidyverse)" was missing. :)
> I'd like to add a black boundary around the shaded area. I suspect
> this can be done with geom_ribbon but I cannot figure this out. Some
>
2024 Feb 28
2
converting MATLAB -> R | element-wise operation
On Tue, 27 Feb 2024 13:51:25 -0800
Jeff Newmiller via R-help <r-help at r-project.org> wrote:
> The fundamental data type in Matlab is a matrix... they don't have
> vectors, they have Nx1 matrices and 1xM matrices.
Also known as column vectors and row vectors. :)
> Vectors don't have any concept of "row" vs. "column".
They do in (numerical) linear