How can I perform word stemming in R

0 votes
For example, I want to stem the words running, runs and ran how would I do it ?
Aug 10, 2018 in Data Analytics by Anmol
• 1,620 points
47 views

1 answer to this question.

0 votes

The tm package in R provides the stemDocument() function to stem the document to it's root.

This function either takes in a character vector and returns a character vector, or takes in a PlainTextDocument and returns a PlainTextDocument.

example: stemDocument(running,runs,ran) would return (run,run,ran) as the ouput.

answered Aug 20, 2018 by Anmol
• 3,620 points

Related Questions In Data Analytics

0 votes
1 answer

How can I define Global Variables in R?

The variables declared inside a function are ...READ MORE

answered Apr 25, 2018 in Data Analytics by shams
• 3,580 points
1,168 views
0 votes
1 answer

How can I delete multiple values from a vector in R?

The %in% operator tells  which elements are ...READ MORE

answered Apr 26, 2018 in Data Analytics by shams
• 3,580 points
96 views
0 votes
1 answer

How can I remove duplicated rows in R ?

The function distinct() in the dplyr package ...READ MORE

answered Apr 26, 2018 in Data Analytics by shams
• 3,580 points
569 views
0 votes
1 answer

How can I control the size of points in an R scatterplot?

plot(variable, type='o' , pch=5, cex=.3) The pch argument ...READ MORE

answered May 3, 2018 in Data Analytics by shams
• 3,580 points
31 views
0 votes
2 answers

How to sort a data frame by columns in R?

You can use dplyr function arrange() like ...READ MORE

answered 3 days ago in Data Analytics by anonymous
• 21,430 points
97 views
0 votes
1 answer

How to know the type of an object?

To find the type of an object ...READ MORE

answered Sep 19, 2018 in Data Analytics by Anmol
• 3,620 points
30 views
0 votes
1 answer

How do I import document files in R programming

Try the following: read.table("~/SMSSpamCollection", header=TRUE, sep="\t") Change "~/" to the "ptah/to/your/file/" Mess around ...READ MORE

answered Nov 5, 2018 in Data Analytics by Kalgi
• 39,330 points
22 views
0 votes
2 answers

Import csv excel file in R

Hi. Check out your filename and the ...READ MORE

answered 2 days ago in Data Analytics by anonymous
• 21,430 points
50 views
0 votes
1 answer

How can I import a file in R without giving the destination/file path to the specified file?

You can use the window explorer to ...READ MORE

answered Aug 28, 2018 in Data Analytics by Anmol
• 3,620 points

edited Aug 28, 2018 by Vardhan 38 views
+1 vote
1 answer

How do I perform feature selection in a disease prediction data set?

Feature selection is based equally upon logic ...READ MORE

answered Aug 20, 2018 in Data Analytics by Anmol
• 3,620 points
40 views