Skip to content

Commit

Permalink
updated example folder to be not top level directory
Browse files Browse the repository at this point in the history
  • Loading branch information
elizagrames committed Dec 20, 2018
1 parent dd7125e commit 4d6f78a
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ revdep/
_testinglitsearchr/*
_testinglitsearchr/
to-do-list.md

to-do-notes.R
6 changes: 5 additions & 1 deletion cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## Resubmission
This is a resubmission. I corrected the DESCRIPTION so that the Description field doesn't start with the name of the package. There is not a reference about the method that I can add at this time; co-authors are currently revising the manuscript before I submit it for peer review.
This is a resubmission. I made the following changes:
- Every function has an executable example except for those requiring an API or that require internet access to scrape html.
- I changed the default in all functions to not save output and the examples use tempdir().
- I added in some new options within a couple of functions (e.g. deduplicate); I hope it was okay to make changes like that during the submission process.
- I also deleted a few redundant or unnecessary functions to reduce the package size.

## Test environments
* local OS X 10.14.1 install, R 3.5.1
Expand Down
3 changes: 3 additions & 0 deletions inst/examples/create_dfm.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
create_dfm(make_corpus(BBWO_data),
make_dictionary(extract_terms(
df=BBWO_data, type="RAKE", min_freq=3)))
2 changes: 2 additions & 0 deletions inst/examples/find_knots.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
find_knots(importance_data=make_importance(BBWO_graph, importance_method = "strength"),
degrees=2, knot_num=1)
2 changes: 2 additions & 0 deletions inst/examples/fit_splines.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
fit_splines(importance_data=data.frame(rank=c(1:5), importance=c(20,20,30,35,90)),
degrees=2, knot_num=1, knots=2.99)
2 changes: 2 additions & 0 deletions inst/examples/get_condensed_terms.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
get_condensed_terms(reduced_graph=reduce_graph(BBWO_graph, cutoff_strength=15),
previous_graphs=list(reduce_graph(BBWO_graph, cutoff_strength=20)))
3 changes: 3 additions & 0 deletions inst/examples/import_results.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
write.csv(litsearchr::scopus_example, paste(tempdir(), "/scopus.csv", sep=""))
naive_results <- import_results(paste(tempdir(), "/", sep=""))

4 changes: 4 additions & 0 deletions inst/examples/language_graphs.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language_graphs(
lang_data=get_language_data(key_topics=c("biology", "conservation", "ecology")),
no_return=15,
key_topics=c("biology", "conservation", "ecology"))
5 changes: 5 additions & 0 deletions inst/examples/write_search.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
write_search(
groupdata=list(c("black-backed woodpecker", "picoides arcticus"),
c("post-fire forest", "time since fire")),
languages="English",
exactphrase=TRUE, stemming=TRUE, verbose=FALSE, writesearch=FALSE)
4 changes: 4 additions & 0 deletions inst/examples/write_titles.R
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
write_title_search(
c("Cross-scale occupancy dynamics of a postfire specialist
in response to variation across a fire regime",
"Variation in home-range size of Black-backed Woodpeckers"))

0 comments on commit 4d6f78a

Please sign in to comment.