How to create global data sets in R

+1 vote
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
• 11,360 points
582 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,840 points

Related Questions In Data Analytics

0 votes
1 answer
+1 vote
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
• 33,030 points
1,838 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,090 points

edited Apr 12, 2018 by kappa3010 773 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,130 points

edited Apr 12, 2018 by nirvana 22,135 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,665 views
+1 vote
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,840 points
4,874 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,840 points
838 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,840 points
2,490 views
+1 vote
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,840 points
947 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