cis-ds / reproducible-examples

0 stars 0 forks source link

03-reorder-urban-example #3

Open bensoltoff opened 2 years ago

bensoltoff commented 2 years ago

Post your reproducible example here.

margueritemcg commented 2 years ago
library(tidyverse)
library(here)
#> here() starts at /Users/Doublem/Desktop/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

dwx1201 commented 2 years ago
library(tidyverse)
library(here)
#> here() starts at /private/var/folders/n5/jpwqk22132bgs57n8s5dtgz00000gn/T/RtmpSoVBYW/reprex-f646f6fc7de-sugar-cob

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Error: '/private/var/folders/n5/jpwqk22132bgs57n8s5dtgz00000gn/T/RtmpSoVBYW/reprex-f646f6fc7de-sugar-cob/data/urbanization-state.csv' does not exist.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()
#> Error in ggplot(data = urban, mapping = aes(x = state, y = urbanindex)): object 'urban' not found

Created on 2021-11-04 by the reprex package (v2.0.1)

mschuhler commented 2 years ago

SO MANY NAMES HOW DO I ORDER THINGS PLEASE HELP

## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/schuhler/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

evaxwu commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/wux21/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

Jenny999973 commented 2 years ago
library(tidyverse)
library(here)
#> here() starts at /tmp/Rtmpk849kB/reprex-2a904e640626e9-jolly-bass

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Error: '/tmp/Rtmpk849kB/reprex-2a904e640626e9-jolly-bass/data/urbanization-state.csv' does not exist.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()
#> Error in ggplot(data = urban, mapping = aes(x = state, y = urbanindex)): object 'urban' not found

Created on 2021-11-04 by the reprex package (v2.0.1)

youli2154 commented 2 years ago
library(tidyverse)
library(here)
#> here() starts at /tmp/RtmpMflDGF/reprex-2aa3c8286bda8b-irate-booby

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Error: '/tmp/RtmpMflDGF/reprex-2aa3c8286bda8b-irate-booby/data/urbanization-state.csv' does not exist.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()
#> Error in ggplot(data = urban, mapping = aes(x = state, y = urbanindex)): object 'urban' not found

Created on 2021-11-04 by the reprex package (v2.0.1)

FrederickZhengHe commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()
julimoth commented 2 years ago
library(tidyverse)
library(ggplot2)
library(here)
#> here() starts at /home/jemothersbaugh/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

Session info ``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.0.1 (2020-06-06) #> os Red Hat Enterprise Linux 8.4 (Ootpa) #> system x86_64, linux-gnu #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/Chicago #> date 2021-11-04 #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date lib source #> assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.0.1) #> backports 1.2.1 2020-12-09 [2] CRAN (R 4.0.1) #> bit 4.0.4 2020-08-04 [2] CRAN (R 4.0.1) #> bit64 4.0.5 2020-08-30 [2] CRAN (R 4.0.1) #> broom 0.7.9 2021-07-27 [2] CRAN (R 4.0.1) #> cellranger 1.1.0 2016-07-27 [2] CRAN (R 4.0.1) #> cli 3.0.1 2021-07-17 [2] CRAN (R 4.0.1) #> colorspace 2.0-2 2021-06-24 [2] CRAN (R 4.0.1) #> crayon 1.4.1 2021-02-08 [2] CRAN (R 4.0.1) #> curl 4.3.2 2021-06-23 [2] CRAN (R 4.0.1) #> DBI 1.1.1 2021-01-15 [2] CRAN (R 4.0.1) #> dbplyr 2.1.1 2021-04-06 [2] CRAN (R 4.0.1) #> digest 0.6.27 2020-10-24 [2] CRAN (R 4.0.1) #> dplyr * 1.0.7 2021-06-18 [2] CRAN (R 4.0.1) #> ellipsis 0.3.2 2021-04-29 [2] CRAN (R 4.0.1) #> evaluate 0.14 2019-05-28 [2] CRAN (R 4.0.1) #> fansi 0.5.0 2021-05-25 [2] CRAN (R 4.0.1) #> farver 2.1.0 2021-02-28 [2] CRAN (R 4.0.1) #> fastmap 1.1.0 2021-01-25 [2] CRAN (R 4.0.1) #> forcats * 0.5.1 2021-01-27 [2] CRAN (R 4.0.1) #> fs 1.5.0 2020-07-31 [2] CRAN (R 4.0.1) #> generics 0.1.0 2020-10-31 [2] CRAN (R 4.0.1) #> ggplot2 * 3.3.5 2021-06-25 [1] CRAN (R 4.0.1) #> glue 1.4.2 2020-08-27 [2] CRAN (R 4.0.1) #> gtable 0.3.0 2019-03-25 [2] CRAN (R 4.0.1) #> haven 2.4.3 2021-08-04 [2] CRAN (R 4.0.1) #> here * 1.0.1 2020-12-13 [1] CRAN (R 4.0.1) #> highr 0.9 2021-04-16 [2] CRAN (R 4.0.1) #> hms 1.1.0 2021-05-17 [2] CRAN (R 4.0.1) #> htmltools 0.5.2 2021-08-25 [2] CRAN (R 4.0.1) #> httr 1.4.2 2020-07-20 [2] CRAN (R 4.0.1) #> jsonlite 1.7.2 2020-12-09 [2] CRAN (R 4.0.1) #> knitr 1.36 2021-09-29 [2] CRAN (R 4.0.1) #> labeling 0.4.2 2020-10-20 [2] CRAN (R 4.0.1) #> lifecycle 1.0.0 2021-02-15 [2] CRAN (R 4.0.1) #> lubridate 1.7.10 2021-02-26 [2] CRAN (R 4.0.1) #> magrittr 2.0.1 2020-11-17 [2] CRAN (R 4.0.1) #> mime 0.11 2021-06-23 [2] CRAN (R 4.0.1) #> modelr 0.1.8 2020-05-19 [2] CRAN (R 4.0.1) #> munsell 0.5.0 2018-06-12 [2] CRAN (R 4.0.1) #> pillar 1.6.2 2021-07-29 [2] CRAN (R 4.0.1) #> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.1) #> purrr * 0.3.4 2020-04-17 [2] CRAN (R 4.0.1) #> R6 2.5.0 2020-10-28 [2] CRAN (R 4.0.1) #> Rcpp 1.0.7 2021-07-07 [2] CRAN (R 4.0.1) #> readr * 2.0.1 2021-08-10 [2] CRAN (R 4.0.1) #> readxl 1.3.1 2019-03-13 [2] CRAN (R 4.0.1) #> reprex 2.0.1 2021-08-05 [1] CRAN (R 4.0.1) #> rlang 0.4.11 2021-04-30 [2] CRAN (R 4.0.1) #> rmarkdown 2.11 2021-09-14 [2] CRAN (R 4.0.1) #> rprojroot 2.0.2 2020-11-15 [2] CRAN (R 4.0.1) #> rstudioapi 0.13 2020-11-12 [2] CRAN (R 4.0.1) #> rvest 1.0.1 2021-07-26 [2] CRAN (R 4.0.1) #> scales 1.1.1 2020-05-11 [2] CRAN (R 4.0.1) #> sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 4.0.1) #> stringi 1.7.4 2021-08-25 [2] CRAN (R 4.0.1) #> stringr * 1.4.0 2019-02-10 [2] CRAN (R 4.0.1) #> styler 1.5.1 2021-07-13 [2] CRAN (R 4.0.1) #> tibble * 3.1.3 2021-07-23 [2] CRAN (R 4.0.1) #> tidyr * 1.1.3 2021-03-03 [2] CRAN (R 4.0.1) #> tidyselect 1.1.1 2021-04-30 [2] CRAN (R 4.0.1) #> tidyverse * 1.3.1 2021-04-15 [2] CRAN (R 4.0.1) #> tzdb 0.1.2 2021-07-20 [2] CRAN (R 4.0.1) #> utf8 1.2.2 2021-07-24 [2] CRAN (R 4.0.1) #> vctrs 0.3.8 2021-04-29 [2] CRAN (R 4.0.1) #> vroom 1.5.4 2021-08-05 [2] CRAN (R 4.0.1) #> withr 2.4.2 2021-04-18 [2] CRAN (R 4.0.1) #> xfun 0.25 2021-08-06 [2] CRAN (R 4.0.1) #> xml2 1.3.2 2020-04-23 [2] CRAN (R 4.0.1) #> yaml 2.2.1 2020-02-01 [2] CRAN (R 4.0.1) #> #> [1] /home/jemothersbaugh/R/x86_64-pc-linux-gnu-library/4.0 #> [2] /opt/R/4.0.1/lib/R/library ```
mariiastepanenko commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/mariiastepanenko/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

alabellehahn commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/alabellehahn/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

gchal15 commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/gchalasani/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

youli2154 commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/youli21/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

FrederickZhengHe commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/zhe2042/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

dbuonauro commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/dbuonauro/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

Davidyang0824 commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/pyang2/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

dbuonauro commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/dbuonauro/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

yan-zihe commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at C:/Users/Zihe Yan/Desktop/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> -- Column specification --------------------------------------------------------
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> i Use `spec()` to retrieve the full column specification for this data.
#> i Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2021-11-04 by the reprex package (v2.0.1)

FrederickZhengHe commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Use datapasta::dpasta() to create
## `urban` in the script rather than relying on the source
## CSV file. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/1

library(tidyverse)
library(here)
#> here() starts at /tmp/RtmpRVuhcO/reprex-2aa4d329f3a895-beton-fish

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Error: '/tmp/RtmpRVuhcO/reprex-2aa4d329f3a895-beton-fish/data/urbanization-state.csv' does not exist.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()
#> Error in ggplot(data = urban, mapping = aes(x = state, y = urbanindex)): object 'urban' not found

Created on 2021-11-04 by the reprex package (v2.0.1)

Session info ``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.0.1 (2020-06-06) #> os Red Hat Enterprise Linux 8.4 (Ootpa) #> system x86_64, linux-gnu #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/Chicago #> date 2021-11-04 #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date lib source #> assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.0.1) #> backports 1.2.1 2020-12-09 [2] CRAN (R 4.0.1) #> bit 4.0.4 2020-08-04 [2] CRAN (R 4.0.1) #> bit64 4.0.5 2020-08-30 [2] CRAN (R 4.0.1) #> broom 0.7.9 2021-07-27 [2] CRAN (R 4.0.1) #> cellranger 1.1.0 2016-07-27 [2] CRAN (R 4.0.1) #> cli 3.0.1 2021-07-17 [2] CRAN (R 4.0.1) #> colorspace 2.0-2 2021-06-24 [2] CRAN (R 4.0.1) #> crayon 1.4.1 2021-02-08 [2] CRAN (R 4.0.1) #> DBI 1.1.1 2021-01-15 [2] CRAN (R 4.0.1) #> dbplyr 2.1.1 2021-04-06 [2] CRAN (R 4.0.1) #> digest 0.6.27 2020-10-24 [2] CRAN (R 4.0.1) #> dplyr * 1.0.7 2021-06-18 [2] CRAN (R 4.0.1) #> ellipsis 0.3.2 2021-04-29 [2] CRAN (R 4.0.1) #> evaluate 0.14 2019-05-28 [2] CRAN (R 4.0.1) #> fansi 0.5.0 2021-05-25 [2] CRAN (R 4.0.1) #> fastmap 1.1.0 2021-01-25 [2] CRAN (R 4.0.1) #> forcats * 0.5.1 2021-01-27 [2] CRAN (R 4.0.1) #> fs 1.5.0 2020-07-31 [2] CRAN (R 4.0.1) #> generics 0.1.0 2020-10-31 [2] CRAN (R 4.0.1) #> ggplot2 * 3.3.5 2021-06-25 [2] CRAN (R 4.0.1) #> glue 1.4.2 2020-08-27 [2] CRAN (R 4.0.1) #> gtable 0.3.0 2019-03-25 [2] CRAN (R 4.0.1) #> haven 2.4.3 2021-08-04 [2] CRAN (R 4.0.1) #> here * 1.0.1 2020-12-13 [2] CRAN (R 4.0.1) #> highr 0.9 2021-04-16 [2] CRAN (R 4.0.1) #> hms 1.1.0 2021-05-17 [2] CRAN (R 4.0.1) #> htmltools 0.5.2 2021-08-25 [2] CRAN (R 4.0.1) #> httr 1.4.2 2020-07-20 [2] CRAN (R 4.0.1) #> jsonlite 1.7.2 2020-12-09 [2] CRAN (R 4.0.1) #> knitr 1.36 2021-09-29 [2] CRAN (R 4.0.1) #> lifecycle 1.0.0 2021-02-15 [2] CRAN (R 4.0.1) #> lubridate 1.7.10 2021-02-26 [2] CRAN (R 4.0.1) #> magrittr 2.0.1 2020-11-17 [2] CRAN (R 4.0.1) #> modelr 0.1.8 2020-05-19 [2] CRAN (R 4.0.1) #> munsell 0.5.0 2018-06-12 [2] CRAN (R 4.0.1) #> pillar 1.6.2 2021-07-29 [2] CRAN (R 4.0.1) #> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.0.1) #> purrr * 0.3.4 2020-04-17 [2] CRAN (R 4.0.1) #> R6 2.5.0 2020-10-28 [2] CRAN (R 4.0.1) #> Rcpp 1.0.7 2021-07-07 [2] CRAN (R 4.0.1) #> readr * 2.0.1 2021-08-10 [2] CRAN (R 4.0.1) #> readxl 1.3.1 2019-03-13 [2] CRAN (R 4.0.1) #> reprex 2.0.1 2021-08-05 [2] CRAN (R 4.0.1) #> rlang 0.4.11 2021-04-30 [2] CRAN (R 4.0.1) #> rmarkdown 2.11 2021-09-14 [2] CRAN (R 4.0.1) #> rprojroot 2.0.2 2020-11-15 [2] CRAN (R 4.0.1) #> rstudioapi 0.13 2020-11-12 [2] CRAN (R 4.0.1) #> rvest 1.0.1 2021-07-26 [2] CRAN (R 4.0.1) #> scales 1.1.1 2020-05-11 [2] CRAN (R 4.0.1) #> sessioninfo 1.1.1 2018-11-05 [2] CRAN (R 4.0.1) #> stringi 1.7.4 2021-08-25 [2] CRAN (R 4.0.1) #> stringr * 1.4.0 2019-02-10 [2] CRAN (R 4.0.1) #> styler 1.5.1 2021-07-13 [2] CRAN (R 4.0.1) #> tibble * 3.1.3 2021-07-23 [2] CRAN (R 4.0.1) #> tidyr * 1.1.3 2021-03-03 [2] CRAN (R 4.0.1) #> tidyselect 1.1.1 2021-04-30 [2] CRAN (R 4.0.1) #> tidyverse * 1.3.1 2021-04-15 [2] CRAN (R 4.0.1) #> tzdb 0.1.2 2021-07-20 [2] CRAN (R 4.0.1) #> utf8 1.2.2 2021-07-24 [2] CRAN (R 4.0.1) #> vctrs 0.3.8 2021-04-29 [2] CRAN (R 4.0.1) #> vroom 1.5.4 2021-08-05 [2] CRAN (R 4.0.1) #> withr 2.4.2 2021-04-18 [2] CRAN (R 4.0.1) #> xfun 0.25 2021-08-06 [2] CRAN (R 4.0.1) #> xml2 1.3.2 2020-04-23 [2] CRAN (R 4.0.1) #> yaml 2.2.1 2020-02-01 [2] CRAN (R 4.0.1) #> #> [1] /home/zhe2042/R/x86_64-pc-linux-gnu-library/4.0 #> [2] /opt/R/4.0.1/lib/R/library ```
cassiewangggg commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /tmp/Rtmp5SHWm9/reprex-2a94e1534ae8e7-sane-eyas

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Error: '/tmp/Rtmp5SHWm9/reprex-2a94e1534ae8e7-sane-eyas/data/urbanization-state.csv' does not exist.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()
#> Error in ggplot(data = urban, mapping = aes(x = state, y = urbanindex)): object 'urban' not found

Created on 2021-11-04 by the reprex package (v2.0.1)

Stellaj240 commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/jiang240/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2022-07-05 by the reprex package (v2.0.1)

Alakshm1 commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/anjanachandran/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2022-07-05 by the reprex package (v2.0.1)

Session info ``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.1.1 (2021-08-10) #> os Red Hat Enterprise Linux 8.6 (Ootpa) #> system x86_64, linux-gnu #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/Chicago #> date 2022-07-05 #> pandoc 2.17.1.1 @ /usr/lib/rstudio-server/bin/quarto/bin/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.1.1) #> backports 1.4.1 2021-12-13 [2] CRAN (R 4.1.1) #> bit 4.0.4 2020-08-04 [2] CRAN (R 4.1.1) #> bit64 4.0.5 2020-08-30 [2] CRAN (R 4.1.1) #> broom 0.8.0 2022-04-13 [2] CRAN (R 4.1.1) #> cellranger 1.1.0 2016-07-27 [2] CRAN (R 4.1.1) #> cli 3.3.0 2022-04-25 [2] CRAN (R 4.1.1) #> colorspace 2.0-3 2022-02-21 [2] CRAN (R 4.1.1) #> crayon 1.5.1 2022-03-26 [2] CRAN (R 4.1.1) #> curl 4.3.2 2021-06-23 [2] CRAN (R 4.1.1) #> DBI 1.1.2 2021-12-20 [2] CRAN (R 4.1.1) #> dbplyr 2.1.1 2021-04-06 [2] CRAN (R 4.1.1) #> digest 0.6.29 2021-12-01 [2] CRAN (R 4.1.1) #> dplyr * 1.0.9 2022-04-28 [2] CRAN (R 4.1.1) #> ellipsis 0.3.2 2021-04-29 [2] CRAN (R 4.1.1) #> evaluate 0.15 2022-02-18 [2] CRAN (R 4.1.1) #> fansi 1.0.3 2022-03-24 [2] CRAN (R 4.1.1) #> farver 2.1.0 2021-02-28 [2] CRAN (R 4.1.1) #> fastmap 1.1.0 2021-01-25 [2] CRAN (R 4.1.1) #> forcats * 0.5.1 2021-01-27 [2] CRAN (R 4.1.1) #> fs 1.5.2 2021-12-08 [2] CRAN (R 4.1.1) #> generics 0.1.2 2022-01-31 [2] CRAN (R 4.1.1) #> ggplot2 * 3.3.6 2022-05-03 [2] CRAN (R 4.1.1) #> glue 1.6.2 2022-02-24 [2] CRAN (R 4.1.1) #> gtable 0.3.0 2019-03-25 [2] CRAN (R 4.1.1) #> haven 2.5.0 2022-04-15 [2] CRAN (R 4.1.1) #> here * 1.0.1 2020-12-13 [2] CRAN (R 4.1.1) #> highr 0.9 2021-04-16 [2] CRAN (R 4.1.1) #> hms 1.1.1 2021-09-26 [2] CRAN (R 4.1.1) #> htmltools 0.5.2 2021-08-25 [2] CRAN (R 4.1.1) #> httr 1.4.3 2022-05-04 [2] CRAN (R 4.1.1) #> jsonlite 1.8.0 2022-02-22 [2] CRAN (R 4.1.1) #> knitr 1.39 2022-04-26 [2] CRAN (R 4.1.1) #> labeling 0.4.2 2020-10-20 [2] CRAN (R 4.1.1) #> lifecycle 1.0.1 2021-09-24 [2] CRAN (R 4.1.1) #> lubridate 1.8.0 2021-10-07 [1] CRAN (R 4.1.1) #> magrittr 2.0.3 2022-03-30 [2] CRAN (R 4.1.1) #> mime 0.12 2021-09-28 [2] CRAN (R 4.1.1) #> modelr 0.1.8 2020-05-19 [2] CRAN (R 4.1.1) #> munsell 0.5.0 2018-06-12 [2] CRAN (R 4.1.1) #> pillar 1.7.0 2022-02-01 [2] CRAN (R 4.1.1) #> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.1.1) #> purrr * 0.3.4 2020-04-17 [2] CRAN (R 4.1.1) #> R.cache 0.15.0 2021-04-30 [2] CRAN (R 4.1.1) #> R.methodsS3 1.8.1 2020-08-26 [2] CRAN (R 4.1.1) #> R.oo 1.24.0 2020-08-26 [2] CRAN (R 4.1.1) #> R.utils 2.11.0 2021-09-26 [2] CRAN (R 4.1.1) #> R6 2.5.1 2021-08-19 [2] CRAN (R 4.1.1) #> readr * 2.1.2 2022-01-30 [2] CRAN (R 4.1.1) #> readxl 1.4.0 2022-03-28 [2] CRAN (R 4.1.1) #> reprex 2.0.1 2021-08-05 [1] CRAN (R 4.1.1) #> rlang 1.0.2 2022-03-04 [2] CRAN (R 4.1.1) #> rmarkdown 2.14 2022-04-25 [2] CRAN (R 4.1.1) #> rprojroot 2.0.3 2022-04-02 [2] CRAN (R 4.1.1) #> rstudioapi 0.13 2020-11-12 [2] CRAN (R 4.1.1) #> rvest 1.0.2 2021-10-16 [2] CRAN (R 4.1.1) #> scales 1.2.0 2022-04-13 [2] CRAN (R 4.1.1) #> sessioninfo 1.2.2 2021-12-06 [2] CRAN (R 4.1.1) #> stringi 1.7.6 2021-11-29 [2] CRAN (R 4.1.1) #> stringr * 1.4.0 2019-02-10 [2] CRAN (R 4.1.1) #> styler 1.7.0 2022-03-13 [2] CRAN (R 4.1.1) #> tibble * 3.1.7 2022-05-03 [2] CRAN (R 4.1.1) #> tidyr * 1.2.0 2022-02-01 [2] CRAN (R 4.1.1) #> tidyselect 1.1.2 2022-02-21 [2] CRAN (R 4.1.1) #> tidyverse * 1.3.1 2021-04-15 [2] CRAN (R 4.1.1) #> tzdb 0.3.0 2022-03-28 [2] CRAN (R 4.1.1) #> utf8 1.2.2 2021-07-24 [2] CRAN (R 4.1.1) #> vctrs 0.4.1 2022-04-13 [2] CRAN (R 4.1.1) #> vroom 1.5.7 2021-11-30 [2] CRAN (R 4.1.1) #> withr 2.5.0 2022-03-03 [2] CRAN (R 4.1.1) #> xfun 0.31 2022-05-10 [2] CRAN (R 4.1.1) #> xml2 1.3.3 2021-11-30 [2] CRAN (R 4.1.1) #> yaml 2.3.5 2022-02-21 [2] CRAN (R 4.1.1) #> #> [1] /home/anjanachandran/R/x86_64-pc-linux-gnu-library/4.1 #> [2] /opt/R/4.1.1/lib/R/library #> #> ────────────────────────────────────────────────────────────────────────────── ```
ulisolovieva commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/uliana/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2022-07-05 by the reprex package (v2.0.1)

bensoltoff commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/soltoffbc/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2022-07-05 by the reprex package (v2.0.1)

micaylaroth9 commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/micaylaroth/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2022-07-05 by the reprex package (v2.0.1)

BaichenTan commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /Users/tanbaichen/Desktop/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2022-07-05 by the reprex package (v2.0.1)

ihomango commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/ohinhyeok/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2022-07-05 by the reprex package (v2.0.1)

bensoltoff commented 2 years ago
library(tidyverse)
library(here)
#> here() starts at /home/soltoffbc/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2022-07-05 by the reprex package (v2.0.1)

davidicrabtree commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/crabtreed/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2022-07-05 by the reprex package (v2.0.1)

Session info ``` r sessioninfo::session_info() #> ─ Session info ─────────────────────────────────────────────────────────────── #> setting value #> version R version 4.1.1 (2021-08-10) #> os Red Hat Enterprise Linux 8.6 (Ootpa) #> system x86_64, linux-gnu #> ui X11 #> language (EN) #> collate en_US.UTF-8 #> ctype en_US.UTF-8 #> tz America/Chicago #> date 2022-07-05 #> pandoc 2.17.1.1 @ /usr/lib/rstudio-server/bin/quarto/bin/ (via rmarkdown) #> #> ─ Packages ─────────────────────────────────────────────────────────────────── #> package * version date (UTC) lib source #> assertthat 0.2.1 2019-03-21 [2] CRAN (R 4.1.1) #> backports 1.4.1 2021-12-13 [2] CRAN (R 4.1.1) #> bit 4.0.4 2020-08-04 [2] CRAN (R 4.1.1) #> bit64 4.0.5 2020-08-30 [2] CRAN (R 4.1.1) #> broom 0.8.0 2022-04-13 [2] CRAN (R 4.1.1) #> cellranger 1.1.0 2016-07-27 [2] CRAN (R 4.1.1) #> cli 3.3.0 2022-04-25 [2] CRAN (R 4.1.1) #> colorspace 2.0-3 2022-02-21 [2] CRAN (R 4.1.1) #> crayon 1.5.1 2022-03-26 [2] CRAN (R 4.1.1) #> curl 4.3.2 2021-06-23 [2] CRAN (R 4.1.1) #> DBI 1.1.2 2021-12-20 [2] CRAN (R 4.1.1) #> dbplyr 2.1.1 2021-04-06 [2] CRAN (R 4.1.1) #> digest 0.6.29 2021-12-01 [2] CRAN (R 4.1.1) #> dplyr * 1.0.9 2022-04-28 [2] CRAN (R 4.1.1) #> ellipsis 0.3.2 2021-04-29 [2] CRAN (R 4.1.1) #> evaluate 0.15 2022-02-18 [2] CRAN (R 4.1.1) #> fansi 1.0.3 2022-03-24 [2] CRAN (R 4.1.1) #> farver 2.1.0 2021-02-28 [2] CRAN (R 4.1.1) #> fastmap 1.1.0 2021-01-25 [2] CRAN (R 4.1.1) #> forcats * 0.5.1 2021-01-27 [2] CRAN (R 4.1.1) #> fs 1.5.2 2021-12-08 [2] CRAN (R 4.1.1) #> generics 0.1.2 2022-01-31 [2] CRAN (R 4.1.1) #> ggplot2 * 3.3.6 2022-05-03 [2] CRAN (R 4.1.1) #> glue 1.6.2 2022-02-24 [2] CRAN (R 4.1.1) #> gtable 0.3.0 2019-03-25 [2] CRAN (R 4.1.1) #> haven 2.5.0 2022-04-15 [2] CRAN (R 4.1.1) #> here * 1.0.1 2020-12-13 [2] CRAN (R 4.1.1) #> highr 0.9 2021-04-16 [2] CRAN (R 4.1.1) #> hms 1.1.1 2021-09-26 [2] CRAN (R 4.1.1) #> htmltools 0.5.2 2021-08-25 [2] CRAN (R 4.1.1) #> httr 1.4.3 2022-05-04 [2] CRAN (R 4.1.1) #> jsonlite 1.8.0 2022-02-22 [2] CRAN (R 4.1.1) #> knitr 1.39 2022-04-26 [2] CRAN (R 4.1.1) #> labeling 0.4.2 2020-10-20 [2] CRAN (R 4.1.1) #> lifecycle 1.0.1 2021-09-24 [2] CRAN (R 4.1.1) #> lubridate 1.8.0 2021-10-07 [2] CRAN (R 4.1.1) #> magrittr 2.0.3 2022-03-30 [2] CRAN (R 4.1.1) #> mime 0.12 2021-09-28 [2] CRAN (R 4.1.1) #> modelr 0.1.8 2020-05-19 [2] CRAN (R 4.1.1) #> munsell 0.5.0 2018-06-12 [2] CRAN (R 4.1.1) #> pillar 1.7.0 2022-02-01 [2] CRAN (R 4.1.1) #> pkgconfig 2.0.3 2019-09-22 [2] CRAN (R 4.1.1) #> purrr * 0.3.4 2020-04-17 [2] CRAN (R 4.1.1) #> R.cache 0.15.0 2021-04-30 [2] CRAN (R 4.1.1) #> R.methodsS3 1.8.1 2020-08-26 [2] CRAN (R 4.1.1) #> R.oo 1.24.0 2020-08-26 [2] CRAN (R 4.1.1) #> R.utils 2.11.0 2021-09-26 [2] CRAN (R 4.1.1) #> R6 2.5.1 2021-08-19 [2] CRAN (R 4.1.1) #> readr * 2.1.2 2022-01-30 [2] CRAN (R 4.1.1) #> readxl 1.4.0 2022-03-28 [2] CRAN (R 4.1.1) #> reprex 2.0.1 2021-08-05 [2] CRAN (R 4.1.1) #> rlang 1.0.2 2022-03-04 [2] CRAN (R 4.1.1) #> rmarkdown 2.14 2022-04-25 [2] CRAN (R 4.1.1) #> rprojroot 2.0.3 2022-04-02 [2] CRAN (R 4.1.1) #> rstudioapi 0.13 2020-11-12 [2] CRAN (R 4.1.1) #> rvest 1.0.2 2021-10-16 [2] CRAN (R 4.1.1) #> scales 1.2.0 2022-04-13 [2] CRAN (R 4.1.1) #> sessioninfo 1.2.2 2021-12-06 [2] CRAN (R 4.1.1) #> stringi 1.7.6 2021-11-29 [2] CRAN (R 4.1.1) #> stringr * 1.4.0 2019-02-10 [2] CRAN (R 4.1.1) #> styler 1.7.0 2022-03-13 [2] CRAN (R 4.1.1) #> tibble * 3.1.7 2022-05-03 [2] CRAN (R 4.1.1) #> tidyr * 1.2.0 2022-02-01 [2] CRAN (R 4.1.1) #> tidyselect 1.1.2 2022-02-21 [2] CRAN (R 4.1.1) #> tidyverse * 1.3.1 2021-04-15 [2] CRAN (R 4.1.1) #> tzdb 0.3.0 2022-03-28 [2] CRAN (R 4.1.1) #> utf8 1.2.2 2021-07-24 [2] CRAN (R 4.1.1) #> vctrs 0.4.1 2022-04-13 [2] CRAN (R 4.1.1) #> vroom 1.5.7 2021-11-30 [2] CRAN (R 4.1.1) #> withr 2.5.0 2022-03-03 [2] CRAN (R 4.1.1) #> xfun 0.31 2022-05-10 [2] CRAN (R 4.1.1) #> xml2 1.3.3 2021-11-30 [2] CRAN (R 4.1.1) #> yaml 2.3.5 2022-02-21 [2] CRAN (R 4.1.1) #> #> [1] /home/crabtreed/R/x86_64-pc-linux-gnu-library/4.1 #> [2] /opt/R/4.1.1/lib/R/library #> #> ────────────────────────────────────────────────────────────────────────────── ```
runanlin commented 2 years ago
library(tidyverse)
library(here)
#> here() starts at /home/rlin01/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

hi-rachelliu commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/rliu24/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2022-07-05 by the reprex package (v2.0.1)

avas1212 commented 2 years ago
## Use the script below to generate a reproducible example
## using the reprex package. Once you generate it, post it on
## https://github.com/uc-cfss/reproducible-examples-and-git/issues/3
## 
## Hint: look at the input and wd arguments to reprex()

library(tidyverse)
library(here)
#> here() starts at /home/asinai/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2022-07-05 by the reprex package (v2.0.1)

julianfox102 commented 2 years ago
library(tidyverse)
library(here)
#> here() starts at /home/julianfox/uc-cfss-reproducible-examples-and-git-d2c4ec3

# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Rows: 56 Columns: 2
#> ── Column specification ────────────────────────────────────────────────────────
#> Delimiter: ","
#> chr (1): state
#> dbl (1): urbanindex
#> 
#> ℹ Use `spec()` to retrieve the full column specification for this data.
#> ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.

# how do I reorder the bars from largest to smallest?
ggplot(data = urban, mapping = aes(x = state, y = urbanindex)) +
  geom_col() +
  coord_flip()

Created on 2022-07-05 by the reprex package (v2.0.1)