Displaying 6 results from an estimated 6 matches for "matri".
Did you mean:
matrix
2010 Dec 11
2
break
Hi
I'm trying to utilize the break command for breaking the loop when the
p-value is less than 10 per cent using the urca package. But it does not
break the loop, anyone that can help me?
library(urca)
set.seed(1)
a1 <- runif(100)
lag.max <- function(object, n = 12){
matris <- matrix(NA, nrow = n)
for(i in 1:n) {
matris[i] <- ur.df(object, lags = i,
type = "trend")@testreg$coefficients[i+3,4]
if (i < 0.1) {break(i)}
}
list(matris = round(matris, 3))
}
a2 <- lag.max(a1)
/With regards
Serd...
2010 Jul 20
1
Exporting NMDS distance matris to csv
...ibrary(vegan,logical.return = TRUE) #return=true verifies package is
available
library(MASS,logical.return=TRUE) #return=true verifies package is
available
data(varespec) #varespec is an example data file in the vegan package
vare.dis <- vegdist(varespec)
vare.dis #this is the triangular matrix I'd like to export
x=format.data.frame(vare.dis) #nope, don't work
x=format(vare.dis) #nope
x=data.frame(vare.dis) #ditto
x=unknown.function(vare.dis) #??? What is the unknown bit here to do
this?
#this is what I want to be able to do, i.e., write the matrix "x" out...
2002 Oct 09
1
problems with missing values created by conversion using as.matri (PR#2130)
...day 01
language R
------------------------------
Create a very simple data frame containing an factor and a character vector
each containing a missing value:
> x <- data.frame( a=c("",NA), b=c(1,NA) )
Conversion to a matrix treats the two missing values differently:
> as.matrix(x)
a b
1 "" " 1"
2 NA "NA"
The missing value in the factor variable has been correctly converted to a
missing value, while the missing value in the numeric vector has been
incorrectly converted to a...
2006 Oct 05
1
matrix multiplication
Dear all,
I have 2 matrices, one is a 8x3 matrix, called X; the other matrix is a 3x3 indicator matrix with the diagonal element as 0 or 1. when a variable is included in the model, the corresponding diagonal element is 1, otherwise, it is 0. Let A be a set of matrices that contain the possible indicator matrix. e.g.,
A=...
2011 Sep 15
1
Creando scrips en R
...ando un scrip, para no tener que teclear esas operaciones a cada Mapa y por ende prolongar la vida de mi precioso teclado con valor de 50 pesos mexicanos
#Operación general
Mapa1 <- readRAST6 ('Mapa1') ###Para importar un raster de GRASS-GIS a R
Mapa1.v <- as.vector(Mapa1.m <- as.matrix(Mapa1)) ###Convierto a matris y después a vector
Mapa1.vn <- Mapa.v[!is.na(Mapa.v)] ### Elimino datos nulos del vector
SP1 <- sample(Mapa.vn, 50) ### Extraigo una muestra de 50 datos.
El asunto ahí no termina, después de realizar esas operaciones necesito calcular las "medidas de sep...
2005 Sep 29
1
Bug in lmer?
I am relatively new to R so I am not confident enough in what I am doing
to be certain this is a bug. I am running R 2.1.1 on a Windows XP
machine and the lme4 package version 0.98-1. The following code fits the
model I want using the nlme package version 3.1-60.
mltloc$loc <- factor(mltloc$loc)
mltloc$block <- factor(mltloc$block)
mltloc$trt <- factor(mltloc$trt)
Mltloc <-