Load the libraries

suppressMessages(library(ggplot2))
suppressMessages(library(ggthemes))
# This library allows us to split up a dataframe and apply a function
suppressMessages(library(dplyr))
# Set the theme to theme_solarized where the font size is 20
theme_set(theme_solarized(20)) 

Load the data

wcdf <- read.csv('BodyIndicators.csv')

Create a box plot of height v/s weight distributions

for each country in the list

ggplot(aes(x = weightKg, y = heightCm), data = wcdf)+
  geom_boxplot(fill = "orange" ) +
  facet_wrap(~nationality, ncol = 8) +
  ylab('Weight in Kg') +
  ylab('Height in Cm')

Save the box plot

ggsave('hwboxplot.jpg', last_plot(), width = 16, height = 8, dpi=100)

Height v/s weight distributions for each country in the world cup

# The points are colored by the position of the player
ggplot(aes(x = weightKg, y = heightCm), data = wcdf) +
  geom_point(aes(color = position, size = BMI)) +
  scale_color_brewer(type = 'div') +
  facet_wrap(~nationality, ncol = 8) +
  xlab('Weight in Kg') +
  ylab('Height in Cm')

Save the scatter plot

ggsave('hwscatter.jpg', last_plot())
## Saving 7 x 5 in image

Create bar plots based on the position for each country

ggplot(aes(x = position), data = wcdf) +
  geom_bar(aes(fill = position)) +
  scale_fill_brewer(type = 'div') +
  theme(axis.text.x = element_text(size = 0)) +
  facet_wrap(~nationality, ncol = 8) +
  xlab('Position') +
  ylab('Count')

Save the bar plot

ggsave('posbar.jpg', last_plot(), width = 16, height = 8, dpi=100)

Create a scatter plot of BMI v/s position for each country

with a smoother layer

ggplot(aes(x = position, y = BMI), data = wcdf) +
  geom_jitter(aes(color = position, size = BMI)) +
  scale_color_brewer(type = 'div') +
  theme(axis.text.x = element_text(size = 0)) +
  facet_wrap(~nationality, ncol = 8) +
  geom_smooth(aes(group = 1)) +
  xlab('Position') +
  ylab('BMI') 
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 5.2419e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 5.2419e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 4.4287e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 4.4287e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 4.4287e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 4.4287e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 8.0036e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 8.0036e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 6.4768e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 4
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 0.985
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 6.4768e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 4
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 1.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 4.0602
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 0.985
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 1.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 4.0602
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 8.0036e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 8.0036e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 1.2429e-016
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 0.985
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 1.2429e-016
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 1.8327e-016
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 1.8327e-016
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 5.599e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 5.599e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 4
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 4
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 7.5433e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 7.5433e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 1.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 1.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 4.7631e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 4.7631e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 6.7924e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 4
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 0.985
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 6.7924e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 4
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 5.2419e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 5.2419e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 9.9166e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 4.0602
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 0.985
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 9.9166e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 4.0602
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 6.0128e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 4.0602
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 0.985
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 6.0128e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 4.0602
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 5.2419e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 5.2419e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 4.7631e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 4.7631e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 8.0036e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 8.0036e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 5.2419e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 5.2419e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 7.5433e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 7.5433e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1

Save the scatter plot

ggsave('bmiscatter.jpg', last_plot(), width = 16, height = 8, dpi=100)
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 5.2419e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 5.2419e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 4.4287e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 4.4287e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 4.4287e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 4.4287e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 8.0036e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 8.0036e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 6.4768e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 4
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 0.985
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 6.4768e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 4
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 1.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 4.0602
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 0.985
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 1.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 4.0602
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 8.0036e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 8.0036e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 1.2429e-016
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 0.985
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 1.2429e-016
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 1.8327e-016
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 1.8327e-016
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 5.599e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 5.599e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 4
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 4
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 7.5433e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 7.5433e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 1.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 1.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 4.7631e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 4.7631e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 6.7924e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 4
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 0.985
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 6.7924e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 4
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 5.2419e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 5.2419e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 9.9166e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 4.0602
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 0.985
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 9.9166e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 4.0602
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 0.985
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 6.0128e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 4.0602
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 0.985
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 6.0128e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 4.0602
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 5.2419e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 5.2419e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 0
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 0
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 4.7631e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 4.7631e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 8.0036e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 8.0036e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 5.2419e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 5.2419e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1
## geom_smooth: method="auto" and size of largest group is <1000, so using loess. Use 'method = x' to change the smoothing method.
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : pseudoinverse used at 4.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : neighborhood radius 2.015
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : reciprocal condition number 7.5433e-017
## Warning in simpleLoess(y, x, w, span, degree, parametric, drop.square,
## normalize, : There are other near singularities as well. 1
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : pseudoinverse used at 4.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : neighborhood radius 2.015
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : reciprocal condition number 7.5433e-017
## Warning in predLoess(y, x, newx, s, weights, pars$robust, pars$span,
## pars$degree, : There are other near singularities as well. 1

Answer some stats about the BMI

# Set na.rm = TRUE to ignore NA/NaN

# Use the by function to calculate the mean of BMI for each country
by(wcdf$BMI, wcdf$nationality, mean, na.rm = TRUE)
## wcdf$nationality: Algeria
## [1] 22.85526
## -------------------------------------------------------- 
## wcdf$nationality: Argentina
## [1] 23.83957
## -------------------------------------------------------- 
## wcdf$nationality: Australia
## [1] 23.25545
## -------------------------------------------------------- 
## wcdf$nationality: Belgium
## [1] 22.44478
## -------------------------------------------------------- 
## wcdf$nationality: Bosnia and Herzegovina
## [1] 22.99316
## -------------------------------------------------------- 
## wcdf$nationality: Brazil
## [1] 22.34609
## -------------------------------------------------------- 
## wcdf$nationality: Cameroon
## [1] 23.5295
## -------------------------------------------------------- 
## wcdf$nationality: Chile
## [1] 23.79545
## -------------------------------------------------------- 
## wcdf$nationality: Colombia
## [1] 23.92957
## -------------------------------------------------------- 
## wcdf$nationality: Costa Rica
## [1] 22.59667
## -------------------------------------------------------- 
## wcdf$nationality: Croatia
## [1] 23.22143
## -------------------------------------------------------- 
## wcdf$nationality: Ecuador
## [1] 22.63619
## -------------------------------------------------------- 
## wcdf$nationality: England
## [1] 22.58
## -------------------------------------------------------- 
## wcdf$nationality: France
## [1] 23.18696
## -------------------------------------------------------- 
## wcdf$nationality: Germany
## [1] 23.26045
## -------------------------------------------------------- 
## wcdf$nationality: Ghana
## [1] 23.23864
## -------------------------------------------------------- 
## wcdf$nationality: Greece
## [1] 22.9585
## -------------------------------------------------------- 
## wcdf$nationality: Honduras
## [1] 23.53214
## -------------------------------------------------------- 
## wcdf$nationality: Iran
## [1] 23.267
## -------------------------------------------------------- 
## wcdf$nationality: Italy
## [1] 22.85348
## -------------------------------------------------------- 
## wcdf$nationality: Ivory Coast
## [1] 23.2965
## -------------------------------------------------------- 
## wcdf$nationality: Japan
## [1] 22.69609
## -------------------------------------------------------- 
## wcdf$nationality: Korea Republic
## [1] 22.54
## -------------------------------------------------------- 
## wcdf$nationality: Mexico
## [1] 22.73609
## -------------------------------------------------------- 
## wcdf$nationality: Netherlands
## [1] 22.6981
## -------------------------------------------------------- 
## wcdf$nationality: Nigeria
## [1] 22.88632
## -------------------------------------------------------- 
## wcdf$nationality: Portugal
## [1] 22.77368
## -------------------------------------------------------- 
## wcdf$nationality: Russia
## [1] 22.51478
## -------------------------------------------------------- 
## wcdf$nationality: Spain
## [1] 22.91522
## -------------------------------------------------------- 
## wcdf$nationality: Switzerland
## [1] 23.25762
## -------------------------------------------------------- 
## wcdf$nationality: Uruguay
## [1] 23.29783
## -------------------------------------------------------- 
## wcdf$nationality: USA
## [1] 22.84062
# Use the by function to calculate the mean of BMI for each position
by(wcdf$BMI, wcdf$position, mean, na.rm = TRUE)
## wcdf$position: Attacker
## [1] 22.90906
## -------------------------------------------------------- 
## wcdf$position: Defender
## [1] 23.01908
## -------------------------------------------------------- 
## wcdf$position: Goalkeeper
## [1] 23.27338
## -------------------------------------------------------- 
## wcdf$position: Midfielder
## [1] 23.01529
# Get the summary for each group
by(wcdf$BMI, wcdf$nationality, summary, na.rm = TRUE)
## wcdf$nationality: Algeria
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.31   22.22   22.96   22.86   23.11   25.76 
## -------------------------------------------------------- 
## wcdf$nationality: Argentina
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   22.60   22.95   23.57   23.84   24.14   27.74 
## -------------------------------------------------------- 
## wcdf$nationality: Australia
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.20   22.22   22.74   23.26   24.35   27.76 
## -------------------------------------------------------- 
## wcdf$nationality: Belgium
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.06   21.54   22.34   22.44   23.22   25.77 
## -------------------------------------------------------- 
## wcdf$nationality: Bosnia and Herzegovina
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.99   21.97   22.94   22.99   24.08   24.72 
## -------------------------------------------------------- 
## wcdf$nationality: Brazil
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   19.60   21.35   22.63   22.35   23.52   24.68 
## -------------------------------------------------------- 
## wcdf$nationality: Cameroon
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   21.13   23.03   23.44   23.53   24.11   25.40 
## -------------------------------------------------------- 
## wcdf$nationality: Chile
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   21.45   22.89   24.01   23.80   24.97   25.56 
## -------------------------------------------------------- 
## wcdf$nationality: Colombia
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   21.31   22.70   23.89   23.93   25.18   26.75 
## -------------------------------------------------------- 
## wcdf$nationality: Costa Rica
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.23   21.84   22.55   22.60   23.29   25.11 
## -------------------------------------------------------- 
## wcdf$nationality: Croatia
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   21.13   22.28   23.30   23.22   24.15   25.66 
## -------------------------------------------------------- 
## wcdf$nationality: Ecuador
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   19.75   21.72   22.91   22.64   23.66   24.62 
## -------------------------------------------------------- 
## wcdf$nationality: England
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.09   21.32   21.88   22.58   24.14   26.85 
## -------------------------------------------------------- 
## wcdf$nationality: France
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   19.49   22.19   23.36   23.19   24.62   25.46 
## -------------------------------------------------------- 
## wcdf$nationality: Germany
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.66   22.16   23.36   23.26   24.36   25.06 
## -------------------------------------------------------- 
## wcdf$nationality: Ghana
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.02   23.02   23.41   23.24   23.94   27.13 
## -------------------------------------------------------- 
## wcdf$nationality: Greece
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.91   22.28   22.98   22.96   23.84   24.84 
## -------------------------------------------------------- 
## wcdf$nationality: Honduras
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.88   22.70   23.62   23.53   24.16   26.23 
## -------------------------------------------------------- 
## wcdf$nationality: Iran
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   21.48   22.54   22.82   23.27   23.79   26.51 
## -------------------------------------------------------- 
## wcdf$nationality: Italy
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.94   22.01   22.71   22.85   23.73   25.47 
## -------------------------------------------------------- 
## wcdf$nationality: Ivory Coast
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.99   22.47   23.15   23.30   24.37   26.57 
## -------------------------------------------------------- 
## wcdf$nationality: Japan
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.02   21.30   23.04   22.70   23.82   25.26 
## -------------------------------------------------------- 
## wcdf$nationality: Korea Republic
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   21.30   21.80   22.41   22.54   22.92   24.57 
## -------------------------------------------------------- 
## wcdf$nationality: Mexico
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   19.04   21.58   22.79   22.74   24.08   25.83 
## -------------------------------------------------------- 
## wcdf$nationality: Netherlands
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.15   21.46   22.55   22.70   23.78   25.25 
## -------------------------------------------------------- 
## wcdf$nationality: Nigeria
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   19.39   22.20   22.64   22.89   23.73   24.93 
## -------------------------------------------------------- 
## wcdf$nationality: Portugal
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.30   21.64   23.16   22.77   23.96   24.69 
## -------------------------------------------------------- 
## wcdf$nationality: Russia
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.90   21.86   22.60   22.51   23.24   23.96 
## -------------------------------------------------------- 
## wcdf$nationality: Spain
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.44   22.32   22.71   22.92   23.35   26.03 
## -------------------------------------------------------- 
## wcdf$nationality: Switzerland
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.90   22.78   23.59   23.26   23.89   25.21 
## -------------------------------------------------------- 
## wcdf$nationality: Uruguay
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   21.33   23.08   23.29   23.30   23.94   25.85 
## -------------------------------------------------------- 
## wcdf$nationality: USA
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##   20.68   21.72   23.02   22.84   23.97   25.50