Ero sivun ”OpasnetBaseUtils” versioiden välillä

Opasnet Suomista
Siirry navigaatioon Siirry hakuun
(→‎Rcode generic: tidy: converts text into numbers if possible in Result column)
Rivi 87: Rivi 87:
if("Havainto" %in% colnames(data)){test <- data$Havainto != "kuvaus"}
if("Havainto" %in% colnames(data)){test <- data$Havainto != "kuvaus"}
data <- data[test, !colnames(data) %in% c("id", "obs", "Result.Text")]
data <- data[test, !colnames(data) %in% c("id", "obs", "Result.Text")]
if(sum(is.na(as.numeric(as.character(data$Result)))) = 0) {data$Result <- as.numeric(as.character(data$Result))}
if(sum(is.na(as.numeric(as.character(data$Result)))) == 0) {data$Result <- as.numeric(as.character(data$Result))}
return(data)
return(data)
}
}

Versio 19. tammikuuta 2012 kello 12.32

This page is just a placeholder for code in op_en:OpasnetBaseUtils so that it can be used in Finnish Opasnet as well.

Rcode generic

  • Functions: dropall, PTable, opasnet.data, tidy, summary.bring

+ Näytä koodi

⇤--#: . Opasnet.data() does not work. Problems: 1) it seems to be unable to download files from M-files; 2) the read.table part does not work (error: line 2 did not have 7 elements (there were 29 columns!)), 3) error: could not find function getURL (this is maybe a problem with my own computer, as getURL has worked correctly in R-tools.) --Jouni 23:54, 28 December 2011 (EET) (type: truth; paradigms: science: attack)