similar to: unexpected result from reshape

Displaying 20 results from an estimated 1000 matches similar to: "unexpected result from reshape"

2002 Nov 16
1
using the function "expression" with "paste" in a plot
Hi, I noticed that paste and expression in the following manner does not produce the desired result. vnames=c("pi","y","delta") vx=vn=3 m=16 # mydata any matrix that takes for the following form mydata=array(somedata,c(m,vn,vx)) # producing plots for (j in 1:vx){ for (i in 1:vn) { plot(mydata, type="l", main=expression(paste("Effect of",
2012 Dec 11
1
Rprof causing R to crash
I'm trying to use Rprof() to identify bottlenecks and speed up a particullary slow section of code which reads in a portion of a tif file and compares each of the values to values of predictors used for model fitting. I've written up an example that anyone can run. Generally temp would be a section of a tif read into a data.frame and used later for other processing. The first portion
2007 Dec 13
1
creating lagged variables
Hi all. I'm looking for robust ways of building lagged variables in a dataset with multiple individuals. Consider a dataset with variables like the following: ## set.seed(123) d <- data.frame(id = rep(1:2, each=3), time=rep(1:3, 2), value=rnorm(6)) ## >d id time value 1 1 1 -0.56047565 2 1 2 -0.23017749 3 1 3 1.55870831 4 2 1 0.07050839 5 2 2 0.12928774 6
2003 May 21
1
Code Help
I am trying to analyse some data and was given R code to do this with but there seem to be errors in the code. My level of knowledge is improving but still limited. The details are; Data on clover lines; Lines.txt attached. Comma seperations Code: options(digits=3) clover <- read.table("Lines.txt",header=T,sep=",") vnames <- names(clover);nv <- length(vnames)
2001 Sep 27
1
Problem with merge() (PR#1102)
I have encountered a problem with merge() that appears to be a bug. Here's an example to illustrate it. > tmp1 <- data.frame(a=letters[1:3],b=LETTERS[2:4],x=1:3) > tmpa <- expand.grid(a=letters[1:4],b=LETTERS[1:4]) > tmpm.1 <- merge(tmpa,tmp1) > tmpm.2 <- merge(tmp1,tmpa) Error in "names<-.default"(*tmp*, value = vnames) : names attribute must
2011 Feb 17
1
cv.glmnet errors
Hi, I am trying to do multinomial regression using the glmnet package, but the following gives me an error (for no reason apparent to me): library(glmnet) cv.glmnet(x=matrix(c(1,2,3,4,5,6,1,2,3,4,5,6), nrow=6),y=as.factor(c(1,2,1,2,3,3)),family='multinomial',alpha=0.5, nfolds=2) The error i get is: Error in if (outlist$msg != "Unknown error") return(outlist) : argument is of
2010 Jul 12
1
Matrix Column Names
Hi, Is there a way to create a matrix in which the column names are not checked to see if they are valid variable names? I'm looking something similar to the check.names argument to data.frame. If so, would such an approach work for the sparse matrix classes in the Matrix package. Many thanks! Cheers, Dave
2003 Apr 03
1
Tukey's one degree of freedom for nonadditivity?
Is there code available to decompose interactions involving at least one nominal factor with more than 2 levels as described, e.g., by Tukey or by Mandel (1971, Technometrics, 13: 1-18)? Tukey's model: E(y[i,j]) = mu0 + a[i] + b[j] + c*a[i]*b[j], estimating a, b, and c so sum(a) = sum(b)= 0. Mandel essentially describes a singular value decomposition of the interaction. Thanks,
2002 May 17
0
options()$warn==2 and try()
Dear R-help folks: Here is my platform: > version platform sparc-sun-solaris2.7 arch sparc os solaris2.7 system sparc, solaris2.7 status major 1 minor 5.0 year 2002 month 04 day 29 language R I have a
2010 Sep 16
5
DO NOT REPLY [Bug 7683] New: New rsync deletes destination files it shouldn't
https://bugzilla.samba.org/show_bug.cgi?id=7683 Summary: New rsync deletes destination files it shouldn't Product: rsync Version: 3.0.7 Platform: x86 OS/Version: Linux Status: NEW Severity: critical Priority: P3 Component: core AssignedTo: wayned at samba.org ReportedBy:
2005 Sep 21
3
ts.intersect bug?
This code gives an error: a <- ts(1:10, start=0, freq=10) b <- ts(1:10, start=1, freq=10) ts.intersect(a,b) This one works normally (and correctly): a <- ts(1:10, start=0) b <- ts(1:10, start=1) ts.intersect(a,b) Antonio, Fabio Di Narzo. P.S. How to switch off italian error messages to post on r-help? > version _ platform i386-pc-mingw32 arch i386 os
2011 Mar 23
2
R helps win competitions
DeaR ComRades, This is a quote from a News article in Science's 11-February issue, about competitions to model data: "For Chris Raimondi, a search-engine expert based in Baltimore, Maryland, and winner of the HIV-treatment competition, the Kaggle contest motivated him to hone his skills in a newly learned computer language called R, which he used to encode the winning data model.
2013 Dec 16
1
External pointers and changing SEXPTYPE
Dear Developers, I've been struggling through writing R extension in C. I've been using an external pointer to store my data (please see sample below). I encountered a very weird erroneous behaviour: when I tried to use my external pointer to a structure holding several types of data, including SEXPs, I discovered that SEXPs change their types between returning from initialization
2005 Sep 25
2
getting variable length numerical gradient
Hi all. I have a numerical function f(x), with x being a vector of generic size (say k=4), and I wanna take the numerically computed gradient, using deriv or numericDeriv (or something else). My difficulties here are that in deriv and numericDeric the function is passed as an expression, and one have to pass the list of variables involved as a char vector... So, it's a pure R programming
2006 May 25
3
missed ylim from plot.default
? stato filtrato un testo allegato il cui set di caratteri non era indicato... Nome: non disponibile Url: https://stat.ethz.ch/pipermail/r-help/attachments/20060525/ef972e9f/attachment.pl
2006 Mar 24
3
bug in plot.acf (PR#8705)
(Moved from r-devel to r-bugs) On 3/24/2006 5:03 AM, Antonio, Fabio Di Narzo wrote: > Hi all. > There's a bug in plot.acf, when plotting acf for multivariate time series. > Here a reproducible example: > > X <- rnorm(1000) > Y <- -X + rnorm(1000, sd=0.6) > Z <- cbind(X,Y) > > In > acf(Z) > cross-correlation plot y-axis is limited to 0-1. But: >
2007 Dec 04
2
Wishlist: mention Vectorize in 'outer' man page (PR#10490)
Full_Name: Antonio, Fabio Di Narzo Version: 2.6.1 OS: linux Submission from: (NULL) (213.140.16.187) In 'outer' man page, there is no mention of the Vectorize function. Moreover, I think it isn't underlined enough that the FUN argument to 'outer' must be a vectorized function (doc speaks about a function which has to 'operate elementwise'). A cross-reference from
2005 Jul 13
4
Where's iris?
Hi: Where is the iris data set actually located in the R 2.1.0 folder (under W XP)? Is it a text file or it is a binary file? Ruben
2009 Nov 27
3
problem with "dynformula" from "plm" package
Hello list, I'm following the paper (http://www.jstatsoft.org/v27/i02/paper) on how to use "plm" to run panel regressions, and am having trouble with what I believe should be something very basic. When I run the command (p.9 in the paper): R> dynformula(emp~wage+capital,log=list(capital=FALSE,TRUE),lag=list(emp=2,c(2,3)),diff=list(FALSE,capital=TRUE)) I see: emp ~ wage +
2006 May 18
2
extracting values from data.frame given arbitrary keys
Hi all. I have a pure R programming question. Having a data.frame with a 'data' variable and some (>1) ID variables (either numeric or factors), I would extract a sequence of data values given a sequence of ID values. Here's an example. Build a dataset: n1 <- 5 n2 <- 2 v1 <- rep(factor(1:n1),2) v2 <- rep(1:n2,5) x <- rnorm(10) dat <- data.frame(x=x, v1=v1, v2=v2)