Skip to content

Instantly share code, notes, and snippets.

@selva86
Created January 25, 2020 06:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save selva86/0e67e7c3986c749c6c6940d0d1e4725c to your computer and use it in GitHub Desktop.
Save selva86/0e67e7c3986c749c6c6940d0d1e4725c to your computer and use it in GitHub Desktop.
country <- c("France", "Germany", "Greece",
"Italy", "Portugal", "Spain", 'Spain') # Countries
gdp_growth <- c(1.3, 0.3, 1.9, 0.3, NA, 2, 0) # GDP growth
mkt_type <- factor(c("High", "High", "Low", "Medium", "Low", "Medium", 'Low')) # Categories
df <- data.frame(country = country,
gdp_grwth = gdp_growth,
market_typ = mkt_type,
stringsAsFactors = F)
df <- rbind(df, df, df, df)
df <- rbind(df, df, df, df)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment