Laura Quinn <[EMAIL PROTECTED]> 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 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help