| Title: | Accessibility for Recreation in R |
|---|---|
| Description: | Recreation model that simulates household types, group types, expected visiting duration, and total visits from city zip codes to surrounding destination areas. The methodology is based on the accessibility model described in Bervaes et al. (1996) "Een model voor het gebruik van de groene ruimte in stadslandschappen (Fase I)" <https://www.wur.nl/en/library>, with optimization procedures based on Goldfarb and Idnani (1983) <doi:10.1007/BF02591962> and Vanderbei et al. (1986) <doi:10.1007/BF01840454>. |
| Authors: | Georgios Martakis [aut, cre], Jan Bervaes [ctb] (deceased), Bert van der Werf [ctb] (ORCID: <https://orcid.org/0000-0003-3072-5937>) |
| Maintainer: | Georgios Martakis <[email protected]> |
| License: | GPL (>= 3) |
| Version: | 1.0.1 |
| Built: | 2026-10-10 14:22:54 UTC |
| Source: | https://github.com/martakis/acrer |
'combinations()' function to obtain at random c3 matrices for the construction of the vector timeMax depending on the number of groupsRecr_act_ts levels
combinations(groupsRecr_act_ts_levels)combinations(groupsRecr_act_ts_levels)
groupsRecr_act_ts_levels |
Numeric vector. |
list50 A list which contains a c3 matrix.
crosstab(Rmatrix, Cmatrix, C1)
crosstab(Rmatrix, Cmatrix, C1)crosstab(Rmatrix, Cmatrix, C1)
Rmatrix |
Matrix of 1 or 2 columns: The first column contains the vector RcrID or the vector groupsRecr_at and the second column if exist the vextor of the corresponding activities pattern for the vector groupsRecr_at |
Cmatrix |
Matrix of 2 or 1 coloumn(s) Activities patern ID and time segment for 2 columns or time segment for one column. |
C1 |
matrix empty,vector If the third argument of the function C1 is an empty matrix and when the Rmatrix matrix contains 1 column THEN the results of this function are the group numbers of recreation areas with the same activities and on the same time segments. If the Rmatrix matrix contains 2 columns then the results of this function are the group numbers of groupsRecr_at and the activities pattern on the same time segment (see Wageningen_tables_Excel folder: Procedures_ACRER.xls, Excel sheet: crosstab_procedure (1 or 9) or HTML folder: Procedures_ACRER.html (crosstab_procedure (1 or 9) section) If the third argument of the function C1 matrix is NOT an empty matrix but contains the linear optimization solution of our model THEN the result of this function are the linear optimization solutions per time segment. |
The data we use here are from the table data which we got from a query from a query of the Final table. The table data had n records (n rows = 970) and 4 columns namely: recreation area, activities pattern, transport type and time segment. This table data with the use of the function group_by was reduced in n1=515 records. The column of the trasport type is not important for the groups computation The crosstab function has 5 subfunctions: 1. NGroup0 2. NGroup1 3. NGroup2 4. NGroup3 5. NGroup4
NGroup0 computes the group numbers of recreation areas where all the sequence(s) of their presences (1) on the combination of activities pattern and time segment are not interrupted by absence (0). Thus in this case we have one group of ones (presence). NGroup1 computes the group numbers of recreation areas where all the sequence(s) of their presences (1) on the combination of activities pattern and time segment are once interrupted by absence (0). Thus in this case we have two groups of ones (presence). NGroup2 computes the group numbers of recreation areas where all the sequence(s) of their presences (1) on the combination of activities pattern and time segment are twice interrupted by absences (0). Thus in this case we have three groups of ones (presence). NGroup3 computes the group numbers of recreation areas where all the sequence(s) of their presences (1) on the combination of activities pattern and time segment are three times interrupted by absences (0). Thus in this case we have four groups of ones (presence). NGroup4 computes the group numbers of recreation areas where all the sequence(s) of their presences (1) on the combination of activities pattern and time segment are four times interrupted by absences (0). Thus in this case we have five groups of ones (presence)
list1 Listrow_matrix, col_matrix, crosstable, groups_matrix, fdata, tdata.
function to compute via integration the expected visit duration per recreation area.
expected_visit_duration( dMinDurationAbs, dMaxDurationAbs, dMinDuration, dMaxDuration )expected_visit_duration( dMinDurationAbs, dMaxDurationAbs, dMinDuration, dMaxDuration )
dMinDurationAbs |
This is equal to_spend_minimum_time_per_activity (in min). |
dMaxDurationAbs |
This is equal to_spend_maximum_time_per_activity (in min). |
dMinDuration |
This is equal to max(maxduration,min_duration_abs) (in min). |
dMaxDuration |
This is equal to min(available_time_for_activity,step1) (in min). |
expected_visit_duration(dMinDurationAbs, dMaxDurationAbs, dMinDuration,dMaxDuration).
expected_visit_duration Computation of the expected visit duration: list1a = matrix(dResult).
Generates a pivot table summarizing recreation areas and transport types as rows and zip codes as columns.
generate_pivot(my_data)generate_pivot(my_data)
my_data |
A data frame containing recreation model results (e.g. 13 variables including recreation areas, transport types, zip codes, distances, fuel costs, activity costs, visits, and expected visiting duration). |
An object of class PivotTable (PivotTable)
containing summary statistics (counts of household groups, mean distances,
mean fuel costs, mean activity costs, sum and mean of visits, and sum and mean
of expected visiting duration) structured across recreation areas, transport
modes, and zip codes.
NGroup0 computes the group numbers of recreation areas where all the sequence(s) of their presences (1) on the combination of activities pattern and time segment are NOT interrupted by absences (0). Thus in this case we have 1 group of ones (presences).
NGroup0( nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr, Index_group_number, groups, Nfactors, fRecrIDX, FRecrID, Ngroups, fbfactX1, fbfactX2, Fbfact11, Fbfact22 )NGroup0( nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr, Index_group_number, groups, Nfactors, fRecrIDX, FRecrID, Ngroups, fbfactX1, fbfactX2, Fbfact11, Fbfact22 )
nRowMatrix |
Matrix. Select each row of the cross table if the vector for the rows matrix equals to one. |
activ_segment |
Matrix. activ_segment construct of the presence/absence of activities-time segment matrix. |
c1 |
Numeric array. Construct the row of the activities pattern factor in which (sumc_of_groups != 0). |
c2 |
Numeric array. Construct the row of the time segment factor in which (sumc_of_groups != 0). |
sumc1c2 |
Numeric vector The sum per column of the presence/absence per block rows of the activities-and time segment without zeros. |
sumc1 |
Numeric vector. The sum of the activ_segment. |
levels_sr |
Numeric vector. levels_sr levels of the sum of rows |
Index_group_number |
Numeric vector. Index_group_number the group number |
groups |
Numeric vector. Groups: 4 6 7 3 1 16 2 34 25 82 31 41 21 19 15 27 37 67 77 when Nfactors are two vectors, the time segment and the activities pattern and the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment and groups: 37 1 4 25 when Nfactors is on vector the time segments vector. |
Nfactors |
Numeric vector. Nfactors: when Nfactors are two vectors, the time segment and the activities pattern then RecrID is the only factor for the presence absence of the combination of the activities in a given time segment and Nfactors is the time segments vector. |
fRecrIDX |
Numeric vector. fRecrIDX: temp. array for the RecrID vector. |
FRecrID |
Numeric vector. FRecrID: FRecrID for nRowMatrix is 1 column if the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment (CMATRIX). |
Ngroups |
Numeric vector. Ngroups is the created vector groupsRecr_at when the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment or the created vector groupsRecr_act_ts when the groupsRecr_at vector and activity pattern are the two factors for the presence absence of the time segment vector. |
fbfactX1 |
Numerical array. fbfactX1: temp. array for the groupsRecr_at vector. |
fbfactX2 |
Numerical array. fbfactX2: temp. array for the activity pattern vector |
Fbfact11 |
Numerical vector. Fbfact11: for the groupsRecr_at vector. |
Fbfact22 |
Numerical vector. Fbfact22: for the activity pattern vector |
list00 Nfactors, Fbfact11, Fbfact22, Ngroups, levels_sr, Index_group_number.
NGroup1(nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr,Index_group_number, groups, Nfactors, fRecrIDX,FRecrID, Ngroups,fbfactX1, fbfactX2, Fbfact11, Fbfact22, pos1, q).
NGroup1( nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr, Index_group_number, groups, Nfactors, fRecrIDX, FRecrID, Ngroups, fbfactX1, fbfactX2, Fbfact11, Fbfact22, pos1, q )NGroup1( nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr, Index_group_number, groups, Nfactors, fRecrIDX, FRecrID, Ngroups, fbfactX1, fbfactX2, Fbfact11, Fbfact22, pos1, q )
nRowMatrix |
Matrix. Select each row of the cross table if the vector for the rows matrix equals to one. |
activ_segment |
Matrix. activ_segment construct of the presence/absence of activities-time segment matrix. |
c1 |
Numeric array. Construct the row of the activities pattern factor in which (sumc_of_groups != 0). |
c2 |
Numeric array. Construct the row of the time segment factor in which (sumc_of_groups != 0). |
sumc1c2 |
Numeric vector The sum per column of the presence/absence per block rows of the activities-and time segment without zeros. |
sumc1 |
Numeric vector. The sum of the activ_segment. |
levels_sr |
Numeric vector. levels_sr levels of the sum of rows |
Index_group_number |
Numeric vector. Index_group_number the group number |
groups |
Numeric vector. Groups: 4 6 7 3 1 16 2 34 25 82 31 41 21 19 15 27 37 67 77 when Nfactors are two vectors, the time segment and the activities pattern and the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment and groups: 37 1 4 25 when Nfactors is on vector the time segments vector. |
Nfactors |
Numeric vector. Nfactors: when Nfactors are two vectors, the time segment and the activities pattern then RecrID is the only factor for the presence absence of the combination of the activities in a given time segment and Nfactors is the time segments vector. |
fRecrIDX |
Numeric vector. fRecrIDX: temp. array for the RecrID vector. |
FRecrID |
Numeric vector. FRecrID: FRecrID for nRowMatrix is 1 column if the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment (CMATRIX). |
Ngroups |
Numeric vector. Ngroups is the created vector groupsRecr_at when the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment or the created vector groupsRecr_act_ts when the groupsRecr_at vector and activity pattern are the two factors for the presence absence of the time segment vector. |
fbfactX1 |
Numerical array. fbfactX1: temp. array for the groupsRecr_at vector. |
fbfactX2 |
Numerical array. fbfactX2: temp. array for the activity pattern vector |
Fbfact11 |
Numerical vector. Fbfact11: for the groupsRecr_at vector. |
Fbfact22 |
Numerical vector. Fbfact22: for the activity pattern vector |
pos1 |
Scalar. Is an index for slicing an array. |
q |
Scalar. To find out which combination is. |
list11 Nfactors, Fbfact11, Fbfact22, Ngroups, levels_sr, Index_group_number.
NGroup2(nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr,Index_group_number, groups, Nfactors, fRecrIDX,FRecrID, Ngroups,fbfactX1, fbfactX2, Fbfact11, Fbfact22, pos1, q).
NGroup2( nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr, Index_group_number, groups, Nfactors, fRecrIDX, FRecrID, Ngroups, fbfactX1, fbfactX2, Fbfact11, Fbfact22, pos1, q )NGroup2( nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr, Index_group_number, groups, Nfactors, fRecrIDX, FRecrID, Ngroups, fbfactX1, fbfactX2, Fbfact11, Fbfact22, pos1, q )
nRowMatrix |
Matrix. Select each row of the cross table if the vector for the rows matrix equals to one. |
activ_segment |
Matrix. activ_segment construct of the presence/absence of activities-time segment matrix. |
c1 |
Numeric array. Construct the row of the activities pattern factor in which (sumc_of_groups != 0). |
c2 |
Numeric array. Construct the row of the time segment factor in which (sumc_of_groups != 0). |
sumc1c2 |
Numeric vector The sum per column of the presence/absence per block rows of the activities-and time segment without zeros. |
sumc1 |
Numeric vector. The sum of the activ_segment. |
levels_sr |
Numeric vector. levels_sr levels of the sum of rows |
Index_group_number |
Numeric vector. Index_group_number the group number |
groups |
Numeric vector. Groups: 4 6 7 3 1 16 2 34 25 82 31 41 21 19 15 27 37 67 77 when Nfactors are two vectors, the time segment and the activities pattern and the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment and groups: 37 1 4 25 when Nfactors is on vector the time segments vector. |
Nfactors |
Numeric vector. Nfactors: when Nfactors are two vectors, the time segment and the activities pattern then RecrID is the only factor for the presence absence of the combination of the activities in a given time segment and Nfactors is the time segments vector. |
fRecrIDX |
Numeric vector. fRecrIDX: temp. array for the RecrID vector. |
FRecrID |
Numeric vector. FRecrID: FRecrID for nRowMatrix is 1 column if the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment (CMATRIX). |
Ngroups |
Numeric vector. Ngroups is the created vector groupsRecr_at when the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment or the created vector groupsRecr_act_ts when the groupsRecr_at vector and activity pattern are the two factors for the presence absence of the time segment vector. |
fbfactX1 |
Numerical array. fbfactX1: temp. array for the groupsRecr_at vector. |
fbfactX2 |
Numerical array. fbfactX2: temp. array for the activity pattern vector |
Fbfact11 |
Numerical vector. Fbfact11: for the groupsRecr_at vector. |
Fbfact22 |
Numerical vector. Fbfact22: for the activity pattern vector |
pos1 |
Scalar. Is an index for slicing an array. |
q |
Scalar. To find out which combination is. |
list22 Nfactors, Fbfact11, Fbfact22, Ngroups, levels_sr, Index_group_number.
NGroup3(nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr,Index_group_number, groups, Nfactors, fRecrIDX,FRecrID, Ngroups,fbfactX1, fbfactX2, Fbfact11, Fbfact22, pos1, q).
NGroup3( nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr, Index_group_number, groups, Nfactors, fRecrIDX, FRecrID, Ngroups, fbfactX1, fbfactX2, Fbfact11, Fbfact22, pos1, q )NGroup3( nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr, Index_group_number, groups, Nfactors, fRecrIDX, FRecrID, Ngroups, fbfactX1, fbfactX2, Fbfact11, Fbfact22, pos1, q )
nRowMatrix |
Matrix. Select each row of the cross table if the vector for the rows matrix equals to one. |
activ_segment |
Matrix. activ_segment construct of the presence/absence of activities-time segment matrix. |
c1 |
Numeric array. Construct the row of the activities pattern factor in which (sumc_of_groups != 0). |
c2 |
Numeric array. Construct the row of the time segment factor in which (sumc_of_groups != 0). |
sumc1c2 |
Numeric vector The sum per column of the presence/absence per block rows of the activities-and time segment without zeros. |
sumc1 |
Numeric vector. The sum of the activ_segment. |
levels_sr |
Numeric vector. levels_sr levels of the sum of rows |
Index_group_number |
Numeric vector. Index_group_number the group number |
groups |
Numeric vector. Groups: 4 6 7 3 1 16 2 34 25 82 31 41 21 19 15 27 37 67 77 when Nfactors are two vectors, the time segment and the activities pattern and the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment and groups: 37 1 4 25 when Nfactors is on vector the time segments vector. |
Nfactors |
Numeric vector. Nfactors: when Nfactors are two vectors, the time segment and the activities pattern then RecrID is the only factor for the presence absence of the combination of the activities in a given time segment and Nfactors is the time segments vector. |
fRecrIDX |
Numeric vector. fRecrIDX: temp. array for the RecrID vector. |
FRecrID |
Numeric vector. FRecrID: FRecrID for nRowMatrix is 1 column if the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment (CMATRIX). |
Ngroups |
Numeric vector. Ngroups is the created vector groupsRecr_at when the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment or the created vector groupsRecr_act_ts when the groupsRecr_at vector and activity pattern are the two factors for the presence absence of the time segment vector. |
fbfactX1 |
Numerical array. fbfactX1: temp. array for the groupsRecr_at vector. |
fbfactX2 |
Numerical array. fbfactX2: temp. array for the activity pattern vector |
Fbfact11 |
Numerical vector. Fbfact11: for the groupsRecr_at vector. |
Fbfact22 |
Numerical vector. Fbfact22: for the activity pattern vector |
pos1 |
Scalar. Is an index for slicing an array. |
q |
Scalar. To find out which combination is. |
list33 Nfactors, Fbfact11, Fbfact22, Ngroups, levels_sr, Index_group_number.
NGroup4(nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr,Index_group_number, groups, Nfactors, fRecrIDX,FRecrID, Ngroups,fbfactX1, fbfactX2, Fbfact11, Fbfact22, pos1, q).
NGroup4( nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr, Index_group_number, groups, Nfactors, fRecrIDX, FRecrID, Ngroups, fbfactX1, fbfactX2, Fbfact11, Fbfact22, pos1, q )NGroup4( nRowMatrix, activ_segment, c1, c2, sumc1c2, sumc1, levels_sr, Index_group_number, groups, Nfactors, fRecrIDX, FRecrID, Ngroups, fbfactX1, fbfactX2, Fbfact11, Fbfact22, pos1, q )
nRowMatrix |
Matrix. Select each row of the cross table if the vector for the rows matrix equals to one. |
activ_segment |
Matrix. activ_segment construct of the presence/absence of activities-time segment matrix. |
c1 |
Numeric array. Construct the row of the activities pattern factor in which (sumc_of_groups != 0). |
c2 |
Numeric array. Construct the row of the time segment factor in which (sumc_of_groups != 0). |
sumc1c2 |
Numeric vector The sum per column of the presence/absence per block rows of the activities-and time segment without zeros. |
sumc1 |
Numeric vector. The sum of the activ_segment. |
levels_sr |
Numeric vector. levels_sr levels of the sum of rows |
Index_group_number |
Numeric vector. Index_group_number the group number |
groups |
Numeric vector. Groups: 4 6 7 3 1 16 2 34 25 82 31 41 21 19 15 27 37 67 77 when Nfactors are two vectors, the time segment and the activities pattern and the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment and groups: 37 1 4 25 when Nfactors is on vector the time segments vector. |
Nfactors |
Numeric vector. Nfactors: when Nfactors are two vectors, the time segment and the activities pattern then RecrID is the only factor for the presence absence of the combination of the activities in a given time segment and Nfactors is the time segments vector. |
fRecrIDX |
Numeric vector. fRecrIDX: temp. array for the RecrID vector. |
FRecrID |
Numeric vector. FRecrID: FRecrID for nRowMatrix is 1 column if the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment (CMATRIX). |
Ngroups |
Numeric vector. Ngroups is the created vector groupsRecr_at when the RecrID is the only factor for the presence absence of the combination of the activities in a given time segment or the created vector groupsRecr_act_ts when the groupsRecr_at vector and activity pattern are the two factors for the presence absence of the time segment vector. |
fbfactX1 |
Numerical array. fbfactX1: temp. array for the groupsRecr_at vector. |
fbfactX2 |
Numerical array. fbfactX2: temp. array for the activity pattern vector |
Fbfact11 |
Numerical vector. Fbfact11: for the groupsRecr_at vector. |
Fbfact22 |
Numerical vector. Fbfact22: for the activity pattern vector |
pos1 |
Scalar. Is an index for slicing an array. |
q |
Scalar. To find out which combination is. |
list44 Nfactors, Fbfact11, Fbfact22, Ngroups, levels_sr, Index_group_number.
Generates a pivot table calculating the percentage of the row total expected visiting duration per recreation area across zip codes and transport types.
percent_EVD_Recr(my_data)percent_EVD_Recr(my_data)
my_data |
A data frame containing recreation model results (e.g. 13 variables including recreation areas, transport types, zip codes, and expected visiting duration). |
An object of class PivotTable (PivotTable)
containing the calculated percentages of expected visiting duration per recreation area,
allowing comparison of destination area shares across zip codes and transport modes.
Generates a pivot table calculating the percentage of the row total expected visiting duration per zip code across recreation areas and transport types.
percent_EVD_zip_code(my_data)percent_EVD_zip_code(my_data)
my_data |
A data frame containing recreation model results (e.g. 13 variables including recreation areas, transport types, zip codes, and expected visiting duration). |
An object of class PivotTable (PivotTable)
containing the calculated percentages of expected visiting duration per zip code,
allowing identification of origin areas with the highest duration shares.
Generates a pivot table calculating the percentage of the Grand Total expected visiting duration across all recreation areas, transport types, and zip codes.
percent_GT_EVD_pivot(my_data)percent_GT_EVD_pivot(my_data)
my_data |
A data frame containing recreation model results (e.g. 13 variables including recreation areas, transport types, zip codes, and expected visiting duration). |
An object of class PivotTable (PivotTable)
containing the Grand Total percentages of expected visiting duration across
recreation areas, transport types, and zip codes.
Generates a pivot table calculating the percentage of the Grand Total number of visits across all recreation areas, transport types, and zip codes.
percent_GT_NV_pivot(my_data)percent_GT_NV_pivot(my_data)
my_data |
A data frame containing recreation model results (e.g. 13 variables including recreation areas, transport types, zip codes, and number of visits). |
An object of class PivotTable (PivotTable)
containing the Grand Total percentages of visits across recreation areas,
transport types, and zip codes.
Generates a pivot table calculating the percentage of the row total number of visits per recreation area across zip codes and transport types.
percent_NV_Recr(my_data)percent_NV_Recr(my_data)
my_data |
A data frame containing recreation model results (e.g. 13 variables including recreation areas, transport types, zip codes, and number of visits). |
An object of class PivotTable (PivotTable)
containing the calculated percentages of visits per recreation area across
zip codes and transport types.
Generates a pivot table calculating the percentage of the row total number of visits per zip code across recreation areas and transport types.
percent_NV_zip_code(my_data)percent_NV_zip_code(my_data)
my_data |
A data frame containing recreation model results (e.g. 13 variables including recreation areas, transport types, zip codes, and number of visits). |
An object of class PivotTable (PivotTable)
containing the calculated percentages of visits per zip code across
recreation areas and transport types.
The model ACRER is a recreation model and simulates the number of persons per household and group types, the expected visiting duration as well as the number of visits from a zip code in a city to the destination area.
run_Acrer_model( db_choice = 1, output_dir = NULL, interactive_ui = FALSE, db_path = NULL )run_Acrer_model( db_choice = 1, output_dir = NULL, interactive_ui = FALSE, db_path = NULL )
db_choice |
Integer or character. 1 or "basic" for Basic tables, 2 or "complete" for Wageningen complete tables. Default is 1. |
output_dir |
Character. Optional directory path to save outputs. Default NULL uses inst/extdata or tempdir. |
interactive_ui |
Logical. If TRUE and in interactive session, prompts user with GUI dialogs. Default FALSE. |
db_path |
Optional character. Direct file or directory path to SQLite DB file. Default NULL. |
A list containing model results and pivot data frame.
Run Queries
Run_Queries(dataset1, conn = NULL)Run_Queries(dataset1, conn = NULL)
dataset1 |
List of basic tables |
conn |
Optional database connection |
List of query results
Connects to a local SQLite DB file. If the file is not found locally, it is downloaded from the published Zenodo open-access repository (record 22671742) and stored in a persistent user cache directory.
wageningen_conn(db_choice = 1, db_path = NULL, force_download = FALSE)wageningen_conn(db_choice = 1, db_path = NULL, force_download = FALSE)
db_choice |
Integer or character: 1 or "basic" for Basic tables, 2 or "complete" for Wageningen complete tables. Default is 1. |
db_path |
Optional character. Direct file path or directory containing the SQLite DB file. |
force_download |
Logical. If TRUE, re-downloads the database even if cached. Default is FALSE. |
A DBI SQLite connection. Remember to close it with 'DBI::dbDisconnect()' when you are done.
## Not run: conn <- ACRER::wageningen_conn() DBI::dbListTables(conn) DBI::dbDisconnect(conn) ## End(Not run)## Not run: conn <- ACRER::wageningen_conn() DBI::dbListTables(conn) DBI::dbDisconnect(conn) ## End(Not run)