search for: lev2

Displaying 14 results from an estimated 14 matches for "lev2".

Did you mean: lev
2008 Jan 02
3
Find missing days
...11,5), by=60*60*24)) date1 <- date1[-c(3,4,15,34,38,40)] df <- data.frame(lev=lev, date1=date1, y=y) I would like to produce a new data.frame with missing days in df$date1 in each df$lev, like this: lev date1 1 lev1 2007-09-03 2 lev1 2007-09-04 3 lev1 2007-09-15 4 lev2 2007-09-01 5 lev2 2007-09-02 etc. How can I do this? Thanks, Lauri FRCBS [[alternative HTML version deleted]]
2006 Feb 17
1
Transforming results of the summary function
Hi all, I have a question about transforming the data from summary function. Let's say I have a data frame like this: > x = data.frame(a = c(rep("lev1", 5), rep("lev2", 5)), b = c(rnorm(5)+2, rnorm(5))) > x a b 1 lev1 1.5964765 2 lev1 2.2945609 3 lev1 3.5285787 4 lev1 1.4439838 5 lev1 2.2948826 6 lev2 1.7063506 7 lev2 -0.4042742 8 lev2 -1.6485337 9 lev2 -1.1163817 10 lev2 -0.2023246 I'd like to create quantiles for ever...
2007 Aug 07
1
Naming Lists
Hi Im pretty new to R and I have run in to a problem. How do I name all the levels in this list. Lev1 <- c("A1","A2") Lev2 <- c("B1","B2") Lev3 <- c("C1","C2") MyList <- lapply(Lev1,function(x){ lapply(Lev2,function(y){ lapply(Lev3,function(z){ paste(unlist(x),unlist(y),unlist(z)) })})}) I would like to name the different levels in the list with the differnt inputs. So...
2007 Aug 23
1
How to merge string to DF
...mp using DF$x and DF$y as an identifier #The following DF should look like this: Group.1 Group.2 x var1 1 1 lev1 6.607869 2000-01-01 Saturday, 2000-01-04 Tuesday, 2000-01-07 Friday, 2000-01-10 Monday etc. 2 2 lev1 6.598861 etc. 3 3 lev1 7.469262 4 1 lev2 27.488734 5 2 lev2 33.164037 6 3 lev2 34.466359 #How do I do this? #Cheers, #Lauri [[alternative HTML version deleted]]
2008 May 30
1
nlm and "missing argument
Dear R Gurus, I am having a little difficulty with nlm. I've searched the archives and found nothing that tells me why this is occuring -- though there are some slightly similar issues. A simple example: lev2<-function(aaa,bbb,ccc,ddd,eee){ res<-aaa+bbb+ccc+ddd+eee res } nlm(lev2,p=c(32,4,5),ddd=45,eee=23) Error in f(x, ...) : argument "bbb" is missing, with no default Why is this occurring? I am running 2.6.1. Is there something simple here that I am overlooking? I am trying to...
2007 Aug 07
2
Interaction factor and numeric variable versus separate regressions
...mula = y ~ x:f, data = d) Residuals: Min 1Q Median 3Q Max -2.8109 -0.8302 0.2542 0.6737 3.5383 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 3.68799 0.41045 8.985 1.91e-12 *** x:flev1 0.20885 0.04145 5.039 5.21e-06 *** x:flev2 1.49670 0.04145 36.109 < 2e-16 *** x:flev3 6.70815 0.04145 161.838 < 2e-16 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 1.53 on 56 degrees of freedom Multiple R-Squared: 0.9984, Adj...
2007 Aug 08
1
tapply grand mean
Hi R-users, I have a data.frame like this (modificated from https://stat.ethz.ch/pipermail/r-help/2007-August/138124.html). y1 <- rnorm(20) + 6.8 y2 <- rnorm(20) + (1:20*1.7 + 1) y3 <- rnorm(20) + (1:20*6.7 + 3.7) y <- c(y1,y2,y3) x <- rep(1:5,12) f <- gl(3,20, labels=paste("lev", 1:3, sep="")) d <- data.frame(x=x,y=y, f=f) and this is how I can
2003 Dec 17
2
variance estimates in lme biased?
...ms in SAS when I use PROC VARCOMP, although I haven't explored it much there. library(nlme) F1V <- F2V <- F3V <- residV <- numeric(0) for (rep in 1:500){ F1f <- F2f <- F3f <- value <- numeric(0) # data generator for (F1 in 1:5) { for (F2 in 1:5) { lev2 <- rnorm(1,sd=1.0) for (F3 in 1:5) { for (F4 in 1:5) { lev4 <- rnorm(1,sd=0.1) value <- c(value, lev2+lev4) F1f <- c(F1f,F1);F2f <- c(F2f,F2);F3f <- c(F3f,F3) } } } } L1 <- as.factor(F1f); L2 <- as.f...
2007 Dec 01
2
How to cbind DF:s with differing number of rows?
#Hi R-users, #Suppose that I have a data.frame like this: y1 <- rnorm(10) + 6.8 y2 <- rnorm(10) + (1:10*1.7 + 1) y3 <- rnorm(10) + (1:10*6.7 + 3.7) y <- c(y1,y2,y3) x <- rep(1:3,10) f <- gl(2,15, labels=paste("lev", 1:2, sep="")) g <- seq(as.Date("2000/1/1"), by="day", length=30) DF <- data.frame(x=x,y=y, f=f, g=g) DF$g[DF$x == 1]
2002 Dec 27
0
WinXP can't open print queue listing
URL: http://www.tek-tips.com/gviewthread.cfm/lev2/3/lev3/19/pid/865/qid/336795 I have the same problem described in the above posting: using WinXP (he used Win2K, presumably WinNT does the same thing), you print something, but the print queue display shows an error message and doesn't show your job(s). The described solution worked for me too...
2000 Mar 22
0
Not being digested, now . . . the question!
...t rather mounted over a 100BaseT NFS backbone? (using knfsd and nfslock as implemented in kernel 2.2.13ac2 and redhat-6.1 userspace)?? I know I had a devil of a time until I got NFS locking up and flying. Thanks for any hints . . . I've tried almost ever combination of oplocks, no oplocks, lev2 oplocks etc, with no apparent joy. It's to the point now that my users no longer trust the server, saving to their C drives instead. Help? This used to work :-( -Darren
2006 Dec 06
3
intercept value in lme
Dear all, I've got a problem in fitting multilevel model in lme. I don't know to much about that but suspect that something is wrong with my model. I'm trying to fit: m1<-lme(X~Y,~1|group,data=data,na.action=na.exclude,method="ML") m2<-lme(X~Y+Z,~1|group,data=data,na.action=na.exclude,method="ML") where: X - dependent var. measured on a scale ranging from
2011 Feb 11
6
linear models with factors
i am trying to fit a linear model with both continuous covariates and factors. When fitted with the intercept term the first level of the factor is treated by R as intercept and the estimate of the effects of remaining levels(say i th level) are given as true estimate of i th level - estimate of 1st level.can any please help me? thanks in advance..... -- View this message in context:
2011 Jan 11
0
modified FAST Script from package SensoMineR for the R community - Reg
...:J) { out[, i] = as.factor(out[, i]) } catego_num2 = out[ordre_prod, ] catego_num2 = catego_num2[, ord] rownames(catego_num2) = rownames(don)[ordre_prod] colnames(catego_num2) = colnames(don)[ord] compte2 = compte[ordre_prod, ] compte2 = compte2[, ordre_prod] lev2 = as.factor(lev) if (graph) { ##x11() plot(lev2, main = "Number of groups formed from sorting tasks") } out1 = matrix(NA, (I * J), 4) lev = rep(NA, J) for (i in 1:J) { lev[i] = length(levels(don[, i])) } tdc = tab.disjonctif(don) gp...