-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path00_check.R
More file actions
96 lines (69 loc) · 2.05 KB
/
00_check.R
File metadata and controls
96 lines (69 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
# devtools ------------------
library(devtools)
load_all()
document()
check_man()
check()
test()
build()
install(upgrade = "never")
# Examples ------------------
common_columns(csv_files = dir("inst/extdata", full.names = TRUE))
common_columns(csv_files = "inst/extdata/csv01.csv")
common_columns(csv_files = "inst/extdata/csv02.csv")
dir("inst/extdata", full.names = TRUE)
all_columns(csv_files = dir("inst/extdata", full.names = TRUE))
bind_csv_all(
csv_files = dir("inst/extdata", full.names = TRUE),
col_names = NULL,
csv_output = "TEMP.csv"
)
data.table::fread("TEMP.csv")
data.table::fread("inst/extdata/csv01.csv")
data.table::fread("inst/extdata/csv02.csv")
file.remove("TEMP.csv")
bind_csv_all(
csv_files = dir("inst/extdata", full.names = TRUE),
col_names = c("z", "x", "y"),
csv_output = "TEMP.csv"
)
data.table::fread("TEMP.csv")
data.table::fread("inst/extdata/csv01.csv")
data.table::fread("inst/extdata/csv02.csv")
file.remove("TEMP.csv")
common_columns(csv_files = "inst/extdata/csv02.csv")
import_existing_add_missing(
csv_file = "inst/extdata/csv02.csv",
col_names = c("x", "y", "z", "w")
)
# usethis -------------------
library(usethis)
use_package_doc()
use_testthat()
use_test("import_list_csv")
use_test("bind_csv")
use_test("all_columns")
use_test("bind_csv_all")
# use_test("common_columns")
use_github_action(name = "check-standard")
# covr ----------------------
library(covr)
p <- package_coverage()
p
report(p, file = "impexpcsv-report.html")
# pkgdown -------------------
pkgdown::build_site()
# git push both on gitlab and github ------------
# From the terminal:
# git remote add github https://github.com/SwissStatsR/impexpcsv.git
# git remote add github git@github.com:SwissStatsR/impexpcsv.git
# git remote -v
# origin is gitlab, github is github
# To push on both remote repositories:
# git push -u origin master # push on gitlab
# git push -u github master # push on github
# Copy tar.gz in 00_copia_sorgenti_gib_packs ----
file.copy(
"../impexpcsv_0.0.7.tar.gz",
to = "../00_copia_sorgenti_gib_packs/"
)