Publications by Derrick Espadas
Documentm
Step 1: Load the Data We will use the airquality data set, which you should already have as part of your R installation. data("airquality") Step 2: Clean the data After you load the data, there will be some NAs in the data. You need to figure out what to do about those nasty NAs. airdataNONA <- na.omit(airquality) colSums(is.na(airdataNONA)) ##...
2036 sym R (2946 sym/32 pcs) 16 img
Espadas_Vogt_Lab2
The “dataframe”" is one of the most essential data structures used in R. It is conceptually equivalent to a database “relation” and to the typical rectangular dataset with variables as columns and cases as rows. For this activity, you will gain some skill with manipulating a dataframe. Task 1 R offers several built-in dataframes: For thi...
8369 sym R (436 sym/7 pcs)
Document
Let’s continue our exploration of sampling. # Install packages if necessary. For this assignment, you'll need the moments package which contains the skewness function. Remember, do not write install code in the markdown document, install the packages in the console. # When you need to use a function that is not a base R function, you need...
215 sym R (5446 sym/27 pcs) 7 img
Homework 5_Derrick_Espadas
Step 1: Load the data HWfiveStepOneurl <- "https://opendata.maryland.gov/api/views/pdvh-tf2u/rows.json?accessType=DOWNLOAD" readJsonFromURL <- function(url){ data_fromJson <- fromJSON(url) df <- data_fromJson$data return (df) } HWfiveStepOnedf <- readJsonFromURL(HWfiveStepOneurl) summary(HWfiveStepOnedf) ## V1 ...
1329 sym R (7488 sym/12 pcs)
HW 8
Bambi <- read.table(file = "clipboard", sep = "\t", header = TRUE) str(Bambi) ## 'data.frame': 8 obs. of 4 variables: ## $ X1: num 2.9 2.4 2 2.3 3.2 ... ## $ X2: num 9.2 8.7 7.2 8.5 9.6 ... ## $ X3: num 13.2 11.5 10.8 12.3 12.6 ... ## $ X4: int 2 3 4 2 3 5 1 3 columns <- c("No_of_fawn", "adult_population"...
9 sym R (4770 sym/25 pcs) 10 img
Homework 9
Step 1: Load the data # Let go back and analyze the air quality dataset (if you remember, we used that previously, in the visualization lab). Remember to think about how to deal with the NAs in the data. Warning messages: 1: In readChar(file, size, TRUE) : truncating string with embedded nuls 2: In readChar(file, size, TRUE) : truncating string...
9340 sym R (15950 sym/42 pcs) 8 img
TextMining Lab
Step 1: Read in the positive and negative word files Pos <- "https://cjacks04.github.io/687/Datasets/positive-words.txt" Pos <-scan(Pos, character(0),sep = "\n") Read 2006 items Neg <-"https://cjacks04.github.io/687/Datasets/negative-words.txt" Neg <-scan(Neg, character(0), sep = "\n") Read 4783 items Step 2: Process in the MLK speech Speech...
8841 sym R (1337 sym/20 pcs) 1 img
TextMining HW
Now that we are doing text mining, we will be creating our own termDocMatrix. This was also done in class, when we analyzed the structure of the “I have a dream” speech – in terms of the use of positive and negative words. However, in that effort, we treated all positive words the same (ex. good is the same as great). This might not be appr...
1482 sym R (7574 sym/45 pcs) 1 img