content
large_stringlengths
0
6.46M
path
large_stringlengths
3
331
license_type
large_stringclasses
2 values
repo_name
large_stringlengths
5
125
language
large_stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
4
6.46M
extension
large_stringclasses
75 values
text
stringlengths
0
6.46M
#' @import shiny #' @import raveio #' @import dipsaus #' @importFrom ravedash shiny_icons #' @importFrom graphics axis par points rect #' @importFrom utils read.csv #' @importFrom R6 R6Class #' @importFrom shinyWidgets updateCheckboxGroupButtons NULL # ------- Re-export #' @export raveio::LazyFST #' @export raveio::...
/R/aaa.R
no_license
beauchamplab/rave
R
false
false
15,638
r
#' @import shiny #' @import raveio #' @import dipsaus #' @importFrom ravedash shiny_icons #' @importFrom graphics axis par points rect #' @importFrom utils read.csv #' @importFrom R6 R6Class #' @importFrom shinyWidgets updateCheckboxGroupButtons NULL # ------- Re-export #' @export raveio::LazyFST #' @export raveio::...
PercentDifferenceFunction <- function(raster){ # Grided GridedRaster<- as(raster,"SpatialPixelsDataFrame") #Raster Resolution Res_2D<-prod(res(raster)) SurfaceArea_Raster <- surfaceArea(GridedRaster,byCell=T) %>% raster(layer=1,values =T) # Percent Difference PercentDifference_Raster_UTM <-...
/2.Scripts/2.Functions/PercentDifferenceFunction.R
no_license
WaldemarOrtizCalo/SpatialDimensionality
R
false
false
1,049
r
PercentDifferenceFunction <- function(raster){ # Grided GridedRaster<- as(raster,"SpatialPixelsDataFrame") #Raster Resolution Res_2D<-prod(res(raster)) SurfaceArea_Raster <- surfaceArea(GridedRaster,byCell=T) %>% raster(layer=1,values =T) # Percent Difference PercentDifference_Raster_UTM <-...
library(tm) library(wordcloud) library(SnowballC) library(RColorBrewer) # first converted pdf to text using pdftotext in cmd wordsOld <-scan("911Report.txt", what = "character") wordsOld <-Corpus(VectorSource(wordsOld)) wordsOld <- tm_map(wordsOld, PlainTextDocument) wordsOld <- tm_map(wordsOld, removeNumbers) wor...
/911_wc.R
no_license
patrick-rogan/911_COMMISSION_REPORT_WC
R
false
false
821
r
library(tm) library(wordcloud) library(SnowballC) library(RColorBrewer) # first converted pdf to text using pdftotext in cmd wordsOld <-scan("911Report.txt", what = "character") wordsOld <-Corpus(VectorSource(wordsOld)) wordsOld <- tm_map(wordsOld, PlainTextDocument) wordsOld <- tm_map(wordsOld, removeNumbers) wor...
# Helper function callJS <- function() { message <- Filter(function(x) !is.symbol(x), as.list(parent.frame(1))) session <- shiny::getDefaultReactiveDomain() method <- paste0("tableau:", message$method) session$sendCustomMessage(method, message) return(message$id) } #' Apply a categorical filter to a Tableau ...
/R/api.R
permissive
jasonpcasey/shinytableau
R
false
false
6,947
r
# Helper function callJS <- function() { message <- Filter(function(x) !is.symbol(x), as.list(parent.frame(1))) session <- shiny::getDefaultReactiveDomain() method <- paste0("tableau:", message$method) session$sendCustomMessage(method, message) return(message$id) } #' Apply a categorical filter to a Tableau ...
library(Sleuth3) ### Name: ex1111 ### Title: Chernobyl Fallout ### Aliases: ex1111 ### Keywords: datasets ### ** Examples str(ex1111)
/data/genthat_extracted_code/Sleuth3/examples/ex1111.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
141
r
library(Sleuth3) ### Name: ex1111 ### Title: Chernobyl Fallout ### Aliases: ex1111 ### Keywords: datasets ### ** Examples str(ex1111)
\name{predict.rbfcl} \alias{predict.rbfcl} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Predict } \description{ It predicts the optimal treatments with model of class \code{'rbfcl'}, which is estimated by \code{\link{wsvm}} with \code{'rbf'} kernel. } \usage{ %## S3 method for class 'rbfcl' \...
/man/predict.rbfcl.Rd
no_license
cran/DTRlearn
R
false
false
1,343
rd
\name{predict.rbfcl} \alias{predict.rbfcl} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Predict } \description{ It predicts the optimal treatments with model of class \code{'rbfcl'}, which is estimated by \code{\link{wsvm}} with \code{'rbf'} kernel. } \usage{ %## S3 method for class 'rbfcl' \...
library(testthat) library(sfmisc) test_check("sfmisc")
/tests/testthat.R
permissive
s-fleck/sfmisc
R
false
false
56
r
library(testthat) library(sfmisc) test_check("sfmisc")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataCheck.R \name{dataCheck} \alias{dataCheck} \title{dataCheck Discharge timeseries screening} \usage{ dataCheck(x, yearType) } \arguments{ \item{x}{A dataframe containing a vector of date values in the first column and vector of numeric flo...
/man/dataCheck.Rd
permissive
doug-friedman/EflowStats
R
false
true
750
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataCheck.R \name{dataCheck} \alias{dataCheck} \title{dataCheck Discharge timeseries screening} \usage{ dataCheck(x, yearType) } \arguments{ \item{x}{A dataframe containing a vector of date values in the first column and vector of numeric flo...
#functions #seasonality; getLambda <- function(t, lambda, season=FALSE){ #The seasonality was set to follow a sin curve, and September is the peak. if (all(t>=0) & season==TRUE){ lam <- ((-sin(t*pi*2/365)+1)/2)*lambda return(lam) } else if (season==FALSE){ return(lambda) } else {print("ERROR: The day...
/v4/v4.func.R
no_license
YWAN446/Adaptive-Sampling-Site-Allocation
R
false
false
5,528
r
#functions #seasonality; getLambda <- function(t, lambda, season=FALSE){ #The seasonality was set to follow a sin curve, and September is the peak. if (all(t>=0) & season==TRUE){ lam <- ((-sin(t*pi*2/365)+1)/2)*lambda return(lam) } else if (season==FALSE){ return(lambda) } else {print("ERROR: The day...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rain_exposure.R \name{county_rain} \alias{county_rain} \title{Hurricane exposure by rain for counties} \usage{ county_rain(counties, start_year, end_year, rain_limit, dist_limit, days_included = c(-2, -1, 0, 1)) } \arguments{ \item{counties...
/man/county_rain.Rd
no_license
mcmccue1/hurricaneexposure
R
false
true
4,598
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rain_exposure.R \name{county_rain} \alias{county_rain} \title{Hurricane exposure by rain for counties} \usage{ county_rain(counties, start_year, end_year, rain_limit, dist_limit, days_included = c(-2, -1, 0, 1)) } \arguments{ \item{counties...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- functi...
/cachematrix.R
no_license
HersheyCastro/ProgrammingAssignment2
R
false
false
938
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- functi...
# This code makes plot1 required for the assignement of week 1 # The zipped file is suposed to be in the working directory #Initialization of the name of the files zipped_hpc_file <- "exdata_data_household_power_consumption.zip" hpc_file <- "household_power_consumption.txt" #Unzip the zip file if the unzipped one is ...
/plot1.R
no_license
epomarico/Exploratory_Data_Analysis_Assignment_Week1
R
false
false
948
r
# This code makes plot1 required for the assignement of week 1 # The zipped file is suposed to be in the working directory #Initialization of the name of the files zipped_hpc_file <- "exdata_data_household_power_consumption.zip" hpc_file <- "household_power_consumption.txt" #Unzip the zip file if the unzipped one is ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/geomorph.support.code.r \name{define.sliders.2d} \alias{define.sliders.2d} \title{Defunct functions in geomorph} \usage{ define.sliders.2d() } \description{ The following functions are no longer supported in geomorph } \details{ defin...
/man/define.sliders.2d.Rd
no_license
rgriff23/geomorph
R
false
false
356
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/geomorph.support.code.r \name{define.sliders.2d} \alias{define.sliders.2d} \title{Defunct functions in geomorph} \usage{ define.sliders.2d() } \description{ The following functions are no longer supported in geomorph } \details{ defin...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.mhmm.R \name{plot.mhmm} \alias{plot.mhmm} \title{Interactive Plotting for Mixed Hidden Markov Model (mhmm)} \usage{ \method{plot}{mhmm}(x, interactive = TRUE, ask = FALSE, which.plots = NULL, nrow = NA, ncol = NA, byrow = FALSE, row....
/man/plot.mhmm.Rd
no_license
domjrivera/seqHMM
R
false
true
9,304
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.mhmm.R \name{plot.mhmm} \alias{plot.mhmm} \title{Interactive Plotting for Mixed Hidden Markov Model (mhmm)} \usage{ \method{plot}{mhmm}(x, interactive = TRUE, ask = FALSE, which.plots = NULL, nrow = NA, ncol = NA, byrow = FALSE, row....
# **************************************************** # ==== U.S. Chronic Disease Indicators (CDI) data ==== # **************************************************** # ==== MAKE SURE TO EDIT CODE BASED ON DATA FILES USED ==== # - Need to save files of datasets to the Prop 23 Github Repo (depending on your data extracti...
/CDI.R
no_license
jessicalumian/prop23-code
R
false
false
11,263
r
# **************************************************** # ==== U.S. Chronic Disease Indicators (CDI) data ==== # **************************************************** # ==== MAKE SURE TO EDIT CODE BASED ON DATA FILES USED ==== # - Need to save files of datasets to the Prop 23 Github Repo (depending on your data extracti...
############################################################ #Create Plot 3 - Tri-color Sub_metering #Create data file: require(sqldf) mydata <- read.csv.sql(file='household_power_consumption.txt', sep=";", sql="select * from file where Date in ('1/2/2007','2/2/2007')", h...
/Plot3.R
no_license
Hibilis/ExData_Plotting1
R
false
false
912
r
############################################################ #Create Plot 3 - Tri-color Sub_metering #Create data file: require(sqldf) mydata <- read.csv.sql(file='household_power_consumption.txt', sep=";", sql="select * from file where Date in ('1/2/2007','2/2/2007')", h...
## download the file fileurl = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" filename = "household_power_consumption.txt" if (!file.exists(filename)) { temp <- tempfile() download.file(fileurl, temp) unzip (temp, filename) unlink(temp) r...
/Plot 1.R
no_license
thomasyeung84/ExData_Plotting1
R
false
false
1,204
r
## download the file fileurl = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" filename = "household_power_consumption.txt" if (!file.exists(filename)) { temp <- tempfile() download.file(fileurl, temp) unzip (temp, filename) unlink(temp) r...
omcdiag<-function(mod, na.rm = TRUE, Inter = TRUE, detr = 0.01, red = 0.5, conf = 0.95, theil = 0.5,cn = 30,...){ cl<-match.call() if (!is.null(mod$call$formula) ){ x <- as.matrix(model.frame(mod)[,-1]) # Regressors only y <- as.matrix(model.frame(mod)[,1]) # dependent variablevari...
/R/omcdiag.R
no_license
eejd/mctest
R
false
false
4,256
r
omcdiag<-function(mod, na.rm = TRUE, Inter = TRUE, detr = 0.01, red = 0.5, conf = 0.95, theil = 0.5,cn = 30,...){ cl<-match.call() if (!is.null(mod$call$formula) ){ x <- as.matrix(model.frame(mod)[,-1]) # Regressors only y <- as.matrix(model.frame(mod)[,1]) # dependent variablevari...
M = matrix( + c(11.5,26.5,12.5,.5,1.5,85,87,86,52,58), nrow=5, ncol=2) M cor(M) fit <- lm(M[,2]~log(M[,1])+log(M[,1]*M[,1])) summary(fit) coef(fit) plot(log(M[,1]),M[,2]) abline(fit) x=M[,1] y=predict(fit,newdata=list(x=M[,1]),interval="confidence") matlines(x,y,lwd=2)
/old_files/others/Untitled2.R
no_license
mthuillier/ELOR
R
false
false
278
r
M = matrix( + c(11.5,26.5,12.5,.5,1.5,85,87,86,52,58), nrow=5, ncol=2) M cor(M) fit <- lm(M[,2]~log(M[,1])+log(M[,1]*M[,1])) summary(fit) coef(fit) plot(log(M[,1]),M[,2]) abline(fit) x=M[,1] y=predict(fit,newdata=list(x=M[,1]),interval="confidence") matlines(x,y,lwd=2)
## Caching the Inverse of a Matrix ## makeCacheMatrix: This function creates a special "matrix" object makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y){ x<<- y m<<- NULL } get <- function() x setinv<- function(inverse) m <<- inverse getinv<- function() m list(s...
/cachematrix.R
no_license
hidhiru/ProgrammingAssignment2
R
false
false
710
r
## Caching the Inverse of a Matrix ## makeCacheMatrix: This function creates a special "matrix" object makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y){ x<<- y m<<- NULL } get <- function() x setinv<- function(inverse) m <<- inverse getinv<- function() m list(s...
# 4. Across the United States, how have emissions from coal # combustion-related sources changed from 1999–2008? ## This first line will likely take a few seconds. Be patient! NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") # change year into factor level NEI$year <- factor(NE...
/Exploratory Data Analysis/project 2/plot4.R
no_license
judauash4/datascience
R
false
false
1,070
r
# 4. Across the United States, how have emissions from coal # combustion-related sources changed from 1999–2008? ## This first line will likely take a few seconds. Be patient! NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") # change year into factor level NEI$year <- factor(NE...
testlist <- list(x = NaN, y = c(NaN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) result <- do.call...
/blorr/inst/testfiles/blr_pairs_cpp/libFuzzer_blr_pairs_cpp/blr_pairs_cpp_valgrind_files/1609956336-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
364
r
testlist <- list(x = NaN, y = c(NaN, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) result <- do.call...
# TODO: Add comment # # Author: Ruth ############################################################################### library(ICC) library(lme4) #### Is personality consistant over time? Intra class correlation #Use weights table! Boldness<-na.omit(subset(Weights, select = c("SpiderID", "BoldnessRank.1", ...
/EcuRCode/BoxTrials/BoxTrialStats/Stats_Personality.R
no_license
ruthubc/ruthubc
R
false
false
3,112
r
# TODO: Add comment # # Author: Ruth ############################################################################### library(ICC) library(lme4) #### Is personality consistant over time? Intra class correlation #Use weights table! Boldness<-na.omit(subset(Weights, select = c("SpiderID", "BoldnessRank.1", ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rl_sp_citation.R \name{rl_sp_citation} \alias{rl_sp_citation} \alias{rl_sp_citation_} \title{Get citations by taxon name, IUCN id, and region} \usage{ rl_sp_citation(name = NULL, id = NULL, region = NULL, key = NULL, parse = TRUE, ...) rl_...
/man/rl_sp_citation.Rd
permissive
jlehtoma/rredlist
R
false
true
1,349
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rl_sp_citation.R \name{rl_sp_citation} \alias{rl_sp_citation} \alias{rl_sp_citation_} \title{Get citations by taxon name, IUCN id, and region} \usage{ rl_sp_citation(name = NULL, id = NULL, region = NULL, key = NULL, parse = TRUE, ...) rl_...
library(XML) d<- xmlRoot(xmlTreeParse("//Vkovnascti003/ccus/BA/igor_processing/STD_COMMISSIONS_NEW/data/LOG.XML")) > d[[1]][[1]] <REPA>01PD_IMPORT</REPA> > xmlName(d[[1]][[1]]) [1] "REPA" > xmlValue(d[[1]][[1]]) [1] "01PD_IMPORT" d$children[[1]] - first set of rows > d$children[[4]][[1]] = 4 set, f...
/XML.R
no_license
savraska/Kata
R
false
false
729
r
library(XML) d<- xmlRoot(xmlTreeParse("//Vkovnascti003/ccus/BA/igor_processing/STD_COMMISSIONS_NEW/data/LOG.XML")) > d[[1]][[1]] <REPA>01PD_IMPORT</REPA> > xmlName(d[[1]][[1]]) [1] "REPA" > xmlValue(d[[1]][[1]]) [1] "01PD_IMPORT" d$children[[1]] - first set of rows > d$children[[4]][[1]] = 4 set, f...
#find and rename html files without a file ending #library('readtext') library('tools') library('tibble') library('stringr') library('dplyr') library('pbapply') state <- "LA" #IN or LA filepath <- str_c("./websites/scraping/", state, "/websites") ## Reading in the data f <- list.files(path = filepath, recursive = T...
/renameHTMLs.R
no_license
desmarais-lab/govWebsites
R
false
false
1,389
r
#find and rename html files without a file ending #library('readtext') library('tools') library('tibble') library('stringr') library('dplyr') library('pbapply') state <- "LA" #IN or LA filepath <- str_c("./websites/scraping/", state, "/websites") ## Reading in the data f <- list.files(path = filepath, recursive = T...
#' @keywords internal #' plot_drifts.sigcolor <- function(significance) { if (is.null(significance) || is.na(significance)) return('springgreen') if (significance < 1/1000) return('red') if (significance < 1/100) return('orange') 'springgreen' } #' @keywords internal #' plot_drifts.samplingrate <- function(ti...
/gwloggeR/R/plot_drifts.R
permissive
agnes-riviere/groundwater-logger-validation
R
false
false
9,028
r
#' @keywords internal #' plot_drifts.sigcolor <- function(significance) { if (is.null(significance) || is.na(significance)) return('springgreen') if (significance < 1/1000) return('red') if (significance < 1/100) return('orange') 'springgreen' } #' @keywords internal #' plot_drifts.samplingrate <- function(ti...
#' @title LIFT Chart #' #' @description LIFT is a plot of the rate of positive prediction against true positive rate for the different thresholds. #' It is useful for measuring and comparing the accuracy of the classificators. #' #' @param object An object of class \code{auditor_model_evaluation} created with \code{\li...
/R/plot_lift.R
no_license
minghao2016/auditor
R
false
false
4,442
r
#' @title LIFT Chart #' #' @description LIFT is a plot of the rate of positive prediction against true positive rate for the different thresholds. #' It is useful for measuring and comparing the accuracy of the classificators. #' #' @param object An object of class \code{auditor_model_evaluation} created with \code{\li...
#' Digested is #' #' Tidy evaluation uses a special parameter assignment operator, \code{:=}. See #' \code{\link[rlang]{quasiquotation}} for more information. #' #' @importFrom rlang := #' @name := #' @rdname digested_is #' @keywords internal #' @param lhs An expression that evaluates to a character or a symbo...
/R/utils-tidy-eval.R
no_license
laudehenri/factory
R
false
false
423
r
#' Digested is #' #' Tidy evaluation uses a special parameter assignment operator, \code{:=}. See #' \code{\link[rlang]{quasiquotation}} for more information. #' #' @importFrom rlang := #' @name := #' @rdname digested_is #' @keywords internal #' @param lhs An expression that evaluates to a character or a symbo...
## read Electric power dataset data <- read.table("household_power_consumption.txt", sep=";", as.is=TRUE, header=TRUE) ## Select Required Data by dates selectdate <- subset(data, data$Date == "1/2/2007" | data$Date == "2/2/2007") ## Create required plot data vectors gap<-as.numeric(selectdata$Global_active_power) dat...
/plot4.R
no_license
vyasdev/ExData_Plotting1
R
false
false
1,341
r
## read Electric power dataset data <- read.table("household_power_consumption.txt", sep=";", as.is=TRUE, header=TRUE) ## Select Required Data by dates selectdate <- subset(data, data$Date == "1/2/2007" | data$Date == "2/2/2007") ## Create required plot data vectors gap<-as.numeric(selectdata$Global_active_power) dat...
# Obtianing Knowledge from a Random Forest # Conor O'Sullivan # 30 October 2020 # Importing the dataset setwd("~/Documents/git/medium-articles/data") dataset = read.csv('interaction_dataset.csv') # Create dummy variables dataset$degree = factor(dataset$degree, levels = c(0, 1)) # Splitting the dataset library(caTo...
/src/archive/rf_interactions_archive.R
permissive
KatlegoLionel/medium-articles
R
false
false
6,079
r
# Obtianing Knowledge from a Random Forest # Conor O'Sullivan # 30 October 2020 # Importing the dataset setwd("~/Documents/git/medium-articles/data") dataset = read.csv('interaction_dataset.csv') # Create dummy variables dataset$degree = factor(dataset$degree, levels = c(0, 1)) # Splitting the dataset library(caTo...
#How have emissions from motor vehicle sources changed from 1999–2008 in Baltimore City mrg_bal_onroad <- subset(mrg, fips == "24510" & type == "ON-ROAD") mrg_bal_onroad_sum <- with(mrg_bal_onroad, aggregate(Emissions, list(type = type, year = year),sum)) colnames(mrg_bal_onroad_sum)[3] <- 'Emissions' mrg_bal_onroad_su...
/plot5.R
no_license
kiet1451/Exploratory-Data-Analysis-Assignment
R
false
false
607
r
#How have emissions from motor vehicle sources changed from 1999–2008 in Baltimore City mrg_bal_onroad <- subset(mrg, fips == "24510" & type == "ON-ROAD") mrg_bal_onroad_sum <- with(mrg_bal_onroad, aggregate(Emissions, list(type = type, year = year),sum)) colnames(mrg_bal_onroad_sum)[3] <- 'Emissions' mrg_bal_onroad_su...
# This function intializes the matrix makeCacheMatrix <- function(x = numeric()) { i <- NULL # Values assignment to matrix set <- function(y) { x <<- y i <<- NULL } # This function returns matrix get <- function() x ...
/cacheInverse.R
no_license
Syeda-Fizzah-Hashmi/Assignment
R
false
false
1,084
r
# This function intializes the matrix makeCacheMatrix <- function(x = numeric()) { i <- NULL # Values assignment to matrix set <- function(y) { x <<- y i <<- NULL } # This function returns matrix get <- function() x ...
# --- Shrinkage estimators # -- "::" - lets you access functions in a package that haven't been loaded' # --- Jitter binaries using # geom_jitter(position = position_jitter(height=0.2)) # pull all columns except one with "name" # wineTrain <- wine[, which(names(wine) != "Culbivar")] # "www.jaredlander.com/data/ide...
/nls.R
no_license
tessam30/RProgramming
R
false
false
2,941
r
# --- Shrinkage estimators # -- "::" - lets you access functions in a package that haven't been loaded' # --- Jitter binaries using # geom_jitter(position = position_jitter(height=0.2)) # pull all columns except one with "name" # wineTrain <- wine[, which(names(wine) != "Culbivar")] # "www.jaredlander.com/data/ide...
library("knitr") library("rgl") #knit("trifloxystrobin.Rmd") #markdownToHTML('trifloxystrobin.md', 'trifloxystrobin.html', options=c("use_xhml")) #system("pandoc -s trifloxystrobin.html -o trifloxystrobin.pdf") knit2html('trifloxystrobin.Rmd')
/FDA_Pesticide_Glossary/trifloxystrobin.R
permissive
andrewdefries/andrewdefries.github.io
R
false
false
246
r
library("knitr") library("rgl") #knit("trifloxystrobin.Rmd") #markdownToHTML('trifloxystrobin.md', 'trifloxystrobin.html', options=c("use_xhml")) #system("pandoc -s trifloxystrobin.html -o trifloxystrobin.pdf") knit2html('trifloxystrobin.Rmd')
' get_purdom_timing_input.R - Creates event timing input data for Purdom method In order to use this code, the following R packages must be installed: docopt, dplyr, readr, tidyr, doParallel, devtools, stringr, cancerTiming, ggplot2 Also, the following must be installed from Bioconductor: VariantAnnotation, G...
/msig-timing/get_purdom_timing_input.R
no_license
eyzhao/bio-pipelines
R
false
false
9,785
r
' get_purdom_timing_input.R - Creates event timing input data for Purdom method In order to use this code, the following R packages must be installed: docopt, dplyr, readr, tidyr, doParallel, devtools, stringr, cancerTiming, ggplot2 Also, the following must be installed from Bioconductor: VariantAnnotation, G...
summarizer <- function(sampling_protocols, data, input, truth) { map(sampling_protocols,.f=function(sampling_protocol){ map(sampling_protocol, .f=function(sampling_times){ results = data %>% plyr::ddply( .variables = 'subjid', .fun = abp_sampler, times = ...
/Code/abp_sampling_functions/summarizer.R
no_license
FreedomSoldier-Liam/Number-and-timing-of-BP-measurements
R
false
false
5,533
r
summarizer <- function(sampling_protocols, data, input, truth) { map(sampling_protocols,.f=function(sampling_protocol){ map(sampling_protocol, .f=function(sampling_times){ results = data %>% plyr::ddply( .variables = 'subjid', .fun = abp_sampler, times = ...
#' Weather data for Seoul #' #' The forecast for the next day and current day weather conditions in and near Seoul from 2013-06-30 to 2017-08-30. #' #' From the source: "This data is for the purpose of bias correction of next-day maximum and minimum air temperatures forecast of the LDAPS model operated by the Korea Met...
/R/seoulweather.R
no_license
TKosfeld/fosdata
R
false
false
3,481
r
#' Weather data for Seoul #' #' The forecast for the next day and current day weather conditions in and near Seoul from 2013-06-30 to 2017-08-30. #' #' From the source: "This data is for the purpose of bias correction of next-day maximum and minimum air temperatures forecast of the LDAPS model operated by the Korea Met...
library(SPSL) ### Name: ssa20 ### Title: Site cluster on Square Anisotropic 2D lattice with ### (1,0)-neighborhood ### Aliases: ssa20 ### ** Examples set.seed(20120507) x <- y <- seq(33) image(x, y, ssa20(), zlim=c(0,2), main="Anisotropic 2D cluster with (1,0)-neighborhood") abline(h=17, lty=2); abline(v=17, lty...
/data/genthat_extracted_code/SPSL/examples/ssa20.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
327
r
library(SPSL) ### Name: ssa20 ### Title: Site cluster on Square Anisotropic 2D lattice with ### (1,0)-neighborhood ### Aliases: ssa20 ### ** Examples set.seed(20120507) x <- y <- seq(33) image(x, y, ssa20(), zlim=c(0,2), main="Anisotropic 2D cluster with (1,0)-neighborhood") abline(h=17, lty=2); abline(v=17, lty...
# RESET WD EACH TIME TO SUIT!!!! setwd("/cap1/kgilbert/DFE_alpha/Outputs") #setwd("/cap1/kgilbert/DFE_alpha/Oct11_2epoch_DFE_Results_rescaleUandS_N1000") # setwd("~/Documents/My_Documents/UofToronto/SLiM/Running_SLiM/Sep28_NewRuns_LargerGenome_compareBens/Outputs_Sep29/test") # list only the directories then go...
/DFE_analysisCode/Compile_DFE_Outputs_2epochs.R
no_license
kjgilbert/SlimSimCode
R
false
false
1,486
r
# RESET WD EACH TIME TO SUIT!!!! setwd("/cap1/kgilbert/DFE_alpha/Outputs") #setwd("/cap1/kgilbert/DFE_alpha/Oct11_2epoch_DFE_Results_rescaleUandS_N1000") # setwd("~/Documents/My_Documents/UofToronto/SLiM/Running_SLiM/Sep28_NewRuns_LargerGenome_compareBens/Outputs_Sep29/test") # list only the directories then go...
setwd('/Users/Runze/Github/artsy') library(rjson) library(plyr) library(ggplot2) library(scales) library(maps) library(mapdata) library(RDSTK) library(httr) library(rgdal) library(maptools) gpclibPermit() load(file = 'data/followers.RData') #get country names from location location = followers$location[followers$loca...
/2. geo.R
no_license
Runze/artsy
R
false
false
3,277
r
setwd('/Users/Runze/Github/artsy') library(rjson) library(plyr) library(ggplot2) library(scales) library(maps) library(mapdata) library(RDSTK) library(httr) library(rgdal) library(maptools) gpclibPermit() load(file = 'data/followers.RData') #get country names from location location = followers$location[followers$loca...
library(h2o) library(data.table) library(Metrics) options(warn = -1) ###### Read Data Path ###### args = commandArgs(trailingOnly = TRUE) if(length(args)<1){ stop("Please provide path of submission_test.csv") } path = paste(dirname(file.path(args[1])), "/", sep = "") ###### Random Forest ###### ###...
/Project/MLProject_Submission.R
no_license
leoyuchuan/MachineLearning
R
false
false
4,482
r
library(h2o) library(data.table) library(Metrics) options(warn = -1) ###### Read Data Path ###### args = commandArgs(trailingOnly = TRUE) if(length(args)<1){ stop("Please provide path of submission_test.csv") } path = paste(dirname(file.path(args[1])), "/", sep = "") ###### Random Forest ###### ###...
library('shiny') grad_col<-readRDS("grad_col.rds") grad_states<-readRDS("grad_states.rds") # Define UI for dataset viewer application shinyUI( fluidPage( # Application title titlePanel("Graduation Data"), # Sidebar with controls to select a dataset and specify the sidebarLayout( sidebarPanel("Pane...
/ui.R
no_license
claireli/data_diploma
R
false
false
1,813
r
library('shiny') grad_col<-readRDS("grad_col.rds") grad_states<-readRDS("grad_states.rds") # Define UI for dataset viewer application shinyUI( fluidPage( # Application title titlePanel("Graduation Data"), # Sidebar with controls to select a dataset and specify the sidebarLayout( sidebarPanel("Pane...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/aop-data.R \name{create_extent_subset} \alias{create_extent_subset} \title{Get subset index x,y min/max dimensions} \usage{ create_extent_subset(h5.extent, dims, res = c(1, 1)) } \arguments{ \item{dims}{- the x/y min and max INDEX values used...
/neonAOP/man/create_extent_subset.Rd
no_license
han-tun/neon-aop-package
R
false
true
820
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/aop-data.R \name{create_extent_subset} \alias{create_extent_subset} \title{Get subset index x,y min/max dimensions} \usage{ create_extent_subset(h5.extent, dims, res = c(1, 1)) } \arguments{ \item{dims}{- the x/y min and max INDEX values used...
HestonCallMonteCarlo <- function(lambda, vbar, eta, rho, v0, r, tau, S0, K, nSteps=250, nPaths=10000) {{ n <- nSteps N <- nPaths dt <- tau / n S <- rep(S0,N) v <- rep(v0,N) V <- c() AV <- c() AVdev <- c() for (i in 1:n) { W1 <- rnorm(N); W2 <- rno...
/hes.R
no_license
NancyGahlot/FM408
R
false
false
2,998
r
HestonCallMonteCarlo <- function(lambda, vbar, eta, rho, v0, r, tau, S0, K, nSteps=250, nPaths=10000) {{ n <- nSteps N <- nPaths dt <- tau / n S <- rep(S0,N) v <- rep(v0,N) V <- c() AV <- c() AVdev <- c() for (i in 1:n) { W1 <- rnorm(N); W2 <- rno...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mlp_teach.R \name{mlp_teach_bp} \alias{mlp_teach_bp} \title{Backpropagation (batch) teaching} \usage{ mlp_teach_bp(net, input, output, tol_level, max_epochs, learn_rate = 0.7, l2reg = 0, report_freq = 0) } \arguments{ \item{net}{an object o...
/man/mlp_teach_bp.Rd
no_license
cran/FCNN4R
R
false
true
2,614
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mlp_teach.R \name{mlp_teach_bp} \alias{mlp_teach_bp} \title{Backpropagation (batch) teaching} \usage{ mlp_teach_bp(net, input, output, tol_level, max_epochs, learn_rate = 0.7, l2reg = 0, report_freq = 0) } \arguments{ \item{net}{an object o...
library(tidyverse) load("~/R/my_blog/_draft/pop_data.RData") pop_data <- pop_data %>% mutate_at(vars(realtime_start, realtime_end, date), as.Date) %>% mutate_at(vars(value), as.integer) pop_match_tbl <- pop_meta %>% select(id, title) %>% mutate(title = str_replace(title, "^Population, Total for ", "")) pop...
/_draft/02_tidy_national-population.R
no_license
seasmith/my_blog
R
false
false
502
r
library(tidyverse) load("~/R/my_blog/_draft/pop_data.RData") pop_data <- pop_data %>% mutate_at(vars(realtime_start, realtime_end, date), as.Date) %>% mutate_at(vars(value), as.integer) pop_match_tbl <- pop_meta %>% select(id, title) %>% mutate(title = str_replace(title, "^Population, Total for ", "")) pop...
install.packages("C50") install.packages("tree") install.packages("caret") install.packages("gmodels") install.packages("party") install.packages("knitr") install.packages("png") install.packages("boot") install.packages ("e1071", dependencies = TRUE) library(e1071) library(C50) library(tree) library(caret)...
/Random Forest/fraud check.R
no_license
seelamsettisahithi/assignments
R
false
false
2,532
r
install.packages("C50") install.packages("tree") install.packages("caret") install.packages("gmodels") install.packages("party") install.packages("knitr") install.packages("png") install.packages("boot") install.packages ("e1071", dependencies = TRUE) library(e1071) library(C50) library(tree) library(caret)...
plot2=function(){ setwd("C:/Users/David/Dropbox/Coursea/Exploratory Data Analysis") #read data set as data table, sep by ;, missing values are coded as ?, header is included DT=fread("household_power_consumption.txt",sep=";",header=T, na.strings="?") DT=DT[DT$Date=="1/2/2007"|DT$Date=="2/2/2007",] ...
/plot2.R
no_license
dchow2201/ExData_Plotting1
R
false
false
696
r
plot2=function(){ setwd("C:/Users/David/Dropbox/Coursea/Exploratory Data Analysis") #read data set as data table, sep by ;, missing values are coded as ?, header is included DT=fread("household_power_consumption.txt",sep=";",header=T, na.strings="?") DT=DT[DT$Date=="1/2/2007"|DT$Date=="2/2/2007",] ...
#--------------------------------------------------------------------------------------------------# #------------------------OBTAIN INFORMATION FROM EXTERNAL DATASETS PRIOR TO SIMULATION RUNS TO CREATE THEM if (exinfo$use_sim_spatial) { # extraction functions if (sim_cells_or_points == "point") { #' extract raste...
/R/2_SWSF_p3of5_ExternalDataExtractions_v51.R
no_license
haiyangzhang798/SoilWat_R_Wrapper
R
false
false
198,472
r
#--------------------------------------------------------------------------------------------------# #------------------------OBTAIN INFORMATION FROM EXTERNAL DATASETS PRIOR TO SIMULATION RUNS TO CREATE THEM if (exinfo$use_sim_spatial) { # extraction functions if (sim_cells_or_points == "point") { #' extract raste...
library(tidyverse) library(janitor) "abc.csv" %>% read.csv() %>% filter(Sector == "FOOD PROCESSING INDUSTRIES") %>% pivot_longer(cols = c(-1), names_to = "year", values_to = "values") %>% separate(year, into=c("metric","date"), sep = 1) -> food_processing_raw_data gsub("[.]", "-", food_processi...
/Ashlesh/line_chart.R
no_license
tusharchaudhari30/FDI_investment
R
false
false
1,251
r
library(tidyverse) library(janitor) "abc.csv" %>% read.csv() %>% filter(Sector == "FOOD PROCESSING INDUSTRIES") %>% pivot_longer(cols = c(-1), names_to = "year", values_to = "values") %>% separate(year, into=c("metric","date"), sep = 1) -> food_processing_raw_data gsub("[.]", "-", food_processi...
context("is_distinct_from") test_that("is_distinct_from", { expect_true(is_distinct_from(1, 2)) expect_false(is_not_distinct_from(1, 2)) expect_true(is_distinct_from(1, NA)) expect_false(is_not_distinct_from(1, NA)) expect_false(is_distinct_from(NA, NA)) expect_true(is_not_distinct_from(NA, NA)) })
/tests/testthat/test_is_distinct_from.R
permissive
s-fleck/sfmisc
R
false
false
317
r
context("is_distinct_from") test_that("is_distinct_from", { expect_true(is_distinct_from(1, 2)) expect_false(is_not_distinct_from(1, 2)) expect_true(is_distinct_from(1, NA)) expect_false(is_not_distinct_from(1, NA)) expect_false(is_distinct_from(NA, NA)) expect_true(is_not_distinct_from(NA, NA)) })
#Generative models - exercises #data set of cerebellum and hippocampus, with 10 randomly selected predictors set.seed(1993) data("tissue_gene_expression") ind <- which(tissue_gene_expression$y %in% c("cerebellum", "hippocampus")) y <- droplevels(tissue_gene_expression$y[ind]) x <- tissue_gene_expression$x[ind, ] x <- x...
/Gen Models Exercises.R
no_license
dedelman04/TrainingRScripts
R
false
false
4,153
r
#Generative models - exercises #data set of cerebellum and hippocampus, with 10 randomly selected predictors set.seed(1993) data("tissue_gene_expression") ind <- which(tissue_gene_expression$y %in% c("cerebellum", "hippocampus")) y <- droplevels(tissue_gene_expression$y[ind]) x <- tissue_gene_expression$x[ind, ] x <- x...
bw <- ceiling(max(ledger_data$amount) - min(ledger_data$amount)) / (sqrt(length(ledger_data$amount))+1) p <- qplot(amount, data = ledger_data, geom = "histogram", binwidth = bw, position="identity", facets = . ~ year, xlab = commodity, ylab = "Number of days") suppressMessages(ggsave(file="histo...
/Support/lib/r/histogram-amount-facet-year.r
permissive
lifepillar/Ledger.tmbundle
R
false
false
385
r
bw <- ceiling(max(ledger_data$amount) - min(ledger_data$amount)) / (sqrt(length(ledger_data$amount))+1) p <- qplot(amount, data = ledger_data, geom = "histogram", binwidth = bw, position="identity", facets = . ~ year, xlab = commodity, ylab = "Number of days") suppressMessages(ggsave(file="histo...
library(shiny) setwd("C:/Users/weloveton/Documents/the-fried-eggs-master") runApp(host="0.0.0.0", port=5050)
/runapp.r
no_license
kilofarad/the-fried-eggs
R
false
false
110
r
library(shiny) setwd("C:/Users/weloveton/Documents/the-fried-eggs-master") runApp(host="0.0.0.0", port=5050)
#ex 1 library(mice) data(mammalsleep) ?mammalsleep #Species = nominal, body weight = continuous, brain weight = continuous #Slow wave = continous, paradox = continuous, total sleep = continous #max lifespan = continous, gestation time = continuous #preditation index = ordinal, sleep exposure index = ordinal #overall ...
/prac3.R
no_license
foreverloop/miss_dat
R
false
false
2,512
r
#ex 1 library(mice) data(mammalsleep) ?mammalsleep #Species = nominal, body weight = continuous, brain weight = continuous #Slow wave = continous, paradox = continuous, total sleep = continous #max lifespan = continous, gestation time = continuous #preditation index = ordinal, sleep exposure index = ordinal #overall ...
rm(list=ls()) require(raster) require(maptools) require(plotrix) require(lattice) require(dplyr) setwd('C:/research/projects/above/') #------------------------------------------------------------------------------------------------------------ # LOAD FILES AND SET VARIABLES #-------------------------------------------...
/code/6.1_plot_shrub_biomass_by_height_and_cover.R
no_license
logan-berner/nslope_biomass
R
false
false
6,288
r
rm(list=ls()) require(raster) require(maptools) require(plotrix) require(lattice) require(dplyr) setwd('C:/research/projects/above/') #------------------------------------------------------------------------------------------------------------ # LOAD FILES AND SET VARIABLES #-------------------------------------------...
#' Train a Model #' #' Train a model object. #' #' @param object A trainable \R object. #' @param ... Optional arguments passed on to implementing methods. #' #' @export train <- function(object, ...) { UseMethod("train") } #' Evaluate a Model #' #' Evaluate a model object. #' #' @param object An evaluatable \R ob...
/R/estimator-generics.R
permissive
ruchigarg1110/tensorflow-2
R
false
false
1,230
r
#' Train a Model #' #' Train a model object. #' #' @param object A trainable \R object. #' @param ... Optional arguments passed on to implementing methods. #' #' @export train <- function(object, ...) { UseMethod("train") } #' Evaluate a Model #' #' Evaluate a model object. #' #' @param object An evaluatable \R ob...
\name{aenetgt-package} \alias{aenetgt-package} \alias{aenetgt} \docType{package} \title{ \packageTitle{aenetgt} } \description{ \packageDescription{aenetgt} } \details{ The DESCRIPTION file: \packageDESCRIPTION{aenetgt} \packageIndices{aenetgt} This package contains functions required to compute the adaptive elastic n...
/man/aenetgt-package.Rd
no_license
gregorkb/aenetgt
R
false
false
3,962
rd
\name{aenetgt-package} \alias{aenetgt-package} \alias{aenetgt} \docType{package} \title{ \packageTitle{aenetgt} } \description{ \packageDescription{aenetgt} } \details{ The DESCRIPTION file: \packageDESCRIPTION{aenetgt} \packageIndices{aenetgt} This package contains functions required to compute the adaptive elastic n...
### Parameter Estimation and Inverse Problems, 2nd edition, 2011 ### by R. Aster, B. Borchers, C. Thurber ### Generate the m by n system matrix for the Shaw problem ### ### G = shaw.G(n,m) ### ### ### m and n must be even. ### Reference: C. B. Shaw, Jr., "Improvements of the resolution of ### an instr...
/R/shawG.R
no_license
cran/PEIP
R
false
false
1,006
r
### Parameter Estimation and Inverse Problems, 2nd edition, 2011 ### by R. Aster, B. Borchers, C. Thurber ### Generate the m by n system matrix for the Shaw problem ### ### G = shaw.G(n,m) ### ### ### m and n must be even. ### Reference: C. B. Shaw, Jr., "Improvements of the resolution of ### an instr...
source("NearestNeighbours.R") ################################## # test case 1 ################################## #test data as dataframes labelled_df <- data.frame() labelled_df <- rbind ( c(1,1,1),c(2,2,2), c(3,3,3), c(4,4,4),c(5,5.,5),c(6.,6.2,6) ) labelled_df <- as.data.frame( labelled_df ) colnames(labelled_d...
/ArtificialIntelligence/UsingR/GradedAsignment1/NearestNeighboursTests.R
no_license
xavierbox/MSCAI
R
false
false
2,837
r
source("NearestNeighbours.R") ################################## # test case 1 ################################## #test data as dataframes labelled_df <- data.frame() labelled_df <- rbind ( c(1,1,1),c(2,2,2), c(3,3,3), c(4,4,4),c(5,5.,5),c(6.,6.2,6) ) labelled_df <- as.data.frame( labelled_df ) colnames(labelled_d...
library(spatstat) ### Name: covering ### Title: Cover Region with Discs ### Aliases: covering ### Keywords: spatial math ### ** Examples rr <- 0.5 X <- covering(letterR, rr) plot(grow.rectangle(Frame(X), rr), type="n", main="") plot(X, pch=16, add=TRUE, col="red") plot(letterR, add=TRUE, lwd=3) plot(X %...
/data/genthat_extracted_code/spatstat/examples/covering.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
360
r
library(spatstat) ### Name: covering ### Title: Cover Region with Discs ### Aliases: covering ### Keywords: spatial math ### ** Examples rr <- 0.5 X <- covering(letterR, rr) plot(grow.rectangle(Frame(X), rr), type="n", main="") plot(X, pch=16, add=TRUE, col="red") plot(letterR, add=TRUE, lwd=3) plot(X %...
# -*- tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- # vi: set ts=2 noet: # # (c) Copyright Rosetta Commons Member Institutions. # (c) This file is part of the Rosetta software suite and is made available under license. # (c) The Rosetta software is developed by the contributing memb...
/inst/scripts/analysis/plots/hbonds/geo_dim_1d/chi_chem_type.R
no_license
momeara/RosettaFeatures
R
false
false
6,934
r
# -*- tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*- # vi: set ts=2 noet: # # (c) Copyright Rosetta Commons Member Institutions. # (c) This file is part of the Rosetta software suite and is made available under license. # (c) The Rosetta software is developed by the contributing memb...
# Fifth tab, Global production by species tab gpTab_reac <- reactive({ req(input$btn_group_fbs_tab5, input$btn_year, input$btn_country, input$btn_start_year) sel_country <- country_input[country_input$label == input$btn_country, code] sel_years <- as.character(as.numeric(input$btn_start_year):as.nume...
/tabs/gpTab5.R
no_license
SWS-Methodology/faoswsShinyFisherySUAFBS
R
false
false
7,051
r
# Fifth tab, Global production by species tab gpTab_reac <- reactive({ req(input$btn_group_fbs_tab5, input$btn_year, input$btn_country, input$btn_start_year) sel_country <- country_input[country_input$label == input$btn_country, code] sel_years <- as.character(as.numeric(input$btn_start_year):as.nume...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DiffFiltLoss.R \name{DiffFiltLoss} \alias{DiffFiltLoss} \title{Difference in filtering loss} \usage{ DiffFiltLoss(X, Order_Ind, Plot = TRUE, Taxa_Names = NULL) } \arguments{ \item{X}{OTU table, where taxa are columns and samples are rows of t...
/man/DiffFiltLoss.Rd
no_license
cxquy91/PERFect
R
false
true
1,845
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DiffFiltLoss.R \name{DiffFiltLoss} \alias{DiffFiltLoss} \title{Difference in filtering loss} \usage{ DiffFiltLoss(X, Order_Ind, Plot = TRUE, Taxa_Names = NULL) } \arguments{ \item{X}{OTU table, where taxa are columns and samples are rows of t...
# # This is the user-interface definition of a Shiny web application. You can # run the application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(shinythemes) library(tidyverse) library(rstanarm) library(DT) shiny...
/shiny/ui.R
no_license
monica-chang/Garcia-vs-DHCD
R
false
false
17,265
r
# # This is the user-interface definition of a Shiny web application. You can # run the application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(shinythemes) library(tidyverse) library(rstanarm) library(DT) shiny...
\name{read.prmtop} \alias{read.prmtop} \alias{print.prmtop} \title{ Read AMBER Parameter/Topology files } \description{ Read parameter and topology data from an AMBER PrmTop file. } \usage{ read.prmtop(file) \method{print}{prmtop}(x, printseq=TRUE, \dots) } \arguments{ \item{file}{ a single element character vecto...
/ver_devel/bio3d/man/read.prmtop.Rd
no_license
AlirezaTafazzol/bio3d
R
false
false
2,726
rd
\name{read.prmtop} \alias{read.prmtop} \alias{print.prmtop} \title{ Read AMBER Parameter/Topology files } \description{ Read parameter and topology data from an AMBER PrmTop file. } \usage{ read.prmtop(file) \method{print}{prmtop}(x, printseq=TRUE, \dots) } \arguments{ \item{file}{ a single element character vecto...
#' stream_tweets #' #' @description Returns public statuses via one of three methods #' described below. By design, this function deciphers which #' method to use when processing the \code{stream} argument. #' \itemize{ #' \item 1. Filtering via a search-like query (up to 400 keywords) #' \item 2. Tracking via ...
/R/stream.R
no_license
aqsmith08/rtweet
R
false
false
9,366
r
#' stream_tweets #' #' @description Returns public statuses via one of three methods #' described below. By design, this function deciphers which #' method to use when processing the \code{stream} argument. #' \itemize{ #' \item 1. Filtering via a search-like query (up to 400 keywords) #' \item 2. Tracking via ...
#' #' Liczenie odleglosci dla ocen mezczyzn od 45 lat wzwyz #' #' Funkcja \code{dOcenaMezczyzniPowyzej45} liczy odleglosc miedzy ocenami mezczyzn od 45 lat wzwyz dla #' dwoch filmow z bazy #' #' @param IDFilm1 - id pierwszego filmu #' @param IDFilm2 - id drugiego filmu #' @param sciezkaDoBazy - sciezka do bazy filmow ...
/WyszynskaRudasIMDB/R/dOcenaMezczyzniPowyzej45.R
no_license
Wyszynskak/Projekty
R
false
false
1,630
r
#' #' Liczenie odleglosci dla ocen mezczyzn od 45 lat wzwyz #' #' Funkcja \code{dOcenaMezczyzniPowyzej45} liczy odleglosc miedzy ocenami mezczyzn od 45 lat wzwyz dla #' dwoch filmow z bazy #' #' @param IDFilm1 - id pierwszego filmu #' @param IDFilm2 - id drugiego filmu #' @param sciezkaDoBazy - sciezka do bazy filmow ...
############ # Looks at variation in survey duration at each site across days of season, year, and survey site. ######## # Libraries used: ggplot2, dplyr ######## # Madeleine Ward (2019 Mar 17); Joel Reynolds (2019 Apr 11) # Last Edit: 2020 Mar 3 moved creation of survey_duration to data_wrangling.R # 2019 M...
/analysis/scripts/survey_duration.R
permissive
nationalparkservice/klgo_bio_monitoring
R
false
false
1,693
r
############ # Looks at variation in survey duration at each site across days of season, year, and survey site. ######## # Libraries used: ggplot2, dplyr ######## # Madeleine Ward (2019 Mar 17); Joel Reynolds (2019 Apr 11) # Last Edit: 2020 Mar 3 moved creation of survey_duration to data_wrangling.R # 2019 M...
library(ggplot2) library(plotly) library(shiny) library(hrbrthemes) ######################################################################################################## ui <- fluidPage( titlePanel("Insight in TIMSS 2019"), sidebarLayout( sidebarPanel( selectInput(inputI...
/TIMSS_Dashboard/app.R
permissive
HubertR21/Hubert-Ruczynski-Projects
R
false
false
8,786
r
library(ggplot2) library(plotly) library(shiny) library(hrbrthemes) ######################################################################################################## ui <- fluidPage( titlePanel("Insight in TIMSS 2019"), sidebarLayout( sidebarPanel( selectInput(inputI...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dash.R \name{dashboardUI} \alias{dashboardUI} \title{dashboardUI} \usage{ dashboardUI(id, dashid, dashname, M) } \arguments{ \item{id}{is caller id} \item{dashid}{is the folder id of reports} \item{dashname}{is the name of the folder} \ite...
/man/dashboardUI.Rd
no_license
byadu/modcubqry
R
false
true
408
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dash.R \name{dashboardUI} \alias{dashboardUI} \title{dashboardUI} \usage{ dashboardUI(id, dashid, dashname, M) } \arguments{ \item{id}{is caller id} \item{dashid}{is the folder id of reports} \item{dashname}{is the name of the folder} \ite...
context("Compressed files") test_that("Recognize compressed file types", { expect_true(rio:::find_compress("file.zip")$compress == "zip") expect_true(rio:::find_compress("file.tar")$compress == "tar") expect_true(rio:::find_compress("file.tar.gz")$compress == "tar") expect_true(is.na(rio:::find_c...
/tests/testthat/test_compress.R
no_license
cran/rio
R
false
false
1,123
r
context("Compressed files") test_that("Recognize compressed file types", { expect_true(rio:::find_compress("file.zip")$compress == "zip") expect_true(rio:::find_compress("file.tar")$compress == "tar") expect_true(rio:::find_compress("file.tar.gz")$compress == "tar") expect_true(is.na(rio:::find_c...
testlist <- list(x = NA_integer_, y = c(805306146L, -230L, -701497345L, 620757111L, 13631487L, -1L, 452984831L, 805240832L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L)) result <- do.call(diffrprojects:::dist_mat_absolute,testlist) str(result)
/diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609961420-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
284
r
testlist <- list(x = NA_integer_, y = c(805306146L, -230L, -701497345L, 620757111L, 13631487L, -1L, 452984831L, 805240832L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L)) result <- do.call(diffrprojects:::dist_mat_absolute,testlist) str(result)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/intersecting_units.R \name{intersecting_units} \alias{intersecting_units} \alias{intersecting_units,Raster,Raster-method} \alias{intersecting_units,Raster,Spatial-method} \alias{intersecting_units,Spatial,Raster-method} \alias{intersecting_un...
/man/intersecting_units.Rd
no_license
IsaakBM/prioritizr
R
false
true
2,271
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/intersecting_units.R \name{intersecting_units} \alias{intersecting_units} \alias{intersecting_units,Raster,Raster-method} \alias{intersecting_units,Raster,Spatial-method} \alias{intersecting_units,Spatial,Raster-method} \alias{intersecting_un...
/MacOSX10.2.8.sdk/System/Library/Frameworks/QuickTime.framework/Versions/A/Headers/Movies.r
no_license
alexey-lysiuk/macos-sdk
R
false
false
1,150
r
library(rstan) options(mc.cores = parallel::detectCores()) rstan_options(auto_write = TRUE) Y<-rnorm(10,1.5,0.2) fit<-stan('simple.stan',iter=20,chains=4,data=list(Y=Y)) library(ggplot2) mu<-extract(fit,'mu')[[1]] qplot(mu) library(shinystan) aFit<-as.shinystan(fit) launch_shinystan(aFit)
/inst/stan/stan1.R
no_license
gbonte/gbcode
R
false
false
291
r
library(rstan) options(mc.cores = parallel::detectCores()) rstan_options(auto_write = TRUE) Y<-rnorm(10,1.5,0.2) fit<-stan('simple.stan',iter=20,chains=4,data=list(Y=Y)) library(ggplot2) mu<-extract(fit,'mu')[[1]] qplot(mu) library(shinystan) aFit<-as.shinystan(fit) launch_shinystan(aFit)
require(ggplot2) # create an "ideal" linear regression data! x <- seq(0, 100, by = 0.1) y <- -4. + 0.25 * x + rnorm(length(x), mean = 0., sd = 2.5) # now a dataframe my_data <- data.frame(x = x, y = y) # perform a linear regression my_lm <- summary(lm(y ~ x, data = my_data)) # plot the data p <- ggplot(my_data, ...
/archived/SilCompBioStat/Practicals/Code/plotLin.R
permissive
kalkai01/TheMulQuaBio
R
false
false
1,005
r
require(ggplot2) # create an "ideal" linear regression data! x <- seq(0, 100, by = 0.1) y <- -4. + 0.25 * x + rnorm(length(x), mean = 0., sd = 2.5) # now a dataframe my_data <- data.frame(x = x, y = y) # perform a linear regression my_lm <- summary(lm(y ~ x, data = my_data)) # plot the data p <- ggplot(my_data, ...
#!/usr/bin/env Rscript # What to o when you subset data and want that data not to show up? # convert cyl to a factor mtcars$cyl <- as.factor(mtcars$cyl) # The normal boxplot boxplot(mpg ~ cyl, data = mtcars) # With one of the levels missing we see the same problem you have boxplot(mpg ~ cyl, data = mtcars, subset = c...
/R/basics/scripts/boxplot2.R
permissive
jdurbin/sandbox
R
false
false
644
r
#!/usr/bin/env Rscript # What to o when you subset data and want that data not to show up? # convert cyl to a factor mtcars$cyl <- as.factor(mtcars$cyl) # The normal boxplot boxplot(mpg ~ cyl, data = mtcars) # With one of the levels missing we see the same problem you have boxplot(mpg ~ cyl, data = mtcars, subset = c...
# Exercise 6: Husky Football 2015 Season # Read in the Husky Football 2015 game data into a variable called `husky.games.2015` husky.games.2015 <- read.csv("./data/huskies_2015.csv",stringsAsFactors = FALSE) #View(husky.games.2015) # Create a vector of the teams that the Huskies played against during that season oppo...
/exercise-6/exercise.R
permissive
amoghdave/module9-dataframes
R
false
false
1,750
r
# Exercise 6: Husky Football 2015 Season # Read in the Husky Football 2015 game data into a variable called `husky.games.2015` husky.games.2015 <- read.csv("./data/huskies_2015.csv",stringsAsFactors = FALSE) #View(husky.games.2015) # Create a vector of the teams that the Huskies played against during that season oppo...
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/ReliefF/lymphoid.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.75,family="gaussian",standardize=TRUE) sink('./lymphoid_077.txt',append=TRUE)...
/Model/EN/ReliefF/lymphoid/lymphoid_077.R
no_license
esbgkannan/QSMART
R
false
false
350
r
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/ReliefF/lymphoid.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.75,family="gaussian",standardize=TRUE) sink('./lymphoid_077.txt',append=TRUE)...
# Aangepast op 1 september 2014 "search.normal" <- function(X, lowerbound =.3, alpha = .05, verbose = TRUE){ # Internal functions any.neg <- function(x){if(any(x < 0))T else F} adjusted.alpha <- function(alpha, K) alpha/(K[1]*(K[1]-1)*.5 + sum(K[-1])) fitstring <- function(string.arg,length...
/mokken/R/search.normal.R
no_license
ingted/R-Examples
R
false
false
7,044
r
# Aangepast op 1 september 2014 "search.normal" <- function(X, lowerbound =.3, alpha = .05, verbose = TRUE){ # Internal functions any.neg <- function(x){if(any(x < 0))T else F} adjusted.alpha <- function(alpha, K) alpha/(K[1]*(K[1]-1)*.5 + sum(K[-1])) fitstring <- function(string.arg,length...
library(shiny) library(ggplot2) #example data data(iris) data(mtcars) #plotting theme for ggplot2 .theme<- theme( axis.line = element_line(colour = 'gray', size = .75), panel.background = element_blank(), plot.background = element_blank() ) # UI for app ui<-(pageWithSidebar( # title headerPanel("資料呈現"), ...
/shiny.R
no_license
wangdom5566/R-University-Assistant-Investigation
R
false
false
4,591
r
library(shiny) library(ggplot2) #example data data(iris) data(mtcars) #plotting theme for ggplot2 .theme<- theme( axis.line = element_line(colour = 'gray', size = .75), panel.background = element_blank(), plot.background = element_blank() ) # UI for app ui<-(pageWithSidebar( # title headerPanel("資料呈現"), ...
cat("Hello aliens. This is a letter from the Earth. The Erath Earth is the third planet from the Sun and formed over 4 billion years ago. Earth orbits around the Sun in 365.26 days, and we call this period an Earth year. Can you tell me something about your planet?")
/hello_aliens.R
no_license
jl9588/36-350
R
false
false
269
r
cat("Hello aliens. This is a letter from the Earth. The Erath Earth is the third planet from the Sun and formed over 4 billion years ago. Earth orbits around the Sun in 365.26 days, and we call this period an Earth year. Can you tell me something about your planet?")
## usethis namespace: start #' @useDynLib opdesmixr, .registration = TRUE ## usethis namespace: end NULL ## usethis namespace: start #' @importFrom Rcpp sourceCpp ## usethis namespace: end NULL
/R/opdesmixr-package.R
no_license
mariobecerra/opdesmixr
R
false
false
195
r
## usethis namespace: start #' @useDynLib opdesmixr, .registration = TRUE ## usethis namespace: end NULL ## usethis namespace: start #' @importFrom Rcpp sourceCpp ## usethis namespace: end NULL
testlist <- list(holes = integer(0), numholes = integer(0), x = c(NaN, NaN, -6.4066631121369e-145, -3.8029764739357e-149, -1.44016825553479e+304, 2.71828627768359e-311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
/decido/inst/testfiles/earcut_cpp/libFuzzer_earcut_cpp/earcut_cpp_valgrind_files/1609874604-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
448
r
testlist <- list(holes = integer(0), numholes = integer(0), x = c(NaN, NaN, -6.4066631121369e-145, -3.8029764739357e-149, -1.44016825553479e+304, 2.71828627768359e-311, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BasquinModel.R \name{h_basq} \alias{h_basq} \title{Link function based on the Basquin Model} \usage{ h_basq(theta, x) } \arguments{ \item{theta}{a vector of length two used as the parameter in the link function} \item{x}{a vector of real num...
/man/h_basq.Rd
no_license
KLeckey/loadshare
R
false
true
522
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BasquinModel.R \name{h_basq} \alias{h_basq} \title{Link function based on the Basquin Model} \usage{ h_basq(theta, x) } \arguments{ \item{theta}{a vector of length two used as the parameter in the link function} \item{x}{a vector of real num...
# PPplot # Description # PPplot plots the empirical and theoretical cumulative distribution function of a vector of data # Arguments # "x" a vector of values for which the histogram is desired. # "distr" a character string of the distribution name. See the examples below and ?distributions. # "para" A named l...
/PPplot.R
no_license
vargaslab/temporal-univariate-Latin-Hypercube
R
false
false
3,490
r
# PPplot # Description # PPplot plots the empirical and theoretical cumulative distribution function of a vector of data # Arguments # "x" a vector of values for which the histogram is desired. # "distr" a character string of the distribution name. See the examples below and ?distributions. # "para" A named l...
#' @title Correlation results to table #' @description Arrange correlation matrices from cross.correlate into a table format #' @param res Output from cross.correlate #' @param verbose verbose #' @return Correlation table #' @export #' @examples #' data(peerj32) #' d1 <- peerj32$microbes[1:20, 1:10] #' d2 <- pee...
/R/cmat2table.R
no_license
TTloveTT/microbiome
R
false
false
2,601
r
#' @title Correlation results to table #' @description Arrange correlation matrices from cross.correlate into a table format #' @param res Output from cross.correlate #' @param verbose verbose #' @return Correlation table #' @export #' @examples #' data(peerj32) #' d1 <- peerj32$microbes[1:20, 1:10] #' d2 <- pee...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DEPRECATED.R \name{ngram_collocations} \alias{ngram_collocations} \title{Ngram Collocations} \usage{ ngram_collocations( text.var, n = 20, gram.length = 2:3, stopwords = stopwords::stopwords("english"), min.char = 4, max.char = In...
/man/ngram_collocations.Rd
no_license
trinker/termco
R
false
true
2,165
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DEPRECATED.R \name{ngram_collocations} \alias{ngram_collocations} \title{Ngram Collocations} \usage{ ngram_collocations( text.var, n = 20, gram.length = 2:3, stopwords = stopwords::stopwords("english"), min.char = 4, max.char = In...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_all_complaints.R \name{get_all_complaints} \alias{get_all_complaints} \title{Get all CFPB complaints} \usage{ get_all_complaints(quiet = TRUE, file = NA) } \arguments{ \item{quiet}{Should progress messages be printed?} \item{file}{if NA,...
/man/get_all_complaints.Rd
permissive
bertcarnell/cfpb.api
R
false
true
2,121
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_all_complaints.R \name{get_all_complaints} \alias{get_all_complaints} \title{Get all CFPB complaints} \usage{ get_all_complaints(quiet = TRUE, file = NA) } \arguments{ \item{quiet}{Should progress messages be printed?} \item{file}{if NA,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/extract.all.genes.annotionbased.R \name{extract.all.genes.annotationbased} \alias{extract.all.genes.annotationbased} \title{Title} \usage{ extract.all.genes.annotationbased( species, collicin, annotationDir, genomeDir, outDir ) } \v...
/man/extract.all.genes.annotationbased.Rd
no_license
JeromeAmbroise/syngulon2
R
false
true
351
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/extract.all.genes.annotionbased.R \name{extract.all.genes.annotationbased} \alias{extract.all.genes.annotationbased} \title{Title} \usage{ extract.all.genes.annotationbased( species, collicin, annotationDir, genomeDir, outDir ) } \v...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/readWikinews.R \name{readWikinews} \alias{readWikinews} \title{Read files from Wikinews} \usage{ readWikinews(path = getwd(), file = list.files(path = path, pattern = "*.xml$", full.names = FALSE, recursive = TRUE)) } \arguments{ \item{path...
/man/readWikinews.Rd
no_license
omarun/tosca
R
false
true
560
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/readWikinews.R \name{readWikinews} \alias{readWikinews} \title{Read files from Wikinews} \usage{ readWikinews(path = getwd(), file = list.files(path = path, pattern = "*.xml$", full.names = FALSE, recursive = TRUE)) } \arguments{ \item{path...
#' @include package.R #' @include class-McmcdbParameters.R #' @include class-McmcdbWide.R #' @exportMethod mcmcdb_unflatten NULL #' @name mcmcdb_unflatten-method #' @rdname mcmcdb_unflatten-method #' @keywords methods #' @aliases mcmcdb_unflatten #' #' @title Unflatten MCMC parameters #' #' @description Convert param...
/R/method-mcmcdb_unflatten.R
no_license
jrnold/mcmcdb
R
false
false
5,939
r
#' @include package.R #' @include class-McmcdbParameters.R #' @include class-McmcdbWide.R #' @exportMethod mcmcdb_unflatten NULL #' @name mcmcdb_unflatten-method #' @rdname mcmcdb_unflatten-method #' @keywords methods #' @aliases mcmcdb_unflatten #' #' @title Unflatten MCMC parameters #' #' @description Convert param...
test_that("fahr_to_kelvin is correct", { expect_equal(fahr_to_kelvin(100), 310.928) expect_equal(fahr_to_kelvin(200), 366.483) }) test_that("kelvin_to_celsius is correct", { expect_equal(kelvin_to_celsius(100), -173.15) expect_equal(kelvin_to_celsius(200), -73.15) }) test_that("celsius_to_fahr is correct", { ...
/tests/testthat/test-all.r
no_license
haiguo19920317/convertemp
R
false
false
821
r
test_that("fahr_to_kelvin is correct", { expect_equal(fahr_to_kelvin(100), 310.928) expect_equal(fahr_to_kelvin(200), 366.483) }) test_that("kelvin_to_celsius is correct", { expect_equal(kelvin_to_celsius(100), -173.15) expect_equal(kelvin_to_celsius(200), -73.15) }) test_that("celsius_to_fahr is correct", { ...
# Statistics for Management and Economics by Gerald Keller # Chapter 4: NUMERICAL DESCRIPTIVE TECHNIQUES # Example 4.9 on Pg. 113 # Using the Empirical Rule to Interpret Standard Deviation population_mean <- 0.1 population_sd <- 0.08 sd1 <- 1 sd2 <- 2 sd3 <- 3 lower_bound_one_SD <- population_mean - pop...
/Statistics_For_Management_And_Economics_by_Gerald_Keller/CH4/EX4.9/Ex4_9.R
permissive
FOSSEE/R_TBC_Uploads
R
false
false
2,170
r
# Statistics for Management and Economics by Gerald Keller # Chapter 4: NUMERICAL DESCRIPTIVE TECHNIQUES # Example 4.9 on Pg. 113 # Using the Empirical Rule to Interpret Standard Deviation population_mean <- 0.1 population_sd <- 0.08 sd1 <- 1 sd2 <- 2 sd3 <- 3 lower_bound_one_SD <- population_mean - pop...
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE.txt in the project root for license information. # --------------------------------------------------------------------...
/R/identify_privacythreshold.R
permissive
standardgalactic/wpa
R
false
false
3,437
r
# -------------------------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See LICENSE.txt in the project root for license information. # --------------------------------------------------------------------...
# Get vice-county (VC) ID using VC name # # Given the name of a VC in the NBN (e.g. 'cambridgeshire'), return its ID key. # The ID key can then be used in searchs and filters. # This is currently an internal function getVCid<-function(name){ if(class(name) != 'character'){ warning('VC name no...
/R/getVCid.R
no_license
cran/rnbn
R
false
false
732
r
# Get vice-county (VC) ID using VC name # # Given the name of a VC in the NBN (e.g. 'cambridgeshire'), return its ID key. # The ID key can then be used in searchs and filters. # This is currently an internal function getVCid<-function(name){ if(class(name) != 'character'){ warning('VC name no...
g <- ggplot(diamonds, aes(x=carat, y=price)) g + geom_point(aes(color=color)) + facet_wrap(~color) g + geom_point(aes(color=color)) + facet_grid(cut~clarity) ggplot(diamonds, aes(x=carat)) + geom_histogram() + facet_wrap(~color)
/lesson_1-5/ggplot_4.R
no_license
sevendaysinn/rprogram
R
false
false
230
r
g <- ggplot(diamonds, aes(x=carat, y=price)) g + geom_point(aes(color=color)) + facet_wrap(~color) g + geom_point(aes(color=color)) + facet_grid(cut~clarity) ggplot(diamonds, aes(x=carat)) + geom_histogram() + facet_wrap(~color)
`dlmapdet` <- function(input, algorithm, s.chr, chrSet, prevLoc=NULL, ...) { dfMerged <- input$dfMerged n.chr <- length(input$map) nphe <- input$nphe type <- attr(input, "type") results <- list() results$converge <- TRUE formula <- list() wald <- rep(0, length(input$map[[s.chr]])) if (algorithm=="as...
/R/dlmapdet.R
no_license
behuang/dlmap
R
false
false
7,494
r
`dlmapdet` <- function(input, algorithm, s.chr, chrSet, prevLoc=NULL, ...) { dfMerged <- input$dfMerged n.chr <- length(input$map) nphe <- input$nphe type <- attr(input, "type") results <- list() results$converge <- TRUE formula <- list() wald <- rep(0, length(input$map[[s.chr]])) if (algorithm=="as...