search for: testrow

Displaying 1 result from an estimated 1 matches for "testrow".

2012 May 31
3
How can I get this function to work?
...ext record to lowercase #### testData$raw <- tolower(testData$raw) #### Remove punctuation and any multiple spaces #### testData$raw <- gsub("[[:punct:]]", "", testData$raw) testData$raw <- gsub(" +", " ", testData$raw) #### Select test row #### testRow <- testData[13,] testRow #### Select terms +/- a specified number of words from "kras" #### Text <- unlist(strsplit(testRow$raw, " ")) Target <- grep("kras", Text) if (length(Target) == 0) {testRow$reduced <- ""} else{ Length <- length(Te...