Читать книгу The Big R-Book - Philippe J. S. De Brouwer - Страница 100
4.3.8.3 Editing Data in a Data Frame
ОглавлениеWhile one usually reads in large amounts of data and uses an IDE such as RStudio that facilitates the visualization and manual modification of data frames, it is useful to know how this is done when no graphical interface is available. Even when working on a server, all these functions will always be available.
de()
data.entry()
edit()
de(x) # fails if x is not defined de(x <- c(NA)) # works x <- de(x <- c(NA)) # will also save the changes data.entry(x) # de is short for data.entry x <- edit(x) # use the standard editor (vi in *nix)
Of course, there are also multiple ways to address data directly in R.
# The following lines do the same. data_test$Score[1] <- 80 data_test[3,1] <- 80