Displaying 3 results from an estimated 3 matches for "numn".
Did you mean:
num
2001 Dec 21
0
read.table and as.vector (Was error message: "Error in model.frame")
...residuals <- residuals(lm(v .... [TRUNCATED]
Error in model.frame(formula, rownames, variables, varnames, extras,
extranames,
invalid variable type
But if I do something like
for (i in list.files(pattern = "*.dmp")) {
currentfile <- read.table(i)
n <- currentfile$V3
numn<-as.numeric(n)
residuals <- residuals(lm(numn ~ vecwordlen))
...
}
everything works fine.
Why should this happen?
Here is the full script containing the above loop:
#-----------------------------------------------------
foobar <- commandArgs()[3] # read in third command line argument...
2011 Aug 28
1
read.table: deciding automatically between two colClasses values
Hello,
I have a function for reading a data-frame from a file, which contains
E = read.table(file = filename,
header = T,
colClasses = c(rep("integer",6),"numeric","integer",rep("numeric",8)),
...)
Now a small variation arose, where
colClasses =
2006 Apr 10
0
fdim questions
...fdim (which measures fractal dimensions of
datasets) apparently prefers 3-D (XYZ) datasets. I'm trying to
measure the information dimension (a type of fractal dimension) of a
2-D (XY) dataset.
Here's some examples of the preferred 3-D data (XYZ):
library(fdim)
XYZ <- (makehplane(NumN=300, DimM=3, Longit=300))
fdim(XYZ,q=0.999999,PlotF=TRUE)
Here's an example of the type of data I have:
library(fdim)
X<- sample(1:1000,size=300,replace=TRUE)
Y<- sample(1:500,size=300,replace=TRUE)
XY<- matrix(c(X,Y),nrow=300)
fdim(XY,q=0.999999,PlotF=TRUE)
My question is this: sin...