How to take input from user in R?

0 votes
How to take input from user in R? Fetch 2 dates using which the dates in that range will be provided for calculations.
Aug 8 in Data Analytics by smitha
32 views

1 answer to this question.

0 votes

Readline() function read input from console as below.

Example:

> n <- readline(prompt="Enter an integer: ")
Enter an integer: 12
> n
[1] "12"
answered Oct 14 by Cherukuri
• 32,260 points

Related Questions In Data Analytics

0 votes
2 answers

How to use group by for multiple columns in dplyr, using string vector input in R?

data = data.frame(   zzz11def = sample(LETTERS[1:3], 100, replace=TRUE),   zbc123qws1 ...READ MORE

answered Aug 5 in Data Analytics by anonymous
3,909 views
0 votes
1 answer

How to find common elements from multiple vectors in R?

Reduce(intersect, list(a,b,c)) READ MORE

answered Apr 26, 2018 in Data Analytics by DeepCoder786
• 1,720 points
905 views
0 votes
1 answer

How to remove HTML tags from string in R Programming?

Try this simple code to remove the <br ...READ MORE

answered Feb 1 in Data Analytics by Sophie may
• 9,870 points
509 views
0 votes
0 answers

How to get the value passed through url from one page to another in R?

How to get the value passed through ...READ MORE

Oct 16 in Data Analytics by ch
• 3,290 points
14 views
0 votes
1 answer

By using dpylr package sum of multiple columns

Basically here we are making an equation ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
128 views
0 votes
1 answer

How to convert a text mining termDocumentMatrix into excel or csv in R?

By assuming that all the values are ...READ MORE

answered Apr 5, 2018 in Data Analytics by DeepCoder786
• 1,720 points
184 views
0 votes
1 answer

In a dpylr pipline how to use sample and seq?

For avoiding rowwise(), I prefer to use ...READ MORE

answered Apr 6, 2018 in Data Analytics by DeepCoder786
• 1,720 points
91 views
0 votes
1 answer

How to create a list of Data frames?

Basically all we have to do is ...READ MORE

answered Apr 9, 2018 in Data Analytics by DeepCoder786
• 1,720 points
115 views
0 votes
4 answers

How to remove NA values from a Vector in R?

You can try na.omit() or na.exclude() too. ...READ MORE

answered Jul 31 in Data Analytics by anonymous
• 32,260 points
9,676 views
0 votes
1 answer

How to create a new table in database from R?

Use dbGetQuery to create a table by ...READ MORE

answered Oct 14 in Data Analytics by Cherukuri
• 32,260 points
44 views