library(tidyverse)
library(pxmake)
Usecase: Simple edit
Simple Edit in a px-file or a folder of px-files
Replace contact information in an existing px-file
Say you have a px-file, you want to have other contact information, than in the present file.
On the filesystem youcan have a folder and subfolders, like:
<- file.path("S:","STATBANK","bank2020","Databases")
statbank_s_path
<- file.path(statbank_s_path,"Greenland","FI") subject_path
- Convert present file to a px-object
- Set CONTACT to new information
This is simple as it is the same in all languages
<- file.path(subject_path,"FIXUDD.px")
fil
<- px(fil)
old
%>% px_contact("Per Lyster, pely@stat.gl") %>%
old px_save(file.path(subject_path,"FIXUDD.px"))
Or do it for all px-files in a folder, like this:
<- list.files(path=file.path(subject_path),pattern="*.px")
file.list
for (fil in file.list) {
<- px(file.path(subject_path,fil))
old
%>%
old px_contact("Per Lyster, pely@stat.gl") %>%
px_save(file.path(subject_path, fil))
}