Created
June 26, 2014 14:53
-
-
Save randyzwitch/397ff5815d220a6db809 to your computer and use it in GitHub Desktop.
Duplicate column names in data frame
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Loop over df and accumulate results | |
#Adding row.names = NULL fixes error message | |
parsed_df <- data.frame() | |
for(i in 1:nrow(df)){ | |
temp <- cbind(df[i,],breakdown_list[[i]], row.names = NULL) | |
parsed_df <- rbind(parsed_df, temp) | |
} | |
names(parsed_df) | |
> names(parsed_df) | |
[1] "name" "year" "month" "day" "hour" "minute" "breakdownTotal" | |
[8] "name" "trend" "counts" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment