R package plyr:count output int not num
I have a dataframe data3_back, and I want to sum value which have same "bp".
So I use this
> data3_back1<-count(data3_back,"bp")
But the output "freq" is int rather than numeric.
Is there anyway to handle it? Or is there any other way to achieve my purpose?
• 1,664 views
•
link
1 answer
This will sum the values of the value column for rows that have the same bp:
data3_back1 %>%
group_by(bp) %>%
summarise(tot_sum = sum(value))
However, your example with count seems to indicate you want to do something else - could you clarify the question?
• 0 views
•
link
Log in to answer this question.
Please do not post the images of the data. try
as.numericThank you for your reply. I make a silly mistake and I misunderstand the function of "count".