I am having dataframe (dataframexml) which have 3 cols- Name, Path and URL and mutiple rows.Based on the URL, I am parsing the XML in R and creating a dataframe using getdataframe() function.So, based on the number of URLs, that many dataframes will be generated. (All the dataframes have same columns)
Now I need to add a new column to each dataframe which will have dataframe name in all rows and append one dataframe over another dynamically a create the master dataframe. This is part where I am stuck. Looking for some guidance.
Code:
for (i in 1:nrow(dataframexml)){
dataURL<- dataframexml[i,3]
dataURL.response<-GET(dataURL,authenticate("string","xxxxx"))
assign(paste("df",substr(dataframexml[i,3],85,100),sep=""),
getdataframe(dataURL.response))
# getdataframe() = A function to create dataframe from the URL
# parts stuck
# "1st <- create a new column which will have dataframe name in all rows"
# "2nd" <- append one dataframe over another and create a master dataframe
print(paste("df",substr(dataframexml[i,3],85,100),sep=""))
# For Testing
}