[R] help with ff matrix indexing and value assignment

2015-06-10 Thread Ken Nussear
Hi all I'm trying to make some assignments to an ffdf using values coming in as 3 columns (row, col, values) As an example with a regular matrix assigning data (d) to row r and column c from a data frame assigns the 3 specific values as desired reg.mat <- matrix(0, nrow=5, ncol=5) > reg.mat

[R] Are melt and dcast with ffdf possible?

2015-06-05 Thread Ken Nussear
Having trouble getting melt and dcast to work with ffdf I'm trying to cast 3 columns to a square matrix With a regular data.frame. comb <- expand.grid((1:10),(1:10)) dim(comb) comb$Dist <- (1:100) c.melt <- melt(comb, id.vars=c("Var1","Var2")) dcast(c.melt,Var2~Var1) goes from > comb V

[R] data.table cant find function melt?

2015-05-22 Thread Ken Nussear
Hi all, trying to use the melt function in data.table and I'm getting an error Anyone seen this before or know how to fix it? Thanks str(Distdata) Classes ‘data.table’ and 'data.frame': 828451 obs. of 3 variables: $ Poly1 : int 50088 50088 50088 50088 50088 50088 50088 50088 50088 500

[R] question about fitted values from geoR - results 'too good'

2007-11-08 Thread Ken Nussear
Hi cross posting from sig geo , because I really need help! I'm using geoR for some spatial linear models and I'm getting surprisingly optimistic values from the spatial models relative to the non-spatial, even when the models appear to be performing about equally (by AIC comparison) For example