Skip to content

Instantly share code, notes, and snippets.

@selva86
Created January 18, 2020 02:20
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/2323de324df2d7286763503b39d2a727 to your computer and use it in GitHub Desktop.
Save selva86/2323de324df2d7286763503b39d2a727 to your computer and use it in GitHub Desktop.
# 1. From the list m below, get the number of page likes on the 10th day of the month
reviews <- c("spongy burgers", "hot and good","crispier than expected",
"hard to chew", "too large to chew", "takes time", "filling",
"unhealthy but delicious" )
set.seed(100)
pages <- 1:100
page_likes <- round(runif(30,1000,8000),0)
m <- list(reviews,pages,page_likes)
# 2. From the list `mylist` filter the numbers that correspond to alphabet 'j'
mylist <- list(sample(letters, 75, replace=T),
sample(1:26, 75, replace=T))
mylist
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment