Skip to content

R notatki

Spis notatek

  • Sampling
  • Visualisation
# Import any packages you want to use here

Take Notes

Add notes here about the concepts you've learned and code cells with code you want to keep.

Sampling

row_indexes <- seq_len(sample_size)*interval

coffee_ratings_strat %>%  count(country_of_origin, sort =TRUE)%>%  mutate(percent = 100* n /sum(n)) #procent obserwacji

attrition_weight <- attrition_pop %>% 
  slice_sample(n = 400, weight_by = YearsAtCompany) #ważenie przez zmienną
#Visualisation

Visualisation

Żeby dodać linie trendu do scatterplota można wrzucić geom_smooth()