en
Welcome Guest! To enable all features please Login or Register.
Options
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: 24

Hi

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?

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

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

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.
dataset

BR / Ole
I work as an employee with TARGIT A/S. Any statement made by me in this forum represents my own opinion and state of mind, and is not necessarily related to or representative of TARGIT A/S.

UserPostedImage Ole Dyring
Users browsing this topic
Anonymous
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.

Notification

Icon
Error

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.

ok