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
library(Rlab) ### Name: Exponential ### Title: The Exponential Distribution ### Aliases: Exponential dexp pexp qexp rexp ### Keywords: distribution ### ** Examples dexp(1) - exp(-1) #-> 0
/data/genthat_extracted_code/Rlab/examples/Exponential.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
195
r
library(Rlab) ### Name: Exponential ### Title: The Exponential Distribution ### Aliases: Exponential dexp pexp qexp rexp ### Keywords: distribution ### ** Examples dexp(1) - exp(-1) #-> 0
library(geiger) ### Name: sim.char ### Title: simulate character evolution ### Aliases: sim.char ### Keywords: arith data ### ** Examples geo <- get(data(geospiza)) ## Continuous character -- univariate usims <- sim.char(geo$phy, 0.02, 100) ## Use a simulated dataset in fitContinuous() fitC <- fitContinuous(geo$p...
/data/genthat_extracted_code/geiger/examples/sim.char.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
920
r
library(geiger) ### Name: sim.char ### Title: simulate character evolution ### Aliases: sim.char ### Keywords: arith data ### ** Examples geo <- get(data(geospiza)) ## Continuous character -- univariate usims <- sim.char(geo$phy, 0.02, 100) ## Use a simulated dataset in fitContinuous() fitC <- fitContinuous(geo$p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BSDA-package.R \docType{data} \name{Gpa} \alias{Gpa} \title{High school GPA versus college GPA} \format{A data frame with 10 observations on the following 2 variables. \describe{ \item{HSGPA}{a numeric vector} \item{CollGPA}{a numeric vecto...
/man/Gpa.Rd
no_license
johnsonjc6/BSDA
R
false
true
709
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/BSDA-package.R \docType{data} \name{Gpa} \alias{Gpa} \title{High school GPA versus college GPA} \format{A data frame with 10 observations on the following 2 variables. \describe{ \item{HSGPA}{a numeric vector} \item{CollGPA}{a numeric vecto...
# Title: DAL4 Part 1 # Author: Grant A. Allard # Author's Email: grant@grantallard.com # Date Created: 2021-02-02 # Purpose: # Set Up#### # Libraries library(tidyverse) # Data # Load your Data and assign to gss_df #### gss_df <- read.csv('gss_df.csv') # Script #### # Question A #### # View the data and read the ...
/Maylath_DAL4_1.R
no_license
mmaylath/Maylath-POSC-3410
R
false
false
8,762
r
# Title: DAL4 Part 1 # Author: Grant A. Allard # Author's Email: grant@grantallard.com # Date Created: 2021-02-02 # Purpose: # Set Up#### # Libraries library(tidyverse) # Data # Load your Data and assign to gss_df #### gss_df <- read.csv('gss_df.csv') # Script #### # Question A #### # View the data and read the ...
\name{CommunityProfile} \alias{CommunityProfile} \alias{as.CommunityProfile} \alias{is.CommunityProfile} \alias{plot.CommunityProfile} \alias{CEnvelope} \title{ Diversity or Entropy Profile of a community } \description{ Calculates the diversity or entropy profile of a community, applying a community func...
/man/CommunityProfile.Rd
no_license
thalesshannonwatson/entropart
R
false
false
4,988
rd
\name{CommunityProfile} \alias{CommunityProfile} \alias{as.CommunityProfile} \alias{is.CommunityProfile} \alias{plot.CommunityProfile} \alias{CEnvelope} \title{ Diversity or Entropy Profile of a community } \description{ Calculates the diversity or entropy profile of a community, applying a community func...
getTrainPerf <- function(x) { bestPerf <- x$bestTune colnames(bestPerf) <- gsub("^\\.", "", colnames(bestPerf)) out <- merge(x$results, bestPerf) out <- out[, colnames(out) %in% x$perfNames] colnames(out) <- paste("Train", colnames(out), sep = "") out$method <- x$method out }
/caret_6.0-37/caret/R/getTrainPerf.R
permissive
QunCh/Applied-Predictive-Modeling-with-Python
R
false
false
293
r
getTrainPerf <- function(x) { bestPerf <- x$bestTune colnames(bestPerf) <- gsub("^\\.", "", colnames(bestPerf)) out <- merge(x$results, bestPerf) out <- out[, colnames(out) %in% x$perfNames] colnames(out) <- paste("Train", colnames(out), sep = "") out$method <- x$method out }
#!/usr/bin/env Rscript install.packages("/projectnb/dietzelab/kiwheel/NEFI_pheno/PhenologyBayesModeling",repo=NULL) install.packages("MODISTools",repo="https://cloud.r-project.org/") install.packages("doParallel",repo="https://cloud.r-project.org/") library("PhenologyBayesModeling") library("rjags") library("runjags")...
/createDiurnalFits.R
permissive
EcoForecast/NEFI_pheno
R
false
false
4,234
r
#!/usr/bin/env Rscript install.packages("/projectnb/dietzelab/kiwheel/NEFI_pheno/PhenologyBayesModeling",repo=NULL) install.packages("MODISTools",repo="https://cloud.r-project.org/") install.packages("doParallel",repo="https://cloud.r-project.org/") library("PhenologyBayesModeling") library("rjags") library("runjags")...
#Need to run after line 521 This.sp=names(Table.species) Select.fn=function(dat) { Use="NO" #Minimum number of observations overall N=nrow(dat) #Minimum number of observations per block Table.blk=with(dat,table(BLOCK)) Table.blk=Table.blk[Table.blk>=min.block] #Minimum number of bl...
/Prelim.year.effect.R
no_license
JuanMatiasBraccini/Git_size.and.sex.patterns
R
false
false
4,485
r
#Need to run after line 521 This.sp=names(Table.species) Select.fn=function(dat) { Use="NO" #Minimum number of observations overall N=nrow(dat) #Minimum number of observations per block Table.blk=with(dat,table(BLOCK)) Table.blk=Table.blk[Table.blk>=min.block] #Minimum number of bl...
context("Extract interaction btw predictors 1 and 2") test_that("Correct beta is being pulled", { iris_model <- lm(formula = Sepal.Length ~ Petal.Length * Petal.Width * Sepal.Width, data = iris) iris_sum <- summary(iris_model) x <- iris_sum$coefficients[5] iris_interact <- interact12(iris_model) y <- iris_in...
/tests/testthat/test_interact12.R
no_license
antonyagonzalez/hw09
R
false
false
361
r
context("Extract interaction btw predictors 1 and 2") test_that("Correct beta is being pulled", { iris_model <- lm(formula = Sepal.Length ~ Petal.Length * Petal.Width * Sepal.Width, data = iris) iris_sum <- summary(iris_model) x <- iris_sum$coefficients[5] iris_interact <- interact12(iris_model) y <- iris_in...
skip_connection("dplyr-cumprod") skip_on_livy() sc <- testthat_spark_connection() test_that("cumprod works as expected", { test_requires_version("2.0.0") test_requires("dplyr") for (stats in list( data.frame(id = 1:10, x = c(1:3, -4, 5, -6, 7, 0, 0, 10)), data.frame(id = 1:10, x = c(1:3, -4, 5, -6, 7, N...
/tests/testthat/test-dplyr-cumprod.R
permissive
sparklyr/sparklyr
R
false
false
747
r
skip_connection("dplyr-cumprod") skip_on_livy() sc <- testthat_spark_connection() test_that("cumprod works as expected", { test_requires_version("2.0.0") test_requires("dplyr") for (stats in list( data.frame(id = 1:10, x = c(1:3, -4, 5, -6, 7, 0, 0, 10)), data.frame(id = 1:10, x = c(1:3, -4, 5, -6, 7, N...
#' Estimates the optimal number of clusters using the Slope criterion when silhouette statistics already exists. #' The optimal number of clusters will be verified in the range {2,..., maxClust}. #' #' @param silStats Silhouette statistics. #' @param p Slope adjust parameter. #' @param maxClust The max number of cluste...
/R/nClust.R
no_license
cran/anocva
R
false
false
7,069
r
#' Estimates the optimal number of clusters using the Slope criterion when silhouette statistics already exists. #' The optimal number of clusters will be verified in the range {2,..., maxClust}. #' #' @param silStats Silhouette statistics. #' @param p Slope adjust parameter. #' @param maxClust The max number of cluste...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{italy.regions} \alias{italy.regions} \title{Shape and population data for the regions in Italy} \format{ A simple feature collection frame with 20 rows } \usage{ italy.regions } \description{ Uses the ISTAT 2018 po...
/man/italy.regions.Rd
no_license
alesaccoia/alexr
R
false
true
355
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{italy.regions} \alias{italy.regions} \title{Shape and population data for the regions in Italy} \format{ A simple feature collection frame with 20 rows } \usage{ italy.regions } \description{ Uses the ISTAT 2018 po...
# Description: calculates the mean of a binomial distribution # Inputs # trials: how many trials # prob: probability of successes # Output # a numeric value aux_mean <- function(trials, prob) { avg <- trials * prob return(avg) } # Description: calculates the variance # Inputs # trials: how many trials # ...
/workout3/binomial/R/aux_funcs.R
no_license
stat133-sp19/hw-stat133-melodyjt
R
false
false
1,227
r
# Description: calculates the mean of a binomial distribution # Inputs # trials: how many trials # prob: probability of successes # Output # a numeric value aux_mean <- function(trials, prob) { avg <- trials * prob return(avg) } # Description: calculates the variance # Inputs # trials: how many trials # ...
#' Frailty with random effects in high dimensional data with MCMC #' #' @description Random effects frailty model #' #' @param m Starting column number form where study variables to be selected. #' @param n Ending column number till where study variables will get selected. #' @param Ins Variable name of Institute...
/R/frairand.R
no_license
cran/SurviMChd
R
false
false
3,288
r
#' Frailty with random effects in high dimensional data with MCMC #' #' @description Random effects frailty model #' #' @param m Starting column number form where study variables to be selected. #' @param n Ending column number till where study variables will get selected. #' @param Ins Variable name of Institute...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TrapSimpson.R \docType{class} \name{Trap-class} \alias{Simpson-class,} \alias{Trap-class} \alias{Trap-class,} \alias{initialize,Trap-Simpsonmethod,} \alias{print,Trap-Simpson-method} \alias{show,Trap-Simpson-method,} \title{A Trap and Simpson...
/integrateIt/man/Trap-Simpson-class.Rd
no_license
tmuraoka320/MidTermExam
R
false
true
717
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TrapSimpson.R \docType{class} \name{Trap-class} \alias{Simpson-class,} \alias{Trap-class} \alias{Trap-class,} \alias{initialize,Trap-Simpsonmethod,} \alias{print,Trap-Simpson-method} \alias{show,Trap-Simpson-method,} \title{A Trap and Simpson...
# script is adapted from one in /data/elecs/MXelsCalendGovt/atlasDis/code/ #source(file = "/home/eric/Dropbox/data/elecs/MXelsCalendGovt/atlasDis/code/mapPrep.r") # sólo correr si hubiera cambios en los datos ## # OJO: when using spTranform in script, use line below for google earth, or next line for OSM/google maps ...
/mapasComparados/loc/maps/0code/mapaDisMor.r
permissive
emagar/mxDistritos
R
false
false
33,632
r
# script is adapted from one in /data/elecs/MXelsCalendGovt/atlasDis/code/ #source(file = "/home/eric/Dropbox/data/elecs/MXelsCalendGovt/atlasDis/code/mapPrep.r") # sólo correr si hubiera cambios en los datos ## # OJO: when using spTranform in script, use line below for google earth, or next line for OSM/google maps ...
cred.region <- function(x, y, ...) polygon(c(x, rev(x)), c(y[1,], rev(y[2,])), border=NA, ...) transp <- function(col, alpha=0.5) return(apply(col2rgb(col), 2, function(c) rgb(c[1]/255, c[2]/255, c[3]/255, alpha))) estci <- function(x){val <- cbind(rowMeans(x), t(apply(x, 1, quantile, c(0.5, 0.025, 0.975)))); col...
/R/plot.R
no_license
m-maheu-giroux/eppasm
R
false
false
5,668
r
cred.region <- function(x, y, ...) polygon(c(x, rev(x)), c(y[1,], rev(y[2,])), border=NA, ...) transp <- function(col, alpha=0.5) return(apply(col2rgb(col), 2, function(c) rgb(c[1]/255, c[2]/255, c[3]/255, alpha))) estci <- function(x){val <- cbind(rowMeans(x), t(apply(x, 1, quantile, c(0.5, 0.025, 0.975)))); col...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/trunc_inf.R \name{compIntForZEachSlice} \alias{compIntForZEachSlice} \title{Solve the roots of quadratic polynomials related to truncated \eqn{Z} test} \usage{ compIntForZEachSlice(coef, tol = 1e-15) } \arguments{ \item{coef, }{the coefficien...
/man/compIntForZEachSlice.Rd
no_license
shuxiaoc/outference
R
false
true
961
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/trunc_inf.R \name{compIntForZEachSlice} \alias{compIntForZEachSlice} \title{Solve the roots of quadratic polynomials related to truncated \eqn{Z} test} \usage{ compIntForZEachSlice(coef, tol = 1e-15) } \arguments{ \item{coef, }{the coefficien...
library(XML) doc = xmlParse("waterQuality.xml") dd = xmlToDataFrame(getNodeSet(doc, "//qua_data"))
/rxml.R
no_license
ogckw/Rpractice
R
false
false
101
r
library(XML) doc = xmlParse("waterQuality.xml") dd = xmlToDataFrame(getNodeSet(doc, "//qua_data"))
odds = function(p) p/(1-p) pshort=c(0.01, 0.1, 1/4, 0.5, 3/4, 0.9, 0.99) p = exp(seq(log(0.01), log(0.99), length=1000)) plot(p, odds(p), log='y', type='l', axes=F, ylab="", xlab="", ylim=c(0.001, 100)) axis(1, col.axis='red', at = c(0.01,.1,.25,.5,.75,.9,.99) ) mtext('p', 1, col='red', li...
/odds graph.R
no_license
professorbeautiful/bioinf2118
R
false
false
1,121
r
odds = function(p) p/(1-p) pshort=c(0.01, 0.1, 1/4, 0.5, 3/4, 0.9, 0.99) p = exp(seq(log(0.01), log(0.99), length=1000)) plot(p, odds(p), log='y', type='l', axes=F, ylab="", xlab="", ylim=c(0.001, 100)) axis(1, col.axis='red', at = c(0.01,.1,.25,.5,.75,.9,.99) ) mtext('p', 1, col='red', li...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/is_labelled.R \name{is_labelled} \alias{is_labelled} \title{Check whether object is of class "labelled"} \usage{ is_labelled(x) } \arguments{ \item{x}{An object.} } \value{ Logical, \code{TRUE} if \code{x} inherits from class \cod...
/man/is_labelled.Rd
no_license
cran/sjlabelled
R
false
true
458
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/is_labelled.R \name{is_labelled} \alias{is_labelled} \title{Check whether object is of class "labelled"} \usage{ is_labelled(x) } \arguments{ \item{x}{An object.} } \value{ Logical, \code{TRUE} if \code{x} inherits from class \cod...
dengue_df # instead of removing NAs we can predict them (because most are colinear and testset has nas) naintrain <- colSums(is.na(dengue_df)) naintest <- colSums(is.na(dengue_features_test)) nainfo <- cbind(naintrain, naintest) dengue_df <- na.omit(dengue_df) # summary(dengue_df) ggplot(dengue_df, aes(x = precipi...
/2-1 - Dealing with NA.R
no_license
xeniafl/Hackathon-1-Dengue
R
false
false
1,123
r
dengue_df # instead of removing NAs we can predict them (because most are colinear and testset has nas) naintrain <- colSums(is.na(dengue_df)) naintest <- colSums(is.na(dengue_features_test)) nainfo <- cbind(naintrain, naintest) dengue_df <- na.omit(dengue_df) # summary(dengue_df) ggplot(dengue_df, aes(x = precipi...
## reminders ## setwd("~/Coursera/4-Exploratory Data Analysis/CourseProject1/ExData_Plotting1") ## library(dplyr) ## library(tidyr) plot1 <- function() { ## read household power consumption data hpc <- read.table("../household_power_consumption.txt",nrows=2100000,sep=";",header=TRUE,na.strings="?") ## f...
/plot1.R
no_license
robertr55/ExData_Plotting1
R
false
false
677
r
## reminders ## setwd("~/Coursera/4-Exploratory Data Analysis/CourseProject1/ExData_Plotting1") ## library(dplyr) ## library(tidyr) plot1 <- function() { ## read household power consumption data hpc <- read.table("../household_power_consumption.txt",nrows=2100000,sep=";",header=TRUE,na.strings="?") ## f...
#' @title Rayleigh quotient iteration #' @description Rayleigh quotient iteration algorithm to computing the maximal eigenpair of #' matrix Q. #' #' @param Q The input matrix to find the maximal eigenpair. #' @param mu A vector. #' @param v0_tilde The unnormalized initial vector \eqn{\tilde{v0}}. #' @param zstart The i...
/R/ray.quot.seceig.general.R
no_license
mxjki/EfficientMaxEigenpair
R
false
false
1,864
r
#' @title Rayleigh quotient iteration #' @description Rayleigh quotient iteration algorithm to computing the maximal eigenpair of #' matrix Q. #' #' @param Q The input matrix to find the maximal eigenpair. #' @param mu A vector. #' @param v0_tilde The unnormalized initial vector \eqn{\tilde{v0}}. #' @param zstart The i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \docType{data} \name{hotspot} \alias{hotspot} \alias{hotspot.txt} \title{The package provide a list of known hotspot positions located on the amplicons of the Ion AmpliSeq™ Colon and Lung Cancer Panel v2 as a txt file \code{hotspo...
/man/hotspot.Rd
no_license
DMU-lilab/PlasmaMutationDetectorForLilab
R
false
true
1,172
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \docType{data} \name{hotspot} \alias{hotspot} \alias{hotspot.txt} \title{The package provide a list of known hotspot positions located on the amplicons of the Ion AmpliSeq™ Colon and Lung Cancer Panel v2 as a txt file \code{hotspo...
testlist <- list(data = structure(9.3557334224265e-307, .Dim = c(1L, 1L)), x = structure(7.74860418548935e-304, .Dim = c(1L, 1L))) result <- do.call(distr6:::C_EmpiricalMVPdf,testlist) str(result)
/distr6/inst/testfiles/C_EmpiricalMVPdf/libFuzzer_C_EmpiricalMVPdf/C_EmpiricalMVPdf_valgrind_files/1610036794-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
201
r
testlist <- list(data = structure(9.3557334224265e-307, .Dim = c(1L, 1L)), x = structure(7.74860418548935e-304, .Dim = c(1L, 1L))) result <- do.call(distr6:::C_EmpiricalMVPdf,testlist) str(result)
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/generateWeights.R \name{generateWeights} \alias{generateWeights} \title{generateWeights} \usage{ generateWeights(g, w) } \arguments{ \item{g}{Graph either defined as a matrix (each element defines how much of the local alpha reserved ...
/man/generateWeights.Rd
no_license
allenzhuaz/gMCP
R
false
false
2,089
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/generateWeights.R \name{generateWeights} \alias{generateWeights} \title{generateWeights} \usage{ generateWeights(g, w) } \arguments{ \item{g}{Graph either defined as a matrix (each element defines how much of the local alpha reserved ...
#!/usr/bin/env Rscript suppressPackageStartupMessages({ library(rhdf5) library(pROC) library(mccr) library(reshape2) library(ggplot2) }) #=============================================================================== # # Preparation # #===========================================================...
/model/summarize_performance.R
no_license
Jeff1995/pLocNet
R
false
false
5,747
r
#!/usr/bin/env Rscript suppressPackageStartupMessages({ library(rhdf5) library(pROC) library(mccr) library(reshape2) library(ggplot2) }) #=============================================================================== # # Preparation # #===========================================================...
library(reliaR) ### Name: ks.moew ### Title: Test of Kolmogorov-Smirnov for the Marshall-Olkin Extended ### Exponential(MOEW) distribution ### Aliases: ks.moew ### Keywords: htest ### ** Examples ## Load data sets data(sys2) ## Maximum Likelihood(ML) Estimates of alpha & lambda for the data(sys2) ## alpha.est = 0...
/data/genthat_extracted_code/reliaR/examples/ks.moew.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
438
r
library(reliaR) ### Name: ks.moew ### Title: Test of Kolmogorov-Smirnov for the Marshall-Olkin Extended ### Exponential(MOEW) distribution ### Aliases: ks.moew ### Keywords: htest ### ** Examples ## Load data sets data(sys2) ## Maximum Likelihood(ML) Estimates of alpha & lambda for the data(sys2) ## alpha.est = 0...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/spatial_deconv.R \name{spatial_deconv} \alias{spatial_deconv} \title{spatial_deconv: Deconvolution of ST data} \usage{ spatial_deconv(x = NULL, method = "xcell") } \arguments{ \item{x}{an STList with normalized count matrices. If 'none', only...
/man/spatial_deconv.Rd
permissive
ACSoupir/spatialGE
R
false
true
1,070
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/spatial_deconv.R \name{spatial_deconv} \alias{spatial_deconv} \title{spatial_deconv: Deconvolution of ST data} \usage{ spatial_deconv(x = NULL, method = "xcell") } \arguments{ \item{x}{an STList with normalized count matrices. If 'none', only...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/spinners.R \name{get_spinner_dependencies} \alias{get_spinner_dependencies} \title{Get Dependencies} \usage{ get_spinner_dependencies() } \description{ Get dependencies for preview. } \keyword{internal}
/man/get_spinner_dependencies.Rd
permissive
gadenbuie/waiter
R
false
true
281
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/spinners.R \name{get_spinner_dependencies} \alias{get_spinner_dependencies} \title{Get Dependencies} \usage{ get_spinner_dependencies() } \description{ Get dependencies for preview. } \keyword{internal}
#' @title A list for ligand-receptor pairs #' #' @docType data #' @description this is a list of ligand and receptor pairs #' @usage data(LRpairs) #' @name LRpairs #' @format a table "LRpairs"
/R/LRpairs.R
no_license
XiaojuanShen/LRC3
R
false
false
193
r
#' @title A list for ligand-receptor pairs #' #' @docType data #' @description this is a list of ligand and receptor pairs #' @usage data(LRpairs) #' @name LRpairs #' @format a table "LRpairs"
########## part 2 ############ X0<-cbind(1,kset[,-1])%>%as.matrix g0 <- function(x){ return(x) } g1 <- function(x){ y <- apply(x,MARGIN = 1,exp) return(as.numeric(y)) } g2 <- function(x){ x^2.6 } f<-function(beta,x,m,n){ beta=as.matrix(beta) yHat <- g(x%*%beta) -var(yHat)/(var(yHat)+var(kse...
/final/part2.R
no_license
Magellen/-gene-project
R
false
false
3,166
r
########## part 2 ############ X0<-cbind(1,kset[,-1])%>%as.matrix g0 <- function(x){ return(x) } g1 <- function(x){ y <- apply(x,MARGIN = 1,exp) return(as.numeric(y)) } g2 <- function(x){ x^2.6 } f<-function(beta,x,m,n){ beta=as.matrix(beta) yHat <- g(x%*%beta) -var(yHat)/(var(yHat)+var(kse...
library(Risk) ### Name: expect ### Title: Expectation ### Aliases: expect ### Keywords: Expectation ### ** Examples expect("norm", -Inf, Inf)
/data/genthat_extracted_code/Risk/examples/expect.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
147
r
library(Risk) ### Name: expect ### Title: Expectation ### Aliases: expect ### Keywords: Expectation ### ** Examples expect("norm", -Inf, Inf)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/emusegs.R \name{label} \alias{label} \alias{label.emusegs} \alias{utt} \alias{utt.emusegs} \title{Get labels / utterances from segment list} \usage{ label(segs) } \arguments{ \item{segs}{segment list} } \value{ label / utterance vector } \des...
/man/label.Rd
no_license
crouzet-o/emuR
R
false
true
731
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/emusegs.R \name{label} \alias{label} \alias{label.emusegs} \alias{utt} \alias{utt.emusegs} \title{Get labels / utterances from segment list} \usage{ label(segs) } \arguments{ \item{segs}{segment list} } \value{ label / utterance vector } \des...
\name{fpot} \alias{fpot} \alias{print.pot} \title{Peaks Over Threshold Modelling using the Generalized Pareto or Point Process Representation} \description{ Maximum-likelihood fitting for peaks over threshold modelling, using the Generalized Pareto or Point Process representation, allowing any of the parameters...
/man/fpot.Rd
no_license
cran/evd
R
false
false
9,210
rd
\name{fpot} \alias{fpot} \alias{print.pot} \title{Peaks Over Threshold Modelling using the Generalized Pareto or Point Process Representation} \description{ Maximum-likelihood fitting for peaks over threshold modelling, using the Generalized Pareto or Point Process representation, allowing any of the parameters...
# Names: Daniel Scheerooren & Jorn Dallinga # Team: DD # Date: 12-1-2015 # load libraries library(raster) library(rgdal) # download data download.file(url = 'https://github.com/GeoScripting-WUR/VectorRaster/raw/gh-pages/data/MODIS.zip', destfile = 'data/Modis.zip', method = 'auto') # unzip the data unzip('data/Modis...
/Main.R
no_license
JornDallinga/lesson6_Team_DD_1
R
false
false
2,096
r
# Names: Daniel Scheerooren & Jorn Dallinga # Team: DD # Date: 12-1-2015 # load libraries library(raster) library(rgdal) # download data download.file(url = 'https://github.com/GeoScripting-WUR/VectorRaster/raw/gh-pages/data/MODIS.zip', destfile = 'data/Modis.zip', method = 'auto') # unzip the data unzip('data/Modis...
install.packages("rgdal") install.packages("sp") install.packages("gdalUtils") install.packages("iterators") install.packages("R.oo") install.packages("R.methodsS3") install.packages("foreach") install.packages("R.utils") install.packages("raster") install.packages("arm") install.packages("minqa") install.packages("nlo...
/binder/install.R
permissive
harrisjk/VegMapper
R
false
false
456
r
install.packages("rgdal") install.packages("sp") install.packages("gdalUtils") install.packages("iterators") install.packages("R.oo") install.packages("R.methodsS3") install.packages("foreach") install.packages("R.utils") install.packages("raster") install.packages("arm") install.packages("minqa") install.packages("nlo...
T=10100;y=20;b=0.05;N=50;lamda=20; for (i in 2:T) { b[i] <- rbeta(1,21,N[i-1]-19) N[i] <- rpois(1,lamda*(1-b[i]))+20 } posterior <- 1/factorial(y)/factorial(N-y)*b^y*(1-b)^(N-y)*lamda^N*exp(-1*lamda) #plot(seq(1,T,length=T),N,type="l",xlab="iterations",main="Trace Plot of N",ylim=c(15,60)) #plot(seq(1,T,length=T),b,...
/Lab Assignments/6/Lab Assignment 6-Dai Li.R
no_license
simpletonpeach/Bayesian_Statistics
R
false
false
620
r
T=10100;y=20;b=0.05;N=50;lamda=20; for (i in 2:T) { b[i] <- rbeta(1,21,N[i-1]-19) N[i] <- rpois(1,lamda*(1-b[i]))+20 } posterior <- 1/factorial(y)/factorial(N-y)*b^y*(1-b)^(N-y)*lamda^N*exp(-1*lamda) #plot(seq(1,T,length=T),N,type="l",xlab="iterations",main="Trace Plot of N",ylim=c(15,60)) #plot(seq(1,T,length=T),b,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Roxy_DataObjects.r \docType{data} \name{San_Francisco_Bay_herring_HerringSFB_OM} \alias{San_Francisco_Bay_herring_HerringSFB_OM} \title{San_Francisco_Bay_herring_HerringSFB_OM OM} \format{An object of class \code{OM} of length 1.} \usage{ San...
/man/San_Francisco_Bay_herring_HerringSFB_OM.Rd
no_license
DLMtool/DLMdata
R
false
true
416
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Roxy_DataObjects.r \docType{data} \name{San_Francisco_Bay_herring_HerringSFB_OM} \alias{San_Francisco_Bay_herring_HerringSFB_OM} \title{San_Francisco_Bay_herring_HerringSFB_OM OM} \format{An object of class \code{OM} of length 1.} \usage{ San...
library(dplyr) data=read.csv("stateLevelOccSal.csv") data$OCC_CODE_PREFIX=as.numeric(sapply(data$OCC_CODE, substring, 0, 2)) membership=read.csv("union-occupation-membership.csv") salary=read.csv("union-occupation-wk-salary.csv") #membership$OCC_CODE = seq.int(nrow(membership)) #salary$OCC_CODE = seq.int(nrow(salary...
/join_union_data.R
no_license
bayeshack2016/labor-ssc
R
false
false
948
r
library(dplyr) data=read.csv("stateLevelOccSal.csv") data$OCC_CODE_PREFIX=as.numeric(sapply(data$OCC_CODE, substring, 0, 2)) membership=read.csv("union-occupation-membership.csv") salary=read.csv("union-occupation-wk-salary.csv") #membership$OCC_CODE = seq.int(nrow(membership)) #salary$OCC_CODE = seq.int(nrow(salary...
library('annotatr') title_str <- 'Status' score <- 'Post.P' #Load BED file #Fichero de prueba solo con 2000 lineas del fichero de segmentos del Monocito 1. dm_regions = read_regions(con = 'intersect_E1_f0.7.bed', genome = 'hg19', format = 'bed', rename_name = title_str, rename_score = score) ...
/Epigenomica/Anotacion/annotate_bed.R
no_license
Huertas97/Epigenomics
R
false
false
10,254
r
library('annotatr') title_str <- 'Status' score <- 'Post.P' #Load BED file #Fichero de prueba solo con 2000 lineas del fichero de segmentos del Monocito 1. dm_regions = read_regions(con = 'intersect_E1_f0.7.bed', genome = 'hg19', format = 'bed', rename_name = title_str, rename_score = score) ...
testlist <- list(m = NULL, repetitions = -1465345375L, in_m = structure(c(2.99939408264402e-241, 1.97274569258757e-154), .Dim = 2:1)) result <- do.call(CNull:::communities_individual_based_sampling_beta_interleaved_matrices,testlist) str(result)
/CNull/inst/testfiles/communities_individual_based_sampling_beta_interleaved_matrices/AFL_communities_individual_based_sampling_beta_interleaved_matrices/communities_individual_based_sampling_beta_interleaved_matrices_valgrind_files/1615841139-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
246
r
testlist <- list(m = NULL, repetitions = -1465345375L, in_m = structure(c(2.99939408264402e-241, 1.97274569258757e-154), .Dim = 2:1)) result <- do.call(CNull:::communities_individual_based_sampling_beta_interleaved_matrices,testlist) str(result)
#' Top Trending (GDELT) #' #' Retrieve current (last 15 minute) "top topics" being discussed on stations #' @export gd_top_trending <- function() { query_tv("", mode = "TrendingTopics") }
/R/gd-top-trending.R
no_license
hrbrmstr/newsflash
R
false
false
191
r
#' Top Trending (GDELT) #' #' Retrieve current (last 15 minute) "top topics" being discussed on stations #' @export gd_top_trending <- function() { query_tv("", mode = "TrendingTopics") }
% File src/library/stats/man/preplot.Rd % Part of the R package, https://www.R-project.org % Copyright 1995-2007 R Core Team % Distributed under GPL 2 or later \name{preplot} \alias{preplot} \title{Pre-computations for a Plotting Object} \description{ Compute an object to be used for plots relating to the given mo...
/bin/R-3.5.1/src/library/stats/man/preplot.Rd
permissive
lifebit-ai/exomedepth
R
false
false
728
rd
% File src/library/stats/man/preplot.Rd % Part of the R package, https://www.R-project.org % Copyright 1995-2007 R Core Team % Distributed under GPL 2 or later \name{preplot} \alias{preplot} \title{Pre-computations for a Plotting Object} \description{ Compute an object to be used for plots relating to the given mo...
roundUp <- function(x){ to <- 10 if(x > 0 & x < 100){ round_any(x,to) } else { if(x >100 & x<1000){ round_any(x,(to*20)) } else {if (x>1000) { round_any(x,(to*50)) } }}}
/R_functions/varia/roundUp.R
no_license
jedgroev/PhD-project
R
false
false
171
r
roundUp <- function(x){ to <- 10 if(x > 0 & x < 100){ round_any(x,to) } else { if(x >100 & x<1000){ round_any(x,(to*20)) } else {if (x>1000) { round_any(x,(to*50)) } }}}
#! /usr/bin/env Rscript library(testthat) library(rly) context("Rules with wrong # args") Parser1 <- R6Class("Parser1", public = list( tokens = c('NAME','NUMBER', 'PLUS','MINUS','TIMES','DIVIDE','EQUALS', 'LPAREN','RPAREN'), # Parsing rules precedence = list(c('left','PLUS','MINUS'), ...
/tests/testthat/test.yacc_badargs.R
no_license
caprice-j/rly
R
false
false
3,913
r
#! /usr/bin/env Rscript library(testthat) library(rly) context("Rules with wrong # args") Parser1 <- R6Class("Parser1", public = list( tokens = c('NAME','NUMBER', 'PLUS','MINUS','TIMES','DIVIDE','EQUALS', 'LPAREN','RPAREN'), # Parsing rules precedence = list(c('left','PLUS','MINUS'), ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ee_pyfunc.R \name{ee_pyfunc} \alias{ee_pyfunc} \title{Wrap an R function in a Python function with the same signature.} \usage{ ee_pyfunc(f) } \arguments{ \item{f}{An R function} } \value{ A Python function that calls the R function \code{f} ...
/man/ee_pyfunc.Rd
permissive
Mariaelena2a/rgee
R
false
true
1,299
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ee_pyfunc.R \name{ee_pyfunc} \alias{ee_pyfunc} \title{Wrap an R function in a Python function with the same signature.} \usage{ ee_pyfunc(f) } \arguments{ \item{f}{An R function} } \value{ A Python function that calls the R function \code{f} ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/initialize.R \name{initialize_attributes} \alias{initialize_attributes} \alias{initialize_newlines} \alias{initialize_spaces} \alias{initialize_multi_line} \alias{initialize_indention_ref_pos_id} \alias{initialize_indent} \alias{validate_pars...
/man/initialize_attributes.Rd
permissive
lorenzwalthert/styler
R
false
true
1,115
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/initialize.R \name{initialize_attributes} \alias{initialize_attributes} \alias{initialize_newlines} \alias{initialize_spaces} \alias{initialize_multi_line} \alias{initialize_indention_ref_pos_id} \alias{initialize_indent} \alias{validate_pars...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/general_data_utils.R \name{Setup.MapData} \alias{Setup.MapData} \title{Save compound name for mapping} \usage{ Setup.MapData(mSetObj = NA, qvec) } \arguments{ \item{mSetObj}{Input the name of the created mSetObj (see InitDataObjects)} \item{...
/man/Setup.MapData.Rd
permissive
xia-lab/MetaboAnalystR
R
false
true
498
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/general_data_utils.R \name{Setup.MapData} \alias{Setup.MapData} \title{Save compound name for mapping} \usage{ Setup.MapData(mSetObj = NA, qvec) } \arguments{ \item{mSetObj}{Input the name of the created mSetObj (see InitDataObjects)} \item{...
# functions in this file # Chi2Dist #' #' Computes the \eqn{\chi^2}{chi2} distance between #' the rows of a rectangular matrix (with positive elements). #' #' \code{Chi2Dist}: #' Computes #' the \eqn{I\times I}{I*I} matrix \bold{D} which is the #' \eqn{\chi^2}{chi2} distance matrix between #' the ro...
/R/Chi2Dist.R
no_license
cran/DistatisR
R
false
false
3,966
r
# functions in this file # Chi2Dist #' #' Computes the \eqn{\chi^2}{chi2} distance between #' the rows of a rectangular matrix (with positive elements). #' #' \code{Chi2Dist}: #' Computes #' the \eqn{I\times I}{I*I} matrix \bold{D} which is the #' \eqn{\chi^2}{chi2} distance matrix between #' the ro...
library(graphics) png("WT0h_VS_WT48h_volcano.png") x=readRDS("WT0h_VS_WT48h_dmc_table.rds") smoothScatter(x$mean.diff,-log10(x$diffmeth.p.adj.fdr),xlim=c(-1,1),ylim=c(0,1), xlab = "DNA methylation difference (WT 0h / WT 48h)", ylab = "-log10 FDR") dev.off() x=readRDS("WT24h_VS_WT48h_dmc_tabl...
/volcano_methylation.R
no_license
rtmag/p53_inhouse
R
false
false
3,217
r
library(graphics) png("WT0h_VS_WT48h_volcano.png") x=readRDS("WT0h_VS_WT48h_dmc_table.rds") smoothScatter(x$mean.diff,-log10(x$diffmeth.p.adj.fdr),xlim=c(-1,1),ylim=c(0,1), xlab = "DNA methylation difference (WT 0h / WT 48h)", ylab = "-log10 FDR") dev.off() x=readRDS("WT24h_VS_WT48h_dmc_tabl...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/get_ts_variables.R \name{get_ts_variables} \alias{get_ts_variables} \title{get a vector of timeseries variable name from a site or sites} \usage{ get_ts_variables(site = NULL, session = NULL) } \arguments{ \item{site}{a valid mda.stre...
/man/get_ts_variables.Rd
permissive
ldecicco-USGS/mda.streams
R
false
false
850
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/get_ts_variables.R \name{get_ts_variables} \alias{get_ts_variables} \title{get a vector of timeseries variable name from a site or sites} \usage{ get_ts_variables(site = NULL, session = NULL) } \arguments{ \item{site}{a valid mda.stre...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defunct.R \name{fulltext-defunct} \alias{fulltext-defunct} \title{Defunct functions in fulltext} \description{ \itemize{ \item \link{ft_extract_corpus} Function removed. As part of focusing scope of the package we're trying to limit dependenc...
/man/fulltext-defunct.Rd
permissive
behrica/fulltext
R
false
true
1,207
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/defunct.R \name{fulltext-defunct} \alias{fulltext-defunct} \title{Defunct functions in fulltext} \description{ \itemize{ \item \link{ft_extract_corpus} Function removed. As part of focusing scope of the package we're trying to limit dependenc...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_red5} \alias{grattan_red5} \title{'} \format{ An object of class \code{character} of length 1. } \usage{ grattan_red5 } \description{ ' } \keyword{datasets}
/man/grattan_red5.Rd
permissive
MattCowgill/grattantheme
R
false
true
289
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create_grattan_colours.R \docType{data} \name{grattan_red5} \alias{grattan_red5} \title{'} \format{ An object of class \code{character} of length 1. } \usage{ grattan_red5 } \description{ ' } \keyword{datasets}
# ArcGIS can't read the projection info in GEE outputs for some reason # This script reads in the GEE output rasters, tweaks the datum in the # proj4 projection specification, and writes the rasters back out # Jill Deines # load packages library(raster) # path to directory fileDir <- 'S:/Data/GIS_Data/Downloaded/...
/0.20_GCE_1km_test.R
no_license
jdeines/RS_irrigation
R
false
false
982
r
# ArcGIS can't read the projection info in GEE outputs for some reason # This script reads in the GEE output rasters, tweaks the datum in the # proj4 projection specification, and writes the rasters back out # Jill Deines # load packages library(raster) # path to directory fileDir <- 'S:/Data/GIS_Data/Downloaded/...
## `makeCacheMatrix(x=matrix())` takes in a matrix object and returns a list of special setters and getters ## `cacheSolve(x, ...)` takes in a special matrix objecg and returns the calculated (new or from cache) inverse matrix ## Returns a list of: ## 1) setter for the matrix object ## 2) getter for the matrix object ...
/R Programming JHU/week3_assignment/ProgrammingAssignment2/cachematrix.R
no_license
yashkarle/coursera
R
false
false
1,134
r
## `makeCacheMatrix(x=matrix())` takes in a matrix object and returns a list of special setters and getters ## `cacheSolve(x, ...)` takes in a special matrix objecg and returns the calculated (new or from cache) inverse matrix ## Returns a list of: ## 1) setter for the matrix object ## 2) getter for the matrix object ...
\name{Ramanujan} \alias{Ramanujan} \title{1729 and beyond} \description{ Finds all the numbers <= \code{Nmax} that can be expressed as a sum of two positive integer cubes in at least \code{k} distinct ways. } \usage{ Ramanujan(Nmax, k=2) } \arguments{ \item{Nmax}{ Limit the search to numbers <= \code{Nma...
/man/Ramanujan.Rd
no_license
hpages/Ramanujan
R
false
false
1,289
rd
\name{Ramanujan} \alias{Ramanujan} \title{1729 and beyond} \description{ Finds all the numbers <= \code{Nmax} that can be expressed as a sum of two positive integer cubes in at least \code{k} distinct ways. } \usage{ Ramanujan(Nmax, k=2) } \arguments{ \item{Nmax}{ Limit the search to numbers <= \code{Nma...
getwd() mydata <- read.csv("hpgtuik_ready_vs2.csv") options(max.print=1000000) attach(mydata) summary(mydata) library(psych) describe(mydata)[,c(3,4,5,8,9,10,11,12)] # des <- describe(mydata) #these are just two other options to name your descriptive something and then print in a particular way # print(des,digits=3...
/OLS_recruitment.R
no_license
gokseldemir/Non_ML_Regressions
R
false
false
4,315
r
getwd() mydata <- read.csv("hpgtuik_ready_vs2.csv") options(max.print=1000000) attach(mydata) summary(mydata) library(psych) describe(mydata)[,c(3,4,5,8,9,10,11,12)] # des <- describe(mydata) #these are just two other options to name your descriptive something and then print in a particular way # print(des,digits=3...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tools.R \name{git_add} \alias{git_add} \title{git_add} \usage{ git_add(repo) } \arguments{ \item{repo}{a git2r::repository() object} } \description{ git_add } \keyword{internal}
/man/git_add.Rd
permissive
petermeissner/dratful
R
false
true
257
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tools.R \name{git_add} \alias{git_add} \title{git_add} \usage{ git_add(repo) } \arguments{ \item{repo}{a git2r::repository() object} } \description{ git_add } \keyword{internal}
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fitFfm.R \name{fitFfm} \alias{coef.ffm} \alias{fitFfm} \alias{fitted.ffm} \alias{residuals.ffm} \title{Fit a fundamental factor model using cross-sectional regression} \usage{ fitFfm(data, asset.var, ret.var, date.var, exposure.vars, weight.v...
/man/fitFfm.Rd
no_license
AvinashAcharya/Test_factorAnalytics
R
false
true
8,737
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fitFfm.R \name{fitFfm} \alias{coef.ffm} \alias{fitFfm} \alias{fitted.ffm} \alias{residuals.ffm} \title{Fit a fundamental factor model using cross-sectional regression} \usage{ fitFfm(data, asset.var, ret.var, date.var, exposure.vars, weight.v...
x = 10 y = 20 data = x + y
/firstfile.R
no_license
phurichp/r-prediction
R
false
false
27
r
x = 10 y = 20 data = x + y
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/var_error.R \name{var_error_u} \alias{var_error_u} \title{Estimate the error variance of \mjseqn{u} ratios} \usage{ var_error_u(u, ni, na = NA, dependent_sds = FALSE) } \arguments{ \item{u}{Vector of \mjseqn{u} ratios.} \item{ni}{Vector of i...
/man/var_error_u.Rd
no_license
abblake/psychmeta
R
false
true
2,086
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/var_error.R \name{var_error_u} \alias{var_error_u} \title{Estimate the error variance of \mjseqn{u} ratios} \usage{ var_error_u(u, ni, na = NA, dependent_sds = FALSE) } \arguments{ \item{u}{Vector of \mjseqn{u} ratios.} \item{ni}{Vector of i...
# Reading data age18_29 <- c(M=208, C=45, FP=46, KD=35, MP=110, S=189, V=34, SD=53, Others=88) age30_49 <- c(M=403, C=58, FP=74, KD=42, MP=146, S=413, V=127, SD=93, Others=57) age50_64 <- c(M=370, C=51, FP=60, KD=47, MP=67, S=401, V=59, SD=61, Others=15) age65 <- c(M=383, C=89, FP=86, K...
/Lab 2/Computer-lab-2.R
no_license
GSternelov/Bayesian-Learning
R
false
false
7,761
r
# Reading data age18_29 <- c(M=208, C=45, FP=46, KD=35, MP=110, S=189, V=34, SD=53, Others=88) age30_49 <- c(M=403, C=58, FP=74, KD=42, MP=146, S=413, V=127, SD=93, Others=57) age50_64 <- c(M=370, C=51, FP=60, KD=47, MP=67, S=401, V=59, SD=61, Others=15) age65 <- c(M=383, C=89, FP=86, K...
## Chargement des données # load(here("data", "data.RData")) ## fonction ###### Base individu ###### i <- mutate(i, sexe = factor(sexe, levels = c("Femme", "Homme"))) ## diplome et occupation de ego non renseigné quand ego est chef de famille i <- mutate(i, niveau_d_etudes = ifelse(is.na(niveau_d_etudes), niveau_d...
/import/recodages_individus.R
no_license
scoavoux/Stats_eclectisme_MCC
R
false
false
21,519
r
## Chargement des données # load(here("data", "data.RData")) ## fonction ###### Base individu ###### i <- mutate(i, sexe = factor(sexe, levels = c("Femme", "Homme"))) ## diplome et occupation de ego non renseigné quand ego est chef de famille i <- mutate(i, niveau_d_etudes = ifelse(is.na(niveau_d_etudes), niveau_d...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/variantkey.R \name{FindRefAltByVariantKey} \alias{FindRefAltByVariantKey} \title{Retrieve the REF and ALT strings for the specified VariantKey. Return REF+ALT length or 0 if the VariantKey is not found.} \usage{ FindRefAltByVariantKey(src, la...
/r/variantkey/man/FindRefAltByVariantKey.Rd
permissive
yzharold/variantkey
R
false
true
683
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/variantkey.R \name{FindRefAltByVariantKey} \alias{FindRefAltByVariantKey} \title{Retrieve the REF and ALT strings for the specified VariantKey. Return REF+ALT length or 0 if the VariantKey is not found.} \usage{ FindRefAltByVariantKey(src, la...
# 0 - Paramètres ---------------------------------------------------------- library(readr) # Chargement des données library(R.utils) library(dplyr) library(tm) # Nettoyage du corpus library(stringr) # Nettoyage des chaines de caractères library(koRpus) # Lemmatisation library(parallel) chemin_donnee <- "dat...
/R_script/01_nettoyage_base.R
no_license
AurelieFrechet/JO2024
R
false
false
3,912
r
# 0 - Paramètres ---------------------------------------------------------- library(readr) # Chargement des données library(R.utils) library(dplyr) library(tm) # Nettoyage du corpus library(stringr) # Nettoyage des chaines de caractères library(koRpus) # Lemmatisation library(parallel) chemin_donnee <- "dat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/redcap-write-oneshot.R \name{redcap_write_oneshot} \alias{redcap_write_oneshot} \title{Write/Import records to a REDCap project} \usage{ redcap_write_oneshot( ds, redcap_uri, token, overwrite_with_blanks = TRUE, convert_logical_to_i...
/man/redcap_write_oneshot.Rd
permissive
michalkouril/REDCapR
R
false
true
4,421
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/redcap-write-oneshot.R \name{redcap_write_oneshot} \alias{redcap_write_oneshot} \title{Write/Import records to a REDCap project} \usage{ redcap_write_oneshot( ds, redcap_uri, token, overwrite_with_blanks = TRUE, convert_logical_to_i...
# Display Histograms file <- read.csv("table.csv",TRUE,sep = ",") file$IMC<- (file$Peso/(file$Altura)^2) # Display height histogram altura<- hist(file$Altura, main="Frequência de altura", xlab = "Altura", ylab = "Quantidade de Pessoas") # Display weight histogram peso<- hist(file$Peso, main="Frequência de peso", xl...
/question1H.r
no_license
JohnQ00/Statistics-2019.2
R
false
false
644
r
# Display Histograms file <- read.csv("table.csv",TRUE,sep = ",") file$IMC<- (file$Peso/(file$Altura)^2) # Display height histogram altura<- hist(file$Altura, main="Frequência de altura", xlab = "Altura", ylab = "Quantidade de Pessoas") # Display weight histogram peso<- hist(file$Peso, main="Frequência de peso", xl...
#' Run external command, and wait until finishes #' #' `run` provides an interface similar to [base::system()] and #' [base::system2()], but based on the [process] class. This allows some #' extra features, see below. #' #' `run` supports #' * Specifying a timeout for the command. If the specified time has #' passed,...
/R/run.R
permissive
fxcebx/processx
R
false
false
10,900
r
#' Run external command, and wait until finishes #' #' `run` provides an interface similar to [base::system()] and #' [base::system2()], but based on the [process] class. This allows some #' extra features, see below. #' #' `run` supports #' * Specifying a timeout for the command. If the specified time has #' passed,...
#! /opt/conda/envs/nf-core-cnvcalling/bin/Rscript #'################################################################################# #'################################################################################# #' Filter CNV calls #' - Select common CNVs between CNVnator and erds (reciprocal overlap > 50%) #' -...
/bin/filterCNVs.R
permissive
yocra3/nf-core-cnvcalling
R
false
false
2,661
r
#! /opt/conda/envs/nf-core-cnvcalling/bin/Rscript #'################################################################################# #'################################################################################# #' Filter CNV calls #' - Select common CNVs between CNVnator and erds (reciprocal overlap > 50%) #' -...
# Export functions in NAMESPACE file path<-'./R'; fn<-paste(path, dir(path), sep='/'); fn<-fn[grep('.r$', fn, ignore.case=TRUE)]; if (length(fn)>0) { fnc<-lapply(fn, function(fn) { ln<-scan(fn, what='', flush=TRUE, sep='\n'); ln<-ln[!grepl('^ ', ln)]; ln<-gsub(' ', '', ln); ln<-ln[grep("<-function\\(", ln)]...
/export_functions.r
no_license
zhezhangsh/DEGandMore
R
false
false
520
r
# Export functions in NAMESPACE file path<-'./R'; fn<-paste(path, dir(path), sep='/'); fn<-fn[grep('.r$', fn, ignore.case=TRUE)]; if (length(fn)>0) { fnc<-lapply(fn, function(fn) { ln<-scan(fn, what='', flush=TRUE, sep='\n'); ln<-ln[!grepl('^ ', ln)]; ln<-gsub(' ', '', ln); ln<-ln[grep("<-function\\(", ln)]...
### Script to calculate all trajectories from a table csv #!/usr/bin/env Rscript ## Tablehead format: sid, latitude, longitude, start_UTC, stop_UTC ## start_UTC & stop_UTC format: %d/%m/%Y %H:%M stopifnot(suppressPackageStartupMessages(require(tidyverse, quietly = TRUE))) stopifnot(suppressPackageStartupMessages(requi...
/Scripts/Traj_calc.R
no_license
Tommy-EE/trajectory_calculation
R
false
false
7,273
r
### Script to calculate all trajectories from a table csv #!/usr/bin/env Rscript ## Tablehead format: sid, latitude, longitude, start_UTC, stop_UTC ## start_UTC & stop_UTC format: %d/%m/%Y %H:%M stopifnot(suppressPackageStartupMessages(require(tidyverse, quietly = TRUE))) stopifnot(suppressPackageStartupMessages(requi...
lexicompare <- function(..., vals, binop = `<=`){ ## Row-wise lexicographic comparison ## For use within data.table. ## ## Example: ## DT <- data.table(c1 = c(3,3,1,3,4), c2 = c(3,2,2,1,1), c3 = c(1,1,-2,3,5)) ## vals <- c(3,2,1) ## DT[, cmp := lexicompare(c1,c2,c3, vals=vals)] lcols <- list(...) ...
/R/base.r
permissive
BoostOlive/Rtoolkit
R
false
false
792
r
lexicompare <- function(..., vals, binop = `<=`){ ## Row-wise lexicographic comparison ## For use within data.table. ## ## Example: ## DT <- data.table(c1 = c(3,3,1,3,4), c2 = c(3,2,2,1,1), c3 = c(1,1,-2,3,5)) ## vals <- c(3,2,1) ## DT[, cmp := lexicompare(c1,c2,c3, vals=vals)] lcols <- list(...) ...
hist(as.numeric(SubsetData$Global_active_power),col = "red",main = "Global Active Power",xlab = "Global Active Power (kilowatts)")
/plot1.R
no_license
PunitSachdev/ExploratoryDataScience-Project1
R
false
false
131
r
hist(as.numeric(SubsetData$Global_active_power),col = "red",main = "Global Active Power",xlab = "Global Active Power (kilowatts)")
out<-readRDS("results/cjsMcmc.rds") library(reshape2) library(data.table) library(dplyr) library(plotHacks) library(coda) outArray<-as.array(out) wrangle<-function(x,margin=c(2)){ getSummary<-function(x){ meanX<-mean(x) quantiles<-quantile(x,c(0.025,0.975)) return(c(meanX,quantiles)) } stringSplit<-...
/wrangleCjsOutput.R
no_license
evanchildress/simpleCJS
R
false
false
4,170
r
out<-readRDS("results/cjsMcmc.rds") library(reshape2) library(data.table) library(dplyr) library(plotHacks) library(coda) outArray<-as.array(out) wrangle<-function(x,margin=c(2)){ getSummary<-function(x){ meanX<-mean(x) quantiles<-quantile(x,c(0.025,0.975)) return(c(meanX,quantiles)) } stringSplit<-...
# loading the libraries library("twitteR") library("tm") library("wordcloud") # account info consumer_key <- 'XXXXXXXX' consumer_secret <- 'XXXXXXXXXXXXXX' access_token <- 'XXXXXXXXXxx' access_secret <- 'XXXXXXXXXXXXXX' setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret) # search Twitter b...
/TwitterSocialTrendDiscovery.R
no_license
reynold0510/TwitterDataMingProject
R
false
false
1,585
r
# loading the libraries library("twitteR") library("tm") library("wordcloud") # account info consumer_key <- 'XXXXXXXX' consumer_secret <- 'XXXXXXXXXXXXXX' access_token <- 'XXXXXXXXXxx' access_secret <- 'XXXXXXXXXXXXXX' setup_twitter_oauth(consumer_key, consumer_secret, access_token, access_secret) # search Twitter b...
# Script that computes the optimal threshold (according to Youden's J) for a locus being significant # For a range of per-locus coverages (e.g. 10 to 200), the script simulates various configurations of # the 4 bases (ACGT) for 4 cases: homozygous germline, heterozygous germline, homzygous+somatic, # heterozygous + som...
/scripts/K.r
no_license
ratschlab/secedo
R
false
false
10,922
r
# Script that computes the optimal threshold (according to Youden's J) for a locus being significant # For a range of per-locus coverages (e.g. 10 to 200), the script simulates various configurations of # the 4 bases (ACGT) for 4 cases: homozygous germline, heterozygous germline, homzygous+somatic, # heterozygous + som...
data("raman_hdpe") data("test_lib") test_that("match_spec() gives expected results", { expect_message( ms <- match_spec(raman_hdpe, test_lib, which = "test") ) expect_error(match_spec(raman_hdpe, test_lib)) expect_length(ms, 4) h1 <- c(ms[1,1:3]) expect_equal(h1$sample_name, 5373) expect_equal(h1$spe...
/tests/testthat/test-match_spec.R
permissive
rainyl/OpenSpecy
R
false
false
701
r
data("raman_hdpe") data("test_lib") test_that("match_spec() gives expected results", { expect_message( ms <- match_spec(raman_hdpe, test_lib, which = "test") ) expect_error(match_spec(raman_hdpe, test_lib)) expect_length(ms, 4) h1 <- c(ms[1,1:3]) expect_equal(h1$sample_name, 5373) expect_equal(h1$spe...
\name{plotTranscripts} \alias{plotTranscripts} \title{visualize structure of assembled transcripts} \usage{ plotTranscripts(gene, gown, samples = NULL, colorby = "transcript", meas = "FPKM", legend = TRUE, labelTranscripts = FALSE, main = NULL, colorBorders = FALSE, log = FALSE, logbase = 2) } \arguments{ \item{g...
/man/plotTranscripts.Rd
no_license
jtleek/ballgown
R
false
false
2,228
rd
\name{plotTranscripts} \alias{plotTranscripts} \title{visualize structure of assembled transcripts} \usage{ plotTranscripts(gene, gown, samples = NULL, colorby = "transcript", meas = "FPKM", legend = TRUE, labelTranscripts = FALSE, main = NULL, colorBorders = FALSE, log = FALSE, logbase = 2) } \arguments{ \item{g...
#' Render a dataframe or tibble #' #' @description Render a previously created dataframe or tibble to html, rtf or latex #' #' Create formatted table #' #' @param data The dataframe or tibble to visualise #' @param title Table title to include in the rendered table #' @param caption Table caption to include in the re...
/R/vr_render_table.R
permissive
thomas-neitmann/visR
R
false
false
5,127
r
#' Render a dataframe or tibble #' #' @description Render a previously created dataframe or tibble to html, rtf or latex #' #' Create formatted table #' #' @param data The dataframe or tibble to visualise #' @param title Table title to include in the rendered table #' @param caption Table caption to include in the re...
#Practical 7 #Correlation #Correlation is usually defined as a measure of the #linear relationship between two quantitative variables #(eg. height and weight). #When the values of one variable increase as the values #of the other increase, this is know as positive correlation. #When the values of one variable decr...
/Practical 7.R
no_license
orlafoley/ST1050
R
false
false
5,785
r
#Practical 7 #Correlation #Correlation is usually defined as a measure of the #linear relationship between two quantitative variables #(eg. height and weight). #When the values of one variable increase as the values #of the other increase, this is know as positive correlation. #When the values of one variable decr...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/orient_rpi.R \name{orient_rpi} \alias{orient_rpi} \alias{orient_rpi_file} \alias{is_rpi_oriented} \title{Reorient an Image to RPI orientation} \usage{ orient_rpi(file, verbose = TRUE) orient_rpi_file(file, verbose = TRUE) is_rpi_oriented(fi...
/man/orient_rpi.Rd
no_license
muschellij2/neurobase
R
false
true
1,295
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/orient_rpi.R \name{orient_rpi} \alias{orient_rpi} \alias{orient_rpi_file} \alias{is_rpi_oriented} \title{Reorient an Image to RPI orientation} \usage{ orient_rpi(file, verbose = TRUE) orient_rpi_file(file, verbose = TRUE) is_rpi_oriented(fi...
\name{Chow.Denning} \alias{Chow.Denning} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Chow-Denning Multiple Variance Ratio Tests } \description{ This function returns Chow-Denning test statistics. CD1: test for iid series; CD2: test for uncorrelated series with possible heteroskeda...
/man/Chow.Denning.Rd
no_license
power1588/vrtest
R
false
false
1,194
rd
\name{Chow.Denning} \alias{Chow.Denning} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Chow-Denning Multiple Variance Ratio Tests } \description{ This function returns Chow-Denning test statistics. CD1: test for iid series; CD2: test for uncorrelated series with possible heteroskeda...
#DESeq2_Heatmaps_ect #Will need to load in .csv files from DESeq2_Statistical and datastructure from DESeq2_prepare DESeq2Clusterplot = function(filepath='/Users/HoltLab/Documents/R/Experiments/RNA_seq_ADH2_Nacho_12.28.17/Results/DESeq2/Sig_Dif_expressed_genes/WT_DEX_v_starve_pH_5_sig.txt', filename='WT_DEX_v_starve...
/Heatmap_Genes_differentially_regulate_dQ(instvvs_dex)_vs_regulation_in_WT.R
permissive
gbritt/SWI_SNF_pH_Sensor_RNASeq
R
false
false
2,991
r
#DESeq2_Heatmaps_ect #Will need to load in .csv files from DESeq2_Statistical and datastructure from DESeq2_prepare DESeq2Clusterplot = function(filepath='/Users/HoltLab/Documents/R/Experiments/RNA_seq_ADH2_Nacho_12.28.17/Results/DESeq2/Sig_Dif_expressed_genes/WT_DEX_v_starve_pH_5_sig.txt', filename='WT_DEX_v_starve...
library(xlsx) library(dplyr) library(plyr) inPath <- "D:\\yxue\\Brillinta\\prediction for Jie\\" outPath <- "D:\\yxue\\Brillinta\\prediction for Jie\\predict_result\\" setwd(outPath) #get frequency of mosaic variable fileN <- c('RF_switch_model_prediction_Oct22_S497', # 'RF_nospillover_model_predic...
/Predict_profilling.R
no_license
jzhao0802/TSC
R
false
false
5,060
r
library(xlsx) library(dplyr) library(plyr) inPath <- "D:\\yxue\\Brillinta\\prediction for Jie\\" outPath <- "D:\\yxue\\Brillinta\\prediction for Jie\\predict_result\\" setwd(outPath) #get frequency of mosaic variable fileN <- c('RF_switch_model_prediction_Oct22_S497', # 'RF_nospillover_model_predic...
install.packages("httr")
/install.R
no_license
bernibra/jupyter-lab-meeting
R
false
false
24
r
install.packages("httr")
# load travels (Reisen) # for each category # plot histogram of categories # plot trip frequency, trip length, trip duration ############## rm(list = ls()) library(ggplot2) library(foreign) ############## # subset events by category, return list of subset data frames subset.events.category <- function(events, ...
/Travels_cat_plots/categorical_plots.r
no_license
galenwilkerson/Human-Mobility-Research
R
false
false
7,624
r
# load travels (Reisen) # for each category # plot histogram of categories # plot trip frequency, trip length, trip duration ############## rm(list = ls()) library(ggplot2) library(foreign) ############## # subset events by category, return list of subset data frames subset.events.category <- function(events, ...
filename='學12-1.新生註冊率-以「系(所)」統計 (1).csv' x=read.csv(filename,fileEncoding = "UTF-8")
/ex1.R
no_license
kk09606/0508
R
false
false
112
r
filename='學12-1.新生註冊率-以「系(所)」統計 (1).csv' x=read.csv(filename,fileEncoding = "UTF-8")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/donutPlot.R \name{donutPlot} \alias{donutPlot} \title{simple function for a donut plot of state width/count fractions} \usage{ donutPlot( gs, text = NULL, colorScheme = NULL, ..., fracSize = 5, legend = FALSE ) } \arguments{ \item...
/man/donutPlot.Rd
no_license
ttriche/chromophobe
R
false
true
785
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/donutPlot.R \name{donutPlot} \alias{donutPlot} \title{simple function for a donut plot of state width/count fractions} \usage{ donutPlot( gs, text = NULL, colorScheme = NULL, ..., fracSize = 5, legend = FALSE ) } \arguments{ \item...
if ( requireNamespace("tinytest", quietly=TRUE) ){ tinytest::test_package("sergeant") }
/tests/tinytest.R
permissive
hrbrmstr/sergeant
R
false
false
92
r
if ( requireNamespace("tinytest", quietly=TRUE) ){ tinytest::test_package("sergeant") }
\alias{gtkActionConnectProxy} \name{gtkActionConnectProxy} \title{gtkActionConnectProxy} \description{Connects a widget to an action object as a proxy. Synchronises various properties of the action with the widget (such as label text, icon, tooltip, etc), and attaches a callback so that the action gets activated wh...
/man/gtkActionConnectProxy.Rd
no_license
cran/RGtk2.10
R
false
false
710
rd
\alias{gtkActionConnectProxy} \name{gtkActionConnectProxy} \title{gtkActionConnectProxy} \description{Connects a widget to an action object as a proxy. Synchronises various properties of the action with the widget (such as label text, icon, tooltip, etc), and attaches a callback so that the action gets activated wh...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/learner_mboost_classif_gamboost.R \name{mlr_learners_classif.gamboost} \alias{mlr_learners_classif.gamboost} \alias{LearnerClassifGAMBoost} \title{Boosted Generalized Additive Classification Learner} \description{ Calls \link[mboost:gamboost]...
/man/mlr_learners_classif.gamboost.Rd
no_license
A-Pai/mlr3extralearners
R
false
true
4,104
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/learner_mboost_classif_gamboost.R \name{mlr_learners_classif.gamboost} \alias{mlr_learners_classif.gamboost} \alias{LearnerClassifGAMBoost} \title{Boosted Generalized Additive Classification Learner} \description{ Calls \link[mboost:gamboost]...
#' Generation of virtual species #' #' This package allows generating virtual species distributions, for example #' for testing species distribution modelling protocols. For a complete tutorial, #' see borisleroy.com/virtualspecies #' #' #' @details #' The process of generating a virtual species distribution is divi...
/R/virtualspecies-package.R
no_license
plantarum/virtualspecies
R
false
false
2,869
r
#' Generation of virtual species #' #' This package allows generating virtual species distributions, for example #' for testing species distribution modelling protocols. For a complete tutorial, #' see borisleroy.com/virtualspecies #' #' #' @details #' The process of generating a virtual species distribution is divi...
#' French league results 1933-2022 #' #' All results for French soccer games in the top tier #' from 1933/34 season to 2021/22 season. Doesn't include #' playoff games. Note: this dataset is as is, it has not #' been proof checked. #' #' @format A data frame with 28566 rows and 12 variables: #' \describe{ #' \item{D...
/R/france.R
no_license
jalapic/engsoccerdata
R
false
false
858
r
#' French league results 1933-2022 #' #' All results for French soccer games in the top tier #' from 1933/34 season to 2021/22 season. Doesn't include #' playoff games. Note: this dataset is as is, it has not #' been proof checked. #' #' @format A data frame with 28566 rows and 12 variables: #' \describe{ #' \item{D...
#' Parsing function for \code{\link{search_analytics}} #' #' @param x req$content from API response #' @param dim the dimensions passed from search_analytics #' @param pn PrettyNames passed from search_analytics #' #' @keywords internal #' @family parsing functions parse_search_analytics <- function(x, dim, prettyNames...
/R/reqParse.R
no_license
cran/searchConsoleR
R
false
false
4,271
r
#' Parsing function for \code{\link{search_analytics}} #' #' @param x req$content from API response #' @param dim the dimensions passed from search_analytics #' @param pn PrettyNames passed from search_analytics #' #' @keywords internal #' @family parsing functions parse_search_analytics <- function(x, dim, prettyNames...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_interface.R \name{spark_write_json} \alias{spark_write_json} \title{Write a Spark DataFrame to a JSON file} \usage{ spark_write_json(x, path, mode = NULL, options = list(), partition_by = NULL, ...) } \arguments{ \item{x}{A Spark DataF...
/man/spark_write_json.Rd
permissive
AgrawalAmey/sparklyr
R
false
true
1,912
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_interface.R \name{spark_write_json} \alias{spark_write_json} \title{Write a Spark DataFrame to a JSON file} \usage{ spark_write_json(x, path, mode = NULL, options = list(), partition_by = NULL, ...) } \arguments{ \item{x}{A Spark DataF...
#import data from csv files attach_abund <-read.csv("3um_top2k_abund.csv", row.names = "OTU_ID", check.names=FALSE) free_abund <-read.csv("02um_top2k_abund.csv", row.names = "OTU_ID", check.names=FALSE) taxonomy_attach <- read.csv("3um_taxonomy.csv", row.names = "OTU_ID", check.names = FALSE) taxonomy_free <- read....
/two_way_t-test.R
no_license
M-Kempnich/Presence-and-abundance-of-T6SS
R
false
false
2,874
r
#import data from csv files attach_abund <-read.csv("3um_top2k_abund.csv", row.names = "OTU_ID", check.names=FALSE) free_abund <-read.csv("02um_top2k_abund.csv", row.names = "OTU_ID", check.names=FALSE) taxonomy_attach <- read.csv("3um_taxonomy.csv", row.names = "OTU_ID", check.names = FALSE) taxonomy_free <- read....
training_answers <- c(8, 3) practice <- function() { unlist(lapply(1:2, practice_and_feedback_pages)) } practice_and_feedback_pages <- function(page_number) { list( practice_page(page_number), psychTestR::reactive_page(function(answer, ...) { practice_feedback_page(page_number, answer) }) ) }...
/R/practice.R
permissive
ViolaPsch/MIQ
R
false
false
1,852
r
training_answers <- c(8, 3) practice <- function() { unlist(lapply(1:2, practice_and_feedback_pages)) } practice_and_feedback_pages <- function(page_number) { list( practice_page(page_number), psychTestR::reactive_page(function(answer, ...) { practice_feedback_page(page_number, answer) }) ) }...
# TOOL qc-illumina.R: Illumina (Illumina quality control using boxplots and density plots. This tool should be run on normalized data.) # INPUT normalized.tsv: normalized.tsv TYPE GENE_EXPRS # INPUT META phenodata.tsv: phenodata.tsv TYPE GENERIC # OUTPUT OPTIONAL boxplot.pdf: boxplot.pdf # OUTPUT OPTIONAL boxplot.pn...
/tools/microarray/R/qc-illumina.R
permissive
oheil/chipster-tools
R
false
false
2,438
r
# TOOL qc-illumina.R: Illumina (Illumina quality control using boxplots and density plots. This tool should be run on normalized data.) # INPUT normalized.tsv: normalized.tsv TYPE GENE_EXPRS # INPUT META phenodata.tsv: phenodata.tsv TYPE GENERIC # OUTPUT OPTIONAL boxplot.pdf: boxplot.pdf # OUTPUT OPTIONAL boxplot.pn...