Hello,
I want to try to get all the data of a cloumn namend "sulfate" which is
not Na.
So I did :
corr <- function(directory, threshold = 0) {
# lezen van alle bestanden in de directory
file_list <- list.files( directory, pattern = "*.csv", full.names =
TRUE)
# lezen van alle bestanden in a loop
# 1) bepalen van de complete_cases
# 2) controleren of het hoger/lager is dan de treshold.
# 3) als het hoger is.
# a) lezen van de nitraat en controleren of het geen Na is
# b) lezen van de sulfaat en controleren of het geen Na is.
# c) als beide geen Na zijn, dan de correlatie bepalen
for(file in file_list) {
content <- read.csv(file)
if (complete.cases(content) > 0) {
sulfate <- which (!is.Na(content[["sulfate"]]))
print(sulfate)
}
}
}
but now I see the above error.
What did I do wrong ?
Regards,
Roelof
______________________________________________
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.