I am trying to update a single column in each row of data.table structure by either calling a function or running some code inline. However, either I cannot pass a current row to a function or once the data.table is updated all values in the column are identical. This is my code for inline code:
airData <- data.table(Airplane_Data)
airData[, c("NewType") := paste(strsplit(gsub("[^a-zA-Z]", " ", Type), " +")[[1]], collapse = ' ')]
That's how I call function from data.table:
airData[,findReason(toString(Summary))]
I cannot figure out what am I doing wrong