Skip to content

Commit

Permalink
Update ECPS_Sahm_2024.r
Browse files Browse the repository at this point in the history
  • Loading branch information
ben-domingue authored Jan 8, 2025
1 parent 2e7ad5c commit 18743fd
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion data/ECPS_Sahm_2024.r
Original file line number Diff line number Diff line change
Expand Up @@ -167,4 +167,14 @@ colnames(emotion_df) <- ifelse(
)

save(emotion_df, file="ecps_sahm_2024_emotion.Rdata")
write.csv(emotion_df, "ecps_sahm_2024_emotion.csv", row.names=FALSE)
write.csv(emotion_df, "ecps_sahm_2024_emotion.csv", row.names=FALSE)


##note [bd 1-8-2025]
##files edited to remove newline from some columns via the following code:
fns<-list.files(pattern="*.csv")
for (fn in fns) {
x<-read.csv(fn)
for (i in 1:ncol(x)) x[,i]<-gsub("\n"," ",x[,i])
write.table(x,fn,quote=FALSE,row.names=FALSE,sep="|")
}

0 comments on commit 18743fd

Please sign in to comment.