Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mcglm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
leg
mcglm
Commits
84069d13
Commit
84069d13
authored
9 years ago
by
Walmes Marques Zeviani
Browse files
Options
Downloads
Patches
Plain Diff
Script R to convert RData in txt and upload.
parent
72cc839a
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
data-raw/RData2txt.R
+46
-0
46 additions, 0 deletions
data-raw/RData2txt.R
with
46 additions
and
0 deletions
data-raw/RData2txt.R
0 → 100644
+
46
−
0
View file @
84069d13
##======================================================================
## Generate plain text files from the RData files for all datasets in
## the package.
##======================================================================
getwd
()
f
<-
list.files
(
path
=
"../data"
,
pattern
=
"*.RData"
)
sapply
(
f
,
FUN
=
function
(
f
){
load
(
paste0
(
"../data/"
,
f
))
g
<-
sub
(
"\\.RData"
,
""
,
f
)
txt
<-
paste0
(
g
,
".txt"
)
dataset
<-
eval
(
parse
(
text
=
g
))
cat
(
file
=
txt
,
sep
=
"\n"
,
"##----------------------------------------------------------------------"
,
"## This dataset is part of mcglm package."
,
"## Visit http://git.leg.ufpr.br/wbonat/mcglm for details."
,
"##----------------------------------------------------------------------"
)
write.table
(
x
=
dataset
,
file
=
txt
,
sep
=
"\t"
,
quote
=
FALSE
,
row.names
=
FALSE
,
append
=
TRUE
)
})
##----------------------------------------------------------------------
## Uploading files to the public folder: www.leg.ufpr.br/~leg/mcglm.
## Port and IP.
u
<-
scan
(
n
=
2
,
what
=
character
())
## Verifica o conteúdo do diretório /datasets.
cmd
<-
paste0
(
"ssh leg@"
,
u
[
2
],
" -p"
,
u
[
1
],
" \"ls -la ~/public_html/mcglm/datasets\""
)
system
(
cmd
)
## By rsync.
cmd
<-
paste0
(
"rsync -avzh --progress *.txt "
,
"-e \"ssh -p "
,
u
[
1
],
"\" leg@"
,
u
[
2
],
":~/public_html/mcglm/datasets/"
)
system
(
cmd
)
url
<-
"http://www.leg.ufpr.br/~leg/mcglm/datasets"
browseURL
(
url
)
##----------------------------------------------------------------------
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment