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
40 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
915 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
65 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
460 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
23 views
0 votes
1 answer

How to sort a data frame by columns in R?

You can just use the order function ...READ MORE

answered Apr 10, 2018 in Data Analytics by darklord
• 6,140 points
70 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
24 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
• 37,320 points
18 views
0 votes
1 answer

Import csv excel file in R

Be sure the file is in the ...READ MORE

answered Nov 5, 2018 in Data Analytics by Kalgi
• 37,320 points
42 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 33 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
37 views