
Let's practice some more with vector creation in the next exercise. Success_msg( "Perfect! Notice that adding a space behind the commas in the `c()` function improves the readability of your code. Don't place quotes around `TRUE` and `FALSE`! Also, make sure to adopt the same order as listed in the instructions. Numeric_vector % check_object( "numeric_vector ", undefined_msg = msg) % >% check_equal(, incorrect_msg = msg)Įx() % >% check_object( "character_vector ", undefined_msg = msg) % >% check_equal( incorrect_msg = msg)Įx() % >% check_object( "boolean_vector ") % >% check_equal( incorrect_msg = "Make sure that you assign the correct values to `boolean_vector`. You place the vector elements separated by a comma between the parentheses. In R, you create a vector with the combine function (). For example, you can store your daily gains and losses in the casinos. In other words, a vector is a simple tool to store data. Vectors are one-dimension arrays that can hold numeric data, character data, or logical data. On your way from rags to riches, you will make extensive use of vectors. Success_msg( "Great! Head over to the next exercise.

Do not forget that R is case sensitive! ") Vegas % check_object( "vegas ") % >% check_equal( incorrect_msg = "Make sure that you assign the correct value to `vegas`. Remember: R is case type the following line in the editor: Do you still remember what you have learned in the first chapter? Assign the value `"Go!"` to the variable `vegas`. This chapter will show how you can easily keep track of your betting progress and how you can do some simple analyses on past actions.
Superpowered rags how to#
Thanks to R and your new data-analytical skills, you will learn how to uplift your performance at the tables and fire off your career as a professional gambler. After completing this chapter, you willīe able to create vectors in R, name them, select elements from them, andįeeling lucky? You better, because this chapter takes you on a trip to the City of Sins, also known as *Statisticians Paradise*! We take you on a trip to Vegas, where you will learn how to analyze your
