R Users,
I am new to R and have tried to figure out how to automate this
process instead of using excel. I have read in this dataframe into r
with read.table. I need to reshape the data from the first table into
the format of the second table.
TractID StandID Species CruiseDate DBHClass
R users,
I am trying to find some way to find the value of a column that is repeated
the most for each StandID of a dataframe. I have research methods online
and the help page, but have had no success in finding a solution. I have
tried using the table function but it returns items for the whole
.
print(mydata)
# Applies basic math to the group selected by the logic.
mydata$score1[gals]<- 2*q1[gals] + q2[gals]
mydata$score2[gals]<- 3*q1[gals] + q2[gals]
mydata$score1[guys]<-20*q1[guys] + q2[guys]
mydata$score2[guys]<-30*q1[guys] + q2[guys]
print(mydata)
ot;NAH6005-001" #Creates a logical vector for
males.
StandFTI$score1[Stand]<- "TEST"
print(StandFTI)
But I get the warning message:
In `[<-.factor`(`*tmp*`, guys, value = "TEST") :
invalid factor level, NAs generated
Any help will be greatly appreciated!
4 matches
Mail list logo