Forked from pmeyerdk/AdobeAnalytics-GovernanceExport.R
Last active
January 4, 2018 10:07
-
-
Save MarkEdmondson1234/0538fb6ac24a1dc6e6a8c123ff073cb4 to your computer and use it in GitHub Desktop.
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
library("RSiteCatalyst") | |
library("dplyr") | |
SCAuth("[email protected]:xxx", "xxx") | |
reportSuites <- GetReportSuites() | |
evar <- GetEvars(reportSuites$rsid) #%>% | |
# reportSuite <- reportSuites$rsid | |
props <- GetProps(reportSuites$rsid) | |
rsids <- reportSuites$rsid | |
list_of_dfs <- lapply(rsids, function(x){ | |
print(x) | |
GetEvars(x) | |
}) | |
# name the list the rdids | |
named_list_of_dfs <- setNames(list_of_dfs, rsids) | |
## access the dfs | |
name1 <- rsids[[1]] | |
named_list_of_dfs[[name1]] | |
# or if you know the name of rsid: | |
named_list_of_dfs$rsid_name | |
# then maybe you want to put all the evars in one data.frame | |
# alter named list of df,s to add the rsid name to a column | |
add_rsid_column <- lapply(names(named_list_of_dfs), function(x){ | |
o <- named_list_of_dfs[[x]] | |
o$rsid_name <- x | |
o | |
}) | |
# make one df | |
all_evars <- Reduce(rbind, add_rsid_column) | |
all_evars |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment