Publications by MM

Activity 11 - Everything

30.11.2022

Activity 11 Michael Marx In this class, you will learn how to: Save new types of data, like character strings and logical values Save a data set as a vector, matrix, array, list, or data frame Load and save your own data sets with R Extract individual values from a data set Change individual values within a data set Atomic Vectors We create a...

6809 sym

Activity 12

01.12.2022

Activity 12 Michael Marx In this class, you will learn how to: Extract individual values from a data set Change individual values within a data set importing the deck csv file -> stored as dataframe displaying the first 5 rows of the dataframe deck <- read.csv("deck.csv",stringsAsFactors=FALSE) head(deck) Positive Numbers R treats positive ...

5125 sym

Activity 13 - Functions

03.12.2022

Activity 13 Michael Marx Functions Are Objects R functions are first-class objects (of the class “function”, of course), meaning that they can be used for the most part just like other objects. This is seen in the syntax of function creation: assigning function to g -> returns input + 1: g <- function(x) { return(x+1) } Here, function...

4887 sym

Activity 15 - String Manipulation

03.12.2022

Activity 15 Michael Marx STRING MANIPULATION Although R is a statistical language with numeric vectors and matrices playing a central role, character strings are surprisingly important as well. Ranging from birth dates stored in medical research data files to textmining applications, character data arises quite frequently in R programs. Ac...

7327 sym

Activity 14

04.12.2022

Activity 14 Michael Marx ##MATH AND SIMULATIONS IN R R contains built-in functions for your favorite math operations and, of course, for statistical distributions. plot functions returns scatter plot of cars dataframe dist and speed columns plot(cars) Extended Example: Calculating a Probability As our first example, we’ll work through calcul...

11449 sym