Skip to content

Commit

Permalink
adding files folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Detlef Groth committed Sep 14, 2023
1 parent bdd9de0 commit 5863559
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
3 changes: 3 additions & 0 deletions R/add.R
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,9 @@ add <- function (x, y) {
#' }
#' \examples{
#' testprint("Hello World!")
#' # sample file use
#' dec=read.table(file.path(system.file(package="Rpkg"),"files","decathlon.tab"))
#' head(dec)
#' }
#' \seealso{ See also \code{\link{add}} }
#' \keyword{ arith }
Expand Down
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,11 +86,15 @@ extractRd(list.files("R",pattern="*.R$",full.names=TRUE))
### you should check the DESCRIPTION file for the package name
### version, author etc and change it accordingly
file.edit("DESCRIPTION")
### change the test file to match the package name
file.edit("tests/tests-add.R")
### change all references to Rpkg to your right package name
file.edit("R/add.R")
### and thereafter build the package file
tools:::.build_packages(".")
system("R CMD build .")
list.files(pattern=".tar.gz")
### check the package
tools:::.check_packages("mypkg_0.0.1.tar.gz")
system("R CMD check mypkg_0.0.1.tar.gz --no-manual")
### install the package
install.packages("mypkg_0.0.1.tar.gz",repos=NULL)
```
Expand Down
34 changes: 34 additions & 0 deletions inst/files/decathlon.tab
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
100 long shot high 400 110 disq pole jave 1500
1 32 7.43 15.48 2.27 29.4479 26.1732 49.28 4.7 61.32 20.0781
2 33.1187 7.45 14.97 1.97 30.1824 27.3859 44.36 5.1 61.76 19.7788
3 32.2004 7.44 14.2 1.97 29.8198 26.7387 43.66 5.2 64.16 20.5167
4 33.8983 7.38 15.02 2.03 29.3518 26.9022 44.8 4.9 64.04 18.9401
5 32.6679 7.43 12.92 1.97 30.3541 27.5 41.2 5.2 57.46 21.0411
6 33.241 7.72 13.58 2.12 29.789 27.9267 43.06 4.9 52.18 19.703
7 32.2004 7.05 14.12 2.06 29.1852 27.5191 41.68 5.7 61.6 18.544
8 32.5792 6.95 15.34 2 29.8693 27.5766 41.32 4.8 63 20.3114
9 32.287 7.12 14.52 2.03 29.2981 27.0123 42.36 4.9 66.46 20.0282
10 32.057 7.28 15.25 1.97 29.6296 26.8293 48.02 5.2 59.48 18.478
11 32.9068 7.45 15.34 1.97 28.8346 27.7895 41.86 4.8 66.64 18.25
12 32.2004 7.34 14.48 1.94 29.3758 26.2078 42.76 4.7 65.84 21.033
13 32.6679 7.29 12.92 2.06 29.8569 26.506 39.54 5 56.8 20.9424
14 32.7571 7.37 13.61 1.97 30.1066 26.9388 43.88 4.3 66.54 20.0766
15 32.6383 7.45 14.2 1.97 29.4238 25.6477 41.66 4.7 64 20.1884
16 32.4617 7.08 14.51 2.03 28.8635 26.793 43.2 4.9 57.18 20.1087
17 31.4136 6.75 16.07 2 28.0811 24.6575 50.66 4.8 72.6 17.856
18 31.115 7 16.6 1.94 28.8925 26.4 46.66 4.9 60.2 18.8785
19 32.5203 7.04 13.41 1.94 30.0188 26.4706 40.38 4.5 51.5 20.5785
20 33.0579 7.07 15.84 1.79 28.9855 25.7477 45.32 4.9 60.48 19.4356
21 31.25 7.36 13.93 1.94 28.8058 25.3197 38.82 4.6 67.04 20.2687
22 31.3316 7.02 13.8 2.03 28.4585 26.0184 39.08 4.7 60.92 20.5378
23 31.6344 7.08 14.31 2 28.6624 26.4529 46.34 4.4 55.68 19.8034
24 31.8584 6.97 13.23 2.15 28.8115 25.7477 38.72 4.6 54.34 19.4356
25 32.7273 7.23 13.15 2.03 28.9564 26.4706 38.06 4.5 52.82 18.9095
26 31.7741 6.83 11.63 2.06 29.7705 25.731 37.52 4.6 55.42 19.9948
27 32.4324 6.98 12.69 1.82 29.6114 26.1732 38.04 4.7 49.52 20.6186
28 31.2772 7.01 14.17 1.94 28.147 26.087 45.84 4.6 56.28 17.8118
29 31.9716 6.9 12.41 1.88 29.8507 25.3684 38.02 4.4 52.68 19.8486
30 31.3043 7.09 12.94 1.82 29.2267 25.4499 42.32 4.5 53.5 18.3767
31 31.4961 6.22 13.98 1.91 28.0976 24.937 46.18 4.6 57.84 18.3057
32 31.3862 6.43 12.33 1.94 28.6282 26.4 38.72 4 57.26 18.3849
33 31.115 7.19 10.27 1.91 28.3968 24.4444 34.36 4.1 54.94 20.0015
3 changes: 3 additions & 0 deletions man/testprint.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
}
\examples{
testprint("Hello World!")
# sample file use
dec=read.table(file.path(system.file(package="Rpkg"),"files","decathlon.tab"))
head(dec)
}
\seealso{ See also \code{\link{add}} }
\keyword{ arith }

0 comments on commit 5863559

Please sign in to comment.