Displaying 20 results from an estimated 26 matches for "xij".
Did you mean:
xi
2019 May 26
2
rbind has confusing result for custom sub-class (possible bug?)
...g by defining a [<- class; the question that I still
> don't see answered in documentation or source code is, why/where is [<-
> called, exactly?
>
Your rbind(DF, DF) call dispatches to base::rbind.data.frame(). The
`[<-` call is this line:
value[[jj]][ri] <- if (is.factor(xij)) as.vector(xij) else xij
That's where the storage.mode changes from integer to double.
debug: value[[jj]][ri] <- if (is.factor(xij)) as.vector(xij) else xij
Browse[2]>
debug: xij
Browse[2]> storage.mode(xij)
[1] "integer"
Browse[2]> value[[jj]][ri]
[1] "2019-05-26&...
2019 May 27
2
rbind has confusing result for custom sub-class (possible bug?)
...> > don't see answered in documentation or source code is, why/where is [<-
> > > called, exactly?
> > >
> > Your rbind(DF, DF) call dispatches to base::rbind.data.frame(). The
> > `[<-` call is this line:
> > value[[jj]][ri] <- if (is.factor(xij)) as.vector(xij) else xij
> >
> > That's where the storage.mode changes from integer to double.
> >
> > debug: value[[jj]][ri] <- if (is.factor(xij)) as.vector(xij) else xij
> > Browse[2]>
> > debug: xij
> > Browse[2]> storage.mode(xij)
> &g...
2006 Dec 02
0
fixup for debug package and R2.4.0
...facCol[j] <- TRUE
}
else facCol[j] <- is.factor(xj)
ordCol[j] <- is.ordered(xj)
has.dim[j] <- length(dim(xj)) == 2
}
}
else for (j in 1:nvar) {
xij <- xi[[j]]
if (is.null(pi) || is.na(jj <- pi[[j]]))
jj <- j
if (facCol[jj]) {
if (length(lij <- levels(xij)) > 0) {
all.levs[[jj]] <- unique(c(all.levs[[jj]],
lij))...
2019 Jun 02
1
rbind has confusing result for custom sub-class (possible bug?)
...ation or source code is, why/where is [<-
> >> > > called, exactly?
> >> > >
> >> > Your rbind(DF, DF) call dispatches to base::rbind.data.frame(). The
> >> > `[<-` call is this line:
> >> > value[[jj]][ri] <- if (is.factor(xij)) as.vector(xij) else xij
> >> >
> >> > That's where the storage.mode changes from integer to double.
> >> >
> >> > debug: value[[jj]][ri] <- if (is.factor(xij)) as.vector(xij) else xij
> >> > Browse[2]>
> >> > debug:...
2007 Jan 12
0
Minor logical bug in rbind.data.frame ?
...facCol[j] <- TRUE
}
else facCol[j] <- is.factor(xj)
ordCol[j] <- is.ordered(xj)
has.dim[j] <- length(dim(xj)) == 2
}
}
else for (j in 1:nvar) {
xij <- xi[[j]]
if (is.null(pi) || is.na(jj <- pi[[j]]))
jj <- j
if (facCol[jj]) {
if (length(lij <- levels(xij)) > 0) {
all.levs[[jj]] <- unique(c(all.levs[[jj]],
lij))...
2019 May 27
0
rbind has confusing result for custom sub-class (possible bug?)
...the question that I still
> > don't see answered in documentation or source code is, why/where is [<-
> > called, exactly?
> >
> Your rbind(DF, DF) call dispatches to base::rbind.data.frame(). The
> `[<-` call is this line:
> value[[jj]][ri] <- if (is.factor(xij)) as.vector(xij) else xij
>
> That's where the storage.mode changes from integer to double.
>
> debug: value[[jj]][ri] <- if (is.factor(xij)) as.vector(xij) else xij
> Browse[2]>
> debug: xij
> Browse[2]> storage.mode(xij)
> [1] "integer"
> Browse[2...
2010 Aug 05
1
rbind on data.frame that contains a column that is also a data.frame
..."3", "4", :
duplicate 'row.names' are not allowed
In addition: Warning message:
non-unique values when setting 'row.names': ?1?, ?10?, ?2?, ?3?, ?4?, ?5?,
?6?, ?7?, ?8?, ?9?
--
Looking at the code of rbind.data.frame, the error comes from the
lines:
--
xij <- xi[[j]]
if (has.dim[jj]) {
value[[jj]][ri, ] <- xij
rownames(value[[jj]])[ri] <- rownames(xij) # <-- problem is here
}
--
if the rownames() line is dropped, all works well. What this line
tries to do is to join the rownames of internal elements of the
data.frames I...
2019 May 27
0
rbind has confusing result for custom sub-class (possible bug?)
...see answered in documentation or source code is, why/where is [<-
>> > > called, exactly?
>> > >
>> > Your rbind(DF, DF) call dispatches to base::rbind.data.frame(). The
>> > `[<-` call is this line:
>> > value[[jj]][ri] <- if (is.factor(xij)) as.vector(xij) else xij
>> >
>> > That's where the storage.mode changes from integer to double.
>> >
>> > debug: value[[jj]][ri] <- if (is.factor(xij)) as.vector(xij) else xij
>> > Browse[2]>
>> > debug: xij
>> > Browse[2]&g...
2012 Aug 02
1
finding the MLEs of IG parameters by EM-Alorithm
...trying to caculate the MLEs for parameters of Inverse Gaussian
distribution (in a k-sample problem with common mean) by using
EM-Algorithm. I found some package for EM-Algorithm that are useful
for missing or incomplete data and are not helpful for solving my
problem.
(Exactly, the problem is: Let Xij, i=1,..,k , j=1,...,ni, be a random
sample from IG(?,?i). So the log-likelihood function is:
log(L)=?(ni/2)*log(?i)-?? (?i/2*(?^2)*xij)*((xij-?)^2)+const.
Find the MLEs for (?,?1,...,?k) by EM-Algorithm?)
Could you please help me with that?
I would like to thank you in advance for your help.
best...
2010 Mar 26
2
R loop help
...ep(-1,4),
rep(1,4)
)
x2=c(
rep(c(-1,-1,1,1),2)
)
x3=c(
rep(c(-1,1),4)
)
x1*x2
x1*x3
x2*x3
========================
suppose i have x1,x2,x3
i want to compute their ' two factor interactions', x1x2,x1x3 and x2x3,
I wrote
========================
for(i in 1:2){
for( j in i+1:3){
xij=c()
xij=xi*xj
}
}
========================
it did not seem to recognize xi and xj
is there any suggestion?
it would be wonderful if there exists a single command that i can use
My ultimate aim is to find the 55 xixj s of the following data:
http://n4.nabble.com/file/n1692945/test_pic.jpg test_p...
2019 May 26
2
rbind has confusing result for custom sub-class (possible bug?)
Debugging this issue:
https://github.com/Rdatatable/data.table/issues/2008
We have custom class 'IDate' which inherits from 'Date' (it just forces
integer storage for efficiency, hence, I).
The concatenation done by rbind, however, breaks this and returns a double:
library(data.table)
DF = data.frame(date = as.IDate(Sys.Date()))
storage.mode(rbind(DF, DF)$date)
# [1]
2006 Oct 17
1
About compositional data analysis
The compositional data xi=(x_i1,x_i2,...,x_in), for each fixed i , xij>0,
and sum(xij)=1;
I want to compare the mean( u_i) of several groups
i.e.
H0: u_1=u_2=...=u_N
or
H0: u_11=u_21=...=u_N1
Are there any ANOVA tpye tools to do this work in R?
Thanks,
WEN S Q
[[alternative HTML version deleted]]
2020 Oct 09
1
Aide pour finaliser ce code
...*sum(R[1:i]))
GGamma[Idebut:Ifin,Idebut:Ifin]=PGamma
}
#Calcul de Sigma
# Calcul de Vn
X1=CentrageV(X,Xbar,n)
Vn=t(X1)%*%X1/n
## Construction de Sigma
GSigma=matrix(0,p*sum(R),p*sum(R))
for (i in 1:q ){
for (j in 1:R[i] ){
for (k in 1:q ){
for (l in 1:R[k]){
Xij=CentrageV(X,Xjhbar[[i]][j,],n)
Xkl=CentrageV(X,Xjhbar[[k]][l,],n)
Vijkl=t(W[[i]][j]*Xij)%*%(W[[k]][l]*Xkl)/n
Vij=t(W[[i]][j]*Xij)%*%Xij/n11[[i]][j]
Vkl=t(W[[k]][l]*Xkl)%*%Xkl/n11[[k]][l]
if (i==1) Idebut=((j-1)*p)+1 else
Idebut=((sum(R[1:(...
2020 Oct 10
3
Please need help to finalize my code
...-1)]))+1)
115 Ifin=(p*sum(R[1:i]))
116 GGamma [Idebut:Ifin,Idebut:Ifin]=PGamma
117 }
118 #Sigma calculation
119 # Calculation of Vn
120 X1=CenteringV(X,Xbar,n)
121 Vn=t(X1)%*%X1/n
122 ## Construction of Sigma
123 GSigma=matrix(0,p*sum(R),p*sum(R))
124 for (i in 1:q ){
125 for (j in 1:R[i] ){
126 Xij=CenteringV(X,Xjhbar[[i]][j,],n)
127 Vij=t(W[[i]][,j]*Xij)%*%Xij/n11[[i]][j]
128 for (k in 1:q ){
129 for (l in 1:R[k]){
130 Xkl=CenteringV(X,Xjhbar[[k]][l,],n)
131 Vijkl=t(W[[i]][,j]*Xij)%*%(W[[k]][,l]*Xkl)/n
132 Vkl=t(W[[k]][,l]*Xkl)%*%Xkl/n11[[k]][l]
133 if (i==1) Idebut=((j-1)*p)+1 else Idebu...
2017 Jan 17
2
bug in rbind?
I suspect there may be a bug in base::rbind.data.frame
Below there is minimal example of the problem:
m <- matrix (1:12, 3)
dfm <- data.frame (c = 1 : 3, m = I (m))
str (dfm)
m.names <- m
rownames (m.names) <- letters [1:3]
dfm.names <- data.frame (c = 1 : 3, m = I (m.names))
str (dfm.names)
rbind (m, m.names)
rbind (m.names, m)
rbind (dfm, dfm.names)
#not working
rbind
2020 Oct 13
1
Please need help to finalize my code
...:Ifin]=PGamma
> 117 }
>
> 118 #Sigma calculation
>
> 119 # Calculation of Vn
> 120 X1=CenteringV(X,Xbar,n)
> 121 Vn=t(X1)%*%X1/n
>
> 122 ## Construction of Sigma
> 123 GSigma=matrix(0,p*sum(R),p*sum(R))
> 124 for (i in 1:q ){
> 125 for (j in 1:R[i] ){
> 126 Xij=CenteringV(X,Xjhbar[[i]][j,],n)
> 127 Vij=t(W[[i]][,j]*Xij)%*%Xij/n11[[i]][j]
>
> 128 for (k in 1:q ){
> 129 for (l in 1:R[k]){
>
> 130 Xkl=CenteringV(X,Xjhbar[[k]][l,],n)
> 131 Vijkl=t(W[[i]][,j]*Xij)%*%(W[[k]][,l]*Xkl)/n
>
> 132 Vkl=t(W[[k]][,l]*Xkl)%*%Xkl/n11[[k]][l...
2020 Oct 13
0
Please need help to finalize my code
...alculation
> >
> > 119 # Calculation of Vn
> > 120 X1=CenteringV(X,Xbar,n)
> > 121 Vn=t(X1)%*%X1/n
> >
> > 122 ## Construction of Sigma
> > 123 GSigma=matrix(0,p*sum(R),p*sum(R))
> > 124 for (i in 1:q ){
> > 125 for (j in 1:R[i] ){
> > 126 Xij=CenteringV(X,Xjhbar[[i]][j,],n)
> > 127 Vij=t(W[[i]][,j]*Xij)%*%Xij/n11[[i]][j]
> >
> > 128 for (k in 1:q ){
> > 129 for (l in 1:R[k]){
> >
> > 130 Xkl=CenteringV(X,Xjhbar[[k]][l,],n)
> > 131 Vijkl=t(W[[i]][,j]*Xij)%*%(W[[k]][,l]*Xkl)/n
> >
> >...
2017 Jan 21
0
bug in rbind?
...ource/blob/01374c3c367fa12f555fd354f735a6e16e5bd98e/src/library/base/R/dataframe.R#L1395
The error is thrown because the line attempts to set a subset of the
rownames to NULL, which fails.
R> options(error = recover)
R> rbind(dfm.names, dfm)
Error in rownames(value[[jj]])[ri] <- rownames(xij) :
replacement has length zero
Enter a frame number, or 0 to exit
1: rbind(dfm.names, dfm)
2: rbind(deparse.level, ...)
Selection: 2
Called from: top level
Browse[1]> rownames(value[[jj]])
[1] "a" "b" "c" NA NA NA
Browse[1]> rownames(xij)
NULL
Browse[1]>...
2007 Nov 22
1
distance matrix to coordinate format for spatial stats
Greetings,
I would like to use some of the spatial statistics functions in R, but I am having trouble entering data. My data is already in a distance matrix format, not an X Y coordinate format (each Xij cell in the matrix represens the distance from point i to j). Does anyone know of a way to convert a distance matrix to a ppp object in spatstat, or an X,Y coordinate system for other packages?
Thanks,
Jesse
[[alternative HTML version deleted]]
2006 Oct 17
0
Are there ANOVA for compositional data?
The compositional data xi=(x_i1, x_i2,..., x_in), for each fixed i ,
xij>0, and sum(xij)=1;
I want to compare the mean( u_i) of several groups
i.e.
H0: u_1=u_2=...=u_N
or
Hj0: u_1j=u_2j=...=u_Nj
Are there any ANOVA tpye tools to do this work in R?
Thanks,
WEN S Q
[[alternative HTML version deleted]]