Ero sivun ”OpasnetBaseUtils” versioiden välillä

Opasnet Suomista
Siirry navigaatioon Siirry hakuun
(→‎Rcode generic: tidy-funktiota sovitettu suomenkieliseen ympäristöön)
Rivi 85: Rivi 85:
data$Result <- ifelse(!is.na(data$Result.Text), as.character(data$Result.Text), data$Result)
data$Result <- ifelse(!is.na(data$Result.Text), as.character(data$Result.Text), data$Result)
if("Observation" %in% colnames(data)){test <- data$Observation != "Description"} else {test <- TRUE}
if("Observation" %in% colnames(data)){test <- data$Observation != "Description"} else {test <- TRUE}
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")]
return(data)
return(data)

Versio 19. tammikuuta 2012 kello 10.35

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)