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,450 points
19 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,040 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 1 day ago in Data Analytics by anonymous
• 21,150 points
91 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,020 points

edited Apr 12, 2018 by kappa3010 23 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 2,201 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,040 points
353 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,040 points
35 views
0 votes
1 answer

Error saying "Error in df$item : object of type 'closure' is not subsettable" when trying to use arules package

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

answered Nov 15, 2018 in Data Analytics by Maverick
• 10,040 points
108 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,040 points
42 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,040 points
19 views