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 |
|---|---|---|---|---|---|---|---|---|---|
elm.fast <- function(y,x,hd=NULL,type=c("lasso","ridge","step","ls"),reps=20,
comb=c("median","mean","mode"),direct=c(FALSE,TRUE),
linscale=c(TRUE,FALSE),output=c("linear","logistic"),
core=c("FALSE","TRUE"),ortho=c(FALSE,TRUE)){
type <- match.arg(type... | /R/elm.fast.R | no_license | edergsc/TStools | R | false | false | 7,268 | r | elm.fast <- function(y,x,hd=NULL,type=c("lasso","ridge","step","ls"),reps=20,
comb=c("median","mean","mode"),direct=c(FALSE,TRUE),
linscale=c(TRUE,FALSE),output=c("linear","logistic"),
core=c("FALSE","TRUE"),ortho=c(FALSE,TRUE)){
type <- match.arg(type... |
library("tidyverse")
filename <- "./result/pacbio/variant_called.tsv"
variant_data <- read_tsv(filename)
variant_data_filtered <- variant_data %>%
filter( share > 2) %>%
mutate(mlpvalue = -phyper(q=share, m=mac1,n=tot1-mac1, k = mac2, lower.tail=FALSE, log.p=TRUE)) %>%
filter(!is.na(mlpvalue))
temp <- ... | /variant_calling/script/call_cooccurence.R | no_license | lizhizhong1992/reconstruct_mito_genome | R | false | false | 1,719 | r | library("tidyverse")
filename <- "./result/pacbio/variant_called.tsv"
variant_data <- read_tsv(filename)
variant_data_filtered <- variant_data %>%
filter( share > 2) %>%
mutate(mlpvalue = -phyper(q=share, m=mac1,n=tot1-mac1, k = mac2, lower.tail=FALSE, log.p=TRUE)) %>%
filter(!is.na(mlpvalue))
temp <- ... |
library(preprocessCore)
exonGeneNames <- function(exonList, GenesDf) {
exonGenes <- exonList %>% as.character() %>% gsub("\\..+", "", .)
indexes <- match(exonGenes, GenesDf[ ,'GeneID'])
exonGenes <- GenesDf[indexes, c('GeneName')] %>% as.character()
geneType <- GenesDf[indexes, c('GeneType')] %>% as.character()
r... | /helperFunctions.R | no_license | hannenhalli-lab/AltSplDevCancer | R | false | false | 2,997 | r | library(preprocessCore)
exonGeneNames <- function(exonList, GenesDf) {
exonGenes <- exonList %>% as.character() %>% gsub("\\..+", "", .)
indexes <- match(exonGenes, GenesDf[ ,'GeneID'])
exonGenes <- GenesDf[indexes, c('GeneName')] %>% as.character()
geneType <- GenesDf[indexes, c('GeneType')] %>% as.character()
r... |
## Set Working Directory
setwd("~/Desktop/Course Project 1")
file <- "~/Desktop/Course Project 1/household_power_consumption.txt"
EPC <- read.table(file, header = TRUE, sep = ";", stringsAsFactors = FALSE, dec = ".")
EPC_Subset <- EPC[EPC$Date %in% c("1/2/2007", "2/2/2007"), ]
## Grab Necessary Data
Gl... | /plot2.R | no_license | uwheartbreaker/ExData_Plotting1 | R | false | false | 661 | r | ## Set Working Directory
setwd("~/Desktop/Course Project 1")
file <- "~/Desktop/Course Project 1/household_power_consumption.txt"
EPC <- read.table(file, header = TRUE, sep = ";", stringsAsFactors = FALSE, dec = ".")
EPC_Subset <- EPC[EPC$Date %in% c("1/2/2007", "2/2/2007"), ]
## Grab Necessary Data
Gl... |
insert_parent_env <- function(env, parent){
env <- as.environment(env)
parent <- as.environment(parent)
old.parent <- parent.env(env)
parent.env(parent) <- old.parent
parent.env(env) <- parent
invisible(parent)
}
if(FALSE){#@testing
a <- new.env(parent = baseenv())
b <- new.env(parent = ... | /R/util-insert_parent_env.R | no_license | RDocTaskForce/extendedRef | R | false | false | 549 | r | insert_parent_env <- function(env, parent){
env <- as.environment(env)
parent <- as.environment(parent)
old.parent <- parent.env(env)
parent.env(parent) <- old.parent
parent.env(env) <- parent
invisible(parent)
}
if(FALSE){#@testing
a <- new.env(parent = baseenv())
b <- new.env(parent = ... |
#' parse a text using spaCy
#'
#' The spacy_parse() function calls spaCy to both tokenize and tag the texts,
#' and returns a data.table of the results. The function provides options on the
#' types of tagsets (\code{tagset_} options) either \code{"google"} or
#' \code{"detailed"}, as well as lemmatization (\code{le... | /R/spacy_parse.R | no_license | MhAmine/spacyr | R | false | false | 7,111 | r | #' parse a text using spaCy
#'
#' The spacy_parse() function calls spaCy to both tokenize and tag the texts,
#' and returns a data.table of the results. The function provides options on the
#' types of tagsets (\code{tagset_} options) either \code{"google"} or
#' \code{"detailed"}, as well as lemmatization (\code{le... |
computeNumericalGradient <- function(J, theta){
#COMPUTENUMERICALGRADIENT Computes the gradient using "finite differences"
#and gives us a numerical estimate of the gradient.
# numgrad = COMPUTENUMERICALGRADIENT(J, theta) computes the numerical
# gradient of the function J around theta. Calling y = J(theta) sho... | /Week5/computeNumericalGradient.R | no_license | Tatortreiniger91/Coursera_Machine_Learning | R | false | false | 1,108 | r | computeNumericalGradient <- function(J, theta){
#COMPUTENUMERICALGRADIENT Computes the gradient using "finite differences"
#and gives us a numerical estimate of the gradient.
# numgrad = COMPUTENUMERICALGRADIENT(J, theta) computes the numerical
# gradient of the function J around theta. Calling y = J(theta) sho... |
date_standards <- function(name, session, start.date, end.date, min.range) {
start.date <- as.Date(start.date)
end.date <- as.Date(end.date)
# If end date is earlier than start date, update the end date to be the same as the new start date
if (end.date < start.date | end.date - start.date < min.range) {
end... | /functions/date_standards_func.R | no_license | cheriels/2017ops_beta | R | false | false | 734 | r | date_standards <- function(name, session, start.date, end.date, min.range) {
start.date <- as.Date(start.date)
end.date <- as.Date(end.date)
# If end date is earlier than start date, update the end date to be the same as the new start date
if (end.date < start.date | end.date - start.date < min.range) {
end... |
## plot1.R
## download data set if it is not already there
fileName <- "household_power_consumption.txt"
if (!file.exists(fileName)) {
require(downloader)
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
zippedFileName <- "household_power_consumption.zip"
download... | /plot1.R | no_license | herofo/ExData_Plotting1 | R | false | false | 962 | r | ## plot1.R
## download data set if it is not already there
fileName <- "household_power_consumption.txt"
if (!file.exists(fileName)) {
require(downloader)
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
zippedFileName <- "household_power_consumption.zip"
download... |
###############################################################################
############################ Process Data Function ###########################
###############################################################################
# This function is for when the user inputs file1_inputa and processing needs... | /Synthetic_app/ProcessingData.R | no_license | lucindanott/CSIRO_Vacation_Project | R | false | false | 4,089 | r | ###############################################################################
############################ Process Data Function ###########################
###############################################################################
# This function is for when the user inputs file1_inputa and processing needs... |
#### Problem 1 ####
#Add the values in the vector and then divide the total by the number of values
f1=function (x) { sum(x)/length(x) }
print(f1(c(1.2,1.5,2.7)))
#result: 1.8
#### Problem 2 ####
f2=function (x){sum (x [! is.na (x)])/length (x [! is.na (x)])}
print(f2(c(1.2,1.5,NA,2.7,NA)))
#result: 1.8
#### Problem... | /Week_3_Quiz.R | no_license | machadob/MSDA | R | false | false | 3,017 | r |
#### Problem 1 ####
#Add the values in the vector and then divide the total by the number of values
f1=function (x) { sum(x)/length(x) }
print(f1(c(1.2,1.5,2.7)))
#result: 1.8
#### Problem 2 ####
f2=function (x){sum (x [! is.na (x)])/length (x [! is.na (x)])}
print(f2(c(1.2,1.5,NA,2.7,NA)))
#result: 1.8
#### Problem... |
library(glmnet)
mydata = read.table("./TrainingSet/RF/pancreas.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.85,family="gaussian",standardize=TRUE)
sink('./Model/EN/Classifier/pancreas/pancreas_085.txt',append... | /Model/EN/Classifier/pancreas/pancreas_085.R | no_license | leon1003/QSMART | R | false | false | 356 | r | library(glmnet)
mydata = read.table("./TrainingSet/RF/pancreas.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.85,family="gaussian",standardize=TRUE)
sink('./Model/EN/Classifier/pancreas/pancreas_085.txt',append... |
#' @import stats
#' @export
maxnet <-
function(p, data, f=maxnet.formula(p, data), regmult=1.0,
regfun=maxnet.default.regularization, addsamplestobackground=T, ...)
{
if (anyNA(data)) stop("NA values in data table. Please remove them and rerun.")
if (addsamplestobackground) {
pdata <- data[p==1,]... | /R/maxnet.R | no_license | cran/maxnet | R | false | false | 2,116 | r | #' @import stats
#' @export
maxnet <-
function(p, data, f=maxnet.formula(p, data), regmult=1.0,
regfun=maxnet.default.regularization, addsamplestobackground=T, ...)
{
if (anyNA(data)) stop("NA values in data table. Please remove them and rerun.")
if (addsamplestobackground) {
pdata <- data[p==1,]... |
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above (assuming you are running R Studio).
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
#library(latex2exp)
library(MASS)
library(shiny)
library(data.table)
library(gg... | /server.R | no_license | firstthefacts/CLT | R | false | false | 7,567 | r | #
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above (assuming you are running R Studio).
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
#library(latex2exp)
library(MASS)
library(shiny)
library(data.table)
library(gg... |
magcutout=function(image, loc = dim(image)/2, box = c(100, 100), shiftloc=TRUE, paddim=TRUE, plot = FALSE, ...){
loc = as.numeric(loc)
xcen = loc[1]
ycen = loc[2]
loc = ceiling(loc)
xlo = ceiling(loc[1] - (box[1]/2 - 0.5))
xhi = ceiling(loc[1] + (box[1]/2 - 0.5))
ylo = ceiling(loc[2] - (box[2]/2 - 0.5))
... | /R/magcutout.R | no_license | taranu/magicaxis | R | false | false | 8,757 | r | magcutout=function(image, loc = dim(image)/2, box = c(100, 100), shiftloc=TRUE, paddim=TRUE, plot = FALSE, ...){
loc = as.numeric(loc)
xcen = loc[1]
ycen = loc[2]
loc = ceiling(loc)
xlo = ceiling(loc[1] - (box[1]/2 - 0.5))
xhi = ceiling(loc[1] + (box[1]/2 - 0.5))
ylo = ceiling(loc[2] - (box[2]/2 - 0.5))
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/objects_doc.R
\docType{data}
\name{cntype.hetloss}
\alias{cntype.hetloss}
\title{copy number type "Heterozygous loss" (loss of one of the two copies).}
\format{character}
\source{
\code{cntype.hetloss <- "Heterozygous loss"}
}
\usage{
cntype.... | /man/cntype.hetloss.Rd | permissive | 1512474508/oncoscanR | R | false | true | 435 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/objects_doc.R
\docType{data}
\name{cntype.hetloss}
\alias{cntype.hetloss}
\title{copy number type "Heterozygous loss" (loss of one of the two copies).}
\format{character}
\source{
\code{cntype.hetloss <- "Heterozygous loss"}
}
\usage{
cntype.... |
#' Calculate statstical power using effect size and confidence interval data
#'
#' Calculate statstical power using effect size and confidence interval data that
#' is typically reported in meta-analyses. Power is calculated assuming
#' the true effect size and a range of effect sizes. The script to calculate power
#' ... | /R/mapower_ul.R | permissive | sayanmitra/metameta | R | false | false | 7,410 | r | #' Calculate statstical power using effect size and confidence interval data
#'
#' Calculate statstical power using effect size and confidence interval data that
#' is typically reported in meta-analyses. Power is calculated assuming
#' the true effect size and a range of effect sizes. The script to calculate power
#' ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DWR.R
\docType{package}
\name{DWR}
\alias{DWR}
\alias{DWR-package}
\title{DWR: a package for getting data from cdec.water.ca.gov}
\description{
The DWR package contains a single function (CDECquery) and two built-in datasets (sensorIDs and st... | /man/DWR.Rd | no_license | Myfanwy/DWRpackage | R | false | true | 724 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DWR.R
\docType{package}
\name{DWR}
\alias{DWR}
\alias{DWR-package}
\title{DWR: a package for getting data from cdec.water.ca.gov}
\description{
The DWR package contains a single function (CDECquery) and two built-in datasets (sensorIDs and st... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_PPP.R
\name{compute_state_length}
\alias{compute_state_length}
\title{Compute the state duration for each state across three equal-size splits of the input data.}
\usage{
compute_state_length(input_data)
}
\description{
Compute the stat... | /man/compute_state_length.Rd | permissive | JasperHG90/sleepsimReval | R | false | true | 398 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils_PPP.R
\name{compute_state_length}
\alias{compute_state_length}
\title{Compute the state duration for each state across three equal-size splits of the input data.}
\usage{
compute_state_length(input_data)
}
\description{
Compute the stat... |
#
# Release Version 130602 build - V1.0 (micromapST)
#
panelFill <-
function(col="#D0D0D0",border=NA,...)
# fill a panel specified by "usr" with a fill color of "col=" and a outline color of "border="
{
xy <- par("usr") # get usr data (x&y scaling) - points on the panel box
# draw pol... | /micromapST/R/panelFunctions.r | no_license | ingted/R-Examples | R | false | false | 10,013 | r | #
# Release Version 130602 build - V1.0 (micromapST)
#
panelFill <-
function(col="#D0D0D0",border=NA,...)
# fill a panel specified by "usr" with a fill color of "col=" and a outline color of "border="
{
xy <- par("usr") # get usr data (x&y scaling) - points on the panel box
# draw pol... |
#reading data from the file
#data is subsetted according to required dates during the read from the file
data <- subset(read.table("household_power_consumption.txt", na.strings = "?", sep = ";", header = TRUE), Date == "1/2/2007" | Date == "2/2/2007")
#adding a new column by concatenating date and time columns and ope... | /plot4.R | no_license | statik22/ExData_Plotting1 | R | false | false | 1,453 | r | #reading data from the file
#data is subsetted according to required dates during the read from the file
data <- subset(read.table("household_power_consumption.txt", na.strings = "?", sep = ";", header = TRUE), Date == "1/2/2007" | Date == "2/2/2007")
#adding a new column by concatenating date and time columns and ope... |
library(dplyr)
#
original_data_url = "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
original_data_filename = "dataset.zip"
if (!file.exists(original_data_filename))
download.file(original_data_url,destfile = original_data_filename)
if(!dir.exists("UCI HAR Dataset")) {
u... | /run_analysis.R | no_license | tdatascience/GettingAndCleaning | R | false | false | 2,843 | r | library(dplyr)
#
original_data_url = "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
original_data_filename = "dataset.zip"
if (!file.exists(original_data_filename))
download.file(original_data_url,destfile = original_data_filename)
if(!dir.exists("UCI HAR Dataset")) {
u... |
library(tidyverse)
library(maps)
middle_ages <- read.csv('middle_ages.csv', stringsAsFactors = FALSE)
renaissance <- read.csv('renaissance.csv', stringsAsFactors = FALSE)
enlight_industrial <- read.csv('enlight_industrial.csv', stringsAsFactors = FALSE)
modern <- read.csv('modern.csv', stringsAsFactors = FALSE)
birth... | /group_project.R | no_license | ivvatt/group_project | R | false | false | 756 | r | library(tidyverse)
library(maps)
middle_ages <- read.csv('middle_ages.csv', stringsAsFactors = FALSE)
renaissance <- read.csv('renaissance.csv', stringsAsFactors = FALSE)
enlight_industrial <- read.csv('enlight_industrial.csv', stringsAsFactors = FALSE)
modern <- read.csv('modern.csv', stringsAsFactors = FALSE)
birth... |
mixer<-function( x, qmin=2, qmax=NULL, method="variational",
directed=NULL, nbiter=10, fpnbiter=5, improve=FALSE, verbose=TRUE )
{
## How the graph is coded ?
if (is.character(x) & (length(x) == 1) ){
## spm file
g <- new("spmgraph",x)
m.save <- getEdges(g)
m <- m.save
NodeN... | /mixer/R/mixer.R | no_license | ingted/R-Examples | R | false | false | 22,332 | r | mixer<-function( x, qmin=2, qmax=NULL, method="variational",
directed=NULL, nbiter=10, fpnbiter=5, improve=FALSE, verbose=TRUE )
{
## How the graph is coded ?
if (is.character(x) & (length(x) == 1) ){
## spm file
g <- new("spmgraph",x)
m.save <- getEdges(g)
m <- m.save
NodeN... |
#' @title count_vowels
#' @description counts the vowels in a string
#' @param a string
#' @return number of vowels
count_vowels <- function(a){
if(!is.character(a)){
stop("invalid input; a string was expected")
}
vowels <- c('a', 'e', 'i', 'o', 'u')
x <- tolower(strsplit(a, "")[[1]])
aa <- as.double... | /workout02/code/functions/count-vowels.R | no_license | nabkizil/stat133_fall2018 | R | false | false | 586 | r | #' @title count_vowels
#' @description counts the vowels in a string
#' @param a string
#' @return number of vowels
count_vowels <- function(a){
if(!is.character(a)){
stop("invalid input; a string was expected")
}
vowels <- c('a', 'e', 'i', 'o', 'u')
x <- tolower(strsplit(a, "")[[1]])
aa <- as.double... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_nbrs.R
\name{get_nbrs}
\alias{get_nbrs}
\title{Get all neighbors of one or more nodes}
\usage{
get_nbrs(graph, nodes)
}
\arguments{
\item{graph}{a graph object of class
\code{dgr_graph}.}
\item{nodes}{a vector of node ID values.}
}
\valu... | /man/get_nbrs.Rd | no_license | DataXujing/DiagrammeR | R | false | true | 1,105 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_nbrs.R
\name{get_nbrs}
\alias{get_nbrs}
\title{Get all neighbors of one or more nodes}
\usage{
get_nbrs(graph, nodes)
}
\arguments{
\item{graph}{a graph object of class
\code{dgr_graph}.}
\item{nodes}{a vector of node ID values.}
}
\valu... |
library(DAMOCLES)
library(picante)
##### Prepare data #####
DuskyTree <- read.tree("your_tree.phy")
comm <- read.csv("comm_phylo.csv", header = TRUE)
comm_sp <- subset(comm, select = -c(elev, Longitude, Latitude, N))
## Match phylogenetic and community data
matched2 <- match.phylo.comm(phy = DuskyTree, comm = comm_s... | /simpleDAMOCLES.R | no_license | jesusNPL/FurnariidesDAMOCLES | R | false | false | 3,293 | r | library(DAMOCLES)
library(picante)
##### Prepare data #####
DuskyTree <- read.tree("your_tree.phy")
comm <- read.csv("comm_phylo.csv", header = TRUE)
comm_sp <- subset(comm, select = -c(elev, Longitude, Latitude, N))
## Match phylogenetic and community data
matched2 <- match.phylo.comm(phy = DuskyTree, comm = comm_s... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 546
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 540
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 540
c
c Input Parameter (command line, file):... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/MayerEichberger-Saffidine/PositionalGames_gttt/ttt_3x3-shape-3-GTTT-2-2-torus-0/ttt_3x3-shape-3-GTTT-2-2-torus-0.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 816 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 546
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 540
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 540
c
c Input Parameter (command line, file):... |
stochprof.search.LNLN <-
function(dataset,n,TY,method="grid",M=10,par.range=NULL,prev.result=NULL,fix.mu=F,fixed.mu,genenames=NULL,print.output=F,use.constraints=F) {
# Calculates the log likelihood function of all model parameters for a given dataset
# at certain parameter values. The so-obtained values are returned i... | /R/stochprof.search.LNLN.R | no_license | fuchslab/stochprofML | R | false | false | 10,507 | r | stochprof.search.LNLN <-
function(dataset,n,TY,method="grid",M=10,par.range=NULL,prev.result=NULL,fix.mu=F,fixed.mu,genenames=NULL,print.output=F,use.constraints=F) {
# Calculates the log likelihood function of all model parameters for a given dataset
# at certain parameter values. The so-obtained values are returned i... |
# hold_num = rep(NA, len)
n_in_pool = 137
len = n_result_sims * n_in_pool
hold_num = rep(NA, len)
#hold_num <- character(len)
# hold_which_bracket <- character(len)
# sim_num <- character(len)
hold_which_bracket = rep(NA, len)
sim_num = rep(NA, len)
calc_bracket_score = function(bracket_created, round_winners){
c... | /Post-Tournament/live_win_prob_pools.R | no_license | eric-thiel/brack_sim | R | false | false | 6,604 | r | # hold_num = rep(NA, len)
n_in_pool = 137
len = n_result_sims * n_in_pool
hold_num = rep(NA, len)
#hold_num <- character(len)
# hold_which_bracket <- character(len)
# sim_num <- character(len)
hold_which_bracket = rep(NA, len)
sim_num = rep(NA, len)
calc_bracket_score = function(bracket_created, round_winners){
c... |
library(stringr)
library(dplyr)
library(purrr)
library(readr)
#### Part 1 ----
test <- c("abcdef", "bababc",
"abbcde", "abcccd",
"aabcdd", "abcdee",
"ababab")
TESTCHKSUM <- 12
data <- read_csv("Input02.txt", col_names = FALSE, col_types = "c")
# counts the number of strings in a vector ... | /Day02/BoxEval.R | permissive | adamsma/AoC2018 | R | false | false | 2,900 | r | library(stringr)
library(dplyr)
library(purrr)
library(readr)
#### Part 1 ----
test <- c("abcdef", "bababc",
"abbcde", "abcccd",
"aabcdd", "abcdee",
"ababab")
TESTCHKSUM <- 12
data <- read_csv("Input02.txt", col_names = FALSE, col_types = "c")
# counts the number of strings in a vector ... |
##' load all data from IntAct ftp
##' @name loadIntActFTP
##' @author Vitalii Kleshchevnikov
##' @description \code{loadIntActFTP} loads all data stored on \link{ftp://ftp.ebi.ac.uk/pub/databases/intact/current/psimitab/} in intact.txt file. Details: \link{https://www.ebi.ac.uk/intact/downloads}. This file contains the... | /R/loadIntActFTP.R | permissive | vitkl/PItools | R | false | false | 2,538 | r | ##' load all data from IntAct ftp
##' @name loadIntActFTP
##' @author Vitalii Kleshchevnikov
##' @description \code{loadIntActFTP} loads all data stored on \link{ftp://ftp.ebi.ac.uk/pub/databases/intact/current/psimitab/} in intact.txt file. Details: \link{https://www.ebi.ac.uk/intact/downloads}. This file contains the... |
################################################################################
### IRD
### Lab 05
### Drzewa decyzyjne cd., drzewa regresji, ocena modeli
################################################################################
################################################################################
#... | /rscripts/IRD_lab_05.R | no_license | JProniewicz/IRD_19_20_Z | R | false | false | 9,143 | r | ################################################################################
### IRD
### Lab 05
### Drzewa decyzyjne cd., drzewa regresji, ocena modeli
################################################################################
################################################################################
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bigquery_objects.R
\name{JsonObject}
\alias{JsonObject}
\title{JsonObject Object}
\usage{
JsonObject()
}
\value{
JsonObject object
}
\description{
JsonObject Object
}
\details{
Autogenerated via \code{\link[googleAuthR]{gar_create_api_objects... | /googlebigqueryv2.auto/man/JsonObject.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 359 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bigquery_objects.R
\name{JsonObject}
\alias{JsonObject}
\title{JsonObject Object}
\usage{
JsonObject()
}
\value{
JsonObject object
}
\description{
JsonObject Object
}
\details{
Autogenerated via \code{\link[googleAuthR]{gar_create_api_objects... |
#' R interface to tencent AI lab's emotion analysis
#'
#' \code{emotion} returns the results of emotion analysis
#' @param text The text is sent to API
#' @param app_key Your app key
#' @param app_id Your app ID
#' @return positive = 1, neuter = 0, nagetive = -1
#' @author Ao Sun <\url{https://ao-sun.github.io/}>
#' @... | /.Rproj.user/F268AFAF/sources/s-8EAE03B/56FCCEDE-contents | no_license | suntiansheng/tencentAI | R | false | false | 1,138 | #' R interface to tencent AI lab's emotion analysis
#'
#' \code{emotion} returns the results of emotion analysis
#' @param text The text is sent to API
#' @param app_key Your app key
#' @param app_id Your app ID
#' @return positive = 1, neuter = 0, nagetive = -1
#' @author Ao Sun <\url{https://ao-sun.github.io/}>
#' @... | |
#set.seed(1000)
mapsize = 201
m = matrix(0, mapsize, mapsize)
r = raster(m, xmn=0, xmx=10, ymn=0, ymx=10)
if(!SA){
snh <- makeClass(r,ceiling(sim_design$snh_fract[row_id]*mapsize*mapsize/sim_design$snh_size[row_id]/100), sim_design$snh_size[row_id], val=1)
snh <- rmSingle(snh)
prop_snh <- mean(values... | /2.generate_maps.R | no_license | mblasirom/LandscapePhenoBee | R | false | false | 1,824 | r | #set.seed(1000)
mapsize = 201
m = matrix(0, mapsize, mapsize)
r = raster(m, xmn=0, xmx=10, ymn=0, ymx=10)
if(!SA){
snh <- makeClass(r,ceiling(sim_design$snh_fract[row_id]*mapsize*mapsize/sim_design$snh_size[row_id]/100), sim_design$snh_size[row_id], val=1)
snh <- rmSingle(snh)
prop_snh <- mean(values... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_sir.R
\name{plot_ioa}
\alias{plot_ioa}
\title{OUTPUT FUNCTION}
\usage{
plot_ioa(SIR, file_name = NULL, ioa_names = NULL,
posterior_pred = TRUE, coolors = "#104F55")
}
\arguments{
\item{SIR}{A fit SIR model}
\item{file_name}{name of a ... | /man/plot_ioa.Rd | no_license | antarctic-humpback-2019-assessment/HumpbackSIR | R | false | true | 843 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot_sir.R
\name{plot_ioa}
\alias{plot_ioa}
\title{OUTPUT FUNCTION}
\usage{
plot_ioa(SIR, file_name = NULL, ioa_names = NULL,
posterior_pred = TRUE, coolors = "#104F55")
}
\arguments{
\item{SIR}{A fit SIR model}
\item{file_name}{name of a ... |
library(survey)
#When using these software products, users must specify that the sample design is “
#With Replacement
#stratum variable (_STSTR),
#the primary sampling unit (_PSU),
#weight (FINALWT_F or CHILDWT_F) -- all of which are on the public use data file.
# ACBS Analysis
ACBS_sample <- ACBS %>%
sel... | /Script/Testing_weights_2.R | no_license | raedkm/TTI-Astham-CI | R | false | false | 1,255 | r |
library(survey)
#When using these software products, users must specify that the sample design is “
#With Replacement
#stratum variable (_STSTR),
#the primary sampling unit (_PSU),
#weight (FINALWT_F or CHILDWT_F) -- all of which are on the public use data file.
# ACBS Analysis
ACBS_sample <- ACBS %>%
sel... |
# scripts related to the 50 original veg plots and env data
source("https://raw.githubusercontent.com/dackerly/PepperwoodVegPlots/master/Analyses/PWfunctions_GitHub.R")
# scripts for the 17 larger hectare tree plots
source("https://raw.githubusercontent.com/dackerly/PepperwoodVegPlots/master/2016/Hectares/hectare_scr... | /source_files.r | no_license | dackerly/PepperwoodVegPlots | R | false | false | 468 | r |
# scripts related to the 50 original veg plots and env data
source("https://raw.githubusercontent.com/dackerly/PepperwoodVegPlots/master/Analyses/PWfunctions_GitHub.R")
# scripts for the 17 larger hectare tree plots
source("https://raw.githubusercontent.com/dackerly/PepperwoodVegPlots/master/2016/Hectares/hectare_scr... |
if (interactive()) {
suppressMessages(require(devtools))
}
| /.Rprofile | permissive | whitneymichelle/ccconnectr | R | false | false | 62 | rprofile | if (interactive()) {
suppressMessages(require(devtools))
}
|
################################################################################
## myInit.R
## 设置
# __1. 账号、密码__
# 2. 文件路径
# 3. 需要的软件包
# __4. 参数设置__
################################################################################
pkgs <- c("tidyverse", "data.table", "parallel",
"RMySQL", "stringr", "bit64",... | /projects/Alpha101/conf/myInit.R | no_license | maxclchen/myStrat.bk | R | false | false | 2,386 | r | ################################################################################
## myInit.R
## 设置
# __1. 账号、密码__
# 2. 文件路径
# 3. 需要的软件包
# __4. 参数设置__
################################################################################
pkgs <- c("tidyverse", "data.table", "parallel",
"RMySQL", "stringr", "bit64",... |
# composite figure script
# --------------------------------------
# Loading in data to make figures from script 8
load("processed_data/gam.temp_temp_only.Rdata") # gam.temp
load("processed_data/gam.time_time_only.Rdata") # gam.time
load("processed_data/gam.time.temp_time_temp.Rdata") # gam.time.temp
load("processed... | /Example_Temporal_TreeRings/scripts/3_composite_figure.R | no_license | caseyyoungflesh/MSB_Non-Stationarity | R | false | false | 5,571 | r | # composite figure script
# --------------------------------------
# Loading in data to make figures from script 8
load("processed_data/gam.temp_temp_only.Rdata") # gam.temp
load("processed_data/gam.time_time_only.Rdata") # gam.time
load("processed_data/gam.time.temp_time_temp.Rdata") # gam.time.temp
load("processed... |
#################################
########### ECON 494 ############
# DESCRIPTIVE ANALYTICS PROJECT #
######## NOELLE FREEBURG ########
#GETTING & CLEANING PROJECT DATA#
#1. GETTING:
install.packages("readxl") #install package to allow R to read Excel files
library("readxl") #load readxl package
my_data<-read_excel(... | /ECON 494, Project 1.R | no_license | nfreeburg/Analytics_Projects | R | false | false | 3,354 | r | #################################
########### ECON 494 ############
# DESCRIPTIVE ANALYTICS PROJECT #
######## NOELLE FREEBURG ########
#GETTING & CLEANING PROJECT DATA#
#1. GETTING:
install.packages("readxl") #install package to allow R to read Excel files
library("readxl") #load readxl package
my_data<-read_excel(... |
##############################################################################
## Out of sample validation
## Author: Amelia Bertozzi-Villa
## Description: Give an example of out-of-sample validation, using the
## Salaries dataset. The question: which regression is better at
## predicting sal... | /module_10/part_1/validation_example.r | no_license | bertozzivill/infx572_winter17 | R | false | false | 2,275 | r | ##############################################################################
## Out of sample validation
## Author: Amelia Bertozzi-Villa
## Description: Give an example of out-of-sample validation, using the
## Salaries dataset. The question: which regression is better at
## predicting sal... |
#' Check data for bind function.
#'
#' check if the data is available for \code{rbind()} or \code{cbind()}
#'
#' @param data A list containing different sublists ready to be processed by \code{do.call('rbind')}
#' or \code{do.call('cbind')}
#' @param bind A string showing which bind you are going to use can be... | /hyfo/R/check.R | no_license | ingted/R-Examples | R | false | false | 4,695 | r | #' Check data for bind function.
#'
#' check if the data is available for \code{rbind()} or \code{cbind()}
#'
#' @param data A list containing different sublists ready to be processed by \code{do.call('rbind')}
#' or \code{do.call('cbind')}
#' @param bind A string showing which bind you are going to use can be... |
library(GenEst)
### Name: aicc.cpm
### Title: Extract AIC and AICc for a carcass persistence model
### Aliases: aicc.cpm
### ** Examples
data(wind_RP)
mod <- cpm(formula_l = l ~ Season, formula_s = s ~ Season,
data = wind_RP$CP, left = "LastPresent", right = "FirstAbsent")
aicc(mod)
| /data/genthat_extracted_code/GenEst/examples/aicc.cpm.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 308 | r | library(GenEst)
### Name: aicc.cpm
### Title: Extract AIC and AICc for a carcass persistence model
### Aliases: aicc.cpm
### ** Examples
data(wind_RP)
mod <- cpm(formula_l = l ~ Season, formula_s = s ~ Season,
data = wind_RP$CP, left = "LastPresent", right = "FirstAbsent")
aicc(mod)
|
\name{p.ancova_to_d1}
\alias{p.ancova_to_d1}
\title{One-tailed p-value from ANCOVA to Standardized Mean Difference (d)
}
\description{Converts a one-tailed p-value from ANCOVA reported in the primary study to a standardized mean difference (d)}
\usage{
p.ancova_to_d1(p, n.1, n.2, R, q)
}
\arguments{
\item{p}{One-tail... | /man/p.ancova_to_d1.Rd | no_license | acdelre/MAd | R | false | false | 1,502 | rd | \name{p.ancova_to_d1}
\alias{p.ancova_to_d1}
\title{One-tailed p-value from ANCOVA to Standardized Mean Difference (d)
}
\description{Converts a one-tailed p-value from ANCOVA reported in the primary study to a standardized mean difference (d)}
\usage{
p.ancova_to_d1(p, n.1, n.2, R, q)
}
\arguments{
\item{p}{One-tail... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spacy_functions.R
\name{SPCY_PreTopicFrame}
\alias{SPCY_PreTopicFrame}
\title{Parse sentences strings using SPACY as the parsing engine, and prep sentences for running through topic model}
\usage{
SPCY_PreTopicFrame(CORPUS_A, sample_num = 0, ... | /man/SPCY_PreTopicFrame.Rd | permissive | qcmuu/eparTextTools | R | false | true | 1,081 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spacy_functions.R
\name{SPCY_PreTopicFrame}
\alias{SPCY_PreTopicFrame}
\title{Parse sentences strings using SPACY as the parsing engine, and prep sentences for running through topic model}
\usage{
SPCY_PreTopicFrame(CORPUS_A, sample_num = 0, ... |
\name{LCTS}
\alias{LCTS}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Computes a Linear Combination Test Statistics}
\description{Given a particular linear combination, specified in terms of
coefficients, cfs, this functions forms the linear combination of
two time series, tsx, tsy and return... | /man/LCTS.Rd | no_license | cran/costat | R | false | false | 3,120 | rd | \name{LCTS}
\alias{LCTS}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Computes a Linear Combination Test Statistics}
\description{Given a particular linear combination, specified in terms of
coefficients, cfs, this functions forms the linear combination of
two time series, tsx, tsy and return... |
#' Write NSSP BioSense Platform Data Quality Summary Reports for One Facility
#'
#' @description
#' This function is a lightweight version of the `write_reports` function. It will generate summary and example workbooks, but only for
#' one specified facility. The first summary workbook shows percents and counts of null... | /R/write_facility.R | no_license | markhwhiteii/biosensequality | R | false | false | 10,686 | r | #' Write NSSP BioSense Platform Data Quality Summary Reports for One Facility
#'
#' @description
#' This function is a lightweight version of the `write_reports` function. It will generate summary and example workbooks, but only for
#' one specified facility. The first summary workbook shows percents and counts of null... |
install.packages("glmnet_2.0-16")
BiocManager::install("glmnet")
require(devtools)
install_version("glmnet", version = "2.0-16", repos = "http://cran.us.r-project.org")
# Loaging the library
library(glmnet)
# Loading the data
data(swiss)
x_vars <- model.matrix(Fertility~. , swiss)[,-1]
y_var <- swiss$Fertility
data ... | /test/Regression/Test_Regression.R | no_license | haojiang9999/HCA_script | R | false | false | 2,433 | r | install.packages("glmnet_2.0-16")
BiocManager::install("glmnet")
require(devtools)
install_version("glmnet", version = "2.0-16", repos = "http://cran.us.r-project.org")
# Loaging the library
library(glmnet)
# Loading the data
data(swiss)
x_vars <- model.matrix(Fertility~. , swiss)[,-1]
y_var <- swiss$Fertility
data ... |
# PACKAGES ----------------------------------------------------------------
library(tidyverse)
library(gh)
# GLOBAL VARS -------------------------------------------------------------
outputDir <- "485_responses"
path_dropbox <- "~/dropbox/"
path_csv_files <- paste0(path_dropbox, outputDir)
org_name <- "SEMO-GABD" ... | /purrr_test.R | permissive | mtaylor-semo/shiny485 | R | false | false | 2,754 | r |
# PACKAGES ----------------------------------------------------------------
library(tidyverse)
library(gh)
# GLOBAL VARS -------------------------------------------------------------
outputDir <- "485_responses"
path_dropbox <- "~/dropbox/"
path_csv_files <- paste0(path_dropbox, outputDir)
org_name <- "SEMO-GABD" ... |
#' Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL)
#'
#' Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL)
#'
#' @param x object of class sf, sfc or sfg
#' @param crs either an object of class \code{crs}, or input to \link[sf]{st_crs} (pr... | /R/transform.R | no_license | RafaMariano/lwgeom | R | false | false | 2,672 | r | #' Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL)
#'
#' Transform or convert coordinates of simple features directly with Proj.4 (bypassing GDAL)
#'
#' @param x object of class sf, sfc or sfg
#' @param crs either an object of class \code{crs}, or input to \link[sf]{st_crs} (pr... |
library(landscapemetrics)
### Name: lsm_l_te
### Title: TE (landscape level)
### Aliases: lsm_l_te lsm_l_te.RasterLayer lsm_l_te.RasterStack
### lsm_l_te.RasterBrick lsm_l_te.stars lsm_l_te.list
### ** Examples
lsm_l_te(landscape)
| /data/genthat_extracted_code/landscapemetrics/examples/lsm_l_te.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 241 | r | library(landscapemetrics)
### Name: lsm_l_te
### Title: TE (landscape level)
### Aliases: lsm_l_te lsm_l_te.RasterLayer lsm_l_te.RasterStack
### lsm_l_te.RasterBrick lsm_l_te.stars lsm_l_te.list
### ** Examples
lsm_l_te(landscape)
|
date_tag = "210317"
source(paste0("/.mounts/labs/reimandlab/private/users/oocsenas/CA2M/",
# source(paste0("/.mounts/labs/reimandlab/private/users/jreimand/CA2M/",
date_tag,
"/bin/000_HEADER.R"))
input_data_dir = "/.mounts/labs/reimandlab/private/users/oocsenas/CA2M/INPUT_DATA/"
#Load in pval and qval dt
windo... | /.ipynb_checkpoints/005E_get_errors_forgenes-checkpoint.R | no_license | reimandlab/CA2M | R | false | false | 3,126 | r | date_tag = "210317"
source(paste0("/.mounts/labs/reimandlab/private/users/oocsenas/CA2M/",
# source(paste0("/.mounts/labs/reimandlab/private/users/jreimand/CA2M/",
date_tag,
"/bin/000_HEADER.R"))
input_data_dir = "/.mounts/labs/reimandlab/private/users/oocsenas/CA2M/INPUT_DATA/"
#Load in pval and qval dt
windo... |
library(ggplot2)
library(tidyr)
library(reshape2)
library(dplyr)
library(tictactoe)
set.seed(123)
p <- ttt_random()
o <- ttt_qlearn(p, N = 5000)
dat <- select(o, -n_sim) %>%
spread(key = res, value = Freq, fill = 0) %>%
melt(id.vars = "n_train", variable.name = "result_num", value.name = "frac")
dat$result <- "... | /examples/qlearn-example.R | no_license | MangalMakwana/tictactoe | R | false | false | 840 | r | library(ggplot2)
library(tidyr)
library(reshape2)
library(dplyr)
library(tictactoe)
set.seed(123)
p <- ttt_random()
o <- ttt_qlearn(p, N = 5000)
dat <- select(o, -n_sim) %>%
spread(key = res, value = Freq, fill = 0) %>%
melt(id.vars = "n_train", variable.name = "result_num", value.name = "frac")
dat$result <- "... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/function_calc_ci_coverage.R
\name{calc_ci_coverage}
\alias{calc_ci_coverage}
\title{Calculate coverage of confidence intervals}
\usage{
calc_ci_coverage(x, groups_col)
}
\arguments{
\item{x}{Data frame. Output of boot_sample function.}
\item... | /man/calc_ci_coverage.Rd | no_license | guysutton/ThermalSampleR | R | false | true | 941 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/function_calc_ci_coverage.R
\name{calc_ci_coverage}
\alias{calc_ci_coverage}
\title{Calculate coverage of confidence intervals}
\usage{
calc_ci_coverage(x, groups_col)
}
\arguments{
\item{x}{Data frame. Output of boot_sample function.}
\item... |
#' Load complete package.
#'
#' @param pkg package description, can be path or package name. See
#' \code{\link{as.package}} for more information
#' @param reset clear package environment and reset file cache before loading
#' any pieces of the package.
#'
#' @keywords programming
#' @export
load_all <- function(... | /R/load.r | no_license | andrie/devtools | R | false | false | 1,213 | r | #' Load complete package.
#'
#' @param pkg package description, can be path or package name. See
#' \code{\link{as.package}} for more information
#' @param reset clear package environment and reset file cache before loading
#' any pieces of the package.
#'
#' @keywords programming
#' @export
load_all <- function(... |
# Questions
# You must address the following questions and tasks in your exploratory analysis. For each question/task you will need to make a single plot. Unless specified, you can use any plotting system in R to make your plot.
library(plyr);
library(ggplot2);
NEI <- readRDS("exdata_data_NEI_data/summarySCC_PM25.rds"... | /Project2/plot6.R | no_license | GityHuby/Exploratory-Data-Analysis | R | false | false | 1,354 | r | # Questions
# You must address the following questions and tasks in your exploratory analysis. For each question/task you will need to make a single plot. Unless specified, you can use any plotting system in R to make your plot.
library(plyr);
library(ggplot2);
NEI <- readRDS("exdata_data_NEI_data/summarySCC_PM25.rds"... |
\name{robpca}
\alias{robpca}
\title{
ROBust PCA algorithm
}
\description{
ROBPCA algorithm of Hubert et al. (2005) including reweighting (Engelen et al., 2005) and possible extension to skewed data (Hubert et al., 2009).
}
\usage{
robpca (x, k = 0, kmax = 10, alpha = 0.75, h = NULL, mcd = FALSE,
ndir = "all... | /man/robpca.Rd | no_license | Sandy4321/rospca | R | false | false | 6,111 | rd | \name{robpca}
\alias{robpca}
\title{
ROBust PCA algorithm
}
\description{
ROBPCA algorithm of Hubert et al. (2005) including reweighting (Engelen et al., 2005) and possible extension to skewed data (Hubert et al., 2009).
}
\usage{
robpca (x, k = 0, kmax = 10, alpha = 0.75, h = NULL, mcd = FALSE,
ndir = "all... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{s_fish_gfw}
\alias{s_fish_gfw}
\title{Raster stack from Global Fishing Watch analysis of high seas (Sala et al,
2018)}
\format{
A \code{\link[raster]{stack}} with layers of results from analyses.
}
\usage{
s_fish_g... | /man/s_fish_gfw.Rd | no_license | BenioffOceanInitiative/bbnj | R | false | true | 509 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{s_fish_gfw}
\alias{s_fish_gfw}
\title{Raster stack from Global Fishing Watch analysis of high seas (Sala et al,
2018)}
\format{
A \code{\link[raster]{stack}} with layers of results from analyses.
}
\usage{
s_fish_g... |
library(dplyr)
library(h2o)
library(data.table)
packageVersion("h2o")
h2o.init(ip = "localhost", port = 4444, nthreads = 15, max_mem_size = "8g", strict_version_check = FALSE)
# Load datasets
ais <- fread("/Users/mauropelucchi/Desktop/Instacart/aisles.csv", key = "aisle_id")
dept <- fread("/Users/mauropelucchi/Des... | /xgboost/h2o_instacart.r | permissive | mauropelucchi/machine-learning-course | R | false | false | 9,450 | r |
library(dplyr)
library(h2o)
library(data.table)
packageVersion("h2o")
h2o.init(ip = "localhost", port = 4444, nthreads = 15, max_mem_size = "8g", strict_version_check = FALSE)
# Load datasets
ais <- fread("/Users/mauropelucchi/Desktop/Instacart/aisles.csv", key = "aisle_id")
dept <- fread("/Users/mauropelucchi/Des... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.fdr_table.R
\name{plot.fdr_table}
\alias{plot.fdr_table}
\title{Plot functionality for results of class "fdr_table" as produced by e.g. the
function assess_fdr_overall()}
\usage{
\method{plot}{fdr_table}(x, output = "Rconsole",
filenam... | /man/plot.fdr_table.Rd | no_license | abelew/SWATH2stats | R | false | true | 1,669 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.fdr_table.R
\name{plot.fdr_table}
\alias{plot.fdr_table}
\title{Plot functionality for results of class "fdr_table" as produced by e.g. the
function assess_fdr_overall()}
\usage{
\method{plot}{fdr_table}(x, output = "Rconsole",
filenam... |
#######################################################################
# dbscan - Density Based Clustering of Applications with Noise
# and Related Algorithms
# Copyright (C) 2015 Michael Hahsler
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Pu... | /dbscan/R/kNNdist.R | no_license | ingted/R-Examples | R | false | false | 1,170 | r | #######################################################################
# dbscan - Density Based Clustering of Applications with Noise
# and Related Algorithms
# Copyright (C) 2015 Michael Hahsler
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Pu... |
x1 = c(1, 1, 0, 5, 6, 4)
x2 = c(4, 3, 4, 1, 2, 0)
plot(x1, x2)
df = data.frame(x1, x2)
plot(df)
sample.df = sample(6, 3)
cl1 = df[sample.df,]
cl2 = df[-sample.df,]
mean.cl1.x = mean(cl1[, 1])
mean.cl1.y = mean(cl1[, 2])
centroid1 = c(mean.cl1.x, mean.cl1.y)
plot(centroid1[1], centroid1[2])
mean.cl2.x = mean(cl2[,... | /191028 - 10.7. Exercises - Conceptual - Exercise 3.r | no_license | mare-astrorum/introduction-to-statistical-learning-practicals | R | false | false | 949 | r | x1 = c(1, 1, 0, 5, 6, 4)
x2 = c(4, 3, 4, 1, 2, 0)
plot(x1, x2)
df = data.frame(x1, x2)
plot(df)
sample.df = sample(6, 3)
cl1 = df[sample.df,]
cl2 = df[-sample.df,]
mean.cl1.x = mean(cl1[, 1])
mean.cl1.y = mean(cl1[, 2])
centroid1 = c(mean.cl1.x, mean.cl1.y)
plot(centroid1[1], centroid1[2])
mean.cl2.x = mean(cl2[,... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 8723
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 8701
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 8701
c
c Input Parameter (command line, fil... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Wintersteiger/RankingFunctions/rankfunc41_unsigned_32/rankfunc41_unsigned_32.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 857 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 8723
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 8701
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 8701
c
c Input Parameter (command line, fil... |
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#------------- Reconstruccion IPC Provincial 2019 ---------------
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#Carga Datos
library(readxl)
library(ggplot2)
library(dplyr)
source(file = "Code/CargaData.R",local = TRUE... | /IPC Provincial-Reconstruido/IPC Provincial - Incompleto/IPC Provincial.R | no_license | InstitutoInvestigacionesEconomicasPUCE/Analisis_IPC | R | false | false | 1,884 | r | #!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#------------- Reconstruccion IPC Provincial 2019 ---------------
#!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#Carga Datos
library(readxl)
library(ggplot2)
library(dplyr)
source(file = "Code/CargaData.R",local = TRUE... |
library(quantmod)
library(PerformanceAnalytics)
library(tawny)
#change working directory
setwd("/home/nick/model_check")
rowsd <- function(xtsobj)
{
rollsd <- rep(0, dim(xtsobj)[1] )
for (i in 1 : dim(xtsobj)[1])
{
rollsd[i] <- sd(as.vector(xtsobj[i, ] ) )
}
rollsd
}
wtsadj <- function(xtsobj)
{
wtsadj <-ma... | /modelcheck.r | no_license | nickchy/model_check | R | false | false | 4,349 | r | library(quantmod)
library(PerformanceAnalytics)
library(tawny)
#change working directory
setwd("/home/nick/model_check")
rowsd <- function(xtsobj)
{
rollsd <- rep(0, dim(xtsobj)[1] )
for (i in 1 : dim(xtsobj)[1])
{
rollsd[i] <- sd(as.vector(xtsobj[i, ] ) )
}
rollsd
}
wtsadj <- function(xtsobj)
{
wtsadj <-ma... |
#' Create polygons from centroid coordinates
#'
#' Create polygon(s) from a data frame with coordinates of the polygon centroid(s)
#'
#' @param x data frame with at least two columns;
#' the first two columns must contain longitude and latitude coordinates, respectively.
#' See 'Details' section for how addit... | /R/pts2poly_centroids.R | no_license | cran/eSDM | R | false | false | 3,265 | r | #' Create polygons from centroid coordinates
#'
#' Create polygon(s) from a data frame with coordinates of the polygon centroid(s)
#'
#' @param x data frame with at least two columns;
#' the first two columns must contain longitude and latitude coordinates, respectively.
#' See 'Details' section for how addit... |
library(medflex)
### Name: neLht
### Title: Linear hypotheses for natural effect models
### Aliases: neLht neEffdecomp neEffdecomp.neModel neLht.neModel
### ** Examples
data(UPBdata)
impData <- neImpute(UPB ~ att * negaff + gender + educ + age,
family = binomial, data = UPBdata)
neMod <- neMod... | /data/genthat_extracted_code/medflex/examples/neLht.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 2,530 | r | library(medflex)
### Name: neLht
### Title: Linear hypotheses for natural effect models
### Aliases: neLht neEffdecomp neEffdecomp.neModel neLht.neModel
### ** Examples
data(UPBdata)
impData <- neImpute(UPB ~ att * negaff + gender + educ + age,
family = binomial, data = UPBdata)
neMod <- neMod... |
#this file saves almost all plots used in report
rm(list = ls())
library('lattice')
library('ggplot2')
library(latticeExtra)
#prepare data frame
df<-load("ALL")
ALL$X.2<-NULL
ALL$X.1<-NULL
ALL$X<-NULL
#deal with time
ALL$Time <- as.POSIXct(ALL$Time, format("%Y-%m-%d %h:%m:%s"))
ALL<-ALL[order(ALL$Time),]
#choose op... | /ploting_nice_plots.R | no_license | sbysiak/R-ttss-krk | R | false | false | 1,977 | r | #this file saves almost all plots used in report
rm(list = ls())
library('lattice')
library('ggplot2')
library(latticeExtra)
#prepare data frame
df<-load("ALL")
ALL$X.2<-NULL
ALL$X.1<-NULL
ALL$X<-NULL
#deal with time
ALL$Time <- as.POSIXct(ALL$Time, format("%Y-%m-%d %h:%m:%s"))
ALL<-ALL[order(ALL$Time),]
#choose op... |
name = "You Yi"
SID = "24333111"
email = "youyi316@berkeley.edu"
github_name = "youyi316"
status = "enrolled" | /info.r | no_license | youyi316/stat133 | R | false | false | 109 | r | name = "You Yi"
SID = "24333111"
email = "youyi316@berkeley.edu"
github_name = "youyi316"
status = "enrolled" |
#' Convert IRT model fitted using fit_enorm (from dexter package) to a mirt object
#'
#' This function is designed to allow users to fit a Rasch model using the
#' conditional maximum likelihood (CML) procedure but to still have access to all of the interactive
#' graphical displays and other functions that are av... | /R/dexter.to.unimirt.R | permissive | CambridgeAssessmentResearch/unimirt | R | false | false | 2,694 | r | #' Convert IRT model fitted using fit_enorm (from dexter package) to a mirt object
#'
#' This function is designed to allow users to fit a Rasch model using the
#' conditional maximum likelihood (CML) procedure but to still have access to all of the interactive
#' graphical displays and other functions that are av... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/goelz.R
\name{select_optimal_goelz}
\alias{select_optimal_goelz}
\title{Select optimal Goelz Triangle design sfrom the results of goelz_optim}
\usage{
select_optimal_goelz(optim.results)
}
\arguments{
\item{optim.results}{An object of class g... | /man/select_optimal_goelz.Rd | no_license | savannainstitute/sysdesign | R | false | true | 1,189 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/goelz.R
\name{select_optimal_goelz}
\alias{select_optimal_goelz}
\title{Select optimal Goelz Triangle design sfrom the results of goelz_optim}
\usage{
select_optimal_goelz(optim.results)
}
\arguments{
\item{optim.results}{An object of class g... |
#' Apply a function to each element of a vector via futures
#'
#' These functions work exactly the same as [purrr::map()] functions, but allow
#' you to run the map in parallel. There are a number of `future.*` arguments
#' to allow you to fine tune the parallel processing. The documentation is
#' adapted from both `pu... | /R/future_map.R | no_license | bweiher/furrr | R | false | false | 9,780 | r | #' Apply a function to each element of a vector via futures
#'
#' These functions work exactly the same as [purrr::map()] functions, but allow
#' you to run the map in parallel. There are a number of `future.*` arguments
#' to allow you to fine tune the parallel processing. The documentation is
#' adapted from both `pu... |
#Set your working directory
setwd("C:/Coursera - Data Science/4-ExploratoryDataAnalysis/CourseProject1")
## 1.Getting data
fileURL="https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
zipFilename <-"HouseholdPowerConsuption.zip"
download.file(fileURL, destfile = zipFilename)
unzip(zi... | /plot3.R | no_license | JustinasMockus/ExData_Plotting1 | R | false | false | 1,173 | r | #Set your working directory
setwd("C:/Coursera - Data Science/4-ExploratoryDataAnalysis/CourseProject1")
## 1.Getting data
fileURL="https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
zipFilename <-"HouseholdPowerConsuption.zip"
download.file(fileURL, destfile = zipFilename)
unzip(zi... |
nmdsplot <- function(x, col, sh) {ggplot(data = x, mapping = aes(x = nmds_axis1, y = nmds_axis2)) +
geom_point(mapping = aes(color = col, shape = sh))}
#
#shape = depthbin, text = sprintf("Sample: %s", sampleID) | /src/shinyprot_nmdsplot.R | no_license | EEgge/ShinyProtists | R | false | false | 219 | r | nmdsplot <- function(x, col, sh) {ggplot(data = x, mapping = aes(x = nmds_axis1, y = nmds_axis2)) +
geom_point(mapping = aes(color = col, shape = sh))}
#
#shape = depthbin, text = sprintf("Sample: %s", sampleID) |
# Auxiliar function to warn and coerce classes
check_var_class_and_coerce <- function(var, dat, class.ok, class.target, warn.coercion) {
# Has the right class?
cl <- class(dat[[var]])
if (!any(cl %in% class.ok))
stop("The variable -",var,"- is of class ", cl, " which is ",
"not supported. Supported ... | /R/survey_to_diffnet.R | permissive | USCCANA/netdiffuseR | R | false | false | 19,423 | r | # Auxiliar function to warn and coerce classes
check_var_class_and_coerce <- function(var, dat, class.ok, class.target, warn.coercion) {
# Has the right class?
cl <- class(dat[[var]])
if (!any(cl %in% class.ok))
stop("The variable -",var,"- is of class ", cl, " which is ",
"not supported. Supported ... |
\name{mirror_sequence}
\alias{mirror_sequence}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
mirror_sequence
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
mirror_sequence(x)
}
%- maybe also 'usage' for other objects ... | /man/mirror_sequence.Rd | no_license | JaimeMLegaz/setup-sequences | R | false | false | 1,305 | rd | \name{mirror_sequence}
\alias{mirror_sequence}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
%% ~~function to do ... ~~
mirror_sequence
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
mirror_sequence(x)
}
%- maybe also 'usage' for other objects ... |
#go to directory
setwd("C:\\datasciencecoursera")
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", destfile = "./household_power_consumption.zip")
unzip("./household_power_consumption.zip", exdir = ".")
#extract file from directory
extract <- read.table("... | /Plot2.R | no_license | trc2112/ExData_Plotting1 | R | false | false | 1,383 | r | #go to directory
setwd("C:\\datasciencecoursera")
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", destfile = "./household_power_consumption.zip")
unzip("./household_power_consumption.zip", exdir = ".")
#extract file from directory
extract <- read.table("... |
################ Figure 7 #####################
# Calculate total C partitioning for individual treatments
#-------------------------------------------------------------------------------------
# cbPalette = c("gray", "orange", "skyblue", "green3", "yellow3", "#0072B2", "#D55E00")
cbPalette = c("gray", "orange", "skybl... | /R/C_partitioning_wtc3.R | no_license | DataFusion18/DA_WTC3 | R | false | false | 6,805 | r | ################ Figure 7 #####################
# Calculate total C partitioning for individual treatments
#-------------------------------------------------------------------------------------
# cbPalette = c("gray", "orange", "skyblue", "green3", "yellow3", "#0072B2", "#D55E00")
cbPalette = c("gray", "orange", "skybl... |
library(dplyr)
download.file("https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2FGDP.csv", "GDP.csv")
GDP <- read.csv("GDP.csv", colClasses = "character")
download.file("https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2FEDSTATS_Country.csv", "countrystats.csv")
countrystats <- read.csv("countrystats.csv")
n... | /Archive/w3q5.a.R | no_license | albertderoos/datasciencecoursera | R | false | false | 1,346 | r | library(dplyr)
download.file("https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2FGDP.csv", "GDP.csv")
GDP <- read.csv("GDP.csv", colClasses = "character")
download.file("https://d396qusza40orc.cloudfront.net/getdata%2Fdata%2FEDSTATS_Country.csv", "countrystats.csv")
countrystats <- read.csv("countrystats.csv")
n... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hello.R
\name{app}
\alias{app}
\title{app}
\usage{
app()
}
\description{
app
}
| /man/app.Rd | no_license | Tutuchan/gettextpo | R | false | true | 158 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hello.R
\name{app}
\alias{app}
\title{app}
\usage{
app()
}
\description{
app
}
|
/*
IMPORTANT! This file is auto-generated each time you run cmake on your
project - if you alter its contents, your changes may be overwritten!
*/
#include "AppConfig.h"
#include <juce_audio_plugin_client_AU.r>
| /build/JuceLibraryCode/include_juce_audio_plugin_client_AU.r | no_license | vincent-chenzhun-huang/Synthesizer | R | false | false | 222 | r | /*
IMPORTANT! This file is auto-generated each time you run cmake on your
project - if you alter its contents, your changes may be overwritten!
*/
#include "AppConfig.h"
#include <juce_audio_plugin_client_AU.r>
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distribution.R
\name{ecosystem}
\alias{ecosystem}
\title{ecosystem}
\usage{
ecosystem(
species_list = NULL,
fields = NULL,
server = getOption("FISHBASE_API", "fishbase"),
version = get_latest_release(),
db = default_db(),
...
)
}
... | /man/ecosystem.Rd | no_license | ropensci/rfishbase | R | false | true | 1,421 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/distribution.R
\name{ecosystem}
\alias{ecosystem}
\title{ecosystem}
\usage{
ecosystem(
species_list = NULL,
fields = NULL,
server = getOption("FISHBASE_API", "fishbase"),
version = get_latest_release(),
db = default_db(),
...
)
}
... |
library(hydrostats)
### Name: high.spell.lengths
### Title: Calculate the length of all high flow spells
### Aliases: high.spell.lengths
### ** Examples
data(Cooper)
Cooper<-ts.format(Cooper)
high.spell.lengths(Cooper, threshold=50000)
| /data/genthat_extracted_code/hydrostats/examples/high.spell.lengths.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 245 | r | library(hydrostats)
### Name: high.spell.lengths
### Title: Calculate the length of all high flow spells
### Aliases: high.spell.lengths
### ** Examples
data(Cooper)
Cooper<-ts.format(Cooper)
high.spell.lengths(Cooper, threshold=50000)
|
#
# This file is part of the CNO software
#
# Copyright (c) 2011-2012 - EMBL - European Bioinformatics Institute
#
# File author(s): CNO developers (cno-dev@ebi.ac.uk)
#
# Distributed under the GPLv3 License.
# See accompanying file LICENSE.txt or copy at
# http://www.gnu.org/licenses/gpl-3.0.html
#
# CNO we... | /packages/CellNOptR/R/makeCNOlist.R | no_license | saezlab/CellNOptR_packages_archived | R | false | false | 15,048 | r | #
# This file is part of the CNO software
#
# Copyright (c) 2011-2012 - EMBL - European Bioinformatics Institute
#
# File author(s): CNO developers (cno-dev@ebi.ac.uk)
#
# Distributed under the GPLv3 License.
# See accompanying file LICENSE.txt or copy at
# http://www.gnu.org/licenses/gpl-3.0.html
#
# CNO we... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hmmDemo.r
\name{hmmDemo}
\alias{hmmDemo}
\title{HMM computation demo functions}
\usage{
hmmDemo(object, ddl = NULL, state.names = NULL, obs.names = NULL)
}
\arguments{
\item{object}{fitted hmm model}
\item{ddl}{design dat list; if NULL it is... | /marked/man/hmmDemo.Rd | no_license | jlaake/marked | R | false | true | 2,045 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hmmDemo.r
\name{hmmDemo}
\alias{hmmDemo}
\title{HMM computation demo functions}
\usage{
hmmDemo(object, ddl = NULL, state.names = NULL, obs.names = NULL)
}
\arguments{
\item{object}{fitted hmm model}
\item{ddl}{design dat list; if NULL it is... |
print.persFit <-
function (x, digits = 4, ...) {
if (!inherits(x, "persFit"))
stop("Use only with 'persFit' objects.\n")
cat("\nPerson-Fit Statistics and P-values\n")
cat("\nCall:\n", paste(deparse(x$call), sep = "\n", collapse = "\n"), "\n", sep = "")
Alt <- switch(x$alternative,
"less"... | /R/print.persFit.R | no_license | gscriver/ltm | R | false | false | 1,542 | r | print.persFit <-
function (x, digits = 4, ...) {
if (!inherits(x, "persFit"))
stop("Use only with 'persFit' objects.\n")
cat("\nPerson-Fit Statistics and P-values\n")
cat("\nCall:\n", paste(deparse(x$call), sep = "\n", collapse = "\n"), "\n", sep = "")
Alt <- switch(x$alternative,
"less"... |
require(ggplot2)
require(grid)
input <- list()
input$Tmax <- 100 # default = 1
input$Time_sampling <- c(1,100)
input$NP <- 1 # default = 1
input$NI <- 3 # default = 1
input$NT <- 1 # default = 1
input$NG <- 1 # default = 1
input$B <- c(0,0.3,0,0)
input$Vind <- matrix(c(0.7 , 0 , 0 , 0,
... | /inst/shiny-squid/test.R | permissive | digideskio/squid-1 | R | false | false | 6,626 | r | require(ggplot2)
require(grid)
input <- list()
input$Tmax <- 100 # default = 1
input$Time_sampling <- c(1,100)
input$NP <- 1 # default = 1
input$NI <- 3 # default = 1
input$NT <- 1 # default = 1
input$NG <- 1 # default = 1
input$B <- c(0,0.3,0,0)
input$Vind <- matrix(c(0.7 , 0 , 0 , 0,
... |
setwd("~/git/practical_machine_learning/")
pml_train <- read.csv("pml-training.csv")
pml_test <- read.csv("pml-testing.csv")
# find out the columns that are unavailable in the testing set
unmeasured <- which(colSums(is.na(pml_test))==20)
# do not use these columns in the testing set
pml_train <- pml_train[,-unmeasured... | /PracticalMachineLearning.R | no_license | xiaopz0/practical_machine_learning | R | false | false | 1,299 | r | setwd("~/git/practical_machine_learning/")
pml_train <- read.csv("pml-training.csv")
pml_test <- read.csv("pml-testing.csv")
# find out the columns that are unavailable in the testing set
unmeasured <- which(colSums(is.na(pml_test))==20)
# do not use these columns in the testing set
pml_train <- pml_train[,-unmeasured... |
context("distinct")
df <- tibble(
x = c(1, 1, 1, 1),
y = c(1, 1, 2, 2),
z = c(1, 2, 1, 2)
)
dfs <- test_load(df)
test_that("distinct equivalent to local unique when keep_all is TRUE", {
dfs %>%
lapply(. %>% distinct()) %>%
expect_equal_tbls(unique(df))
})
test_that("distinct for single column equival... | /tests/testthat/test-verb-distinct.R | permissive | alex-gable/dbplyr | R | false | false | 2,164 | r | context("distinct")
df <- tibble(
x = c(1, 1, 1, 1),
y = c(1, 1, 2, 2),
z = c(1, 2, 1, 2)
)
dfs <- test_load(df)
test_that("distinct equivalent to local unique when keep_all is TRUE", {
dfs %>%
lapply(. %>% distinct()) %>%
expect_equal_tbls(unique(df))
})
test_that("distinct for single column equival... |
library('tidyverse')
library('cowplot')
library('astsa')
library('forecast')
library('reshape2')
library('tsibble')
library('plotly')
library('ggTimeSeries')
source('paths2.R')
load(file = paste(data.path, 'resp_disease.RData'))
# Exploratory Data Analysis -----------------------------------------------
resp.full.pl... | /eda.R | no_license | bastianabaleiv/hospadmis | R | false | false | 6,787 | r | library('tidyverse')
library('cowplot')
library('astsa')
library('forecast')
library('reshape2')
library('tsibble')
library('plotly')
library('ggTimeSeries')
source('paths2.R')
load(file = paste(data.path, 'resp_disease.RData'))
# Exploratory Data Analysis -----------------------------------------------
resp.full.pl... |
load_db_as_list <- function(
user_file = NA,
hashtag_file = NA,
tweet_file = NA,
url_file = NA,
as_csv = TRUE
) {
if (as_csv) {
if (is.na(user_file)) { user_file <- file.path('.','db','atusers.csv') }
if (is.na(hashtag_file)) { hashtag_file <- file.path('.','db','hashtags.csv') }
if (is.na(twe... | /R/load_db_as_list.r | no_license | dannhek/covid_gov_tweets | R | false | false | 664 | r | load_db_as_list <- function(
user_file = NA,
hashtag_file = NA,
tweet_file = NA,
url_file = NA,
as_csv = TRUE
) {
if (as_csv) {
if (is.na(user_file)) { user_file <- file.path('.','db','atusers.csv') }
if (is.na(hashtag_file)) { hashtag_file <- file.path('.','db','hashtags.csv') }
if (is.na(twe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/printPercentage.R
\name{printPercentage}
\alias{printPercentage}
\alias{printCount}
\title{Print Percentage of Activity Completed to stdout}
\usage{
printPercentage(i, n, dp = 0, first = 1, last = n, prev = i - 1)
}
\arguments{
\item{i}{the n... | /man/printPercentage.Rd | no_license | rje42/rje | R | false | true | 1,591 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/printPercentage.R
\name{printPercentage}
\alias{printPercentage}
\alias{printCount}
\title{Print Percentage of Activity Completed to stdout}
\usage{
printPercentage(i, n, dp = 0, first = 1, last = n, prev = i - 1)
}
\arguments{
\item{i}{the n... |
as_override_type_sum <- function(x) {
structure(x, class = "override_type_sum")
}
type_sum.override_type_sum <- function(x, ...) {
"SC"
}
registerS3method("type_sum", "override_type_sum", type_sum.override_type_sum, envir = asNamespace("pillar"))
| /tests/testthat/helper-type-sum.R | no_license | jrnold/tibble | R | false | false | 253 | r | as_override_type_sum <- function(x) {
structure(x, class = "override_type_sum")
}
type_sum.override_type_sum <- function(x, ...) {
"SC"
}
registerS3method("type_sum", "override_type_sum", type_sum.override_type_sum, envir = asNamespace("pillar"))
|
library(MASS)
library(coda)
library(Matrix)
library(metafor)
library(hbmem)
library(truncnorm)
wd = '/home/ZijunKe/Research/MetaR/Simulation5/'
#wd <- "E:/MetaR/Simulation3/"
openbugs.d = NULL
source(paste(wd,'RCode/RFuncs_Sim.R',sep=''))
nsim = 500
n.iter = 10000
Nstudy.all = c(28,60,100)
mu.N.all = c(150,350)
L.Al... | /Simulations/RCode/MetaRR48.R | no_license | zijunke/CAM | R | false | false | 3,833 | r | library(MASS)
library(coda)
library(Matrix)
library(metafor)
library(hbmem)
library(truncnorm)
wd = '/home/ZijunKe/Research/MetaR/Simulation5/'
#wd <- "E:/MetaR/Simulation3/"
openbugs.d = NULL
source(paste(wd,'RCode/RFuncs_Sim.R',sep=''))
nsim = 500
n.iter = 10000
Nstudy.all = c(28,60,100)
mu.N.all = c(150,350)
L.Al... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{autocrop}
\alias{autocrop}
\title{Autocrop image region}
\usage{
autocrop(im, color, axes = "zyx")
}
\arguments{
\item{im}{an image}
\item{color}{Color used for the crop. If 0, color is guessed.}
\item{axes}{Axes used f... | /man/autocrop.Rd | no_license | MartinRoth/imager | R | false | true | 512 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{autocrop}
\alias{autocrop}
\title{Autocrop image region}
\usage{
autocrop(im, color, axes = "zyx")
}
\arguments{
\item{im}{an image}
\item{color}{Color used for the crop. If 0, color is guessed.}
\item{axes}{Axes used f... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/do-logistic-univ.R
\name{.do_logistic_univ}
\alias{.do_logistic_univ}
\title{Do univariable logistic regression and extract results in nice format.}
\usage{
.do_logistic_univ(
data,
formula,
format = "html",
conf_level = 0.95,
expon... | /man/dot-do_logistic_univ.Rd | permissive | emilelatour/latable | R | false | true | 1,352 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/do-logistic-univ.R
\name{.do_logistic_univ}
\alias{.do_logistic_univ}
\title{Do univariable logistic regression and extract results in nice format.}
\usage{
.do_logistic_univ(
data,
formula,
format = "html",
conf_level = 0.95,
expon... |
#####################################################
#
# ********* ********* *********
# * * * * *
# * * * * *
# * * * * *
# ********* ********* * *
# * ... | /1_ParticleSwarm.R | no_license | onthejeep/PSO | R | false | false | 5,947 | r | #####################################################
#
# ********* ********* *********
# * * * * *
# * * * * *
# * * * * *
# ********* ********* * *
# * ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.