Mod 8 Input/Output

Daniel Tafmizi

Dr. Friedman

Lis 4370

Module 8

Github: daniel.R/Work.R/LIS4370Rprog/Mod8input_output.R at main · DanielDataGit/daniel.R (github.com)

After looking at the step-by-step solutions I see I have misunderstood the first prompt. I used group_by to summarize by sex and give the mean age and grade. The second command I used what was listed to extract [iI] names. The subset with grepl worked perfectly. It kept only names with the letter [iI] in it. I find the syntax a little weird. Using "[iI]" is not what I would expect. I was thinking it would be something like c("i", "I") or by using the | operator.


Step 1:

 Sex    Age   Grade
1 Female 21.375 86.9375
2   Male 21.250 80.2500


Step 2:

   Name Age    Sex Grade
3      Lauri  21 Female    90
4     Leonie  21 Female    91
6    Mikaela  20 Female    69
8       Aiko  24 Female    97
9   Tiffaney  21 Female    78
10    Corina  23 Female    81
11 Petronila  23 Female    98
12    Alecia  20 Female    87
13   Shemika  23 Female    97
15   Deloris  21 Female    67
17     Eboni  20 Female    84
18   Delfina  19 Female    93
19 Ernestina  19 Female    93
20      Milo  19   Male    67

Comments

Popular posts from this blog

redditApiR

Mod 7 OOP

Description File