I made a function systemFail(x), where x is one of the columns in my data frame (df$location).
Now I want to create a new column in my data frame (df$outcome) with the result of this function (Pass/Fail result). I used the line of code below which made the extra column as I wanted. However, annoyingly the result (a long column of Passes and Fails) also shows up in my R Markdown document.
How can I get the extra column in my data frame without getting the result also in my R Markdown document?
df$outcome <- sapply(df$location, systemFail)