Dasst-setter function

"[[<-" method for class Dasst

"[[<-" method for class Dasst

"[[<-" sets the contents of a table from an object of class Dasst. methods

Arguments

  • x: An object of class Dasst.
  • i: An integer value. Position where values will be updated.
  • value: Any Values to be stored at the given position.

Returns

The actual object of class Dasst.

Details

This method sets the contents of the selected table stored in an object of class Dasst. Tables are internally stored and retrieved as data.frame. Rules for subset can be applied.

Examples

# Add a row of NA at the end of the table 1 data(plantGrowth) rmax <- nrow(plantGrowth[[1]]) plantGrowth[[1]][rmax + 1, ] <- NA # Edit a subset plantGrowth[[1]][131:132,2:4] plantGrowth[[1]][131:132,2:4] <- matrix(rep(100,6),nrow=2) plantGrowth[[1]][131:132,2:4] # Remove the last rows # No need to subset left hand side. Dimension are automatically adjusted. tail(plantGrowth[[1]]) plantGrowth[[1]] <- plantGrowth[[1]][c(-131,-132), ] tail(plantGrowth[[1]]) # Column names are also valid plantGrowth[[1]][129:130,"SNW1C"] plantGrowth[[1]][129:130,"SNW1C"] <- 1100:1101 plantGrowth[[1]][129:130,"SNW1C"]

See Also

[[

  • Maintainer: Homero Lozza
  • License: GPL (>= 2)
  • Last published: 2022-04-13

Useful links