my_link <- 'https://www.gutenberg.org/ebooks/2264.txt.utf-8' my_book <- readr::read_lines(my_link) # solution my_sol <- length(my_book)
my_answers <- make_random_answers(my_sol) #check_answers(my_answers)
No endereço https://www.gutenberg.org/files/1342/1342-0.txt é possível acessar um arquivo .txt contendo o texto integral do livro Pride and Prejudice de Jane Austen. Utilize funções download.file
e readr::read_lines
para importar o livro inteiro como um vetor de caracteres chamado my_book
no R. Quantas linhas o objeto resultante possui?
exams::answerlist(my_answers, markup = "markdown")
extype: num
exsolution: r my_sol
exname: "numeric "
exshuffle: TRUE
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.