1ivan
November 13, 2021, 10:10pm
1
*Display the descriptive statistics on the number of births each day, broken out by the day of the week. On which day are the most children born? *
tally(~births | day_of_week, data=df2)
Hi, you should provide a reproducible example so that we can run your data. We don't know anything about df2
at the moment, so can't really help you.
A minimal reproducible example consists of the following items:
A minimal dataset, necessary to reproduce the issue
The minimal runnable code necessary to reproduce the issue, which can be run
on the given dataset, and including the necessary information on the used packages.
Let's quickly go over each one of these with examples:
Minimal Dataset (Sample Data)
You need to provide a data frame that is small enough to be (reasonably) pasted on a post, but big enough to reproduce your issue.
Let's say, as an example, that you are working with the iris data frame
head(iris)
#> Sepal.Length Sepal.Width Petal.Length Petal.Width Species
#> 1 5.1 3.5 1.4 0.…
Also, if this is your homework, have a read:
Can I ask questions from a course I am taking here?
General questions are always welcome!
Please do ask general questions about things like:
How to use R
How to use the RStudio IDE or RStudio Cloud
How to work with tidyverse packages
Where to find resources to help you learn or solve problems
Specific questions can be OK, if you follow these rules:
Never copy-paste instructions from an assignment (even for online courses).
Explicitly mention the course you are taking and use the #homework tag.
Ask your question as a reproducible example (reprex) , preferably prepared for posting using the reprex package .
Want to maximize your chances of getting the help you need? Keep readin…
1ivan
November 14, 2021, 12:26am
3
Tally is a command used to summarize the data. But I am looking for a command that finds an exact numerical value. The df2 corresponds to the data in the pic.
startz
November 14, 2021, 12:59am
4
If you use tidyverse
, you can get counts quite easily by using group_by()
and summarize()
.
system
Closed
December 5, 2021, 1:00am
5
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed. If you have a query related to it or one of the replies, start a new topic and refer back with a link.