-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtesting.R
71 lines (57 loc) · 1.73 KB
/
testing.R
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
# Sources all for fast delelopment without building
SOURCE = FALSE
if (SOURCE){
source("R/edudat/R/edudat.R")
source("R/edudat/R/df_utils.R")
source("R/edudat/R/internal.R")
source("R/edudat/R/misc_functions.R")
source("R/edudat/R/quarto_related.R")
source("R/edudat/R/edudat-methods.R")
} else{
library(edudat)
}
# Loading
?edudat::load_data()
### Direct Loading
df <- load_data("https://zenodo.org/records/1319069/files/iris.csv", verbose = TRUE)
### Loading form Repository
# Files are not in the repository
### Loading via YAML (with contains link to the file)
df <- load_data("zenodo.5126651.bl.yaml", verbose = TRUE)
attributes(df)$download_url
# Files are in the repository
df <- load_data("abodauer.csv.gz", verbose = TRUE) #csv.gz is OK
attributes(df)$download_url
df <- load_data("challenger.csv", verbose = TRUE)
attributes(df)
class(df) #"edudat" "data.frame"
attributes(df)
summary(df) #Specially Implemented for edudat
print(df)
## Extra Functionality implemented via qmd-files
plot(df) #Using Default plot method
source_extra_code(df, verbose = TRUE) #Extra R-Functionality Implemented in qmd-file (code)
plot(df) + ggtitle("Challenger dataset")
to_celcius(df$Temp) #Extra Function Implemented
## Handling the cache
list_cache_files()
## Rendering for Übungsblätter
show_loading(attributes(df))
?show_loading
#### Functions as of 21 May 2024
# Generated by roxygen2: do not edit by hand
#
# S3method(print,edudat)
# S3method(summary,edudat)
# export(as.stan_data)
# export(get_cache_dir)
# export(get_yaml_attributes)
# export(list_cache_files)
# export(load_data)
# export(show_code)
# export(show_data)
# export(show_loading)
# export(show_mini_help)
# export(source_extra_code)
df = load_data('sbp.csv')
show_data(df)