I'm trying to run a loop in R script on a dataframe called input. and update the column name Valid. 

```
function myFunction(x){
    Result <- x * 2 
return(Result)
}

for (row in nrow(input)){
input$Valid[row] == myFunction(2)
}

output <- input 

```

But not getting the dataframe updated. And Yes I want to do this in a loop.