KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have a simple but strange problem. indices.list is a list, containing 118,771 Elements(integers or numeric). By applying the function unlist I lose about 500 elements. Look at the following code: > indices <- unlist(indices.list, use.names = FALSE) > > length(indices.list) [1] 118771 > length(indices) [1] 118248 How is that Possible?? I checked if indices.list contains any NA. But it does not: > any(is.na(indices.list) == TRUE) [1] FALSE data.set.merged is a dataframe containing more than 200,000 rows. When I use the vector indices (which apparently has the length 118,248) in order to get a subset of data.set.merged, I get a dataframe with 118,771 rows!?? That's so strange! data.set.merged.2 <- data.set.merged[indices, ] > nrow(data.set.2) [1] 118771 Any ideas whats going on here?
Tags (comma-separated)
Save Edits
Cancel