Skip to content

LeBlanc-Palakur_Submission#3

Open
PatrickLeBlanc wants to merge 7 commits into
araiho:masterfrom
PatrickLeBlanc:master
Open

LeBlanc-Palakur_Submission#3
PatrickLeBlanc wants to merge 7 commits into
araiho:masterfrom
PatrickLeBlanc:master

Conversation

@PatrickLeBlanc

Copy link
Copy Markdown

No description provided.

@araiho araiho left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good job! and thank you for showing your work 4/4

Comment thread ExerciseFinalREADTHIS.R

#Sort unique combinations of gender and years experience by first gender and then years experience
wages=read.csv(file="wages.csv",header=TRUE,stringsAsFactors=FALSE)
wages2=unique(wages[,1:2])

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Be careful naming things like this. If you come back later you may not know what you were trying to do.

Comment thread ExerciseFinalREADTHIS.R
orderedfemale=female[order(female[,2]),]
orderedmale=male[order(male[,2]),]
orderedwages2=rbind(orderedfemale,orderedmale)
write.csv(orderedwages2,file="orderedwages.csv")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Another way would be

genderYears=data[,1:2]
unique_genderYears=unique(genderYears)

sorted=unique_genderYears[order(unique_genderYears[,1],unique_genderYears[,2]),]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants