Re: [R] handling nulls while reading mainframe file

2010-05-05 Thread Michael Steven Rooney
t; str(x) > raw [1:10] 00 00 22 00 ... > > x > [1] 00 00 22 00 00 00 00 00 00 00 > > x[x == as.raw(0)] <- as.raw(0xab) > > x > [1] ab ab 22 ab ab ab ab ab ab ab > > > > > On Wed, May 5, 2010 at 1:07 PM, Michael Steven Rooney < > michael.s.r

[R] handling nulls while reading mainframe file

2010-05-05 Thread Michael Steven Rooney
Hi, I am trying to read in records from an old main frame file. Each record is 640 bytes. I had some success using the following statement: iconv(readChar(con, nchars=640, useBytes = TRUE),from="IBM037",to="",sub="#") What I have found, however, is that ocassionally a record will contain a Null

[R] EBCDIC

2010-04-29 Thread Michael Steven Rooney
Does R have package/function that can read a file that has been downloaded from a mainframe in EBCDIC format? Thanks, Mike [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] when setting environment: target of assignment expands to non-language object

2010-04-27 Thread Michael Steven Rooney
t;nlme")) > mymodel <- lme(fixed = e ~ a,random= ~ 1 | g,data=df,correlation=corExp(c(1,.5),form= ~ x + y | g, nugget=TRUE),control=list(msVerbose=TRUE,opt="nlminb")) coef<-.corExp Error in `coef<-.corSpatial`(`*tmp*`, value = c(0, 0)) : object 'spatial_factList&#x

Re: [R] when setting environment: target of assignment expands to non-language object

2010-04-27 Thread Michael Steven Rooney
ormula") <- form attr(value, "nugget") <- nugget attr(value, "metric") <- match.arg(metric) attr(value, "fixed") <- fixed class(value) <- c("corExp", "corSpatial", "corStruct") value } On Mon, Apr

Re: [R] when setting environment: target of assignment expands to non-language object

2010-04-26 Thread Michael Steven Rooney
ot;) <- form attr(value, "nugget") <- nugget attr(value, "metric") <- match.arg(metric) attr(value, "fixed") <- fixed class(value) <- c("corExp", "corSpatial", "corStruct") value } On Mon, Apr 26, 201

Re: [R] when setting environment: target of assignment expands to non-language object

2010-04-26 Thread Michael Steven Rooney
Thanks. How do I make my function visible to others? Will assignInNamespace do that? On Mon, Apr 26, 2010 at 10:23 PM, Gabor Grothendieck < ggrothendi...@gmail.com> wrote: > See ?assignInNamespace > > On Mon, Apr 26, 2010 at 9:49 PM, Michael Steven Rooney > wrote: > >

[R] when setting environment: target of assignment expands to non-language object

2010-04-26 Thread Michael Steven Rooney
Hi, I am trying to place my own functions in the nlme environment: The following statement works: environment(coef.corSPT) <- environment(getS3method("coef","corSpatial")) but this one returns an error: environment(get("coef<-.corSPT")) <- environment(getS3method("coef<-","corSpatial")) Error

Re: [R] R crashing oddly

2010-04-23 Thread Michael Steven Rooney
OK, now it sounds like the behavior is exactly the same for both of us. I think Gmail sometimes gobbles up newline characters, and that must have messed up the code I sent out before. Someone pointed out to me that a similar problem was identified before: https://stat.ethz.ch/pipermail/r-sig-mixe

Re: [R] R crashing oddly

2010-04-23 Thread Michael Steven Rooney
glish_United States.1252 > [4] LC_NUMERIC=C > [5] LC_TIME=English_United States.1252 > > attached base packages: > character(0) > > other attached packages: > [1] nlme_3.1-96 > > loaded via a namespace (and not attached): > [1] base_2.11.0 graphics_2.11.0 grDev

Re: [R] R crashing oddly

2010-04-23 Thread Michael Steven Rooney
coef<-.corSpatial`(`*tmp*`, value = c(0, 0, 0)) : > Cannot change the length of the parameter after initialization > > Even trying several times I always get the error and cannot reproduce any > crash. > > Best wishes, > Uwe > > > > > On 22.04.2010 19:31, Mich

Re: [R] R crashing oddly

2010-04-22 Thread Michael Steven Rooney
;logDet","corStruct") recalc.corSPT <- getS3method("recalc","corStruct") formula.corSPT <- function(object,...) { a <- as.character(formula(object[["time"]])) b <- as.character(formula(object[["space"]])) a <- strsplit(

[R] R crashing oddly

2010-04-21 Thread Michael Steven Rooney
Rooney You definitely need to provide the information requested in the posting guide, specifically OS, R version, package version (and update to the newest if you haven't yet). Sarah On Wed, Apr 21, 2010 at 11:41 AM, Michael Steven Rooney wrote: > Hi, > > I am working with the pac

[R] R crashing oddly

2010-04-21 Thread Michael Steven Rooney
Hi, I am working with the package nlme, and I tried creating a new correlation class (which, according to the help pages, is possible if you write a few new method functions). Anyways, I think I am 99% of the way there, but I have a recurring problem with R crashing on seemingly innocuous statemen

[R] creating a new corClass for lme()

2010-04-13 Thread Michael Steven Rooney
Hi, I have been using the function lme() of the package nlme to model grouped data that is auto-correlated in time and in space (the data was collected on different days via a moving monitor). I am aware that I can use the correlation classes corCAR1 and corExp (among other options) to model the t