browse: browse

Description Usage Arguments Value Examples

View source: R/browse.R

Description

Creates a temporary HTML file with source codes and opens it into a browser using browseURL. Note that the source code is reformatted.

Usage

1
browse(prgs, simdf, n = (simdf[, 3] > 0), width.cutoff = 60, css = NULL)

Arguments

prgs

sourcecode object

simdf

similarity object

n

integer: comparisons to show (default: simf[,3]>0)

width.cutoff

integer: an integer in [20, 500]: if a line's character length is at or over this number, the function will try to break it into a new line (default: 60)

css

character: file name of CSS style for highlighting the R code

Value

invisibly the name of the temporary HTML file

Examples

1
2
3
4
5
6
# example files are taken from https://CRAN.R-project.org/package=SimilaR
files <- list.files(system.file("examples", package="rscc"), "*.R$", full.names=TRUE)
prgs  <- sourcecode(files)
simm  <- similarities(documents(prgs))
simdf <- matrix2dataframe(simm)
if (interactive()) browse(prgs, simdf)

rscc documentation built on Jan. 20, 2022, 5:08 p.m.