1. Frequency of characters in resume
Posted: April 11, 2016; Updated: April 12, 2016
In this project the R script reads a plain text resume to generate a bar plot of all the characters.
# R/RStudio code setwd("D:/Oht/R/Resume_char_freq") library(ggplot2) library(stringr) # read text file into a vector cc <- scan("res.txt", what = "", sep = "") # clean the vector cc_split <- strsplit(cc, "") cc_vect <- rle(unlist(cc_split))$values cc_vect_strip <- str_replace_all(cc_vect, "[^[:alnum:]]|\\s", " ") cc_clean <- gsub(" ", "", cc_vect_strip) cc_new <- cc_clean[cc_clean != ""] barplot(table(cc_new),main = "Frequency of Characters in Resume", xlab = "Characters", ylab="Frequency",las=2)