Learn R Programming


title: "README" author: "Hanming Tu" date: "01/21/2020" output: html_document

About this package

This is my very first R package. The purpose of this package is to provide a framework of PHUSE script web application based on script metadata for sharing. See the paper Defining Script Metadata for Sharing: Using phuse R package as an example and presenation about this framework. Here is a list of people who work on this project.

It has the following tabs in the framework:

  • Script: displays the script if it is readable.
  • YML: displays the content of YML
  • Info: displays the information about the YML
  • Metadata: shows the metadata of the script in table format
  • Verify: verifies the existence of the files defined in YML
  • Download: downloads the script to local computer
  • Merge: merges online and local metadata files
  • Execute: executes the script if it is executable.

How to install

  • Install from CRAN
install.packages(“phuse”)
  • Install from GitHub
install.packages("devtools")
library(devtools)
install_github(”TuCai/phuse")

How to use

library(phuse)
start_app()               # start with default settings
start_app(msg_lvl = 3)    # start and display detailed message at level 3
start_app(n=7)            # to start an application

It will try to conduct the following tasks:

  • Build a YML file index and stored the file to your local computer if you are the first time to start the interface or the local YML file is too old (older than 7 days)
  • Build a data frame to hold the information for all YML files
  • Write the data frame to the local file if there are new YML files added
  • Populate the “Select Script” dropdown list

Create Simplified TS domain file

After you install phuse package, you can start it as start_app(n=7) or access the published app at Creating TS Domain.

To view source code, you can go to the app 07 source.

Copy Link

Version

Install

install.packages('phuse')

Monthly Downloads

7

Version

0.2.2

License

MIT + file LICENSE

Maintainer

Hanming Tu

Last Published

January 22nd, 2020

Functions in phuse (0.2.2)

get_yml_inputs

Get Inputs from Script Metadata File
get_inputs

Get Inputs from Input Sources
start_app

Start Phuse Web Application
create_dir

Create a directory
crt_workdir

Create work directory
cvt_class2df

Convert a class to data fram
merge_lists

Compare and merge two lists
cvt_list2df

Convert list to data frame
read_yml

Read YML file into a list
start_phuse

Start Phuse Web Application
extract_fns

Extract File Names from Script Metadata
download_fns

Download files from a repository
resolve

Resolve absolute path
download_script_files

Download files from a repository
init_cfg

Initialize configuration for phuse
url.exists

Check URL based on httr package
download_script

Download files defined in script metadata
gen_simplified_ts

Generate Simplified TS domain xpt file
search_api

Search GitHub and build a script index data frame
chk_workdir

Verify work directory
clone_github

Clone a GitHub repositoru
build_inputs

Build Inputs from Script Metadata for Phuse Web Framework
is_empty

Check if a variable is na or null or space
build_script_df

Build Script Index Dataset
echo_msg

Echo message
run_example

Run example
search_github

Search GitHub and build a script index data frame