How to use Aggregate function in R

0 votes
can anyone please help me with how to properly use an aggregate function in R?
Jun 13 in Data Analytics by Avinash
• 1,260 points
9 views

1 answer to this question.

0 votes
Where dat is the name of your matrix, use aggregate(FLOWS SPORT, dat, function(x) sum(as.numeric(x))).

Here, everything serves a purpose.

The second column must be converted into integers using numeric.
answered 4 days ago by Sohail
• 2,280 points

Related Questions In Data Analytics

0 votes
1 answer
0 votes
2 answers

How to use group by for multiple columns in dplyr, using string vector input in R?

data = data.frame(   zzz11def = sample(LETTERS[1:3], 100, replace=TRUE),   zbc123qws1 ...READ MORE

answered Aug 6, 2019 in Data Analytics by anonymous
11,615 views
+1 vote
2 answers

Which function can I use to clear the console in R and RStudio ?

Description                   Windows & Linux           Mac Clear console                      Ctrl+L ...READ MORE

answered Apr 17, 2018 in Data Analytics by anonymous
46,823 views
0 votes
1 answer

How to write a custom function which will replace all the missing values in a vector with the mean of values in R?

Consider this vector: a<-c(1,2,3,NA,4,5,NA,NA) Write the function to impute ...READ MORE

answered Jul 4, 2018 in Data Analytics by CodingByHeart77
• 3,720 points
3,157 views
+1 vote
1 answer

How can I use which() function in R ?

which() function determines the position of elements ...READ MORE

answered Sep 25, 2018 in Data Analytics by Daisy
• 8,120 points
6,650 views
0 votes
0 answers

How to use the where clause in R programming?

I'm trying to implement a where clause ...READ MORE

Dec 24, 2018 in Data Analytics by Sophie may
• 10,590 points
3,010 views
0 votes
1 answer

How to make points transparent using plot function in R?

There is no attribute to set the ...READ MORE

answered Oct 14, 2019 in Data Analytics by Cherukuri
• 33,010 points
880 views
0 votes
1 answer

How to use regular expressions in R?

Set of operators to use for regular ...READ MORE

answered Nov 2, 2019 in Data Analytics by anonymous
• 33,010 points
170 views
0 votes
1 answer

How to use the switch statement in R functions?

Switch definitely wasn't intended to operate this ...READ MORE

answered 4 days ago in Data Analytics by Sohail
• 2,280 points
11 views
0 votes
1 answer

How to use the strsplit function with a period

Since the dot has a specific meaning ...READ MORE

answered 4 days ago in Data Analytics by Sohail
• 2,280 points
11 views
webinar REGISTER FOR FREE WEBINAR X
Send OTP
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP