README.md

ksulibSearch

This package contains convenience functions for testing our site search.

Installing and configuring R

  1. Download R from cran.r-project.org and run it. You can use the default install options while using the install wizard.
  2. (Optional) Download RStudio from rstudio.com.

After you have installed R, first time R users will need to install the following packages:

install.packages(c("devtools", "dplyr", "xml2", "rvest", "httr", "curl", "tidyr", "stringi"))

You will then need to install this package:

library(devtools)
install_github("kyeager4/ksulibSearch")

Once the packages are installed, you do not have to re-install them the next time you launch R.

If there are changes to the code in this package, you can rerun install_github("kyeager4/ksulibSearch") to update to the most recent version.

Using this package

To use this package:

## Load this package (only needs to be done once, at the start of your R session.)
library(ksulibSearch)

## Test a single query on the production site.
query_example1 <- run_ksu_search("hours")

## Test a single query on the test server.
query_example2 <- run_ksu_search("hours", production=FALSE)

## You can also test more than one query at a time by supplying a character vector. 
## Use quotations around each query, and separate each query by a comma.
myterms <- c("hours", "locations", "academic search complete")

query_example3 <- run_ksu_search(myterms)
query_example4 <- run_ksu_search(myterms, production=FALSE)

This package is a work in progress.

To do

High priority:



kyeager4/ksulibSearch documentation built on May 23, 2019, 9:33 a.m.