[R] Beginner's query - segmentation fault
Peter Dalgaard BSA
p.dalgaard at biostat.ku.dk
Tue Oct 7 14:25:23 CEST 2003
Laura Quinn <laura at env.leeds.ac.uk> writes:
> I am dealing with a huge matrix in R (20 columns, 54000 rows) and have
> lots of missing values within the dataset which are currently displayed as
> the value "-999.00" I am trying to create a new matrix (or change the
> existing one) to display these values as "NA" so that I can then perform
> the necessary analysis on the columns within the matrix.
>
> The matrix name is temp and the column names are t1 to t20 inclusive.
>
> I have tried the following command:
>
> temp$t1[temp$t1 == -999.00] <- NA
>
> and it returns a segmentation fault, can someone tell me what I am doing
> wrong?
Not telling us which system and which version you are using, and not
giving us a reproducible example... OK, the latter can be tricky, but
does it happen all the time? Only after doing X? Also if you deal with
a subset of data?
The command as such should work as far as I can see, and segmentation
faults should basically not happen unless the user has been messing
about at the C code level.
(BTW, that's a data frame, not a "matrix", I assume.)
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list