How to create global data sets in R?

0 votes
I'm trying to create some global datasets in R. I know there is an assign function but I don't know how to use it. Any help will be appreciated. Thanks.
Dec 12, 2018 in Data Analytics by Ali
• 10,660 points
37 views

1 answer to this question.

0 votes

You can use the <<- operator for assigning variables globally

z <- function ()  x <<- c(1,2,3,4,5,6,7,8,9,10) 
z()
x
#[1]  1  2  3  4  5  6  7  8  9 10
answered Dec 12, 2018 by Maverick
• 10,800 points

Related Questions In Data Analytics

0 votes
1 answer
0 votes
2 answers

How to sort a data frame by columns in R?

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

answered Aug 21, 2019 in Data Analytics by anonymous
• 32,440 points
190 views
0 votes
1 answer

How to create excellent examples in R?

An excellent example must consist of the ...READ MORE

answered Apr 10, 2018 in Data Analytics by kappa3010
• 2,080 points

edited Apr 12, 2018 by kappa3010 54 views
0 votes
1 answer

How to convert a list to data frame in R?

Let's assume your list of lists is ...READ MORE

answered Apr 12, 2018 in Data Analytics by nirvana
• 3,060 points

edited Apr 12, 2018 by nirvana 5,145 views
+9 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,680 points
97 views
0 votes
1 answer

Error saying "vector size cannot be NA" when using R with data mining

You can use the removesparseterm function.  Removes sparse ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,800 points
677 views
+1 vote
2 answers
0 votes
1 answer

Trying to find frequent itemsets of a data set using arules package

Try replacing ID <- c("A123","A123","A123","A123","B456","B456","B456") item <- c("bread", "butter", "milk", ...READ MORE

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,800 points
52 views
0 votes
1 answer

How do I convert data frame to csv file in R?

Hey @Ali, its very simple one line ...READ MORE

answered Nov 21, 2018 in Data Analytics by Maverick
• 10,800 points
106 views
0 votes
1 answer

How to give line numbers in errors in R?

Use the following command: options(show.error.locations = TRUE) READ MORE

answered Nov 8, 2018 in Data Analytics by Maverick
• 10,800 points
33 views