Closed bensoltoff closed 4 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
#> Warning: package 'ggplot2' was built under R version 3.6.2
#> Warning: package 'tibble' was built under R version 3.6.2
#> Warning: package 'tidyr' was built under R version 3.6.2
#> Warning: package 'purrr' was built under R version 3.6.2
#> Warning: package 'dplyr' was built under R version 3.6.2
library(here)
#> here() starts at /private/var/folders/l0/bs3rcy9x525cvxqc7h9pxdbm0000gn/T/RtmpR8iNR9/reprex4cc26e503f28
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Error: '/private/var/folders/l0/bs3rcy9x525cvxqc7h9pxdbm0000gn/T/RtmpR8iNR9/reprex4cc26e503f28/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 2020-07-09 by the reprex package (v0.3.0)
library(tidyverse)
library(here)
#> here() starts at C:/Users/Xuefei Gao/AppData/Local/Temp/Rtmp2POEQC/reprex3274e415ef0
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Error: 'C:/Users/Xuefei Gao/AppData/Local/Temp/Rtmp2POEQC/reprex3274e415ef0/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)): 找不到对象'urban'
Created on 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at /private/var/folders/t2/b_0kv4zx0rxd31mtzgt3fmb40000gn/T/Rtmpb7kdsr/reprexfaf4ad28bb4
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Error: '/private/var/folders/t2/b_0kv4zx0rxd31mtzgt3fmb40000gn/T/Rtmpb7kdsr/reprexfaf4ad28bb4/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 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at /tmp/RtmpDgZX9W/reprexb832e353bd07e
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Error: '/tmp/RtmpDgZX9W/reprexb832e353bd07e/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 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at /home/psposa/reproducible-examples-and-git-master
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Parsed with column specification:
#> cols(
#> state = col_character(),
#> urbanindex = col_double()
#> )
# 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 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at /tmp/RtmpphdgSq/reprexb86a8714ee49b
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Error: '/tmp/RtmpphdgSq/reprexb86a8714ee49b/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
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
#> Warning: 程辑包'tidyverse'是用R版本4.0.2 来建造的
library(here)
#> Error in library(here): 不存在叫'here'这个名字的程辑包
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Error in here("data", "urbanization-state.csv"): 没有"here"这个函数
# 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)): 找不到对象'urban'
Created on 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at /Users/soltoffbc/Projects/Computing for Social Sciences/exercises/reproducible-examples-and-git
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Parsed with column specification:
#> cols(
#> state = col_character(),
#> urbanindex = col_double()
#> )
# 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 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at /tmp/RtmpsFiLOu/reprexb78c935203417
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Error: '/tmp/RtmpsFiLOu/reprexb78c935203417/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 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at /Users/william/Desktop/reproducible-examples-and-git-master
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Parsed with column specification:
#> cols(
#> state = col_character(),
#> urbanindex = col_double()
#> )
# 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 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at /Users/francescadicera/Desktop/reproducible-examples-and-git-master
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Parsed with column specification:
#> cols(
#> state = col_character(),
#> urbanindex = col_double()
#> )
# 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 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at C:/Users/Family/Desktop/reproducible-examples-and-git-master
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Parsed with column specification:
#> cols(
#> state = col_character(),
#> urbanindex = col_double()
#> )
# 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 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at /home/kcannell/reproducible-examples-and-git-master
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Parsed with column specification:
#> cols(
#> state = col_character(),
#> urbanindex = col_double()
#> )
# 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 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at /home/cweis22/reproducible-examples-and-git-master
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Parsed with column specification:
#> cols(
#> state = col_character(),
#> urbanindex = col_double()
#> )
# 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 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> Warning: package 'here' was built under R version 4.0.2
#> here() starts at C:/Users/Wendy/Desktop/reproducible-examples-and-git-master
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Parsed with column specification:
#> cols(
#> state = col_character(),
#> urbanindex = col_double()
#> )
# 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 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at /Users/ramkripa/Desktop/reproducible-examples-and-git-master
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Parsed with column specification:
#> cols(
#> state = col_character(),
#> urbanindex = col_double()
#> )
# 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 2020-07-09 by the reprex package (v0.3.0)
outfile = NA seems useful
## 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/Discussion/issues/145
##
## Hint: look at the input and outfile arguments to reprex()
library(tidyverse)
library(here)
#> here() starts at /home/vanessag/reproducible-examples-and-git-master
# import data file
urban <- read_csv(here("data", "urbanization-state.csv"))
#> Parsed with column specification:
#> cols(
#> state = col_character(),
#> urbanindex = col_double()
#> )
# 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 2020-07-09 by the reprex package (v0.3.0)
## 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/Discussion/issues/146
library(tidyverse)
library(here)
#> Warning: package 'here' was built under R version 4.0.2
#> here() starts at C:/Users/Wendy/AppData/Local/Temp/RtmpCk9Tbj/reprex37042aa74db8
# import data file
urban <- tibble::tribble(
~state, ~urbanindex,
"Alabama", 9.605935,
"Alaska", 8.735964,
"American Samoa", 11.08593,
"Arizona", 11.29971,
"Arkansas", 9.259444,
"California", 12.19028,
"Colorado", 11.15445,
"Connecticut", 11.40968,
"Delaware", 11.00999,
"District of Columbia", 13.44057,
"Florida", 11.46484,
"Georgia", 10.55233,
"Guam", 11.08593,
"Hawaii", 11.08621,
"Idaho", 9.593634,
"Illinois", 11.62372,
"Indiana", 10.4105,
"Iowa", 9.593525,
"Kansas", 10.12044,
"Kentucky", 9.789536,
"Louisiana", 10.17518,
"Maine", 9.037091,
"Maryland", 11.71105,
"Massachusetts", 11.83973,
"Michigan", 10.80559,
"Minnesota", 10.45684,
"Mississippi", 8.910859,
"Missouri", 10.20212,
"Montana", 8.470226,
"Nebraska", 10.19912,
"Nevada", 11.76972,
"New Hampshire", 9.917139,
"New Jersey", 12.23565,
"New Mexico", 9.896993,
"New York", 12.55857,
"North Carolina", 10.32481,
"North Dakota", 9.054678,
"Northern Marianas", 11.08593,
"Ohio", 10.87687,
"Oklahoma", 9.93928,
"Oregon", 10.71233,
"Pennsylvania", 11.14623,
"Puerto Rico", 11.57168,
"Rhode Island", 11.72124,
"South Carolina", 10.11142,
"South Dakota", 8.728642,
"Tennessee", 10.19729,
"Texas", 11.17488,
"Utah", 10.96281,
"Vermont", 8.843222,
"Virgin Islands", 11.08593,
"Virginia", 10.90625,
"Washington", 11.11933,
"West Virginia", 9.111112,
"Wisconsin", 10.19131,
"Wyoming", 8.256294
)
# 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 2020-07-09 by the reprex package (v0.3.0)
Post your reproducible example here