Displaying 8 results from an estimated 8 matches for "datx".
Did you mean:
data
2009 Apr 15
2
AICs from lmer different with summary and anova
Dear R Helpers,
I have noticed that when I use lmer to analyse data, the summary function
gives different values for the AIC, BIC and log-likelihood compared with the
anova function.
Here is a sample program
#make some data
set.seed(1);
datx=data.frame(array(runif(720),c(240,3),dimnames=list(NULL,c('x1','x2','y'
))))
id=rep(1:120,2); datx=cbind(id,datx)
#give x1 a slight relation with y (only necessary to make the random effects
non-zero in this artificial example)
datx$x1=(datx$y*0.1)+datx$x1
library(lme4)
#...
2011 Apr 03
1
zoo:rollapply by multiple grouping factors
...though it deals with all species at once, still seems exceedingly
inefficient.
# So the question is, how do I use something like aggregate.zoo or
tapply or even lapply to apply rollapply on each species' time series.
# The closest I've come is the following two approaches:
# First let:
datx<-list(Site=dat$Site,Plot=dat$Plot,Sp=dat$Sp)
daty<-dat$Count
# Method 1.
out1<-tapply(seq(along=daty),datx,function(i,x=daty){
rollapply(zoo(x[i]), w, cv, na.pad=T, align='right') })
out1
out1[,,1]
# Which "works" in that it gives me the right answers, but in a format...
1999 Mar 24
2
Change of parsing parameters to functions between 0.63.1 and 0.63.3 ?
Hi,
I wonder whether the mechanism of parsing parameters to functions has
changed between 0.63.1 and 0.63.3? The following code yeils different
results in R 0.63.1 (Version 0.63.1 (Dec 5, 1998)) and R 0.63.3.
cave<-function(x,a,b)
{
return(c(mean(x[a],na.rm=T),mean(x[b],na.rm=T)))
}
datx <- data.frame(rbind(c(1,2,3,4),c(4,5,6,7)))
names(datx)<-c("A","B","C","D")
f1<-c("A","C")
f2<-c("B","D")
t1<-apply(datx,1,cave,f1,f2)
R 0.63.1 Result:
> t1
1 2
[1,] 2 5
[2,] 3 6
R 0.63.3...
1999 Mar 24
2
Change of parsing parameters to functions between 0.63.1 and 0.63.3 ?
Hi,
I wonder whether the mechanism of parsing parameters to functions has
changed between 0.63.1 and 0.63.3? The following code yeils different
results in R 0.63.1 (Version 0.63.1 (Dec 5, 1998)) and R 0.63.3.
cave<-function(x,a,b)
{
return(c(mean(x[a],na.rm=T),mean(x[b],na.rm=T)))
}
datx <- data.frame(rbind(c(1,2,3,4),c(4,5,6,7)))
names(datx)<-c("A","B","C","D")
f1<-c("A","C")
f2<-c("B","D")
t1<-apply(datx,1,cave,f1,f2)
R 0.63.1 Result:
> t1
1 2
[1,] 2 5
[2,] 3 6
R 0.63.3...
2008 May 11
1
superscript text on graph legend
Is that possible to create superscript text on the graph legend, for example
to put "cm2" (centimeter square) on the legend. Please show me how to do it.
Thanks.
--
Agus Susanto
[[alternative HTML version deleted]]
2006 Sep 07
0
winbind authentication issue
...ck:
credentials check failed. : 3 Time(s)
nsswitch/winbindd_dual.c:child_read_request(49) Got invalid request
length: 0 : 9 Time(s)
nsswitch/winbindd_group.c:winbindd_getgrgid(330) could not lookup sid :
10 Time(s)
nsswitch/winbindd_group.c:winbindd_getgrnam(255) group common in domain
DATX does not exist : 32 Time(s)
nsswitch/winbindd_user.c:winbindd_dual_userinfo(157) error getting user
info for sid S-1-5-21-32718380-1069048975-798045042-1101 : 2 Time(s)
nsswitch/winbindd_user.c:winbindd_dual_userinfo(157) error getting user
info for sid S-1-5-21-32718380-1069048975-79804504...
2010 Feb 23
1
Problem with strptime generating missing values where none appear to exist
...ifficulty with strptime. I wish to find the differences between
two vectors of times. I have apparently no difficulty to convert the vectors
to the appropriate format using strptime. But, then difftime does not
calculate all the differences.
Here is the code and output:-
dob=strptime(as.character(datx$BDT),'%d-%b-%y'); dob$year=dob$year-100
sdate=strptime(as.character(datx$SDT),'%d-%b-%y')
head(dob); head(sdate)
[1] "1922-07-14" "1922-07-14" "1922-07-14" "1922-07-14" "1921-03-23"
"1921-03-23"
[1] "2001-08-27" &...
2010 Feb 23
0
subtracting 100 from strptime year vector generates missing values in POSIXct where none appear to exist in strptime year vector
...ish to find the differences between
>two vectors of times. I have apparently no difficulty to convert the vectors
>to the appropriate format using strptime. But, then difftime does not
>calculate all the differences.
>
>Here is the code and output:-
>
>dob=strptime(as.character(datx$BDT),'%d-%b-%y'); dob$year=dob$year-100
>sdate=strptime(as.character(datx$SDT),'%d-%b-%y')
>head(dob); head(sdate)
>[1] "1922-07-14" "1922-07-14" "1922-07-14" "1922-07-14" "1921-03-23"
>"1921-03-23"
>[1] &quo...