R query and Data Science

+1 vote

Hi,

We have done R certification course from Edureka and require some assistance in the following query.

Is there any way or package to assign the following values to a column in single syntax?

GL Accounts

Group Description

Range of GL accounts

Fee Revenues

400-429

Capitalized Payroll

529

Training Costs

540-549

Travel Costs

580-589

Client Entertainment Costs

600-609

Computer Hardware & Software Costs

610-619

Telecommunication Costs

620-629

Facility Costs

630-639

Local GAAP - Revenues

840000 - 849999

Local GAAP - Expenses

850000 - 879999

Dec 18, 2017 in Data Analytics by Deepika
894 views

1 answer to this question.

0 votes

Dear Deepika,

Hope you are doing great.

You can use sample function to generate random number between specified range.

For example:

x <- sample(1:10, 5, replace=T)

x
[1] 6 9 7 6 5

You need to generate one function which will generate all the specified range.

Hope that helps.

Happy learning :)

answered Dec 18, 2017 by Sudhir
• 1,570 points

Related Questions In Data Analytics

0 votes
2 answers

"Train" and "Test" sets in Data Science

Normally to perform supervised learning you need ...READ MORE

answered Aug 3, 2018 in Data Analytics by Abhi
• 3,720 points
1,325 views
+1 vote
2 answers

Splitting the data into training and testing sets - R

Hi, Try like this. train = sample(x = ...READ MORE

answered Aug 21, 2019 in Data Analytics by anonymous
• 33,030 points
6,129 views
0 votes
1 answer

How to filter a data frame with dplyr and tidy evaluation in R?

Requires the use of map_df to run each model, ...READ MORE

answered May 17, 2018 in Data Analytics by DataKing99
• 8,250 points
1,899 views
0 votes
1 answer

How to forecast season and trend of data using STL and ARIMA in R?

You can use the forecast.stl function for the ...READ MORE

answered May 19, 2018 in Data Analytics by DataKing99
• 8,250 points
2,172 views
0 votes
1 answer

How to calculate group mean and assign it to new data in R

You can use something like this: df$grp.mean.values <- ...READ MORE

answered Jun 27, 2018 in Data Analytics by Sahiti
• 6,370 points
1,883 views
+10 votes
3 answers

Which is a better initiative to learn data science: Python or R?

Well it truly depends on your requirement, If ...READ MORE

answered Aug 9, 2018 in Data Analytics by Abhi
• 3,720 points
1,626 views
+1 vote
4 answers

Python vs. R for data science

I would say both Python and R ...READ MORE

answered Aug 1, 2019 in Data Analytics by briny
2,180 views
0 votes
1 answer
0 votes
1 answer

Big Data transformations with R

Dear Koushik, Hope you are doing great. You can ...READ MORE

answered Dec 18, 2017 in Data Analytics by Sudhir
• 1,570 points
1,030 views
0 votes
2 answers

What is difference between Distributed search head and Search head cluster?

 A distributed environment describes the separation of ...READ MORE

answered Dec 4, 2018 in Data Analytics by Ali
• 11,360 points
2,469 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP