I have two variables in a data frame, I want to generate two additional
variables. For every observations (i.e. every row), I want the first new
variable 'min' to carry the minimum of the two existing variables, and I
want the second new variable 'max' to carry the maximum of the two existing
vari
I want to use read.table to input many files, each for a different year. I
would like to use the macro variable 't' to refer to the exact file that I
would like to input the data using read.table. How could I do this? Thank
you!
for (t in 1970:2005)
{ edge <- read.table(file="edge_t.csv", head
I want to delete a row from a data frame XYZ where A == "TRUE". Let's assume
there are five variables in this data frame XYZ. My deletion is based on
the TRUE vs. FALSE value under variable A. How do I do this? Thanks!
My current code:
for (i in 1:length(XYZ$A)) if (XYZ$A == "FALSE") XYZ<-XY
3 matches
Mail list logo