Description Usage Arguments Value Note Examples
View source: R/survival_sex_rel.R
This function analyses the relationship between Survival rate and sex of the passengers.
1 |
df: |
The titanic train data set which we imported and converted to df dataframe. |
sub_sex |
: subset which contains just the sex and survival rate of passenger |
fem_total |
:total females in the ship |
male_total |
:total males in the ship |
sur_sex |
:subset with only survived passengers |
female_survived |
: total female survived |
male_survived |
: total male survived |
mf_total: |
total analysis |
plot_sex |
: graphical representation of the relationship |
sex_rel_ans : returns the analysis and also the graphical representation.
To use this function by itself, you need to first run import_data() function to import the Titanic df from the train.csv file.
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.