## ----------------------------------------------------------------------------- library(agro) ff <- get_data_from_uri("https://doi.org/10.34725/DVN/90SBOT", ".") ff ## ----------------------------------------------------------------------------- data <- read.delim(ff[1]) ## ----------------------------------------------------------------------------- # Split data according to fertilisation scheme mydata <- split(data, data$Fertilisationscheme) # For mineral fertilization mineralf <- mydata$`Mineral fertilization` # For no fertilization nof <- mydata$`No fertilization` # For Non sterilized compost nscompost <- mydata$`Non sterilized compost` # For sterilized compost scompost <- mydata$`Sterilized compost` # For C.calothyrsus. con <- mydata$Calliandra ## ----------------------------------------------------------------------------- # Mineral fertilizetion vs. Control t.test(mineralf$Plantvigor, con$Plantvigor, paired = TRUE) # No fertilizetion vs. Control t.test(nof$Plantvigor, con$Plantvigor, paired = TRUE) # Non sterilized compost vs. Control t.test(nscompost$Plantvigor, con$Plantvigor, paired = TRUE) # Sterilized compost vs. Control t.test(scompost$Plantvigor, con$Plantvigor, paired = TRUE) ## ----------------------------------------------------------------------------- # Subset new data frame newdata <- data[ , -c(1:7,14)] # Make a correlation matrix table round(cor(newdata), 2)