Welcome Guest! To enable all features please Login or Register.
Go to last post Go to first unread
Lotte Bjørn Jensen  
#1 Posted : Wednesday, May 1, 2019 1:18:54 PM(UTC)
Lotte Bjørn Jensen
Rank: Advanced Member

Groups: extranet\Forum
Joined: 4/12/2019(UTC)
Posts: 44


I'm going to merge some files for a datasource in Targit, but where do I find the mergescript shown in the e-learning? Do I have to write it myself?

#2 Posted : Tuesday, July 2, 2019 7:49:03 AM(UTC)
Rank: Administration

Groups: extranet\Forum
Joined: 4/7/2011(UTC)
Posts: 514

Hi Lotte,

This is the script used in e-learning:

dataset <- NULL

# Load all files from the specified directory. All files must have the same data structure.
file_list <- list.files("C:/foldername/subfoldername", full.names = TRUE)

# Loop through the files and add them to dataset.
for (file in file_list){
dataset<-rbind(dataset, read.csv2(file))

# if needed to write the dataset to a file.
#write.table(dataset, file = "C:/foldername/filename.csv",row.names=FALSE, na="",col.names=TRUE, sep=",")

# Return data to TARGIT Data Service.

BR / Ole
Ole Dyring
Users browsing this topic
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.



We use cookies to improve your site experience, but they also provide us with information on your use of our website.
To find out more about the cookies we use and how to delete them, see our Privacy Policy. By continuing to browse the site, you are consenting to our use of cookies.