Displaying 3 results from an estimated 3 matches for "wordlen".
Did you mean:
worden
2001 Dec 21
0
read.table and as.vector (Was error message: "Error in model.frame")
...del.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
# from shell script...
2001 Dec 20
0
error message: "Error in model.frame"
...related to the question below are in
http://ling.ohio-state.edu/~vasishth/TempRdir/
I've been using a script (called newresiduals.R, the code is in the above
directory; I wanted to avoid cluttering up this message) that is run in
the following manner at the command prompt:
R --vanilla "wordlen-2-01-g1" < newresiduals.R
What it does is: it goes through a bunch of files with extension .dmp, and
(a) calculates residuals by doing residuals(lm(...)), using the vector
version of wordlen-2-01-g1 as the independent variable, and the vector
version of the third column of each .dmp file a...
2000 Nov 08
0
vq diffs
...probability count */
{
- long *probability=_ogg_malloc(c->entries*sizeof(long));
+ long *probability=(long*)_ogg_malloc(c->entries*sizeof(long));
for(i=0;i<c->entries;i++)probability[i]=1; /* trivial guard */
b->dim=c->dim;
@@ -574,6 +575,6 @@
{
long *wordlen=c->lengthlist;
- long *index=_ogg_malloc(c->entries*sizeof(long));
- long *revindex=_ogg_malloc(c->entries*sizeof(long));
+ long *index=(long*)_ogg_malloc(c->entries*sizeof(long));
+ long *revindex=(long*)_ogg_malloc(c->entries*sizeof(long));
int k;
for(i=0;i<...