Mastering Development

Density Plots in R

I am trying to make interactive density plots for my data in R. I am able to make a basic density plot for some simulated data: library(plotly) library(ggplot2) a = rnorm(100,10,10) b = plot(density(a)) b Now, I am trying to make this an interactive plot. I tried the following line of code, but I get […]


Looping over multiple data frames to ggplot

I am very new to the language. I have read in multiple csv files as dataframes, setwd(“/Users/user/go/src/Project/outputcsv2D”) file_list <- list.files(path=”/Users/user/go/src/Project/outputcsv2D”) filenames <- gsub(“\\.csv$”,””, list.files(pattern=”\\.csv$”)) for(i in filenames){ assign(i, read.csv(paste(i, “.csv”, sep=””))) } but when I try to loop over the filenames[i] to plot, #making a list of plots plot_list = list() for (i in filenames) […]