Hello,
I have this data frame [algae] in the package DMwR. I thought I understand how to refer an element but I cannot explain... is.na(algae) is giving us the a logical vector with TRUE being the na's. which(is.na(algae)) gives the positions on the elements in the data frame where is.na returns TRUE. However which(is.na(algae)) returns [1] 648 838 862 1055 1056 1057 1058 1059 1060 1061 1062 1161 1199 1262 1399 1462 1599 1662 1799 1828 1999 2055 2056 2057 2058 2059 2060 2061 2062 2063 [31] 2116 2184 2199 Weirs since: > dim(algae) [1] 200 18 If I refer back algae[which(is.na(algae))) I get a vector of NA's... What are the values returned by which(is.na(algae))? Thanks a lot for your help [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.