I am trying to loop through all the rows of a column in a DataFrame
. I read in the csv using data.table
. I am new to R and was wondering what way I would go about doing something like this:
for i in row_2_of_dataframe:
if i == 0:
#Do something to that value
else:
#Leave it the way it is
Any help would be great.