R query and Data Science

0 votes

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 17, 2017 in Data Analytics by Deepika
33 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 17, 2017 by Sudhir
• 1,610 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 2, 2018 in Data Analytics by Anmol
• 3,620 points
52 views
0 votes
2 answers

Splitting the data into training and testing sets - R

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

answered Aug 20 in Data Analytics by anonymous
• 28,040 points
1,059 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 16, 2018 in Data Analytics by DataKing99
• 8,130 points
119 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 18, 2018 in Data Analytics by DataKing99
• 8,130 points
547 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 darklord
• 6,170 points
51 views
0 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 8, 2018 in Data Analytics by Anmol
• 3,620 points
55 views
0 votes
4 answers

Python vs. R for data science

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

answered Aug 1 in Data Analytics by briny
112 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 17, 2017 in Data Analytics by Sudhir
• 1,610 points
49 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 3, 2018 in Data Analytics by Ali
• 10,430 points
167 views