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
PermMeta.LnOR.boxplot <- function(PermMeta,plot="LnOR",plot_study="all",order="no", main="LnOR,no order",true_value_pch=3,pch_col="red",pos=3,text_col="blue",digits=2){ if (!is.element(order, c("LnOR","LnOR_VAR","VAR_LnOR","sample",'no'))){ stop("'order' should be 'LnOR','LnOR_VAR','VAR_LnOR','sample',...
/MCPerm/R/PermMeta.LnOR.boxplot.R
no_license
ingted/R-Examples
R
false
false
3,022
r
PermMeta.LnOR.boxplot <- function(PermMeta,plot="LnOR",plot_study="all",order="no", main="LnOR,no order",true_value_pch=3,pch_col="red",pos=3,text_col="blue",digits=2){ if (!is.element(order, c("LnOR","LnOR_VAR","VAR_LnOR","sample",'no'))){ stop("'order' should be 'LnOR','LnOR_VAR','VAR_LnOR','sample',...
## sapply: use in vector, list dataframe (return a vector, matrix or list) x = list(a=1:10,bb =exp(-2:2),logic = c(T,F,T,F,T)) x # return a vector sapply(x,mean)
/04Function/42Sapply__mean.R
no_license
MomusChao/R
R
false
false
169
r
## sapply: use in vector, list dataframe (return a vector, matrix or list) x = list(a=1:10,bb =exp(-2:2),logic = c(T,F,T,F,T)) x # return a vector sapply(x,mean)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/theme_trakt.R \name{theme_trakt} \alias{theme_trakt} \title{Theme Matching trakt.tv (Dark Knight Mode)} \usage{ theme_trakt( title.size = 16, text.size = 14, legend.position = "top", show.axis = FALSE, show.grid = TRUE, plot.margi...
/man/theme_trakt.Rd
permissive
tadaadata/tadaathemes
R
false
true
2,257
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/theme_trakt.R \name{theme_trakt} \alias{theme_trakt} \title{Theme Matching trakt.tv (Dark Knight Mode)} \usage{ theme_trakt( title.size = 16, text.size = 14, legend.position = "top", show.axis = FALSE, show.grid = TRUE, plot.margi...
library(RCircos) ### Name: RCircos.ZoomIn.Chromosome ### Title: Zoom in One or Partial Chromosome Ideogram ### Aliases: RCircos.ZoomIn.Chromosome ### Keywords: methods ### ** Examples ## Not run: ##D ##D library(RCircos) ##D data(UCSC.HG19.Human.CytoBandIdeogram) ##D zoomedIdeo <- RCircos.ZoomIn.Chromosome( #...
/data/genthat_extracted_code/RCircos/examples/RCircos.ZoomIn.Chromosome.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
463
r
library(RCircos) ### Name: RCircos.ZoomIn.Chromosome ### Title: Zoom in One or Partial Chromosome Ideogram ### Aliases: RCircos.ZoomIn.Chromosome ### Keywords: methods ### ** Examples ## Not run: ##D ##D library(RCircos) ##D data(UCSC.HG19.Human.CytoBandIdeogram) ##D zoomedIdeo <- RCircos.ZoomIn.Chromosome( #...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/localsurface.R \name{ssc} \alias{ssc} \title{Mean Summit Curvature} \usage{ ssc(x) } \arguments{ \item{x}{A raster object.} } \value{ A numeric value representing the average curvature of surface peaks. } \description{ Calculates the mean s...
/surface_metrics/geodiv/man/ssc.Rd
permissive
bioXgeo/SyntheticLandscape
R
false
true
551
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/localsurface.R \name{ssc} \alias{ssc} \title{Mean Summit Curvature} \usage{ ssc(x) } \arguments{ \item{x}{A raster object.} } \value{ A numeric value representing the average curvature of surface peaks. } \description{ Calculates the mean s...
\alias{gtkWindowGroupRemoveWindow} \name{gtkWindowGroupRemoveWindow} \title{gtkWindowGroupRemoveWindow} \description{Removes a window from a \code{\link{GtkWindowGroup}}.} \usage{gtkWindowGroupRemoveWindow(object, window)} \arguments{ \item{\code{object}}{[\code{\link{GtkWindowGroup}}] a \code{\link{GtkWindowGroup}}} ...
/man/gtkWindowGroupRemoveWindow.Rd
no_license
cran/RGtk2.10
R
false
false
480
rd
\alias{gtkWindowGroupRemoveWindow} \name{gtkWindowGroupRemoveWindow} \title{gtkWindowGroupRemoveWindow} \description{Removes a window from a \code{\link{GtkWindowGroup}}.} \usage{gtkWindowGroupRemoveWindow(object, window)} \arguments{ \item{\code{object}}{[\code{\link{GtkWindowGroup}}] a \code{\link{GtkWindowGroup}}} ...
#we use the lubridate year, day and month functions to subset the data library(lubridate) plot4 <- function(){ #Loading data data <- read.table('household_power_consumption.txt', header=TRUE, sep=';') #Subset to relevant dates data$Date <- as.Date(data$Date, format = "%d/%m/%Y") ...
/plot4.R
no_license
tweelinck/ExData_Plotting1
R
false
false
1,994
r
#we use the lubridate year, day and month functions to subset the data library(lubridate) plot4 <- function(){ #Loading data data <- read.table('household_power_consumption.txt', header=TRUE, sep=';') #Subset to relevant dates data$Date <- as.Date(data$Date, format = "%d/%m/%Y") ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Gsector.R \name{nn_directional_distance_distribution} \alias{nn_directional_distance_distribution} \title{Directional nearest neighbour distribution} \usage{ nn_directional_distance_distribution( x, r, direction, epsilon, type = "lo...
/man/nn_directional_distance_distribution.Rd
no_license
antiphon/Kdirectional
R
false
true
769
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Gsector.R \name{nn_directional_distance_distribution} \alias{nn_directional_distance_distribution} \title{Directional nearest neighbour distribution} \usage{ nn_directional_distance_distribution( x, r, direction, epsilon, type = "lo...
/rNaive.R
no_license
andresum97/Mineria_proyecto_01
R
false
false
1,156
r
makeCacheMatrix <- function(x = matrix()) { ## this function creates a matrix in cache inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() {x} setInverse <- function(inverse) {inv <<- inverse} getInverse <- function() {inv} list(set = set, get = get, setInverse = setInvers...
/cachematrix.R
no_license
deady123/ProgrammingAssignment2
R
false
false
638
r
makeCacheMatrix <- function(x = matrix()) { ## this function creates a matrix in cache inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() {x} setInverse <- function(inverse) {inv <<- inverse} getInverse <- function() {inv} list(set = set, get = get, setInverse = setInvers...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/search_adv.R \name{ed_search_adv} \alias{ed_search_adv} \title{Advanced search for ERDDAP tabledep or griddap datasets} \usage{ ed_search_adv( query = NULL, page = 1, page_size = 1000, protocol = NULL, cdm_data_type = NULL, instit...
/man/ed_search_adv.Rd
permissive
kant/rerddap
R
false
true
3,561
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/search_adv.R \name{ed_search_adv} \alias{ed_search_adv} \title{Advanced search for ERDDAP tabledep or griddap datasets} \usage{ ed_search_adv( query = NULL, page = 1, page_size = 1000, protocol = NULL, cdm_data_type = NULL, instit...
############################################################################ ######################### bcbcsf main functions ############################ ############################################################################ bcbcsf_fitpred <- function ( ## arguments specifying info of data sets X_tr, y_tr, no...
/BCBCSF/R/tr-pr.r
no_license
ingted/R-Examples
R
false
false
20,999
r
############################################################################ ######################### bcbcsf main functions ############################ ############################################################################ bcbcsf_fitpred <- function ( ## arguments specifying info of data sets X_tr, y_tr, no...
library(rstudioapi)#Para obtener ruta en el directorio library(readxl)#Leer Excel library(lubridate)#Obtener a?o rm(list=ls())#Limpia objetos fecStart <-Sys.time() setwd(dirname(getActiveDocumentContext()$path)) #Cambiar en cada Ejecucion fecCierre <- as.Date("31/12/2019", format = "%d/%m/%Y") directorioBD <- "C:/Ron...
/Rimac/201912/generadordeTramasRimacPrevRT_SL_122019.R
no_license
ronaldEY/auditoria.actuarial
R
false
false
10,176
r
library(rstudioapi)#Para obtener ruta en el directorio library(readxl)#Leer Excel library(lubridate)#Obtener a?o rm(list=ls())#Limpia objetos fecStart <-Sys.time() setwd(dirname(getActiveDocumentContext()$path)) #Cambiar en cada Ejecucion fecCierre <- as.Date("31/12/2019", format = "%d/%m/%Y") directorioBD <- "C:/Ron...
redis.connect <- function(host="localhost", port=6379L, timeout=30, reconnect=FALSE, retry=FALSE) .Call(cr_connect, host, port, timeout, reconnect, retry) redis.get <- function(rc, keys, list=FALSE) { r <- .Call(cr_get, rc, keys, list) if (is.list(r)) lapply(r, function(o) .Call(raw_unpack, o)) else .Call(raw_unpa...
/R/redis.R
no_license
smschauhan/rediscc
R
false
false
1,240
r
redis.connect <- function(host="localhost", port=6379L, timeout=30, reconnect=FALSE, retry=FALSE) .Call(cr_connect, host, port, timeout, reconnect, retry) redis.get <- function(rc, keys, list=FALSE) { r <- .Call(cr_get, rc, keys, list) if (is.list(r)) lapply(r, function(o) .Call(raw_unpack, o)) else .Call(raw_unpa...
# loads the raw data, setting some default types for various columns load_raw <- function(filename) { read_csv(filename, col_types = cols( .default = col_character(), project_id = col_character(), ...
/R/data_load_clean2.R
permissive
alyshabatada/mice_sex_diff
R
false
false
4,021
r
# loads the raw data, setting some default types for various columns load_raw <- function(filename) { read_csv(filename, col_types = cols( .default = col_character(), project_id = col_character(), ...
######################################################################## ## ## Name: plot_ensemble.R ## ## Description: ## This script should be called via an Rscript command to plot ## ensemble statistic line types from the MET Ensemble-Stat tool. ## This script can read the following types of ASCII files: ...
/scripts/Rscripts/plot_ensemble.R
permissive
dtcenter/MET
R
false
false
11,472
r
######################################################################## ## ## Name: plot_ensemble.R ## ## Description: ## This script should be called via an Rscript command to plot ## ensemble statistic line types from the MET Ensemble-Stat tool. ## This script can read the following types of ASCII files: ...
library(foreach) library(doMC) registerDoMC(3) options(width = 200) # Correlation between two rows of two different matrices source("/ngsprojects/iwt/ehsab/Gene_duplication/Scripts/Functions/CORR.R") data.grape = read.table("/ngsprojects/iwt/ehsab/Gene_duplication/Integrated_CORNET2.0/Vitis_vinifera/GE.mean.SD....
/Gene_dupliation/Grape/development/ICC/ICC35.r
no_license
ehsanbiostat/PhD-thesis
R
false
false
5,300
r
library(foreach) library(doMC) registerDoMC(3) options(width = 200) # Correlation between two rows of two different matrices source("/ngsprojects/iwt/ehsab/Gene_duplication/Scripts/Functions/CORR.R") data.grape = read.table("/ngsprojects/iwt/ehsab/Gene_duplication/Integrated_CORNET2.0/Vitis_vinifera/GE.mean.SD....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/project_beds.R \name{project_beds} \alias{project_beds} \alias{project_beds.projections} \alias{project_beds.incidence} \title{Project bed occupancy from admissions} \usage{ project_beds(x, ...) \method{project_beds}{projections}(x, r_los, n...
/man/project_beds.Rd
permissive
reconhub/occupancy
R
false
true
2,428
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/project_beds.R \name{project_beds} \alias{project_beds} \alias{project_beds.projections} \alias{project_beds.incidence} \title{Project bed occupancy from admissions} \usage{ project_beds(x, ...) \method{project_beds}{projections}(x, r_los, n...
pollutantmean <- function(directory, pollutant, id) { #declare and intialize variables # count and string variables count = 0; one_zero = "0" two_zero = "00" extension = ".csv" filename = "" # Variables used in calculations Running_agg = 0 Running_rows = 0 pollutant_agg = 0 pollutant_rows = 0 #Initialize data frames...
/pollutantmean.R
no_license
arunsimha/R_Programming
R
false
false
1,393
r
pollutantmean <- function(directory, pollutant, id) { #declare and intialize variables # count and string variables count = 0; one_zero = "0" two_zero = "00" extension = ".csv" filename = "" # Variables used in calculations Running_agg = 0 Running_rows = 0 pollutant_agg = 0 pollutant_rows = 0 #Initialize data frames...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pinside.R \name{pinside} \alias{pinside} \title{Calculate the probability inside an expert range given a logistic decay} \usage{ pinside(dists, parms) } \arguments{ \item{dists}{frequency table of unique distance values (output from running \...
/man/pinside.Rd
no_license
cran/bossMaps
R
false
true
896
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pinside.R \name{pinside} \alias{pinside} \title{Calculate the probability inside an expert range given a logistic decay} \usage{ pinside(dists, parms) } \arguments{ \item{dists}{frequency table of unique distance values (output from running \...
pacman::p_load('dplyr', 'tidyr', 'gapminder', 'ggplot2', 'ggalt', 'forcats', 'R.utils', 'png', 'grid', 'ggpubr', 'scales', 'bbplot2') install.packages("tm") # for text mining install.packages("SnowballC") # for text stemming install.packages("wordc...
/coronacrowd.R
no_license
BBC-Data-Unit/coronavirus-crowdfundingpubs
R
false
false
2,134
r
pacman::p_load('dplyr', 'tidyr', 'gapminder', 'ggplot2', 'ggalt', 'forcats', 'R.utils', 'png', 'grid', 'ggpubr', 'scales', 'bbplot2') install.packages("tm") # for text mining install.packages("SnowballC") # for text stemming install.packages("wordc...
## change int values to numeric snow$BEGIN_YEARMONTH <- as.numeric(snow$BEGIN_YEARMONTH) snow$BEGIN_DAY <- as.numeric(snow$BEGIN_DAY) snow$BEGIN_TIME <- as.numeric(snow$BEGIN_TIME) snow$END_YEARMONTH <- as.numeric(snow$END_YEARMONTH) snow$END_DAY <- as.numeric(snow$END_DAY) snow$END_TIME <- as.numeric(snow$END_TI...
/SnowAlgorithm.R
no_license
wxwatchr/Snowstorm-Classification
R
false
false
2,319
r
## change int values to numeric snow$BEGIN_YEARMONTH <- as.numeric(snow$BEGIN_YEARMONTH) snow$BEGIN_DAY <- as.numeric(snow$BEGIN_DAY) snow$BEGIN_TIME <- as.numeric(snow$BEGIN_TIME) snow$END_YEARMONTH <- as.numeric(snow$END_YEARMONTH) snow$END_DAY <- as.numeric(snow$END_DAY) snow$END_TIME <- as.numeric(snow$END_TI...
ComputeIS_dual <- function(c1, dur, gradient) { # Computes the information matrix and the score function, when gamma is fixed # (i.e. only estimate 3 parameters) # # Args: # c1: # dur: # gradient: # # Returns: # list(i.mat, s.vec) # infomat: information matrix # score: a vector...
/Real_data/Newtons_code/Functions/ComputeIS_dual.R
no_license
EricaZ/FACD-model
R
false
false
679
r
ComputeIS_dual <- function(c1, dur, gradient) { # Computes the information matrix and the score function, when gamma is fixed # (i.e. only estimate 3 parameters) # # Args: # c1: # dur: # gradient: # # Returns: # list(i.mat, s.vec) # infomat: information matrix # score: a vector...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calc_solar_insolation.R \name{to_radians} \alias{to_radians} \title{Convert degrees to radians} \usage{ to_radians(degrees) } \arguments{ \item{degrees}{angle in degrees} } \value{ angle in radians } \description{ Convert degrees to radians }...
/man/to_radians.Rd
permissive
appling/streamMetabolizer
R
false
true
322
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/calc_solar_insolation.R \name{to_radians} \alias{to_radians} \title{Convert degrees to radians} \usage{ to_radians(degrees) } \arguments{ \item{degrees}{angle in degrees} } \value{ angle in radians } \description{ Convert degrees to radians }...
if(!exists("NEI")){ NEI <- readRDS("summarySCC_PM25.rds") } if(!exists("SCC")){ SCC <- readRDS("Source_Classification_Code.rds") } # merge the two data sets if(!exists("NEISCC")){ NEISCC <- merge(NEI, SCC, by="SCC") } library(ggplot2) # How have emissions from motor vehicle sources changed from 1999-2008 in ...
/plot5.R
no_license
phowops/Course-project2-exploratory-data-analyis
R
false
false
1,008
r
if(!exists("NEI")){ NEI <- readRDS("summarySCC_PM25.rds") } if(!exists("SCC")){ SCC <- readRDS("Source_Classification_Code.rds") } # merge the two data sets if(!exists("NEISCC")){ NEISCC <- merge(NEI, SCC, by="SCC") } library(ggplot2) # How have emissions from motor vehicle sources changed from 1999-2008 in ...
source("./Scripts/sak_file_var/getMeta.R") soFar <- getMeta(pathToData = "../../taler/id_taler_meta.csv", sakfolderPath = "/media/martigso/Data/referat_raw/stortinget.no/no/Saker-og-publikasjoner/Publikasjoner/Referater/Stortinget/", session = "2008-2009") save(soFar, file = paste0("...
/R/Scripts/sak_file_var/s0809.R
no_license
emanlapponi/storting
R
false
false
396
r
source("./Scripts/sak_file_var/getMeta.R") soFar <- getMeta(pathToData = "../../taler/id_taler_meta.csv", sakfolderPath = "/media/martigso/Data/referat_raw/stortinget.no/no/Saker-og-publikasjoner/Publikasjoner/Referater/Stortinget/", session = "2008-2009") save(soFar, file = paste0("...
### Hi everyone, here are the solutions to the various exercises from the modeling workshop on 6/10/2015 ### If anything is unclear, don't hesitate to send me an email at dibble@uga.edu ######################################### ### Exponential growth and exercises 1-2 #########################################...
/REUworkshop/WK3_dynamical-models-workshop/REUworkshopworkedexamplesCD.R
no_license
anabento/R_Bootcamp
R
false
false
24,704
r
### Hi everyone, here are the solutions to the various exercises from the modeling workshop on 6/10/2015 ### If anything is unclear, don't hesitate to send me an email at dibble@uga.edu ######################################### ### Exponential growth and exercises 1-2 #########################################...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/acmpca_operations.R \name{acmpca_list_tags} \alias{acmpca_list_tags} \title{Lists the tags, if any, that are associated with your private CA} \usage{ acmpca_list_tags(CertificateAuthorityArn, NextToken, MaxResults) } \arguments{ \item{Certifi...
/cran/paws.security.identity/man/acmpca_list_tags.Rd
permissive
peoplecure/paws
R
false
true
1,655
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/acmpca_operations.R \name{acmpca_list_tags} \alias{acmpca_list_tags} \title{Lists the tags, if any, that are associated with your private CA} \usage{ acmpca_list_tags(CertificateAuthorityArn, NextToken, MaxResults) } \arguments{ \item{Certifi...
########################################################################################## # Designed and developed by Tinniam V Ganesh # Date : 21 Mar 2016 # Function: teamBowlingWicketKindMatch # This function computes the performance of bowlers of team with the wicketkind (caught, bowled, # caught & bowled) for the ...
/R/teamBowlingWicketKindMatch.R
no_license
tvganesh/yorkr
R
false
false
4,913
r
########################################################################################## # Designed and developed by Tinniam V Ganesh # Date : 21 Mar 2016 # Function: teamBowlingWicketKindMatch # This function computes the performance of bowlers of team with the wicketkind (caught, bowled, # caught & bowled) for the ...
set.seed(35235) x = runif(1000,0,2) hist(x,prob=T,xlab='',ylab='') opar=par(mfrow=c(1,2)) hist(x*x,prob=T,xlab='',ylab='',main="I") hist(4-x*x,prob=T,xlab='',ylab='',main="II") par(opar)
/pgdas/sqhist.r
no_license
arnabc74/arnabc74.github.io
R
false
false
187
r
set.seed(35235) x = runif(1000,0,2) hist(x,prob=T,xlab='',ylab='') opar=par(mfrow=c(1,2)) hist(x*x,prob=T,xlab='',ylab='',main="I") hist(4-x*x,prob=T,xlab='',ylab='',main="II") par(opar)
##' Additive model with constraints ##' ##' An internal function, called by \code{fosr()}, that fits additive models ##' with linear constraints via a call to \code{\link[mgcv]{gam}} or ##' \code{\link[mgcv]{bam}} in the \pkg{mgcv} package. ##' ##' The additive model is fitted using \code{\link[mgcv]{gam}}, unless ther...
/R/amc.R
no_license
refunders/refund
R
false
false
2,924
r
##' Additive model with constraints ##' ##' An internal function, called by \code{fosr()}, that fits additive models ##' with linear constraints via a call to \code{\link[mgcv]{gam}} or ##' \code{\link[mgcv]{bam}} in the \pkg{mgcv} package. ##' ##' The additive model is fitted using \code{\link[mgcv]{gam}}, unless ther...
/R/problemAnalyusis.R
no_license
maxgonzalezb/learn-doing
R
false
false
1,205
r
#!/usr/bin/env Rscript #=========================================================== # R script for plotting different features of individual genomic bins - 1D plots #Author: Sourya Bhattacharyya #Vijay-Ay lab, LJI #=========================================================== library(optparse) library(ggplot2) library(...
/Analysis/PlotGenomeBins.r
permissive
ay-lab/FitHiChIP
R
false
false
10,337
r
#!/usr/bin/env Rscript #=========================================================== # R script for plotting different features of individual genomic bins - 1D plots #Author: Sourya Bhattacharyya #Vijay-Ay lab, LJI #=========================================================== library(optparse) library(ggplot2) library(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fviz_ca.R \name{fviz_ca} \alias{fviz_ca} \alias{fviz_ca_row} \alias{fviz_ca_col} \alias{fviz_ca_biplot} \alias{fviz_ca} \title{Visualize Correspondence Analysis} \usage{ fviz_ca_row(X, axes = c(1, 2), geom = c("point", "text"), shape.row = 19...
/man/fviz_ca.Rd
no_license
yzhlinscau/factoextra
R
false
true
8,850
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fviz_ca.R \name{fviz_ca} \alias{fviz_ca} \alias{fviz_ca_row} \alias{fviz_ca_col} \alias{fviz_ca_biplot} \alias{fviz_ca} \title{Visualize Correspondence Analysis} \usage{ fviz_ca_row(X, axes = c(1, 2), geom = c("point", "text"), shape.row = 19...
\name{trlong} \alias{trlong} \docType{data} \title{ Transportation mode choice, long format } \description{ Choice of transportation mode by gender, in long format so that each choice occupies 5 rows. } \usage{data("trlong")} \format{ A data frame with 31680 observations on the following 6 variables. \describe{ ...
/man/trlong.Rd
no_license
cran/smdata
R
false
false
1,456
rd
\name{trlong} \alias{trlong} \docType{data} \title{ Transportation mode choice, long format } \description{ Choice of transportation mode by gender, in long format so that each choice occupies 5 rows. } \usage{data("trlong")} \format{ A data frame with 31680 observations on the following 6 variables. \describe{ ...
# You are given an array of integers. On each move you are allowed to increase exactly one of its element by one. Find the minimal number of moves required to obtain a strictly increasing sequence from the input. # # Example # # For inputArray = [1, 1, 1], the output should be # arrayChange(inputArray) = 3. # # Inpu...
/arrayChange.R
no_license
chaegeunsong/RCodePractice
R
false
false
1,959
r
# You are given an array of integers. On each move you are allowed to increase exactly one of its element by one. Find the minimal number of moves required to obtain a strictly increasing sequence from the input. # # Example # # For inputArray = [1, 1, 1], the output should be # arrayChange(inputArray) = 3. # # Inpu...
# Model #1 # First test for one-vs-all for `spruce_fir` vs all df_m1 <- df_xg %>% make_response_var_one_vs_all("spruce_fir") glimpse(df_m1) (tsk <- makeClassifTask(data = df_m1, target = "cover_type")) (lrn <- makeLearner(cl = "classif.xgboost", id = "model1_xbg", nrounds=400, verbose = 0, max_depth = 8)) (rdesc <-...
/src/rahul/01-B-XGB.R
no_license
rsangole/454_FinalProject
R
false
false
1,426
r
# Model #1 # First test for one-vs-all for `spruce_fir` vs all df_m1 <- df_xg %>% make_response_var_one_vs_all("spruce_fir") glimpse(df_m1) (tsk <- makeClassifTask(data = df_m1, target = "cover_type")) (lrn <- makeLearner(cl = "classif.xgboost", id = "model1_xbg", nrounds=400, verbose = 0, max_depth = 8)) (rdesc <-...
# Example of One-Way ANOVA library(dplyr) PATH <- "https://raw.githubusercontent.com/guru99-edu/R-Programming/master/poisons.csv" df <- read.csv(PATH) %>% select(-X) %>% mutate(poison = factor(poison, ordered = TRUE)) glimpse(df) # level of poison levels(df$poison) df %>% group_by(poison) %>% summarise( count_po...
/R-Tutorial/r-anova-tutorial_kr.R
permissive
misdb/R
R
false
false
843
r
# Example of One-Way ANOVA library(dplyr) PATH <- "https://raw.githubusercontent.com/guru99-edu/R-Programming/master/poisons.csv" df <- read.csv(PATH) %>% select(-X) %>% mutate(poison = factor(poison, ordered = TRUE)) glimpse(df) # level of poison levels(df$poison) df %>% group_by(poison) %>% summarise( count_po...
## ## Package: flowFP ## File: AllClasses.R ## Author: Herb Holyst ## ## Copyright (C) 2009 by University of Pennsylvania, ## Philadelphia, PA USA. All rights reserved. ## ## This declarative file contains the class definitions for the three main ## classes used and exported by this package. It also contains a priv...
/R/AllClasses.R
no_license
holyst/flowFP
R
false
false
5,825
r
## ## Package: flowFP ## File: AllClasses.R ## Author: Herb Holyst ## ## Copyright (C) 2009 by University of Pennsylvania, ## Philadelphia, PA USA. All rights reserved. ## ## This declarative file contains the class definitions for the three main ## classes used and exported by this package. It also contains a priv...
library(caret) library(ggplot2) library(Hmisc) library(randomForest) library(e1071) data <- read.csv("data/pml-training.csv",header = TRUE)[,-c(1:7)] dim(data) names(data) summary(data) #Remove rows with NAs data <- data[,colSums(is.na(data))==0] dim(data) names(data) str(data) #Remove columns with categorical variab...
/exploratory.R
no_license
tsk/PracticalML
R
false
false
1,724
r
library(caret) library(ggplot2) library(Hmisc) library(randomForest) library(e1071) data <- read.csv("data/pml-training.csv",header = TRUE)[,-c(1:7)] dim(data) names(data) summary(data) #Remove rows with NAs data <- data[,colSums(is.na(data))==0] dim(data) names(data) str(data) #Remove columns with categorical variab...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R \docType{methods} \name{data.characterEncoding} \alias{data.characterEncoding} \alias{data.characterEncoding,EMLParser,numeric-method} \title{CharacterEncoding} \usage{ data.characterEncoding(x, index, ...
/man/data.characterEncoding.Rd
permissive
AnneMTreasure/rdataone
R
false
true
659
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AbstractTableDescriber.R, R/EMLParser.R \docType{methods} \name{data.characterEncoding} \alias{data.characterEncoding} \alias{data.characterEncoding,EMLParser,numeric-method} \title{CharacterEncoding} \usage{ data.characterEncoding(x, index, ...
library(combinat) library(clue) spn.cluster.run <- function(data, nclasses, thr=0.001, verb=FALSE, ncores=1, max.it=10) { cat(paste(Sys.time(),'::init',"\n")) #Generate the initial class labels classcol=ncol(data) y_true <- data[, classcol] data <- cbind(data[, -classcol], clara2(data[, -classcol], nclasses,...
/R/spn.clustering.r
no_license
nvlml/SUM2019
R
false
false
2,313
r
library(combinat) library(clue) spn.cluster.run <- function(data, nclasses, thr=0.001, verb=FALSE, ncores=1, max.it=10) { cat(paste(Sys.time(),'::init',"\n")) #Generate the initial class labels classcol=ncol(data) y_true <- data[, classcol] data <- cbind(data[, -classcol], clara2(data[, -classcol], nclasses,...
#Reading the full dataset colclasses<-c("character","character",rep("numeric",7)) df<-read.csv2(file = "household_power_consumption.csv",sep=";",dec='.',na.strings = "?",colClasses = colclasses) df$jdate<-as.POSIXct(paste(df$Date, df$Time), format="%d/%m/%Y %H:%M:%S") df$Date<-as.Date(as.character(df$Date),format="%d/...
/plot2.R
no_license
clausgyrup/ExData_Plotting1
R
false
false
641
r
#Reading the full dataset colclasses<-c("character","character",rep("numeric",7)) df<-read.csv2(file = "household_power_consumption.csv",sep=";",dec='.',na.strings = "?",colClasses = colclasses) df$jdate<-as.POSIXct(paste(df$Date, df$Time), format="%d/%m/%Y %H:%M:%S") df$Date<-as.Date(as.character(df$Date),format="%d/...
require(ggplot2) classify.results <- t names(classify.results) <- c("item.class", "logpr.a", "logpr.b") classify.results.sample <- classify.results[sample(1:nrow(classify.results), 3000, replace=FALSE),] p <- ggplot(classify.results, aes(logpr.a, logpr.b)) p + geom_point(aes(colour = factor(item.class))) + geom_abl...
/analysis/scripts/plot confu.R
permissive
max22260/Identification-of-the-class-of-English-text-among-several-classes
R
false
false
732
r
require(ggplot2) classify.results <- t names(classify.results) <- c("item.class", "logpr.a", "logpr.b") classify.results.sample <- classify.results[sample(1:nrow(classify.results), 3000, replace=FALSE),] p <- ggplot(classify.results, aes(logpr.a, logpr.b)) p + geom_point(aes(colour = factor(item.class))) + geom_abl...
# elegant workflow for splitting dataset into training and testing data for machine learning # get data data("mtcars") # split into train & test sets, with 75/25 split splitIndex <- sample(nrow(mtcars), floor(.75 * nrow(mtcars))) train <- mtcars[splitIndex,] test <- mtcars[-splitIndex,] # split into train & test set...
/create-test-and-training-sets.R
no_license
fiddlesleet/Machine-Learning
R
false
false
460
r
# elegant workflow for splitting dataset into training and testing data for machine learning # get data data("mtcars") # split into train & test sets, with 75/25 split splitIndex <- sample(nrow(mtcars), floor(.75 * nrow(mtcars))) train <- mtcars[splitIndex,] test <- mtcars[-splitIndex,] # split into train & test set...
SKAT_Optimal_Integrate_Func_Liu <- function(x,pmin.q,param.m,r.all){ n.r<-length(r.all) n.x<-length(x) temp1<-param.m$tau %x% t(x) temp<-(pmin.q - temp1)/(1-r.all) temp.min<-apply(temp,2,min) temp.q<-(temp.min - param.m$MuQ)/sqrt(param.m$VarQ)*sqrt(2*param.m$Df) + param.m$Df re<-pchisq(temp.q ,df=param.m$Df) * dchi...
/TransMeta/R/SKAT_Optimal_Integrate_Func_Liu.R
no_license
shijingc/TransMeta
R
false
false
346
r
SKAT_Optimal_Integrate_Func_Liu <- function(x,pmin.q,param.m,r.all){ n.r<-length(r.all) n.x<-length(x) temp1<-param.m$tau %x% t(x) temp<-(pmin.q - temp1)/(1-r.all) temp.min<-apply(temp,2,min) temp.q<-(temp.min - param.m$MuQ)/sqrt(param.m$VarQ)*sqrt(2*param.m$Df) + param.m$Df re<-pchisq(temp.q ,df=param.m$Df) * dchi...
####################################################################################### # get.prm.comp.R - read and decode ASCII parameters file for compare program # Ensign Energy Services Inc. retains all rights to this software # FHS, Feb 18, 2019 #####################################################################...
/source/util/get.prm.comp.R
no_license
sthallor/miscRscripts
R
false
false
24,599
r
####################################################################################### # get.prm.comp.R - read and decode ASCII parameters file for compare program # Ensign Energy Services Inc. retains all rights to this software # FHS, Feb 18, 2019 #####################################################################...
#!/usr/bin/env Rscript library(optparse) option_list <- c(make_option('--input', default='/dev/stdin'), make_option('--rank'), make_option('--output', default='/dev/stdout'), make_option('--subset_taxa') ) parser <- OptionParser(option_list = option_...
/R/bin/make-rank-table
permissive
triplett/dipp-microbiome-study
R
false
false
708
#!/usr/bin/env Rscript library(optparse) option_list <- c(make_option('--input', default='/dev/stdin'), make_option('--rank'), make_option('--output', default='/dev/stdout'), make_option('--subset_taxa') ) parser <- OptionParser(option_list = option_...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cloudformation_operations.R \name{cloudformation_update_termination_protection} \alias{cloudformation_update_termination_protection} \title{Updates termination protection for the specified stack} \usage{ cloudformation_update_termination_prot...
/cran/paws.management/man/cloudformation_update_termination_protection.Rd
permissive
sanchezvivi/paws
R
false
true
1,410
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cloudformation_operations.R \name{cloudformation_update_termination_protection} \alias{cloudformation_update_termination_protection} \title{Updates termination protection for the specified stack} \usage{ cloudformation_update_termination_prot...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Basic statistics for population and loci.R \docType{data} \name{l.col} \alias{l.col} \title{Displaying DAPC to categorize the populations in different clusters} \format{ An object of class \code{character} of length 40. } \usage{ l.col } \des...
/PyCPackage/man/l.col.Rd
no_license
shiwanisapkota/PyCPackage
R
false
true
459
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Basic statistics for population and loci.R \docType{data} \name{l.col} \alias{l.col} \title{Displaying DAPC to categorize the populations in different clusters} \format{ An object of class \code{character} of length 40. } \usage{ l.col } \des...
# Shiny server library(shiny) library(shiny) library(datasets) # We tweak the "am" field to have nicer factor labels. Since this doesn't # rely on any user inputs we can do this once at startup and then use the # value throughout the lifetime of the application mpgData <- mtcars mpgData$am <- factor(mpgData$am, labe...
/dataVis/2016/rcodes/Lab6/app2/server.R
no_license
sixian7/TA-Northwestern
R
false
false
1,026
r
# Shiny server library(shiny) library(shiny) library(datasets) # We tweak the "am" field to have nicer factor labels. Since this doesn't # rely on any user inputs we can do this once at startup and then use the # value throughout the lifetime of the application mpgData <- mtcars mpgData$am <- factor(mpgData$am, labe...
# R Examples of dotchart() dotchart(VADeaths, main="Death Rates in Virginia - 1940") dotchart(t(VADeaths), xlim=c(0,100), main="Death Rates in Virginia - 1940") # modify the symbol and color dotchart(VADeaths, col=rainbow(5), pch=c(15:19)) dotchart(t(VADeaths), col=rainbow(4), pch=c(15:18)) dotchart(VADeaths...
/12/ex5-1-6-dotchart.R
no_license
harute931507/R_practice
R
false
false
419
r
# R Examples of dotchart() dotchart(VADeaths, main="Death Rates in Virginia - 1940") dotchart(t(VADeaths), xlim=c(0,100), main="Death Rates in Virginia - 1940") # modify the symbol and color dotchart(VADeaths, col=rainbow(5), pch=c(15:19)) dotchart(t(VADeaths), col=rainbow(4), pch=c(15:18)) dotchart(VADeaths...
wd_corrente <- getwd() setwd("C:/Users/Sergio Franklin/Desktop/Academia/6BigData/Curso_Data_Science/Unit3 Getting and Cleanning Data/ProgrammingAssignment3") if (!file.exists("Project")) { dir.create("Project") } prjdataUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip...
/run_analysis.R
no_license
SergioFranklin/ProgrammingAssignment3
R
false
false
3,053
r
wd_corrente <- getwd() setwd("C:/Users/Sergio Franklin/Desktop/Academia/6BigData/Curso_Data_Science/Unit3 Getting and Cleanning Data/ProgrammingAssignment3") if (!file.exists("Project")) { dir.create("Project") } prjdataUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/temp_models.R \name{DynModel_driver} \alias{DynModel_driver} \title{DynModel_driver} \usage{ DynModel_driver( temp, times, A0 = 139500, A1 = 2.567e+18, E0 = 4153.5, E1 = 12888.8, slope = 1.6, Tf = 4, deg_celsi...
/fuzzedpackages/chillR/man/DynModel_driver.Rd
no_license
akhikolla/testpackages
R
false
true
2,743
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/temp_models.R \name{DynModel_driver} \alias{DynModel_driver} \title{DynModel_driver} \usage{ DynModel_driver( temp, times, A0 = 139500, A1 = 2.567e+18, E0 = 4153.5, E1 = 12888.8, slope = 1.6, Tf = 4, deg_celsi...
tar_test("feather format", { skip_on_cran() skip_if_not_installed("arrow") envir <- new.env(parent = baseenv()) envir$f <- function() { data.frame(x = 1, y = 2) } x <- target_init( name = "abc", expr = quote(f()), format = "feather" ) store_update_stage_early(x$store, "abc", path_store_d...
/tests/testthat/test-class_feather.R
permissive
billdenney/targets
R
false
false
3,721
r
tar_test("feather format", { skip_on_cran() skip_if_not_installed("arrow") envir <- new.env(parent = baseenv()) envir$f <- function() { data.frame(x = 1, y = 2) } x <- target_init( name = "abc", expr = quote(f()), format = "feather" ) store_update_stage_early(x$store, "abc", path_store_d...
library(shiny) library(shinyjs) library(DT) library(formattable) library(shinythemes) library(shinydashboard) library(shinyWidgets) library(fireData) library(googleAuthR) library(httr) library(gargle) library(stringi) library(sass) #### LOGIN #### getOption("googleAuthR.securitycode") source("secret.R") source("dm....
/app/global.R
no_license
HudoGriz/TRACKIT
R
false
false
10,355
r
library(shiny) library(shinyjs) library(DT) library(formattable) library(shinythemes) library(shinydashboard) library(shinyWidgets) library(fireData) library(googleAuthR) library(httr) library(gargle) library(stringi) library(sass) #### LOGIN #### getOption("googleAuthR.securitycode") source("secret.R") source("dm....
library("DESeq2") library("tximport") library("EnsDb.Hsapiens.v86") library("tidyverse") library("ggrepel") library("gridExtra") library("genefilter") library("geneplotter") library("VennDiagram") library("Rsamtools") library("biomaRt") pdf("HeLa_TAGGGT_repeat_analysis.pdf") samples <- read_tsv("20190103_recei...
/scripts/DESeq2_TAGGGT_repeat_analysis.R
no_license
fcadete/TALES_RNAseq_analysis
R
false
false
17,857
r
library("DESeq2") library("tximport") library("EnsDb.Hsapiens.v86") library("tidyverse") library("ggrepel") library("gridExtra") library("genefilter") library("geneplotter") library("VennDiagram") library("Rsamtools") library("biomaRt") pdf("HeLa_TAGGGT_repeat_analysis.pdf") samples <- read_tsv("20190103_recei...
library(shiny); library(ggplot2) shinyServer(function(input, output) { mu1 <- reactive({ input$mu0 + input$effect.size }) two.sided <- reactive({ if(input$one.two == TRUE){ 2 } else{ 1 } }) za <- reactive({ qnorm(input$a/two.sided(), lower.tail=FALSE) }) zb <- reactive({ qnorm(input$b...
/DDP/server.R
no_license
JihanYu/DDP_project
R
false
false
2,716
r
library(shiny); library(ggplot2) shinyServer(function(input, output) { mu1 <- reactive({ input$mu0 + input$effect.size }) two.sided <- reactive({ if(input$one.two == TRUE){ 2 } else{ 1 } }) za <- reactive({ qnorm(input$a/two.sided(), lower.tail=FALSE) }) zb <- reactive({ qnorm(input$b...
#' Grab the legend and print it as a plot #' #' @param p ggplot2 plot object #' @param x legend object that has been grabbed from a ggplot2 object #' @param ... ignored #' @param plotNew boolean to determine if the `grid.newpage()` command and a new blank rectangle should be printed #' @import ggplot2 #' @export #' @ex...
/R/ggmatrix_legend.R
no_license
cran/GGally
R
false
false
3,490
r
#' Grab the legend and print it as a plot #' #' @param p ggplot2 plot object #' @param x legend object that has been grabbed from a ggplot2 object #' @param ... ignored #' @param plotNew boolean to determine if the `grid.newpage()` command and a new blank rectangle should be printed #' @import ggplot2 #' @export #' @ex...
# 读取数据 library(XLConnect) # 设置文件夹路径 setwd("/media/kaji331/Windows/Users/kaji331/Desktop/zxy补充实验荧光定量") # 读入基因数据 filenames <- list.files(pattern="\\.xls$") for (i in seq_along(filenames)) assign(paste("data_",sub(".xls","",filenames[i]),sep=""), readWorksheetFromFile(filenames[i], ...
/脚本/荧光定量/荧光定量.R
no_license
kaji331/R_scripts
R
false
false
7,874
r
# 读取数据 library(XLConnect) # 设置文件夹路径 setwd("/media/kaji331/Windows/Users/kaji331/Desktop/zxy补充实验荧光定量") # 读入基因数据 filenames <- list.files(pattern="\\.xls$") for (i in seq_along(filenames)) assign(paste("data_",sub(".xls","",filenames[i]),sep=""), readWorksheetFromFile(filenames[i], ...
library(parallel) simRep <- 5000 # Replication times in one simulation pvalue.true <- .05 # Testing type I error b.var <- c(0.0225) # The set of varaince of random covariates b as random slope smooth <- 0 # measurement error is added to M if smooth = 0; no measurement error is added if sooth = 1 cores <- 8 r.sim <- b....
/full simulation/summer/hetero_power/variance0.0225/seed2/heter_power_0.0225_pca_u_seed2_200_50.R
no_license
wma9/FMRI-project
R
false
false
9,199
r
library(parallel) simRep <- 5000 # Replication times in one simulation pvalue.true <- .05 # Testing type I error b.var <- c(0.0225) # The set of varaince of random covariates b as random slope smooth <- 0 # measurement error is added to M if smooth = 0; no measurement error is added if sooth = 1 cores <- 8 r.sim <- b....
#' Apply Box-Cox Power Transformations #' #'Compute the Box-Cox power transformation of a variable. #' #' @param x numeric vector to transform #' @param p power (0 = log); if p is a vector then a matrix of transformed values with columns labelled by powers will be returned. #' @return a vector or matrix of transformed ...
/powers.Rcheck/00_pkg_src/powers/R/boxcox.R
no_license
STAT545-UBC-hw-2018-19/hw07-divita95
R
false
false
509
r
#' Apply Box-Cox Power Transformations #' #'Compute the Box-Cox power transformation of a variable. #' #' @param x numeric vector to transform #' @param p power (0 = log); if p is a vector then a matrix of transformed values with columns labelled by powers will be returned. #' @return a vector or matrix of transformed ...
#' Plotting opioid overdoses by year #' #' This function takes the clean opioid overdoses ED visits or hospitalizations #' data and the the clean population estimates and projections data and produces #' a plot of the number or rate of ED visits or hospitalizations due to opioid #' overdoses by year. #' #' @param clean...
/R/plotting_opioid_overdoses_by_year.R
no_license
timchisamore/opioid-overdose_surveillance
R
false
false
3,268
r
#' Plotting opioid overdoses by year #' #' This function takes the clean opioid overdoses ED visits or hospitalizations #' data and the the clean population estimates and projections data and produces #' a plot of the number or rate of ED visits or hospitalizations due to opioid #' overdoses by year. #' #' @param clean...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/depthproc.R \docType{data} \name{internet.users} \alias{internet.users} \title{Internet view data} \format{ data frame containing 17518 rows and 6 columns --- 17518 working days of the Internet service considered with respect to variables: se...
/man/internet.users.Rd
no_license
zzawadz/DepthProc
R
false
true
624
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/depthproc.R \docType{data} \name{internet.users} \alias{internet.users} \title{Internet view data} \format{ data frame containing 17518 rows and 6 columns --- 17518 working days of the Internet service considered with respect to variables: se...
% Generated by roxygen2: do not edit by hand \name{as.big.data.table} \alias{as.big.data.table} \alias{as.big.data.table.call} \alias{as.big.data.table.data.table} \alias{as.big.data.table.function} \alias{as.big.data.table.list} \title{Convert to big.data.table} \usage{ as.big.data.table(x, ...) \method{as.big.data.t...
/man/as.big.data.table.Rd
no_license
jangorecki/big.data.table
R
false
true
1,836
rd
% Generated by roxygen2: do not edit by hand \name{as.big.data.table} \alias{as.big.data.table} \alias{as.big.data.table.call} \alias{as.big.data.table.data.table} \alias{as.big.data.table.function} \alias{as.big.data.table.list} \title{Convert to big.data.table} \usage{ as.big.data.table(x, ...) \method{as.big.data.t...
SCAD_d <- function(x,lambda,a=3.7){ ## ----------------------------------------------------------------------------------------------------------------- ## The name of the function: SCAD_d ## ----------------------------------------------------------------------------------------------------------------- ...
/R/SCAD_d.R
no_license
Ren-Mingyang/HeteroGGM
R
false
false
1,440
r
SCAD_d <- function(x,lambda,a=3.7){ ## ----------------------------------------------------------------------------------------------------------------- ## The name of the function: SCAD_d ## ----------------------------------------------------------------------------------------------------------------- ...
% Generated by roxygen2 (4.0.2.9000): do not edit by hand \name{ppm.reader} \alias{ppm.reader} \title{Read a PPM file with a .ppm file extension.} \usage{ ppm.reader(data.file, filename, variable.name) } \arguments{ \item{data.file}{The name of the data file to be read.} \item{filename}{The path to the data set to be ...
/man/ppm.reader.Rd
no_license
dschneiderch/ProjectTemplate
R
false
false
755
rd
% Generated by roxygen2 (4.0.2.9000): do not edit by hand \name{ppm.reader} \alias{ppm.reader} \title{Read a PPM file with a .ppm file extension.} \usage{ ppm.reader(data.file, filename, variable.name) } \arguments{ \item{data.file}{The name of the data file to be read.} \item{filename}{The path to the data set to be ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/evaluate.R \name{evaluate_quantile_predictions_cards} \alias{evaluate_quantile_predictions_cards} \title{Evaluate a list of prediction cards} \usage{ evaluate_quantile_predictions_cards( df, predictions_cards, err_measure = weighted_int...
/evalforecast/man/evaluate_quantile_predictions_cards.Rd
permissive
brookslogan/covid-19-iif-blog-post-code
R
false
true
1,171
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/evaluate.R \name{evaluate_quantile_predictions_cards} \alias{evaluate_quantile_predictions_cards} \title{Evaluate a list of prediction cards} \usage{ evaluate_quantile_predictions_cards( df, predictions_cards, err_measure = weighted_int...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gCMAPWeb-package.R \docType{data} \name{cmap-data} \alias{cmap-data} \alias{cmap1} \alias{cmap2} \alias{cmap3} \alias{cmap4} \alias{cmap5} \title{Example reference datasets} \format{cmap1 to 4 are \code{\linkS4class{NChannelSet}} objects each...
/man/cmap-data.Rd
no_license
tomsing1/gCMAPWeb
R
false
true
1,097
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gCMAPWeb-package.R \docType{data} \name{cmap-data} \alias{cmap-data} \alias{cmap1} \alias{cmap2} \alias{cmap3} \alias{cmap4} \alias{cmap5} \title{Example reference datasets} \format{cmap1 to 4 are \code{\linkS4class{NChannelSet}} objects each...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/impute_location_parameter.R \name{impute_mode} \alias{impute_mode} \title{Mode imputation} \usage{ impute_mode(ds, type = "columnwise", convert_tibble = TRUE) } \arguments{ \item{ds}{A data frame or matrix with missing values.} \i...
/man/impute_mode.Rd
no_license
cran/missMethods
R
false
true
1,836
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/impute_location_parameter.R \name{impute_mode} \alias{impute_mode} \title{Mode imputation} \usage{ impute_mode(ds, type = "columnwise", convert_tibble = TRUE) } \arguments{ \item{ds}{A data frame or matrix with missing values.} \i...
# saved as welcome_ui.R tabItem(tabName = "welcome", align = "center", shinyjs::useShinyjs(), shiny::fluidRow(width="85%", # Put content here shiny::column(width=12, shiny::tags$div(style="display:block, height:3%") ...
/VAMBE/app/welcome_ui.R
no_license
jwinter6/Analysis
R
false
false
724
r
# saved as welcome_ui.R tabItem(tabName = "welcome", align = "center", shinyjs::useShinyjs(), shiny::fluidRow(width="85%", # Put content here shiny::column(width=12, shiny::tags$div(style="display:block, height:3%") ...
#' Min Max Arithmetical recombination for DE #' #' Implements the "/mmax" (min-max-arithmetical) recombination for the ExpDE #' framework #' #' @section Warning: #' This recombination operator evaluates \code{4*popsize} candidate solutions #' per iteration of the algorithm. The value of the \code{nfe} counter and th...
/R/recombination_mmax.R
no_license
brunasqz/ExpDE
R
false
false
3,577
r
#' Min Max Arithmetical recombination for DE #' #' Implements the "/mmax" (min-max-arithmetical) recombination for the ExpDE #' framework #' #' @section Warning: #' This recombination operator evaluates \code{4*popsize} candidate solutions #' per iteration of the algorithm. The value of the \code{nfe} counter and th...
library(ape) testtree <- read.tree("7510_4.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="7510_4_unrooted.txt")
/codeml_files/newick_trees_processed/7510_4/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("7510_4.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="7510_4_unrooted.txt")
source("2-Data Cleaning and Feature Engineering.R") var<-c("price_doc", "full_sq", "life_sq_m", "floor", "max_floor", "material", "build_year", "num_room", "kitch_sq", "state", "product_type", #"sub_area", "ID_railroad", "ID_bu...
/3-Naive Regression Model.R
no_license
marrieu/Kaggle-Russian-Housing
R
false
false
2,556
r
source("2-Data Cleaning and Feature Engineering.R") var<-c("price_doc", "full_sq", "life_sq_m", "floor", "max_floor", "material", "build_year", "num_room", "kitch_sq", "state", "product_type", #"sub_area", "ID_railroad", "ID_bu...
context("raw") raw <- as.raw(c(48:57, 0, 48:57)) test_that("Raw vectors are converted to bytearraw", { skip_if_no_python() expect_s3_class(r_to_py(raw), "python.builtin.bytearray") }) test_that("Raw vectors with null bytes roundtrip correctly", { skip_if_no_python() ba <- r_to_py(raw) builtins <- import_bu...
/tests/testthat/test-python-raw.R
permissive
rstudio/reticulate
R
false
false
763
r
context("raw") raw <- as.raw(c(48:57, 0, 48:57)) test_that("Raw vectors are converted to bytearraw", { skip_if_no_python() expect_s3_class(r_to_py(raw), "python.builtin.bytearray") }) test_that("Raw vectors with null bytes roundtrip correctly", { skip_if_no_python() ba <- r_to_py(raw) builtins <- import_bu...
###### Fast pairwise cosine computations #' @export #' @importFrom lsa cosine pairwise <- function(x,y,tvectors=tvectors){ if(is.data.frame(tvectors)){ tvectors <- as.matrix(tvectors) }else if(inherits(tvectors,"textmatrix")){ tvectors <- matrix(tvectors, nrow=nrow(tve...
/R/pairwise.r
no_license
cran/LSAfun
R
false
false
1,724
r
###### Fast pairwise cosine computations #' @export #' @importFrom lsa cosine pairwise <- function(x,y,tvectors=tvectors){ if(is.data.frame(tvectors)){ tvectors <- as.matrix(tvectors) }else if(inherits(tvectors,"textmatrix")){ tvectors <- matrix(tvectors, nrow=nrow(tve...
\name{mathprog-NLP} \alias{rdonlp2NLP} \alias{donlp2NLP} \alias{donlp2NLPControl} \alias{rdonlp2} \alias{rsolnpNLP} \alias{solnpNLP} \alias{solnpNLPControl} \alias{rnlminb2NLP} \alias{nlminb2NLP} \alias{nlminb2NLPControl} \alias{rnlminb2} \alias{ramplNLP} \alias{amplNLP} \alias{amplNLPControl} \title...
/man/mathprog-NLP.Rd
no_license
fdoperezi/fPortfolio
R
false
false
4,733
rd
\name{mathprog-NLP} \alias{rdonlp2NLP} \alias{donlp2NLP} \alias{donlp2NLPControl} \alias{rdonlp2} \alias{rsolnpNLP} \alias{solnpNLP} \alias{solnpNLPControl} \alias{rnlminb2NLP} \alias{nlminb2NLP} \alias{nlminb2NLPControl} \alias{rnlminb2} \alias{ramplNLP} \alias{amplNLP} \alias{amplNLPControl} \title...
# Sarcoma WGBS analysis library(ggplot2) library(plyr) library(VennDiagram) library(gridExtra) library(gplots) library(reshape2) library(wq) library(dplyr) library(RCircos) library(stringr) source('~/HirstLab/Pipeline/R/DMR.figures.R') source('~/HirstLab/Pipeline/R/enrich.R') source('~/HirstLab/Pipeline/R/enrich_GREAT...
/Sarcoma/WGBS.R
no_license
gloriali/HirstLab
R
false
false
4,152
r
# Sarcoma WGBS analysis library(ggplot2) library(plyr) library(VennDiagram) library(gridExtra) library(gplots) library(reshape2) library(wq) library(dplyr) library(RCircos) library(stringr) source('~/HirstLab/Pipeline/R/DMR.figures.R') source('~/HirstLab/Pipeline/R/enrich.R') source('~/HirstLab/Pipeline/R/enrich_GREAT...
###################################### ##### Bayesian logistic regression with MCMC ####### Question 2(c) ##### MCMC sampling with help of MetropolisHastings algorithm set.seed(5) Z = as.data.frame(dat) D = as.matrix(dat) y <- D[,1] X <- D[, 2:6] log.post <- function(y, X, beta, s2 = 100, mu = 0) { n <- length(y) ...
/logistic.R
no_license
gaurav8604003471/Data-Analysis-and-Statistical-Simulation
R
false
false
3,709
r
###################################### ##### Bayesian logistic regression with MCMC ####### Question 2(c) ##### MCMC sampling with help of MetropolisHastings algorithm set.seed(5) Z = as.data.frame(dat) D = as.matrix(dat) y <- D[,1] X <- D[, 2:6] log.post <- function(y, X, beta, s2 = 100, mu = 0) { n <- length(y) ...
# read data https://github.com/YafeiXu/xyfQuantlet/blob/master/2000year.csv d2000=read.csv("YOUR DATA PATH") # do plot plot(as.Date(d2000[,1]),as.numeric(d2000[,6]), xlab="Yearly Date", ylab="USD Millions", type="b",col="blue",pch=17) abline(v=as.Date(d2000[,1])[10],col="red") abline(v=as.Date(d2000[,1])[7],col="gree...
/MARyearlyIssuance.R
no_license
TotallyBullshit/xyfQuantlet
R
false
false
634
r
# read data https://github.com/YafeiXu/xyfQuantlet/blob/master/2000year.csv d2000=read.csv("YOUR DATA PATH") # do plot plot(as.Date(d2000[,1]),as.numeric(d2000[,6]), xlab="Yearly Date", ylab="USD Millions", type="b",col="blue",pch=17) abline(v=as.Date(d2000[,1])[10],col="red") abline(v=as.Date(d2000[,1])[7],col="gree...
#------------------------------------------------------------------------------- # tcplSubsetChid: Subset level 5 data to a single sample per chemical #------------------------------------------------------------------------------- #' @title Subset level 5 data to a single sample per chemical #' #' @description #' \co...
/R/tcplSubsetChid.R
permissive
USEPA/CompTox-ToxCast-tcpl
R
false
false
6,351
r
#------------------------------------------------------------------------------- # tcplSubsetChid: Subset level 5 data to a single sample per chemical #------------------------------------------------------------------------------- #' @title Subset level 5 data to a single sample per chemical #' #' @description #' \co...
library(xgboost) library(data.table) library(mlr) library(dplyr) library(caret) dt1 <- study17_top20 sample <- sample.int(n = nrow(dt1), size = floor(.8*nrow(dt1)), replace = F) traindt <- dt1[sample,] traindt1 <- traindt traindt1 <- traindt1 %>% mutate_each(funs(as.factor), c(Labels)) ## or as.factor(traind...
/XGBoost Traincode Cleaned.R
no_license
jaychoi4830/SMRIbasemodels
R
false
false
3,787
r
library(xgboost) library(data.table) library(mlr) library(dplyr) library(caret) dt1 <- study17_top20 sample <- sample.int(n = nrow(dt1), size = floor(.8*nrow(dt1)), replace = F) traindt <- dt1[sample,] traindt1 <- traindt traindt1 <- traindt1 %>% mutate_each(funs(as.factor), c(Labels)) ## or as.factor(traind...
# This file is part of the standard setup for testthat. # It is recommended that you do not modify it. # # Where should you do additional test configuration? # Learn more about the roles of various files in: # * https://r-pkgs.org/tests.html # * https://testthat.r-lib.org/reference/test_package.html#special-files libr...
/tests/testthat.R
permissive
syncrosim/rsyncrosim
R
false
false
380
r
# This file is part of the standard setup for testthat. # It is recommended that you do not modify it. # # Where should you do additional test configuration? # Learn more about the roles of various files in: # * https://r-pkgs.org/tests.html # * https://testthat.r-lib.org/reference/test_package.html#special-files libr...
#삼 ## append x <- c(1,2) cat(x) x<- append(x,3) cat(x) ## 누적하기 n <- 1 for (i in 1:8) { n <- n+2 } cat(n) ## x=c() x[1] = 1 cat(x) for (i in 2:5) { x[i]=i } cat(x) ## x <- c(1,2,3,4,5) y <- c(10,9,8,7,6) z <- append(x,y) cat(z) ## matrix(c(1,0,0,0),nrow=1) matrix(c(2,3,0,0),nrow=1) c(4:6) c(7:10) mtxSelect<-...
/rlang_006_Matrix.R
no_license
Jzeror/rlang_078
R
false
false
639
r
#삼 ## append x <- c(1,2) cat(x) x<- append(x,3) cat(x) ## 누적하기 n <- 1 for (i in 1:8) { n <- n+2 } cat(n) ## x=c() x[1] = 1 cat(x) for (i in 2:5) { x[i]=i } cat(x) ## x <- c(1,2,3,4,5) y <- c(10,9,8,7,6) z <- append(x,y) cat(z) ## matrix(c(1,0,0,0),nrow=1) matrix(c(2,3,0,0),nrow=1) c(4:6) c(7:10) mtxSelect<-...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/chat_get_pinned_messages.R \name{chat_get_pinned_messages} \alias{chat_get_pinned_messages} \title{Get Pinned Messages} \usage{ chat_get_pinned_messages(tok, roomid, offset = NULL, count = NULL) } \arguments{ \item{roomid}{The room id Require...
/man/chat_get_pinned_messages.Rd
no_license
ColinFay/rrocketchat
R
false
true
572
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/chat_get_pinned_messages.R \name{chat_get_pinned_messages} \alias{chat_get_pinned_messages} \title{Get Pinned Messages} \usage{ chat_get_pinned_messages(tok, roomid, offset = NULL, count = NULL) } \arguments{ \item{roomid}{The room id Require...
get_prefecture <- function(region = "Occitanie") { exceptions <- c("Hautes-Pyrénées", "Pyrénées-Orientales", "Tarn-et-Garonne") osm_url <- "http://nominatim.openstreetmap.org/search/" params <- list(format = "json", details = 0, limit = 1) wiki_url <- "https://fr.wikipedia.org/wiki/" article <- paste0(...
/misc/get_prefecture.R
no_license
MaelDore/datatoolbox
R
false
false
2,099
r
get_prefecture <- function(region = "Occitanie") { exceptions <- c("Hautes-Pyrénées", "Pyrénées-Orientales", "Tarn-et-Garonne") osm_url <- "http://nominatim.openstreetmap.org/search/" params <- list(format = "json", details = 0, limit = 1) wiki_url <- "https://fr.wikipedia.org/wiki/" article <- paste0(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cstringr.R \name{len_as_chr} \alias{len_as_chr} \title{Number Converted To character} \usage{ len_as_chr(x) } \arguments{ \item{x}{integer(1L)} } \value{ character(1L) } \description{ e.g., \code{100} becomes \code{"100"} }
/man/len_as_chr.Rd
no_license
brodieG/cstringr
R
false
true
302
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cstringr.R \name{len_as_chr} \alias{len_as_chr} \title{Number Converted To character} \usage{ len_as_chr(x) } \arguments{ \item{x}{integer(1L)} } \value{ character(1L) } \description{ e.g., \code{100} becomes \code{"100"} }
dObs <- Csnippet(" if (R_FINITE(reports)) { if ( (reports > 0) & (cases == 0) ) { lik = (give_log) ? log(1e-16) : 1e-16; } else { lik = dpois(reports, cases * obsprob, give_log); } }...
/R/ModelSnippet.R
no_license
17nak1/TBE
R
false
false
4,232
r
dObs <- Csnippet(" if (R_FINITE(reports)) { if ( (reports > 0) & (cases == 0) ) { lik = (give_log) ? log(1e-16) : 1e-16; } else { lik = dpois(reports, cases * obsprob, give_log); } }...
######################################################################################## # Table A.12 ######################################################################################## rm(list = ls()) library(xtable) library(dplyr) df <- read.csv(file = "Simulations/Combined/ResScen2.csv",header = T) ## True pa...
/Simulations/Summary/TableA12.R
no_license
daniel258/LongitSemiCompReproduce
R
false
false
3,951
r
######################################################################################## # Table A.12 ######################################################################################## rm(list = ls()) library(xtable) library(dplyr) df <- read.csv(file = "Simulations/Combined/ResScen2.csv",header = T) ## True pa...
library(mclust) args = commandArgs(TRUE) #Prefix of current experiment currexpt = args[1] #cellfloor = No. reads to be considered a cell report2 = read.table(paste0(currexpt,".bam_H9_DHS.txt"),header=T) bkgd.ind = grep("bkgd",report2$Tag) nobkgdmat = report2[-bkgd.ind,] cellcall = Mclust(data.frame(log10(nobkgdmat$To...
/sc_atac_individual_cellcall_plots.R
no_license
resurgo-genetics/scATACseq
R
false
false
3,124
r
library(mclust) args = commandArgs(TRUE) #Prefix of current experiment currexpt = args[1] #cellfloor = No. reads to be considered a cell report2 = read.table(paste0(currexpt,".bam_H9_DHS.txt"),header=T) bkgd.ind = grep("bkgd",report2$Tag) nobkgdmat = report2[-bkgd.ind,] cellcall = Mclust(data.frame(log10(nobkgdmat$To...
library(shiny) library(datasets) require(graphics) shinyUI(fluidPage( headerPanel(img(src = "ddp.jpg"), h2("Developing Data Products: Courserea Project") ), # description and input sidebarPanel( h3('Input Panel'), p('Here we can play with mtcars dataset.'), p('Select the pr...
/Final_Project/ui.R
no_license
Avighan/avighan.github.io
R
false
false
1,227
r
library(shiny) library(datasets) require(graphics) shinyUI(fluidPage( headerPanel(img(src = "ddp.jpg"), h2("Developing Data Products: Courserea Project") ), # description and input sidebarPanel( h3('Input Panel'), p('Here we can play with mtcars dataset.'), p('Select the pr...
#' SSD with Standard Error estimated via a Bootstrap #' #' @param Size a numerical vector giving the size of each individual as a scalar quantity #' @param Sex a character or factor vector recording sex for each individual as 'm' or 'f', individuals should be in the same order as the Size vector #' @param Strata a char...
/R/SSDwSE.R
no_license
TWilliamBell/angler
R
false
false
784
r
#' SSD with Standard Error estimated via a Bootstrap #' #' @param Size a numerical vector giving the size of each individual as a scalar quantity #' @param Sex a character or factor vector recording sex for each individual as 'm' or 'f', individuals should be in the same order as the Size vector #' @param Strata a char...
library(jsonlite) library(plyr) library(dplyr) library(tidyr) library(devtools) library(readr) library(stringr) library(tm) library(SnowballC) library(tidytext) library(wordcloud) library(httr) #List of Years with Billboard data available year_list=1950:2015 set_config(config(ssl_verifypeer = 0L)) get_billboard_data =...
/The Making of Great Music/scripts/music_sentiment.R
no_license
acmy1/TheArtandScienceofData
R
false
false
15,408
r
library(jsonlite) library(plyr) library(dplyr) library(tidyr) library(devtools) library(readr) library(stringr) library(tm) library(SnowballC) library(tidytext) library(wordcloud) library(httr) #List of Years with Billboard data available year_list=1950:2015 set_config(config(ssl_verifypeer = 0L)) get_billboard_data =...
context("npv_4yrotation") test_that("multiplication works", { expect_equal(2 * 2, 4) })
/tests/testthat/test-npv_4yrotation.R
permissive
ericasare1/WetlandEconsRPackage
R
false
false
92
r
context("npv_4yrotation") test_that("multiplication works", { expect_equal(2 * 2, 4) })
##' Generate chains from a branching process with negative binomial ##' offspring distribution ##' ##' @param n number of outbreaks to simulate ##' @param R mean of the offspring distribution ##' @param k dispersion of the offspring distribution ##' @param init number of individuals in the first generation ##' @param m...
/R/simulations.R
no_license
sbfnk/nbbpchainsizes
R
false
false
1,863
r
##' Generate chains from a branching process with negative binomial ##' offspring distribution ##' ##' @param n number of outbreaks to simulate ##' @param R mean of the offspring distribution ##' @param k dispersion of the offspring distribution ##' @param init number of individuals in the first generation ##' @param m...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils_callr.R \name{tar_callr_args_default} \alias{tar_callr_args_default} \title{Default \code{callr} arguments.} \usage{ tar_callr_args_default(callr_function, reporter = NULL) } \arguments{ \item{callr_function}{A function from the \code{c...
/man/tar_callr_args_default.Rd
permissive
ropensci/targets
R
false
true
864
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils_callr.R \name{tar_callr_args_default} \alias{tar_callr_args_default} \title{Default \code{callr} arguments.} \usage{ tar_callr_args_default(callr_function, reporter = NULL) } \arguments{ \item{callr_function}{A function from the \code{c...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotFS.R \name{plotFS} \alias{plotFS} \title{plotFS} \usage{ plotFS(x) } \arguments{ \item{x}{plotFS object} } \description{ plotFS }
/man/plotFS.Rd
no_license
MartinWut/GoeFlexStatCrawler
R
false
true
212
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotFS.R \name{plotFS} \alias{plotFS} \title{plotFS} \usage{ plotFS(x) } \arguments{ \item{x}{plotFS object} } \description{ plotFS }
### Testing RHadoop with rmr2 # Set up variable environment Sys.setenv("HADOOP_CMD"="/usr/local/hadoop/bin/hadoop") Sys.setenv("LD_LIBRARY_PATH"="/usr/local/hadoop/lib/native/") # Load packages library(rhdfs) hdfs.init() library(rmr2) # Set backup as local to test rmr2 features using local file system *used for lea...
/hmnguy01_rmr_examples.R
no_license
ha-nguyen/rhadoop-ubuntu
R
false
false
2,459
r
### Testing RHadoop with rmr2 # Set up variable environment Sys.setenv("HADOOP_CMD"="/usr/local/hadoop/bin/hadoop") Sys.setenv("LD_LIBRARY_PATH"="/usr/local/hadoop/lib/native/") # Load packages library(rhdfs) hdfs.init() library(rmr2) # Set backup as local to test rmr2 features using local file system *used for lea...
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
/mepstrends/hc_care/json/code/r/pctPOP__ind__rsn_MD__.r
permissive
HHS-AHRQ/MEPS-summary-tables
R
false
false
1,150
r
# Install and load packages package_names <- c("survey","dplyr","foreign","devtools") lapply(package_names, function(x) if(!x %in% installed.packages()) install.packages(x)) lapply(package_names, require, character.only=T) install_github("e-mitchell/meps_r_pkg/MEPS") library(MEPS) options(survey.lonely.ps...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summarize_multinom_list.R \name{summarize_multinom_list} \alias{summarise_multinom_list} \alias{summarize_multinom_list} \title{Fit multinomial model and extract summary info on a list of data objects} \usage{ summarize_multinom_list(formula,...
/man/summarize_multinom_list.Rd
no_license
jenniferthompson/ClusterMultinom
R
false
true
5,465
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summarize_multinom_list.R \name{summarize_multinom_list} \alias{summarise_multinom_list} \alias{summarize_multinom_list} \title{Fit multinomial model and extract summary info on a list of data objects} \usage{ summarize_multinom_list(formula,...