Publications by Ken Wood

R Programming - Week 4 Assignment

06.10.2020

rm(list=ls(all=TRUE)) best <- function(state, outcome) { ## Read outcome data df <- read.csv("outcome-of-care-measures.csv", na.strings="Not Available",stringsAsFactors=FALSE, colClasses = "character") ## Check that state and outcome arguments are valid if ((state %in% df$State == TRUE) && (outcome %in% c("heart attack","heart failure",...

5 sym R (9681 sym/28 pcs)

Exploratory Data Analysis in R - Week 4 Assignment

06.10.2020

# Load the raw data files. # These lines of code will take a little time to execute, so please be patient! NEI <- readRDS("exdata-data-NEI_data/summarySCC_PM25.rds") SCC <- readRDS("exdata-data-NEI_data/Source_Classification_Code.rds") merged_df <- merge(NEI,SCC,by="SCC") Questions We will address the following questions and tasks in our explor...

1393 sym R (3271 sym/11 pcs) 6 img

R Programming - Week 3 Assignment

06.10.2020

For large square matrices, it may take too long to compute the inverse, especially if it has to be computed repeatedly (e.g. in a loop). If the contents of the matrix do not change, it may make sense to cache the matrix inverse so that, when we need it again, it can be looked up in the cache rather than recomputed. In this Programming Assignment...

1449 sym R (1222 sym/21 pcs)

Getting and Cleaning Data in R - Code Book Project

06.10.2020

Fitbit devices use a 3-axis accelerometer to determine body movement and actions. This sensor also allows a device to determine the frequency, duration, intensity, and patterns of a person’s movement. Below is a table of tokens used in the dataset feature names and a brief description of each token. Token Description Body Signal based on the ...

1375 sym

Getting and Cleaning Data in R - Week 2 Quiz

06.10.2020

library(httr) library(jsonlite) # Question #1 # A. Find OAuth settings for github: # http://developer.github.com/v3/oauth/ oauth_endpoints("github") ## <oauth_endpoint> ## authorize: https://github.com/login/oauth/authorize ## access: https://github.com/login/oauth/access_token # B. To make your own application, register at # https:/...

5 sym R (3553 sym/23 pcs)

Getting and Cleaning Data in R - Week 3 Quiz

06.10.2020

# Question #1 - Create a logical vector that identifies the households on greater than 10 acres who sold more than $10,000 worth of agriculture products. Assign that logical vector to the variable agricultureLogical. Apply the which() function like this to identify the rows of the data frame where the logical vector is TRUE. which(agricultureL...

5 sym R (4362 sym/26 pcs)

Developing Data Products in R - Week 3 Project

05.10.2020

9/30/2020 Histogram of Housing Prices Box Plot of Saleprice vs. Home Condition Scatter Plot of Saleprice vs. Lot Area ...

135 sym

Statistical Inference in R - Week 4 Quiz

06.10.2020

baseline <- c(140,138,150,148,135) Week2 <- c(132,135,151,146,130) t.test(Week2,baseline,alternative="two.sided",paired=TRUE) ## ## Paired t-test ## ## data: Week2 and baseline ## t = -2.2616, df = 4, p-value = 0.08652 ## alternative hypothesis: true difference in means is not equal to 0 ## 95 percent confidence interval: ## -7.5739122 0.7...

5 sym R (1212 sym/12 pcs)

Statistical Inference in R Course Project - Part 1

06.10.2020

Introduction In this project, we will investigate the exponential distribution in R and compare it with the Central Limit Theorem. The exponential distribution can be simulated in R with the expression rexp(n, lambda) where lambda is the rate parameter. The mean of the exponential distribution is 1/lambda and the standard deviation is also 1/lamb...

2071 sym R (720 sym/10 pcs) 2 img

Developing Data Products in R - Week 2 Project

05.10.2020

Places Where I Have Lived Use a picture of me as the icon for each location… KenLatLong <- data.frame( lat = c(41.766667,41.716667,40.441944,42.295833,42.134064,42.083333,35.766667), lng = c(-71.45,-71.416667,-86.9125,-71.713333,-71.969017,-71.4,-78.633333)) KenLatLong %>% leaflet() %>% addTiles() %>% addMarkers(icon = KenPic, popup=...

85 sym R (472 sym/1 pcs)