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 |
|---|---|---|---|---|---|---|---|---|---|
/MSfilter.R | no_license | zhengfj1994/MSFilter | R | false | false | 2,562 | r | ||
library(GENEAclassify)
### Name: getZeros
### Title: Find Zero Crossing Points
### Aliases: getZeros
### Keywords: internal
### ** Examples
x1 <- -7:8
getZeros(x = x1)
x2 <- rep(-1:1, times = 6)
getZeros(x = x2)
| /data/genthat_extracted_code/GENEAclassify/examples/getZeros.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 231 | r | library(GENEAclassify)
### Name: getZeros
### Title: Find Zero Crossing Points
### Aliases: getZeros
### Keywords: internal
### ** Examples
x1 <- -7:8
getZeros(x = x1)
x2 <- rep(-1:1, times = 6)
getZeros(x = x2)
|
% $Id: ELISA.Rd 1012 2006-11-14 22:25:06Z ggorjan $
%
\name{ELISA}
\docType{data}
\alias{ELISA}
\title{Data from an ELISA assay}
\description{Observed signals and (for some observations) nominal
concentrations for samples that were aliquoted to multiple assay plates,
which were read multiple times on multiple days.... | /gtools/man/ELISA.Rd | no_license | jackieli123723/clearlinux | R | false | false | 896 | rd | % $Id: ELISA.Rd 1012 2006-11-14 22:25:06Z ggorjan $
%
\name{ELISA}
\docType{data}
\alias{ELISA}
\title{Data from an ELISA assay}
\description{Observed signals and (for some observations) nominal
concentrations for samples that were aliquoted to multiple assay plates,
which were read multiple times on multiple days.... |
temp=5 +5
temp | /script.R | no_license | anea4613/test | R | false | false | 14 | r | temp=5 +5
temp |
#Demonstrates some built in functions.
#Simple functions are chosen as this program is intended to provide basic information on the functions
#Absolute values of the sequence -4 to 3 ignores the signs and provides the absolute values
abs(-4:3) #Outputs: [1] 4 3 2 1 0 1 2 3
#sign() can be used to identify if a number ... | /functions_builtin.R | no_license | kondapallishashi/R | R | false | false | 1,387 | r | #Demonstrates some built in functions.
#Simple functions are chosen as this program is intended to provide basic information on the functions
#Absolute values of the sequence -4 to 3 ignores the signs and provides the absolute values
abs(-4:3) #Outputs: [1] 4 3 2 1 0 1 2 3
#sign() can be used to identify if a number ... |
# name and paths
overall_name = "gamm_formants_complex_across_type_1"
path.on.local = "~/documents/research/projects/dynamic-gam/gamm_modelling_strategies/formants/complex_across"
path.on.server = "/scratch/ms1341/r/gamm-sim/formants/complex_across"
output.dir = "/scratch/ms1341/r/gamm-sim/formants/complex_across/outpu... | /formants/complex_across/formants_complex_across_type_1_config_file.R | no_license | 007v/gamm_modelling_strategies | R | false | false | 1,105 | r | # name and paths
overall_name = "gamm_formants_complex_across_type_1"
path.on.local = "~/documents/research/projects/dynamic-gam/gamm_modelling_strategies/formants/complex_across"
path.on.server = "/scratch/ms1341/r/gamm-sim/formants/complex_across"
output.dir = "/scratch/ms1341/r/gamm-sim/formants/complex_across/outpu... |
get_val_from_list <- function(list_vals,to_match){
return(list_vals[which(names(list_vals)==to_match ) ])}
# identify_english_translation <- function(json_data,original_value){
# translate_list <- get_val_from_list(list_vals = json_data,to_match = original_value)
# return(translate_list[[1]]$English[[1]][2... | /Adaptive_Flashcard - Testing/Adaptive_Flashcards/data_mgt_functions.r | permissive | poc1673/Adaptive_Flashcards | R | false | false | 1,939 | r | get_val_from_list <- function(list_vals,to_match){
return(list_vals[which(names(list_vals)==to_match ) ])}
# identify_english_translation <- function(json_data,original_value){
# translate_list <- get_val_from_list(list_vals = json_data,to_match = original_value)
# return(translate_list[[1]]$English[[1]][2... |
setwd("/home/paulob/Documentos/dataScience/projetos/projetos/analise_de_sentimento")
library(tidyverse)
library(tidytext)
library(text2vec)
library(glmnet)
library(DT)
app_name = ""
consumer_key <- ""
consumer_secret <- ""
access_token <- ""
access_secret <- ""
?create_token
create_token(app = app_name, consume... | /R/sentiment_analysis_v1/sentiment_analysis_twitter_brazil.R | no_license | livelif/data-science | R | false | false | 4,505 | r | setwd("/home/paulob/Documentos/dataScience/projetos/projetos/analise_de_sentimento")
library(tidyverse)
library(tidytext)
library(text2vec)
library(glmnet)
library(DT)
app_name = ""
consumer_key <- ""
consumer_secret <- ""
access_token <- ""
access_secret <- ""
?create_token
create_token(app = app_name, consume... |
#' Dog parameters
#'
#' @description Dataset containing dog parameters gathered during from the (infamous) dog improvement program 2020 - 2022.
#'
#' @docType data
#'
#' @usage data(dog_study)
#'
#' @format An object of class \code{"tibble"}
#'
#' @keywords datasets
#'
#' @references L'bardo et al. (2022) Dog Genetics ... | /R/dog_study.R | no_license | alkc/dogs | R | false | false | 620 | r | #' Dog parameters
#'
#' @description Dataset containing dog parameters gathered during from the (infamous) dog improvement program 2020 - 2022.
#'
#' @docType data
#'
#' @usage data(dog_study)
#'
#' @format An object of class \code{"tibble"}
#'
#' @keywords datasets
#'
#' @references L'bardo et al. (2022) Dog Genetics ... |
context("abs")
.data <- iris[, 1:4]
datetime <- seq(from = Sys.time(), length.out = nrow(.data), by = "mins")
.data <- cbind(datetime = datetime, .data)
ref_period <- 1:100
mea_period <- 101:150
.cbar <- cbar(.data, ref_period, mea_period)
test_that("visual abstraction", {
.plot <- plot_ts(.cbar)
expect_true(inh... | /tests/testthat/test-abs.R | permissive | Dragon-Dane/cbar | R | false | false | 706 | r | context("abs")
.data <- iris[, 1:4]
datetime <- seq(from = Sys.time(), length.out = nrow(.data), by = "mins")
.data <- cbind(datetime = datetime, .data)
ref_period <- 1:100
mea_period <- 101:150
.cbar <- cbar(.data, ref_period, mea_period)
test_that("visual abstraction", {
.plot <- plot_ts(.cbar)
expect_true(inh... |
# PARALLEL START/STOP ----
#' Start parallel clusters using `parallel` package
#'
#' @param ... Parameters passed to `parallel::makeCluster()`
#'
#'
#' @details
#'
#' Performs 3 Steps:
#'
#' 1. Makes clusters using `parallel::makeCluster()`
#' 2. Registers clusters using `doParallel::registerDoParallel()`
#' 3. Adds ... | /R/utils-control-par.R | permissive | ggardiakos/modeltime | R | false | false | 14,389 | r |
# PARALLEL START/STOP ----
#' Start parallel clusters using `parallel` package
#'
#' @param ... Parameters passed to `parallel::makeCluster()`
#'
#'
#' @details
#'
#' Performs 3 Steps:
#'
#' 1. Makes clusters using `parallel::makeCluster()`
#' 2. Registers clusters using `doParallel::registerDoParallel()`
#' 3. Adds ... |
## Script for reading in raw almetric, attaching OA status, removing extra columns
rm(list=ls())
setwd("~/GitHub/open-climate-change/")
setwd('/Users/robins64/Documents/git_repos/open-climate-change')
library(here); library(stringr)
# alt<-read.csv('Data/altmetric/Altmetric_2018-02-26.csv')
# alt<-read.csv('Data... | /scripts/altmetric_read_clean.R | no_license | jpwrobinson/open-climate-change | R | false | false | 4,608 | r |
## Script for reading in raw almetric, attaching OA status, removing extra columns
rm(list=ls())
setwd("~/GitHub/open-climate-change/")
setwd('/Users/robins64/Documents/git_repos/open-climate-change')
library(here); library(stringr)
# alt<-read.csv('Data/altmetric/Altmetric_2018-02-26.csv')
# alt<-read.csv('Data... |
############################################################################
# MLwiN MCMC Manual
#
# 7 Using the WinBUGS Interface in MLwiN . . . . . . . . . . . . . . . .83
#
# Browne, W.J. (2009) MCMC Estimation in MLwiN, v2.13. Centre for
# Multilevel Modelling, University of Bristol.
##########... | /R2MLwiN/demo/MCMCGuide07.R | no_license | ingted/R-Examples | R | false | false | 3,977 | r | ############################################################################
# MLwiN MCMC Manual
#
# 7 Using the WinBUGS Interface in MLwiN . . . . . . . . . . . . . . . .83
#
# Browne, W.J. (2009) MCMC Estimation in MLwiN, v2.13. Centre for
# Multilevel Modelling, University of Bristol.
##########... |
# =================================================================================================================
# Bagging Algorithm Applied to Census Dataset
# =================================================================================================================
# ====... | /Bagging using Random_forest_project.R | no_license | arjunsingh88/ensemble_learning | R | false | false | 38,309 | r | # =================================================================================================================
# Bagging Algorithm Applied to Census Dataset
# =================================================================================================================
# ====... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_Y_recovered_by_strain.R
\name{create_Y_recovered_by_strain}
\alias{create_Y_recovered_by_strain}
\title{Create Y matrix for recovered compartment for each strain}
\usage{
create_Y_recovered_by_strain(n_age, n_vaccine, n_strain)
}
\argu... | /HutchCOVID/man/create_Y_recovered_by_strain.Rd | no_license | FredHutch/COVID_modeling_schools | R | false | true | 544 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/create_Y_recovered_by_strain.R
\name{create_Y_recovered_by_strain}
\alias{create_Y_recovered_by_strain}
\title{Create Y matrix for recovered compartment for each strain}
\usage{
create_Y_recovered_by_strain(n_age, n_vaccine, n_strain)
}
\argu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Output.r
\name{BK_ML}
\alias{BK_ML}
\title{Beddington and Kirkwood life-history analysis with mean-length estimator of
current abundance}
\usage{
BK_ML(x, Data, reps = 100)
}
\arguments{
\item{x}{Position in a data-limited methods data object... | /man/BK_ML.Rd | no_license | Lijiuqi/DLMtool | R | false | true | 930 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Output.r
\name{BK_ML}
\alias{BK_ML}
\title{Beddington and Kirkwood life-history analysis with mean-length estimator of
current abundance}
\usage{
BK_ML(x, Data, reps = 100)
}
\arguments{
\item{x}{Position in a data-limited methods data object... |
library("BiocManager")
options(repos = BiocManager::repositories())
getOption("repos")
library(shiny)
library(plotly)
library(DT)
library(dplyr)
options(shiny.maxRequestSize = 100*1024^2)
# Define UI
ui <- shinyUI(navbarPage(title = "RNA-seq: Unsupervised Exploration",
... | /Archive/sandBox/dockerized/app/app.R | no_license | bixBeta/TReX | R | false | false | 8,456 | r | library("BiocManager")
options(repos = BiocManager::repositories())
getOption("repos")
library(shiny)
library(plotly)
library(DT)
library(dplyr)
options(shiny.maxRequestSize = 100*1024^2)
# Define UI
ui <- shinyUI(navbarPage(title = "RNA-seq: Unsupervised Exploration",
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.appsync_operations.R
\name{create_type}
\alias{create_type}
\title{Creates a Type object}
\usage{
create_type(apiId, definition, format)
}
\arguments{
\item{apiId}{[required] The API ID.}
\item{definition}{[required] The type definition... | /service/paws.appsync/man/create_type.Rd | permissive | CR-Mercado/paws | R | false | true | 713 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.appsync_operations.R
\name{create_type}
\alias{create_type}
\title{Creates a Type object}
\usage{
create_type(apiId, definition, format)
}
\arguments{
\item{apiId}{[required] The API ID.}
\item{definition}{[required] The type definition... |
library(magrittr)
py_img_ppt <- "./mean_images/precip_1980-09-30.tif" %>%
raster::raster()
py_img_pet <- "./mean_images/pet_1980-09-30.tif" %>%
raster::raster()
py_img_ppt[py_img_ppt < 0] <- NA
py_img_pet[py_img_pet < 0] <- NA
check_agg <- list.files("./raw_images", pattern = "precip", full.names = T) %>%
... | /R/method_check.R | no_license | colinbrust/crop_map | R | false | false | 893 | r | library(magrittr)
py_img_ppt <- "./mean_images/precip_1980-09-30.tif" %>%
raster::raster()
py_img_pet <- "./mean_images/pet_1980-09-30.tif" %>%
raster::raster()
py_img_ppt[py_img_ppt < 0] <- NA
py_img_pet[py_img_pet < 0] <- NA
check_agg <- list.files("./raw_images", pattern = "precip", full.names = T) %>%
... |
#Read the file
file <- "household_power_consumption.txt"
head <- read.table(file,header=FALSE,sep=";",nrows=1)
cNames <- character()
for(i in 1:length(head)){ cNames[i] <- as.character(head[[i]]) }
#Transform the format of time
powerData <- read.table(file,header=FALSE,sep=";",col.names=cNames,nrows=2880,skip=66637)
... | /plot4.R | no_license | DanielShawCoursera/ExData_Plotting1 | R | false | false | 1,085 | r | #Read the file
file <- "household_power_consumption.txt"
head <- read.table(file,header=FALSE,sep=";",nrows=1)
cNames <- character()
for(i in 1:length(head)){ cNames[i] <- as.character(head[[i]]) }
#Transform the format of time
powerData <- read.table(file,header=FALSE,sep=";",col.names=cNames,nrows=2880,skip=66637)
... |
library(shiny)
shinyUI(fluidPage(
fluidRow(
column(3,wellPanel(
textInput("token",label="API token",value=NA)
,p("Copy and paste your API token above!")
,actionButton("button","Get REDCap Data")
,p("Click the button to pull data from REDCap! This may take some time, please... | /ui.R | permissive | ul-research-support/spcapp | R | false | false | 1,461 | r | library(shiny)
shinyUI(fluidPage(
fluidRow(
column(3,wellPanel(
textInput("token",label="API token",value=NA)
,p("Copy and paste your API token above!")
,actionButton("button","Get REDCap Data")
,p("Click the button to pull data from REDCap! This may take some time, please... |
\name{anomaly}
\alias{anomaly}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Anomalies of a satin object
}
\description{
This function returns ocean data anomalies of a satin object. Anomalies are calculated subtracting a conforming average satin object.
}
\usage{
anomaly(X, Y)
}
%... | /man/anomaly.Rd | no_license | cran/satin | R | false | false | 3,005 | rd | \name{anomaly}
\alias{anomaly}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Anomalies of a satin object
}
\description{
This function returns ocean data anomalies of a satin object. Anomalies are calculated subtracting a conforming average satin object.
}
\usage{
anomaly(X, Y)
}
%... |
# This R Script loads all the relevat data for this project and return a tidy an
# clean set of data following the steps:
# 1. Merges the training and the test sets to create one data set.
# 2. Extracts only the measurements on the mean and standard deviation for each measurement.
# 3. Uses descriptive activity names... | /run_analysis.R | no_license | jfl272/Assignment-week-4---getting-and-cleaning-data | R | false | false | 2,905 | r | # This R Script loads all the relevat data for this project and return a tidy an
# clean set of data following the steps:
# 1. Merges the training and the test sets to create one data set.
# 2. Extracts only the measurements on the mean and standard deviation for each measurement.
# 3. Uses descriptive activity names... |
testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... | /myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615767341-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,803 | r | testlist <- list(AgeVector = c(-4.73074171454048e-167, 2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, 4.7390525269307e-300, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704... |
# Function to skip tests if Suggested packages not available on system
check_suggests <- function() {
skip_if_not_installed("rvest")
skip_if_not_installed("xml2")
}
test_that("gt_plt_bar_pct HTML is created and has specific values", {
check_suggests()
gt_bar_plot_tab <- mtcars %>%
head() %>%
dplyr::s... | /tests/testthat/test-gt-bar-html.R | permissive | adamkemberling/gtExtras | R | false | false | 1,428 | r | # Function to skip tests if Suggested packages not available on system
check_suggests <- function() {
skip_if_not_installed("rvest")
skip_if_not_installed("xml2")
}
test_that("gt_plt_bar_pct HTML is created and has specific values", {
check_suggests()
gt_bar_plot_tab <- mtcars %>%
head() %>%
dplyr::s... |
# Load in the SPEW logfile functions
library(spew)
# Read in the log-file data
all_logfiles <- list.files("/mnt/beegfs1/data/shared_group_data/syneco/olympus/logfiles/logfiles_1.2.0",
full.names = TRUE)
# Extract the country name from the log-file...
logfile_names <- unlist(lapply(strsplit(all_logfiles, "\\... | /olympus/logfiles/check_logfiles.R | no_license | maxsibilla/spew | R | false | false | 1,145 | r | # Load in the SPEW logfile functions
library(spew)
# Read in the log-file data
all_logfiles <- list.files("/mnt/beegfs1/data/shared_group_data/syneco/olympus/logfiles/logfiles_1.2.0",
full.names = TRUE)
# Extract the country name from the log-file...
logfile_names <- unlist(lapply(strsplit(all_logfiles, "\\... |
library(triebeard)
### Name: greedy_match
### Title: Greedily match against a tree
### Aliases: greedy_match
### ** Examples
trie <- trie(keys = c("afford", "affair", "available", "binary", "bind", "blind"),
values = c("afford", "affair", "available", "binary", "bind", "blind"))
greedy_match(trie... | /data/genthat_extracted_code/triebeard/examples/greedy_match.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 357 | r | library(triebeard)
### Name: greedy_match
### Title: Greedily match against a tree
### Aliases: greedy_match
### ** Examples
trie <- trie(keys = c("afford", "affair", "available", "binary", "bind", "blind"),
values = c("afford", "affair", "available", "binary", "bind", "blind"))
greedy_match(trie... |
/homework_sns_teens.R | no_license | MinjiHa/st_R | R | false | false | 1,149 | r | ||
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ec2_operations.R
\name{ec2_create_vpn_gateway}
\alias{ec2_create_vpn_gateway}
\title{Creates a virtual private gateway}
\usage{
ec2_create_vpn_gateway(AvailabilityZone, Type, TagSpecifications,
AmazonSideAsn, DryRun)
}
\arguments{
\item{Ava... | /paws/man/ec2_create_vpn_gateway.Rd | permissive | sanchezvivi/paws | R | false | true | 2,744 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ec2_operations.R
\name{ec2_create_vpn_gateway}
\alias{ec2_create_vpn_gateway}
\title{Creates a virtual private gateway}
\usage{
ec2_create_vpn_gateway(AvailabilityZone, Type, TagSpecifications,
AmazonSideAsn, DryRun)
}
\arguments{
\item{Ava... |
#' @title Download all orders in account
#'
#' @description Makes a request to the server, and returns a data.table object with information about all live orders related with your account if successful.
#'
#' @param token token from Tinkoff account
#' @param live live trading - TRUE or sandbox (paper) trading - FALSE (... | /R/getOrders.R | no_license | cran/tcsinvest | R | false | false | 3,979 | r | #' @title Download all orders in account
#'
#' @description Makes a request to the server, and returns a data.table object with information about all live orders related with your account if successful.
#'
#' @param token token from Tinkoff account
#' @param live live trading - TRUE or sandbox (paper) trading - FALSE (... |
#' Identification of gene pairs coexpressed in at least one of two conditions
#'
#' This function identifies gene pairs coexpressed in at least one of two
#' conditions.
#' @param exprs.1 a SummarizedExperiment, data frame or matrix
#' for condition 1, with gene IDs as rownames and sample IDs as column names.
#' @param... | /R/coexpr.R | no_license | hidelab/diffcoexp | R | false | false | 3,430 | r | #' Identification of gene pairs coexpressed in at least one of two conditions
#'
#' This function identifies gene pairs coexpressed in at least one of two
#' conditions.
#' @param exprs.1 a SummarizedExperiment, data frame or matrix
#' for condition 1, with gene IDs as rownames and sample IDs as column names.
#' @param... |
#!/usr/bin/env Rscript
DATAPATH <- Sys.getenv("DATAPATH")
#R commands and output:
## Input constants.
d=55
v = 100
r = 1 + d/v
## Find the root of the function.
cnu = function(nu){pchisq(qchisq(.95,nu)/r,nu) - 0.01}
size = uniroot(cnu,c(1,200))
size$root
#> [1] 169.3335
## Generate table of sample sizes.
x=matrix(... | /03/xx/01-r/7_prc_compare/prc232_Comparing_to_Nominal_Variability.r | no_license | microgenios/cod | R | false | false | 855 | r | #!/usr/bin/env Rscript
DATAPATH <- Sys.getenv("DATAPATH")
#R commands and output:
## Input constants.
d=55
v = 100
r = 1 + d/v
## Find the root of the function.
cnu = function(nu){pchisq(qchisq(.95,nu)/r,nu) - 0.01}
size = uniroot(cnu,c(1,200))
size$root
#> [1] 169.3335
## Generate table of sample sizes.
x=matrix(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gf_functions.R
\name{gf_sina}
\alias{gf_sina}
\title{Formula interface to geom_sina()}
\usage{
gf_sina(
object = NULL,
gformula = NULL,
data = NULL,
...,
alpha,
color,
size,
fill,
group,
xlab,
ylab,
title,
subtitle,
... | /man/gf_sina.Rd | no_license | rasanderson/ggformula | R | false | true | 4,707 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gf_functions.R
\name{gf_sina}
\alias{gf_sina}
\title{Formula interface to geom_sina()}
\usage{
gf_sina(
object = NULL,
gformula = NULL,
data = NULL,
...,
alpha,
color,
size,
fill,
group,
xlab,
ylab,
title,
subtitle,
... |
# script for extracting variance from Stan complex model (model3)
# input taskID corresponding to 10000 site chunks starting at site (N-1)*10000+1
# Now incorporating parallel processing by RStan methods
library(doParallel)
library(rstan)
library(gtools)
library(ggplot2)
library(bayesplot)
## INITIALIZE
rstan_option... | /GetPosteriorsSingleSites.R | permissive | kevin-murgas/DNAmethylation-hierarchicalmodel | R | false | false | 7,923 | r | # script for extracting variance from Stan complex model (model3)
# input taskID corresponding to 10000 site chunks starting at site (N-1)*10000+1
# Now incorporating parallel processing by RStan methods
library(doParallel)
library(rstan)
library(gtools)
library(ggplot2)
library(bayesplot)
## INITIALIZE
rstan_option... |
\name{require_packages}
\alias{require_packages}
\title{Installs packages, if necessary, and loads them.}
\usage{
require_packages(...)
}
\arguments{
\item{...}{Name of packages. Can be given as characters
strings or sans-quotes.}
}
\description{
Nice to reproducibility when sharing files which depend
on pack... | /man/require_packages.Rd | no_license | rbrtasmth/robertMisc | R | false | false | 624 | rd | \name{require_packages}
\alias{require_packages}
\title{Installs packages, if necessary, and loads them.}
\usage{
require_packages(...)
}
\arguments{
\item{...}{Name of packages. Can be given as characters
strings or sans-quotes.}
}
\description{
Nice to reproducibility when sharing files which depend
on pack... |
pim.summary <- function (object,...)
{
#TAKEN FROM SUMMARY.GLM
if(!object@exact&all(dim(object@boot.pim)==c(1,1))){
print(object@boot.pim)
warning("Coef. table requires bootstrap resamples")
}
else if(object@exact&all(dim(object@boot.pim)==c(1,1))){
# FIT WITH APPROXIMATE VCOV, NO VARIANCE FOR RESPONSIVE... | /anoint/R/summary.pim.R | no_license | ingted/R-Examples | R | false | false | 1,512 | r | pim.summary <- function (object,...)
{
#TAKEN FROM SUMMARY.GLM
if(!object@exact&all(dim(object@boot.pim)==c(1,1))){
print(object@boot.pim)
warning("Coef. table requires bootstrap resamples")
}
else if(object@exact&all(dim(object@boot.pim)==c(1,1))){
# FIT WITH APPROXIMATE VCOV, NO VARIANCE FOR RESPONSIVE... |
add.colnames.resp <- function(resp){
if( is.null(colnames(resp)) ){
I <- ncol(resp)
colnames(resp) <- paste0("I",1:I)
}
return(resp)
} | /TAM/R/add.colnames.resp.R | no_license | ingted/R-Examples | R | false | false | 156 | r |
add.colnames.resp <- function(resp){
if( is.null(colnames(resp)) ){
I <- ncol(resp)
colnames(resp) <- paste0("I",1:I)
}
return(resp)
} |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit.3g.R
\name{print.3Gfit}
\alias{print.3Gfit}
\title{Print method for class \code{\link{3Gfit}}}
\usage{
\method{print}{3Gfit}(y, n = 3, ...)
}
\arguments{
\item{yy}{object of class \code{\link{3Gfit}}; generally output from \code{\link{fit... | /man/print.3Gfit.Rd | no_license | jamesliley/subtest | R | false | true | 411 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fit.3g.R
\name{print.3Gfit}
\alias{print.3Gfit}
\title{Print method for class \code{\link{3Gfit}}}
\usage{
\method{print}{3Gfit}(y, n = 3, ...)
}
\arguments{
\item{yy}{object of class \code{\link{3Gfit}}; generally output from \code{\link{fit... |
#' @import rJava
NULL
jd_clobj <- NULL
.onLoad <- function(libname, pkgname) {
# For debugts_ging: to see if Jars are effectively loaded
# options(java.parameters = "-verbose:class")
# TODO : devtools will look only in RJDemetra3\java for JAR files so copied them there too
result <- .jpackage(pkgname, lib.lo... | /R/zzz.R | no_license | nbbrd/rjdssf | R | false | false | 849 | r | #' @import rJava
NULL
jd_clobj <- NULL
.onLoad <- function(libname, pkgname) {
# For debugts_ging: to see if Jars are effectively loaded
# options(java.parameters = "-verbose:class")
# TODO : devtools will look only in RJDemetra3\java for JAR files so copied them there too
result <- .jpackage(pkgname, lib.lo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{committee_code}
\alias{committee_code}
\title{Committee Type Codes}
\format{A data frame with two variables:
\describe{
\item{\code{committee_code}}{A 1-character alphabetic code assigned to a committee by the Fede... | /man/committee_code.Rd | no_license | chrisaddy/contributions | R | false | true | 694 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{committee_code}
\alias{committee_code}
\title{Committee Type Codes}
\format{A data frame with two variables:
\describe{
\item{\code{committee_code}}{A 1-character alphabetic code assigned to a committee by the Fede... |
library(Seurat)
library(sctransform)
library(dplyr)
library(SingleR)
library(ggplot2)
##data: GEO:GSE134809
##data files(matrix.mtx,genes.tsv,barcodes.tsv) associated-
#-with a given sample number organised in a folder named by the sample number: as required for Read10x()
#'path'<-"path to the folder con... | /CD/process.R | no_license | inuritdino/HyperInflamDataProcessing | R | false | false | 5,346 | r | library(Seurat)
library(sctransform)
library(dplyr)
library(SingleR)
library(ggplot2)
##data: GEO:GSE134809
##data files(matrix.mtx,genes.tsv,barcodes.tsv) associated-
#-with a given sample number organised in a folder named by the sample number: as required for Read10x()
#'path'<-"path to the folder con... |
library(nloptr)
### Name: mlsl
### Title: Multi-level Single-linkage
### Aliases: mlsl
### ** Examples
### Minimize the Hartmann6 function
hartmann6 <- function(x) {
n <- length(x)
a <- c(1.0, 1.2, 3.0, 3.2)
A <- matrix(c(10.0, 0.05, 3.0, 17.0,
3.0, 10.0, 3.5, 8.0,
... | /data/genthat_extracted_code/nloptr/examples/mlsl.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,408 | r | library(nloptr)
### Name: mlsl
### Title: Multi-level Single-linkage
### Aliases: mlsl
### ** Examples
### Minimize the Hartmann6 function
hartmann6 <- function(x) {
n <- length(x)
a <- c(1.0, 1.2, 3.0, 3.2)
A <- matrix(c(10.0, 0.05, 3.0, 17.0,
3.0, 10.0, 3.5, 8.0,
... |
library(dplyr, warn.conflicts = FALSE)
library(tidyr, warn.conflicts = FALSE)
library(readr, warn.conflicts = FALSE)
library(lubridate, warn.conflicts = FALSE)
library(ggplot2, warn.conflicts = FALSE)
library(purrr, warn.conflicts = FALSE)
source(here::here("R/combine-sources.R"))
line_list <- readr::read_csv("data/co... | /plot-testing.R | no_license | galluccineto/covid19-florida | R | false | false | 33,211 | r | library(dplyr, warn.conflicts = FALSE)
library(tidyr, warn.conflicts = FALSE)
library(readr, warn.conflicts = FALSE)
library(lubridate, warn.conflicts = FALSE)
library(ggplot2, warn.conflicts = FALSE)
library(purrr, warn.conflicts = FALSE)
source(here::here("R/combine-sources.R"))
line_list <- readr::read_csv("data/co... |
require(RColorBrewer)
# # Colour palettes
divergingPal <- c(brewer.pal(11, "Spectral"), "grey")
divergingPal_long <- c("grey",
brewer.pal(9, "YlOrRd")[c(2,3,5,7,9)],
brewer.pal(9, "YlGnBu")[c(2,3,4,5,6,7,8,9)],
brewer.pal(9, "YlGn")[c(8,7,5)],
... | /utilis.R | no_license | ss-lab-cancerunit/solaris | R | false | false | 943 | r | require(RColorBrewer)
# # Colour palettes
divergingPal <- c(brewer.pal(11, "Spectral"), "grey")
divergingPal_long <- c("grey",
brewer.pal(9, "YlOrRd")[c(2,3,5,7,9)],
brewer.pal(9, "YlGnBu")[c(2,3,4,5,6,7,8,9)],
brewer.pal(9, "YlGn")[c(8,7,5)],
... |
# serious stuff going on here
library(MASHprototype)
library(deSolve)
parms <- c(k1 = 0.04, k2 = 1e4, k3=3e7)
Y <- c(y1 = 1.0, y2 = 0.0, y3 = 0.0)
times <- c(0, 0.4*10^(0:11) )
out <- ode(Y, times, func = "derivs", parms = parms,
jacfunc = "jac", dllname = "deSolveModel",
initfunc = "initmod... | /MASH-Prototype/TEST-PROTOTYPE.R | no_license | Chipdelmal/MASH-Main | R | false | false | 351 | r | # serious stuff going on here
library(MASHprototype)
library(deSolve)
parms <- c(k1 = 0.04, k2 = 1e4, k3=3e7)
Y <- c(y1 = 1.0, y2 = 0.0, y3 = 0.0)
times <- c(0, 0.4*10^(0:11) )
out <- ode(Y, times, func = "derivs", parms = parms,
jacfunc = "jac", dllname = "deSolveModel",
initfunc = "initmod... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Bass_spatial_RKsolver.R
\name{Bass_spatial_RKsolver}
\alias{Bass_spatial_RKsolver}
\title{Solves the Seabass bioenergetic balance with a 4th order Runge Kutta method - used in spatialized model}
\usage{
Bass_spatial_RKsolver(Param, Temp... | /man/Bass_spatial_RKsolver.Rd | no_license | cran/RAC | R | false | true | 1,056 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Bass_spatial_RKsolver.R
\name{Bass_spatial_RKsolver}
\alias{Bass_spatial_RKsolver}
\title{Solves the Seabass bioenergetic balance with a 4th order Runge Kutta method - used in spatialized model}
\usage{
Bass_spatial_RKsolver(Param, Temp... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iModel-testadd.R
\name{testadd}
\alias{testadd}
\alias{testadd.iModel}
\alias{print.testadd}
\alias{testadd.mModel}
\title{Test addition of edge to graphical model}
\usage{
testadd(object, edge, k = 2, details = 1, ...)
}
\arguments{
\item{ob... | /man/testadd.Rd | no_license | boennecd/gRim | R | false | true | 1,973 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/iModel-testadd.R
\name{testadd}
\alias{testadd}
\alias{testadd.iModel}
\alias{print.testadd}
\alias{testadd.mModel}
\title{Test addition of edge to graphical model}
\usage{
testadd(object, edge, k = 2, details = 1, ...)
}
\arguments{
\item{ob... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{vecchia_Linv}
\alias{vecchia_Linv}
\title{Entries of inverse Cholesky approximation}
\usage{
vecchia_Linv(covparms, covfun_name, locs, NNarray)
}
\arguments{
\item{covparms}{A vector of covariance parameters appropriate
fo... | /man/vecchia_Linv.Rd | no_license | katzfuss/GpGp | R | false | true | 1,523 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{vecchia_Linv}
\alias{vecchia_Linv}
\title{Entries of inverse Cholesky approximation}
\usage{
vecchia_Linv(covparms, covfun_name, locs, NNarray)
}
\arguments{
\item{covparms}{A vector of covariance parameters appropriate
fo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clanToolsFunctions.R
\name{codes.ca}
\alias{codes.ca}
\title{codes.ca}
\usage{
codes.ca
}
\arguments{
\item{object}{}
}
\value{
codes
}
\description{
This function will be deleted.
}
\author{
Claus E. Andersen
}
| /man/codes.ca.Rd | no_license | claus-e-andersen/clanTools | R | false | true | 290 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clanToolsFunctions.R
\name{codes.ca}
\alias{codes.ca}
\title{codes.ca}
\usage{
codes.ca
}
\arguments{
\item{object}{}
}
\value{
codes
}
\description{
This function will be deleted.
}
\author{
Claus E. Andersen
}
|
## Simple Dynamic Models dialog
## output has regular model methods defined for it except update()
dModelsDialog = function() {
## list of avail. models
models = list(
"linear regression"= "gui.lm",
"robust regresion" = "gui.rlm",
"-----" = "-----",
"Analysis of variance"="gui.aov"
)
## main ... | /pmg/R/dModelsDialog.R | no_license | ingted/R-Examples | R | false | false | 15,671 | r | ## Simple Dynamic Models dialog
## output has regular model methods defined for it except update()
dModelsDialog = function() {
## list of avail. models
models = list(
"linear regression"= "gui.lm",
"robust regresion" = "gui.rlm",
"-----" = "-----",
"Analysis of variance"="gui.aov"
)
## main ... |
\name{bivariateNormal}
\alias{bivariateNormal}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Plot the bivariate normal density using wireframe for specified rho.
}
\description{
Plot the bivariate normal density using wireframe for specified rho.
There is a shiny app that allows this to be ... | /man/bivariateNormal.Rd | no_license | cran/HH | R | false | false | 2,007 | rd | \name{bivariateNormal}
\alias{bivariateNormal}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Plot the bivariate normal density using wireframe for specified rho.
}
\description{
Plot the bivariate normal density using wireframe for specified rho.
There is a shiny app that allows this to be ... |
#' @export
makeRLearner.surv.randomForestSRC = function() {
makeRLearnerSurv(
cl = "surv.randomForestSRC",
package = c("survival", "randomForestSRC"),
par.set = makeParamSet(
makeIntegerLearnerParam(id = "ntree", default = 1000L, lower = 1L),
makeDiscreteLearnerParam(id = "bootstrap", default ... | /R/RLearner_surv_randomForestSRC.R | no_license | gragusa/mlr | R | false | false | 2,434 | r | #' @export
makeRLearner.surv.randomForestSRC = function() {
makeRLearnerSurv(
cl = "surv.randomForestSRC",
package = c("survival", "randomForestSRC"),
par.set = makeParamSet(
makeIntegerLearnerParam(id = "ntree", default = 1000L, lower = 1L),
makeDiscreteLearnerParam(id = "bootstrap", default ... |
library(dplyr)
library(ggplot2)
library(boot)
library(scales)
library(tidyr)
library(stringr)
getwd()
kaggle <- read.csv("C:/Users/Ryo Nakagawara/Desktop/Kaggle data/survey_results_public.csv")
glimpse(kaggle)
kaggle %>% filter(!is.na(Salary)) %>% glimpse()
kaggle_salary <- kaggle %>%
filter(!is.na(Salary)) %>%... | /kaggle_stuff.r | no_license | Ryo-N7/Misc.ProjectsTutorials | R | false | false | 733 | r | library(dplyr)
library(ggplot2)
library(boot)
library(scales)
library(tidyr)
library(stringr)
getwd()
kaggle <- read.csv("C:/Users/Ryo Nakagawara/Desktop/Kaggle data/survey_results_public.csv")
glimpse(kaggle)
kaggle %>% filter(!is.na(Salary)) %>% glimpse()
kaggle_salary <- kaggle %>%
filter(!is.na(Salary)) %>%... |
# Questions:
#1???"total value " in merger part1, N/A
#2??? 2 observations duplicated in mydata (just merged four parts)
#3) 20 observations in merger 0. what are the observations?
#4) N/A cusip in mydata?? (delete 500!)*****
#5???Other resources of sic information? (too much deleted!)
#6) ESTFLAG: explain it.
librar... | /mergers20171107b.R | no_license | fionaivywang/Relative-Time-Event-Study | R | false | false | 18,947 | r | # Questions:
#1???"total value " in merger part1, N/A
#2??? 2 observations duplicated in mydata (just merged four parts)
#3) 20 observations in merger 0. what are the observations?
#4) N/A cusip in mydata?? (delete 500!)*****
#5???Other resources of sic information? (too much deleted!)
#6) ESTFLAG: explain it.
librar... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y){
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(solveMatrix) inv <<- solveM... | /cachematrix.R | no_license | fedjr14/ProgrammingAssignment2 | R | false | false | 748 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y){
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(solveMatrix) inv <<- solveM... |
test_that("redundant_equals_linter skips allowed usages", {
# comparisons to non-logical constants
expect_lint("x == 1", NULL, redundant_equals_linter())
# comparison to TRUE as a string
expect_lint("x != 'TRUE'", NULL, redundant_equals_linter())
})
test_that("mutliple lints return correct custom messages", {
... | /tests/testthat/test-redundant_equals_linter.R | permissive | dpprdan/lintr | R | false | false | 1,118 | r | test_that("redundant_equals_linter skips allowed usages", {
# comparisons to non-logical constants
expect_lint("x == 1", NULL, redundant_equals_linter())
# comparison to TRUE as a string
expect_lint("x != 'TRUE'", NULL, redundant_equals_linter())
})
test_that("mutliple lints return correct custom messages", {
... |
options(lifecycle_verbosity = "warning")
# it has to be added as test
tf0 <- read_cells("00_nightly_only/dev/ABSSelfExplore/test.xlsx")[[1]]
tf0 <- tf0 %>% numeric_values_classifier()
tf0 %>% mutate(type = ifelse(row<6, "attribute", type)) ->tf0
ee <- explore_it("00_nightly_only/dev/ABSSelfExplore/")
ee <- ee %... | /00_nightly_only/dev/example_tuning.R | permissive | bedantaguru/tidycells_nightly | R | false | false | 3,300 | r |
options(lifecycle_verbosity = "warning")
# it has to be added as test
tf0 <- read_cells("00_nightly_only/dev/ABSSelfExplore/test.xlsx")[[1]]
tf0 <- tf0 %>% numeric_values_classifier()
tf0 %>% mutate(type = ifelse(row<6, "attribute", type)) ->tf0
ee <- explore_it("00_nightly_only/dev/ABSSelfExplore/")
ee <- ee %... |
# @title inla spde analaysis
# importing packages
source("./packages.R")
# importing data
source("./data/organised_data.R")
inla_function <- function(cutoff, rho0, sig0) {
# setting up the spde model in inla
coords <- cbind(data$x, data$y)
mesh <- inla.mesh.2d(coords, max.edge = c(500, 1000),
... | /inla_function.R | no_license | jmargrove/SpatialCarbonAnalysis | R | false | false | 1,616 | r | # @title inla spde analaysis
# importing packages
source("./packages.R")
# importing data
source("./data/organised_data.R")
inla_function <- function(cutoff, rho0, sig0) {
# setting up the spde model in inla
coords <- cbind(data$x, data$y)
mesh <- inla.mesh.2d(coords, max.edge = c(500, 1000),
... |
# Load in SVM membership predictions for each topic and cat into one table
args <- commandArgs(TRUE)
main.dir <- args[1]
cutoff <- args[2]
# Find all the files associated with the classification
#main.dir <- "/n/airoldifs2/lab/jbischof/reuters_output/"
class.dir <- paste(main.dir,"mmm_class_out/",sep="")
raw.data.dir... | /mmm_class_code/mmm_class_functions/get_reuters_svm_pred_postprocess.R | no_license | jbischof/HPC_model | R | false | false | 2,002 | r | # Load in SVM membership predictions for each topic and cat into one table
args <- commandArgs(TRUE)
main.dir <- args[1]
cutoff <- args[2]
# Find all the files associated with the classification
#main.dir <- "/n/airoldifs2/lab/jbischof/reuters_output/"
class.dir <- paste(main.dir,"mmm_class_out/",sep="")
raw.data.dir... |
/Users/philip/Documents/robots/CoinIpopt/Ipopt/contrib/RInterface/R/plot.sparseness.R | /CoinIpopt/build/Ipopt/contrib/RInterface/R/plot.sparseness.R | no_license | philzook58/robots | R | false | false | 85 | r | /Users/philip/Documents/robots/CoinIpopt/Ipopt/contrib/RInterface/R/plot.sparseness.R |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{get_k_threshold}
\alias{get_k_threshold}
\title{Get the \code{k_threshold}}
\usage{
get_k_threshold(obj)
}
\arguments{
\item{obj}{the output of \code{kselection} function.}
}
\value{
the \code{k_threshold} value.
}
\description{
Get the maximum value of \eqn{f(... | /man/get_k_threshold.Rd | no_license | pimentel/kselection | R | false | false | 476 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{get_k_threshold}
\alias{get_k_threshold}
\title{Get the \code{k_threshold}}
\usage{
get_k_threshold(obj)
}
\arguments{
\item{obj}{the output of \code{kselection} function.}
}
\value{
the \code{k_threshold} value.
}
\description{
Get the maximum value of \eqn{f(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/image.R
\name{web_image}
\alias{web_image}
\title{Helper function for adding an image from the web}
\usage{
web_image(url, height = 30)
}
\arguments{
\item{url}{a url that resolves to an image file.}
\item{height}{the absolute height (px) of... | /man/web_image.Rd | permissive | jordanodonnell138/gt | R | false | true | 3,070 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/image.R
\name{web_image}
\alias{web_image}
\title{Helper function for adding an image from the web}
\usage{
web_image(url, height = 30)
}
\arguments{
\item{url}{a url that resolves to an image file.}
\item{height}{the absolute height (px) of... |
#' Spark ML -- Generalized Linear Regression
#'
#' Perform regression using Generalized Linear Model (GLM).
#'
#' @template roxlate-ml-algo
#' @template roxlate-ml-formula-params
#' @template roxlate-ml-linear-regression-params
#' @template roxlate-ml-predictor-params
#' @param offset_col Offset column name. If this is... | /R/ml_regression_generalized_linear_regression.R | permissive | Ineedi2/sparklyr | R | false | false | 12,686 | r | #' Spark ML -- Generalized Linear Regression
#'
#' Perform regression using Generalized Linear Model (GLM).
#'
#' @template roxlate-ml-algo
#' @template roxlate-ml-formula-params
#' @template roxlate-ml-linear-regression-params
#' @template roxlate-ml-predictor-params
#' @param offset_col Offset column name. If this is... |
library(shiny)
library(ggplot2)
library(shinythemes)
# DEFINE UI ----
ui <- fluidPage(
theme = shinytheme("slate"),
# titlePanel("MAP syntax diagrams"),
br(),
a(href="https://map-polytheisms.huma-num.fr", target="_blank",
img(src='map-logo.png', width="250", align = "center")),
br(),
h3("MAP syntax d... | /app/app.R | no_license | LaboratoirePLH/map-syntax-diagrams | R | false | false | 16,875 | r | library(shiny)
library(ggplot2)
library(shinythemes)
# DEFINE UI ----
ui <- fluidPage(
theme = shinytheme("slate"),
# titlePanel("MAP syntax diagrams"),
br(),
a(href="https://map-polytheisms.huma-num.fr", target="_blank",
img(src='map-logo.png', width="250", align = "center")),
br(),
h3("MAP syntax d... |
#
# Copyright (C) 2013-2015 University of Amsterdam
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program i... | /ModelView/R/anovarepeatedmeasures.R | no_license | jasp-extra/snippets | R | false | false | 72,075 | r | #
# Copyright (C) 2013-2015 University of Amsterdam
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 2 of the License, or
# (at your option) any later version.
#
# This program i... |
#######################
## Produces the table with ranking shifts resulting from the adjustment for complementary football features
## within a single season.
#######################
require(tidyverse)
require(gridExtra)
require(plotrix)
#####
## For which week we get the rankings?(if all weeks - put in "MAX")
####... | /Submission_Step7_Ranking_Shifts_Within_A_Season.R | no_license | UsDAnDreS/SUBMISSIONS_OffenseST_DefenseST_GLM_LASSO_adjusted_rankings | R | false | false | 11,707 | r | #######################
## Produces the table with ranking shifts resulting from the adjustment for complementary football features
## within a single season.
#######################
require(tidyverse)
require(gridExtra)
require(plotrix)
#####
## For which week we get the rankings?(if all weeks - put in "MAX")
####... |
###############################################################################################
##
## 3-safe 1-risky bandit with exp condition 0 setting
## Parameter Recovery Test
##
## Wataru Toyokawa
##
###############################################################################################
if(FALSE) rm(list=l... | /experimentalAnalysis/parameter_recovery/SL00/parameter_recovery_pseudo_data_4ab_riskID11.R | no_license | WataruToyokawa/ToyokawaGaissmaier2021 | R | false | false | 11,173 | r | ###############################################################################################
##
## 3-safe 1-risky bandit with exp condition 0 setting
## Parameter Recovery Test
##
## Wataru Toyokawa
##
###############################################################################################
if(FALSE) rm(list=l... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Margin_Cells.R
\name{cellMargin}
\alias{cellMargin}
\title{Removes or assign indicators to margin events.}
\usage{
cellMargin(
flowframe,
Channel = "SSC.W",
type = c("manual", "estimate"),
cut = NULL,
y_toplot = "FSC,HLin"
)
}
\argu... | /man/cellmargin.Rd | no_license | fomotis/cyanoFilter | R | false | true | 2,633 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Margin_Cells.R
\name{cellMargin}
\alias{cellMargin}
\title{Removes or assign indicators to margin events.}
\usage{
cellMargin(
flowframe,
Channel = "SSC.W",
type = c("manual", "estimate"),
cut = NULL,
y_toplot = "FSC,HLin"
)
}
\argu... |
# By Dr. Rajen Shah (http://www.statslab.cam.ac.uk/~rds37/)
# Sent to Sahir upon request via email August 12, 2015
# Returns a sequence of groupings and corresponding maximal canonical correlations, and also
# a possibly "sign-corrected" version of the the design matrix x.
# Note the group numbers in the groupings are ... | /Agglomerative_clustering.R | no_license | sahirbhatnagar/cancluster | R | false | false | 4,151 | r | # By Dr. Rajen Shah (http://www.statslab.cam.ac.uk/~rds37/)
# Sent to Sahir upon request via email August 12, 2015
# Returns a sequence of groupings and corresponding maximal canonical correlations, and also
# a possibly "sign-corrected" version of the the design matrix x.
# Note the group numbers in the groupings are ... |
# Set-up
library("coda")
source("R/id_set_up.R")
## Modified bridge scheme
source("R/mis.R")
################################################
# Optimal tuning matrix
################################################
mis_sigma = matrix(c(0.012, 0.0052, 0.0052, 0.0046),
ncol = 2, byrow = TRUE)
# Run sam... | /R/example1.R | no_license | csgillespie/cor-pseudo-marginal | R | false | false | 1,258 | r | # Set-up
library("coda")
source("R/id_set_up.R")
## Modified bridge scheme
source("R/mis.R")
################################################
# Optimal tuning matrix
################################################
mis_sigma = matrix(c(0.012, 0.0052, 0.0052, 0.0046),
ncol = 2, byrow = TRUE)
# Run sam... |
library(checkarg)
### Name: isStrictlyNegativeIntegerOrNaOrInfScalarOrNull
### Title: Wrapper for the checkarg function, using specific parameter
### settings.
### Aliases: isStrictlyNegativeIntegerOrNaOrInfScalarOrNull
### ** Examples
isStrictlyNegativeIntegerOrNaOrInfScalarOrNull(-2)
# returns TRUE (argument... | /data/genthat_extracted_code/checkarg/examples/isStrictlyNegativeIntegerOrNaOrInfScalarOrNull.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,014 | r | library(checkarg)
### Name: isStrictlyNegativeIntegerOrNaOrInfScalarOrNull
### Title: Wrapper for the checkarg function, using specific parameter
### settings.
### Aliases: isStrictlyNegativeIntegerOrNaOrInfScalarOrNull
### ** Examples
isStrictlyNegativeIntegerOrNaOrInfScalarOrNull(-2)
# returns TRUE (argument... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/generateParamChoices.R
\name{generateParamChoices}
\alias{generateParamChoices}
\title{Generate a dataframe with parameter options for model creation.}
\usage{
generateParamChoices(predictVariables, modelReturn, pathToSave = "",
sav... | /man/generateParamChoices.Rd | permissive | limnoliver/GSqwsr | R | false | false | 1,520 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/generateParamChoices.R
\name{generateParamChoices}
\alias{generateParamChoices}
\title{Generate a dataframe with parameter options for model creation.}
\usage{
generateParamChoices(predictVariables, modelReturn, pathToSave = "",
sav... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "no2")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn = makeLearner("... | /models/openml_no2/classification_binaryClass/40fe3fca558ed7e544c02851f3c68897/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 726 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "no2")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn = makeLearner("... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sagemaker_operations.R
\name{sagemaker_list_tags}
\alias{sagemaker_list_tags}
\title{Returns the tags for the specified Amazon SageMaker resource}
\usage{
sagemaker_list_tags(ResourceArn, NextToken, MaxResults)
}
\arguments{
\item{ResourceArn... | /paws/man/sagemaker_list_tags.Rd | permissive | johnnytommy/paws | R | false | true | 892 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sagemaker_operations.R
\name{sagemaker_list_tags}
\alias{sagemaker_list_tags}
\title{Returns the tags for the specified Amazon SageMaker resource}
\usage{
sagemaker_list_tags(ResourceArn, NextToken, MaxResults)
}
\arguments{
\item{ResourceArn... |
###########################################################################
#PLot 2 : Total emissions for Baltimore City during 1999, 2002, 2005, 2008
## Question ##
# Have total emissions from PM2.5 decreased in the Baltimore City, Maryland (fips == "24510") from 1999 to 2008? Use the base plotting system to make a ... | /ExploratoryAnalysis/ExData_Plotting4/plot2.R | no_license | sriharshaanp/CourseraLessons | R | false | false | 1,439 | r | ###########################################################################
#PLot 2 : Total emissions for Baltimore City during 1999, 2002, 2005, 2008
## Question ##
# Have total emissions from PM2.5 decreased in the Baltimore City, Maryland (fips == "24510") from 1999 to 2008? Use the base plotting system to make a ... |
fi=function(i,m,M){
library(expm)
p=matrix(c(0),1)
fi=matrix(c(0),1)
sm=matrix(rep(0,2),2)
for(c in 2:m){
n=c
for(a in 1:n) {
p[a]=(M%^%a)[i,i]
}
fi[1]=p[1]
fp=fi%*%t(p)
sm=matrix(rep(0,n-1),n-1)
for (a in 2:n-1) {
for (b in 1:a) {
sm[a]=sm[a]+fp[... | /prob de retorno.R | no_license | vay1987/probabilidad_de_retorno_fi_estocasticos | R | false | false | 400 | r | fi=function(i,m,M){
library(expm)
p=matrix(c(0),1)
fi=matrix(c(0),1)
sm=matrix(rep(0,2),2)
for(c in 2:m){
n=c
for(a in 1:n) {
p[a]=(M%^%a)[i,i]
}
fi[1]=p[1]
fp=fi%*%t(p)
sm=matrix(rep(0,n-1),n-1)
for (a in 2:n-1) {
for (b in 1:a) {
sm[a]=sm[a]+fp[... |
testlist <- list(x = c(-2.42208305039457e+24, -1.3476552055185e+28, -6.67115915940654e+306, 8.90771002988687e-159, 9.34665314051611e-307, 5.65896446765599e+294, -4.30276296309807e-140, 7.05681447781244e-158, 3.39833555023577e+178, 3.07908049665631e-146, -3.61841824398353e-138, -4.02250795184041e-87, 9.1113672530976... | /blorr/inst/testfiles/blr_pairs_cpp/libFuzzer_blr_pairs_cpp/blr_pairs_cpp_valgrind_files/1609956743-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 1,058 | r | testlist <- list(x = c(-2.42208305039457e+24, -1.3476552055185e+28, -6.67115915940654e+306, 8.90771002988687e-159, 9.34665314051611e-307, 5.65896446765599e+294, -4.30276296309807e-140, 7.05681447781244e-158, 3.39833555023577e+178, 3.07908049665631e-146, -3.61841824398353e-138, -4.02250795184041e-87, 9.1113672530976... |
dataPower <- "~/household_power_consumption.txt"
data <- read.table(dataPower, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subPower <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
gap <- as.numeric(subPower$Global_active_power)
png("plot1.png", width=480, height=480)
hist(gap, main = "Global Active Power... | /plot1.R | no_license | MilanaSmuk/ExData_Plotting1 | R | false | false | 407 | r | dataPower <- "~/household_power_consumption.txt"
data <- read.table(dataPower, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subPower <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
gap <- as.numeric(subPower$Global_active_power)
png("plot1.png", width=480, height=480)
hist(gap, main = "Global Active Power... |
/paqueteR/R/sqrtfun1.R | no_license | marcelinodelacruz/Como-crear-paquetes-de-R | R | false | false | 225 | r | ||
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
#here I have defined a function named: makeCacheMatrix, where the function creates a special matrix object that can cache it's inverse.
#steps followed: set matrix -> get value ... | /cachematrix.R | no_license | Pranjita1/ProgrammingAssignment2 | R | false | false | 1,563 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
#here I have defined a function named: makeCacheMatrix, where the function creates a special matrix object that can cache it's inverse.
#steps followed: set matrix -> get value ... |
library(eqtools)
library(readr)
library(leaflet)
test_that("eq_map returns a object with class leaflet",{
adf <- read_delim( system.file("extdata", "signif-july-2017.txt.gz", package = "eqtools"),delim = "\t")
cdf <- eq_clean_data(adf)
#getting a warning about bad lat,long
amap <- eq_map(cdf,annot_col = ... | /tests/testthat/test_map.R | no_license | tcoopermont/eqtools | R | false | false | 778 | r |
library(eqtools)
library(readr)
library(leaflet)
test_that("eq_map returns a object with class leaflet",{
adf <- read_delim( system.file("extdata", "signif-july-2017.txt.gz", package = "eqtools"),delim = "\t")
cdf <- eq_clean_data(adf)
#getting a warning about bad lat,long
amap <- eq_map(cdf,annot_col = ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predBevHoltSR.R
\name{predBevHoltSR}
\alias{predBevHoltSR}
\title{Beverton Holt Stock Recruitment}
\usage{
predBevHoltSR(BHalpha, BHbeta, SSB)
}
\arguments{
\item{BHalpha}{Bev-Holt alpha parameter in R = alpha * SSB / (beta + SSB)}
\item{BHb... | /Sandbox/man/predBevHoltSR.Rd | no_license | pdbsimproj/WoodsHoleSimThing | R | false | true | 496 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/predBevHoltSR.R
\name{predBevHoltSR}
\alias{predBevHoltSR}
\title{Beverton Holt Stock Recruitment}
\usage{
predBevHoltSR(BHalpha, BHbeta, SSB)
}
\arguments{
\item{BHalpha}{Bev-Holt alpha parameter in R = alpha * SSB / (beta + SSB)}
\item{BHb... |
petBrainGlioma <- data.frame(grade=factor(rep(1:2, each=5)),
FDG=c(6.41, 3.54, 4.72, 5.48, 3.42,
14.6, 6.58, 3.84, 5.12, 5.48),
ACE=c(1.84, 1.07, 1.82, 2.65, 1.87,
2.78, 1.98, 2.69, 2.63, 3.0... | /data/petBrainGlioma.R | no_license | cran/auRoc | R | false | false | 324 | r | petBrainGlioma <- data.frame(grade=factor(rep(1:2, each=5)),
FDG=c(6.41, 3.54, 4.72, 5.48, 3.42,
14.6, 6.58, 3.84, 5.12, 5.48),
ACE=c(1.84, 1.07, 1.82, 2.65, 1.87,
2.78, 1.98, 2.69, 2.63, 3.0... |
library(Przewodnik)
### Name: brca
### Title: BRCA Dataset
### Aliases: brca
### Keywords: datasets
### ** Examples
library("Przewodnik")
summary(brca)
| /data/genthat_extracted_code/Przewodnik/examples/brca.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 159 | r | library(Przewodnik)
### Name: brca
### Title: BRCA Dataset
### Aliases: brca
### Keywords: datasets
### ** Examples
library("Przewodnik")
summary(brca)
|
# Import data, then keep only 2 days of the data
powerData <- read.csv("data/powerData.txt",header=TRUE,sep=";",stringsAsFactors = FALSE)
powerData$Date <- as.Date(powerData$Date, format="%d/%m/%Y")
partialPowerData <- powerData[(powerData$Date >= "2007-02-01") & (powerData$Date <= "2007-02-02"),]
# Convert used colum... | /plot1.R | no_license | poliwop/ExData_Plotting1 | R | false | false | 626 | r | # Import data, then keep only 2 days of the data
powerData <- read.csv("data/powerData.txt",header=TRUE,sep=";",stringsAsFactors = FALSE)
powerData$Date <- as.Date(powerData$Date, format="%d/%m/%Y")
partialPowerData <- powerData[(powerData$Date >= "2007-02-01") & (powerData$Date <= "2007-02-02"),]
# Convert used colum... |
#' Utilities for BGM files for Atlantis
#'
#' Tools for handling network data for Atlantis from box-geometry
#' model (BGM) files
#'
#' @name rbgm-package
#' @docType package
#' @author Michael D. Sumner
#' @import raster sp
NULL
##' Partial read for .bgm files
##'
##' Read geometry from BGM files
##'
##' @title Read... | /R/rbgm.R | no_license | erikjsolsen/rbgm | R | false | false | 3,186 | r | #' Utilities for BGM files for Atlantis
#'
#' Tools for handling network data for Atlantis from box-geometry
#' model (BGM) files
#'
#' @name rbgm-package
#' @docType package
#' @author Michael D. Sumner
#' @import raster sp
NULL
##' Partial read for .bgm files
##'
##' Read geometry from BGM files
##'
##' @title Read... |
library(tidyverse)
library(shiny)
final <- read_csv("./data/df_[final]_small.csv")
# Define UI for application that draws a histogram
ui <- fluidPage(
# Application title
titlePanel("Producto - Cliente - Agencia"),
# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
... | /app.R | no_license | enriquelpz23/abraxas | R | false | false | 1,314 | r | library(tidyverse)
library(shiny)
final <- read_csv("./data/df_[final]_small.csv")
# Define UI for application that draws a histogram
ui <- fluidPage(
# Application title
titlePanel("Producto - Cliente - Agencia"),
# Sidebar with a slider input for number of bins
sidebarLayout(
sidebarPanel(
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BETS.save.R
\name{BETS.save}
\alias{BETS.save}
\title{Prepare a time series to be exported}
\usage{
BETS.save(code = NULL, data = NULL, file.name = "series", type = "")
}
\arguments{
\item{code}{An \code{integer}. The unique identifi... | /man/BETS.save.Rd | no_license | fernote7/BETS2 | R | false | true | 851 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BETS.save.R
\name{BETS.save}
\alias{BETS.save}
\title{Prepare a time series to be exported}
\usage{
BETS.save(code = NULL, data = NULL, file.name = "series", type = "")
}
\arguments{
\item{code}{An \code{integer}. The unique identifi... |
library(subgraphing)
context("Bernoulli Subgraph Estimator and Classifier Tests")
#------- Incoherent Estimator Tests ---------------------------------------------------------#
n = 1000 # number of samples per class just so we get a lot of data
xdim <- 5
ydim <- 5
c <- 2 # number of classes
p <- array(NaN, dim=c(x... | /tests/testthat/test-bern-subgraph.R | permissive | neurodata/subgraphing | R | false | false | 4,294 | r | library(subgraphing)
context("Bernoulli Subgraph Estimator and Classifier Tests")
#------- Incoherent Estimator Tests ---------------------------------------------------------#
n = 1000 # number of samples per class just so we get a lot of data
xdim <- 5
ydim <- 5
c <- 2 # number of classes
p <- array(NaN, dim=c(x... |
#' List of FINEMAP config file contents for two simulated traits
#'
#' Simulated data was generated using the mvrnorm function in R and genotype matrix X. The two traits have correlation 0.4 and
#' each has two causal variants, of which one, rs61839660 is shared between traits; trait 1 has second
#' causal variant ... | /R/FMconfig.R | no_license | jennasimit/flashfm | R | false | false | 644 | r | #' List of FINEMAP config file contents for two simulated traits
#'
#' Simulated data was generated using the mvrnorm function in R and genotype matrix X. The two traits have correlation 0.4 and
#' each has two causal variants, of which one, rs61839660 is shared between traits; trait 1 has second
#' causal variant ... |
#library("testthat");
library("doParallel"); registerDoParallel(80)
library("gapfill", lib.loc = "../lib")
load("issue_juras.rda")
context("test-local-issue-juras")
test_that("test-local-issue-juras",{
expect_error(data_issue_juras_out <- Gapfill(data = data_issue_juras, dopar=TRUE), NA)
expect_warning(data_is... | /tests-local/test-local-issue-juras.R | no_license | florafauna/gapfill | R | false | false | 454 | r | #library("testthat");
library("doParallel"); registerDoParallel(80)
library("gapfill", lib.loc = "../lib")
load("issue_juras.rda")
context("test-local-issue-juras")
test_that("test-local-issue-juras",{
expect_error(data_issue_juras_out <- Gapfill(data = data_issue_juras, dopar=TRUE), NA)
expect_warning(data_is... |
TestInterceptTerm <- function() {
i <- emre:::InterceptTerm$new("1")
events <- emre:::AddData(i, data.frame(response = 1:10))
checkEquals(events, sum(1:10))
}
TestOffsetTermData <- function() {
o0 <- emre:::OffsetTerm$new() # must initialize to offset(1)
vec0 <- emre:::AddData(o0, data.frame(x = 1:10))
ch... | /inst/unitTests/add_data_test.R | permissive | QPC-WORLDWIDE/emre | R | false | false | 3,231 | r | TestInterceptTerm <- function() {
i <- emre:::InterceptTerm$new("1")
events <- emre:::AddData(i, data.frame(response = 1:10))
checkEquals(events, sum(1:10))
}
TestOffsetTermData <- function() {
o0 <- emre:::OffsetTerm$new() # must initialize to offset(1)
vec0 <- emre:::AddData(o0, data.frame(x = 1:10))
ch... |
# This script pulls from a spreadsheet that compiles original CDC data from two locations:
# https://www.cdc.gov/mmwr/pdf/wk/mm6341.pdf
# https://www.cdc.gov/mmwr/volumes/67/wr/mm6740a3.htm
library(tidyverse)
library(janitor)
library(readxl)
library(naniar)
#import the compiled spreadsheet file
orig_data <- read_exce... | /01_clean_and_calculate.R | permissive | amkessler/nme_analysis | R | false | false | 2,203 | r | # This script pulls from a spreadsheet that compiles original CDC data from two locations:
# https://www.cdc.gov/mmwr/pdf/wk/mm6341.pdf
# https://www.cdc.gov/mmwr/volumes/67/wr/mm6740a3.htm
library(tidyverse)
library(janitor)
library(readxl)
library(naniar)
#import the compiled spreadsheet file
orig_data <- read_exce... |
#source('preprocess.R')
library(dplyr)
library(purrr)
library(keras)
# For Model --------history + demo info---------------------
# splitting data into train / test
dat.sale.train = select(dat.wide,`sale.2017-10-01`:`sale.2017-12-31`, pid, size, releaseDate, key)
# get max sale per day
lst_max = as.numeric(appl... | /users/jiamingqiu/pre_histANDdemo.R | no_license | ISU-DMC/dmc2018 | R | false | false | 4,850 | r | #source('preprocess.R')
library(dplyr)
library(purrr)
library(keras)
# For Model --------history + demo info---------------------
# splitting data into train / test
dat.sale.train = select(dat.wide,`sale.2017-10-01`:`sale.2017-12-31`, pid, size, releaseDate, key)
# get max sale per day
lst_max = as.numeric(appl... |
library(shiny)
library(DT)
server <- function(input, output) {
output[["table"]] <- renderDataTable({
datatable(iris)
# datatable(iris, filter = "top")
# datatable(iris, extensions = "Buttons",
# options = list(
# dom = "Brtip",
# buttons = list("copy",... | /cz2_shiny/app4.R | no_license | STWUR/STWUR-2018-04-21 | R | false | false | 461 | r | library(shiny)
library(DT)
server <- function(input, output) {
output[["table"]] <- renderDataTable({
datatable(iris)
# datatable(iris, filter = "top")
# datatable(iris, extensions = "Buttons",
# options = list(
# dom = "Brtip",
# buttons = list("copy",... |
library(leaflet)
library(RColorBrewer)
library(scales)
library(lattice)
library(dplyr)
# Leaflet bindings are a bit slow; for now we'll just sample to compensate
set.seed(100)
zipdata <- allzips[sample.int(nrow(allzips), 10000),]
# By ordering by centile, we ensure that the (comparatively rare) SuperZIPs
# will be dra... | /063-superzip-example/server.R | permissive | mine-cetinkaya-rundel/shiny-examples | R | false | false | 6,149 | r | library(leaflet)
library(RColorBrewer)
library(scales)
library(lattice)
library(dplyr)
# Leaflet bindings are a bit slow; for now we'll just sample to compensate
set.seed(100)
zipdata <- allzips[sample.int(nrow(allzips), 10000),]
# By ordering by centile, we ensure that the (comparatively rare) SuperZIPs
# will be dra... |
#' @name games.men.2021
#' @title 2021 NCAA Men's Basketball Game-by-Game Results
#' @description This dataset contains the game results of the
#' college men's basketball 2020-2021 season, identifying
#' the game, the home and away teams, (using the ESPN ID system),
#' the home and away scores, whether the game ... | /R/games.men.2021.R | no_license | jpbranson/mRchmadness | R | false | false | 571 | r | #' @name games.men.2021
#' @title 2021 NCAA Men's Basketball Game-by-Game Results
#' @description This dataset contains the game results of the
#' college men's basketball 2020-2021 season, identifying
#' the game, the home and away teams, (using the ESPN ID system),
#' the home and away scores, whether the game ... |
# Chapter 03
# 실습: 키보드로 숫자 입력하기
num <- scan()
num
sum(num)
# 실습: 키보드로 문자 입력하기
name <- scan(what = character())
name
# 실습: 편집기를 이용한 데이터프레임 만들기
df = data.frame()
df = edit(df)
df
# 실습: 칼럼명이 없는 파일 불러오기
getwd()
setwd("C:/Rwork/Part-I")
student <- read.table(file = "student.txt")
student
names(student) <- c("번호", ... | /Rcs/Rwork/R-script/chapter03.R | no_license | cherish10/R | R | false | false | 3,441 | r | # Chapter 03
# 실습: 키보드로 숫자 입력하기
num <- scan()
num
sum(num)
# 실습: 키보드로 문자 입력하기
name <- scan(what = character())
name
# 실습: 편집기를 이용한 데이터프레임 만들기
df = data.frame()
df = edit(df)
df
# 실습: 칼럼명이 없는 파일 불러오기
getwd()
setwd("C:/Rwork/Part-I")
student <- read.table(file = "student.txt")
student
names(student) <- c("번호", ... |
# {{{ load packages
library(survival)
library(testthat)
library(prodlim)
library(riskRegression)
library(wally)
# }}}
# {{{ "Wally for survival weird formula and hanging"
test_that("Wally for survival weird formula and hanging",{
set.seed(10)
d <- sampleData(138,outcome="survival")
setnames(d,c("time","e... | /data/genthat_extracted_code/wally/tests/test-wally-function.R | no_license | surayaaramli/typeRrh | R | false | false | 13,857 | r |
# {{{ load packages
library(survival)
library(testthat)
library(prodlim)
library(riskRegression)
library(wally)
# }}}
# {{{ "Wally for survival weird formula and hanging"
test_that("Wally for survival weird formula and hanging",{
set.seed(10)
d <- sampleData(138,outcome="survival")
setnames(d,c("time","e... |
#!/usr/bin/Rscript
source("fqq.R")
args <- commandArgs(trailingOnly = TRUE)
p.f = args[1]
p.m = as.numeric(args[2])
p.e = as.numeric(args[3])
if (is.na(p.m)){
p.m = 0.001
}
if (is.na(p.e)){
p.e = 0.001
}
message(paste0("p.m = ",p.m,"\np.e = ",p.e))
qq.f = paste0(p.f, ".qq.png")
message(paste0("output file n... | /plot_fqq.R | no_license | vforget/fqq | R | false | false | 550 | r | #!/usr/bin/Rscript
source("fqq.R")
args <- commandArgs(trailingOnly = TRUE)
p.f = args[1]
p.m = as.numeric(args[2])
p.e = as.numeric(args[3])
if (is.na(p.m)){
p.m = 0.001
}
if (is.na(p.e)){
p.e = 0.001
}
message(paste0("p.m = ",p.m,"\np.e = ",p.e))
qq.f = paste0(p.f, ".qq.png")
message(paste0("output file n... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.