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 |
|---|---|---|---|---|---|---|---|---|---|
source("KMeanClusteringUtils.R")
library(cluster)
#reading KMeanClustering model
kMeanClusteringModel = readRDS("KMeanClusteringModel.RDS")
inputValue <- importKMeanClusteringDataset("K_Mean_Clustering_Mall_Customers.csv")
inputValue = inputValue[170,]
#predicting new set
KMeanClusteringPredictNewClusters(inputValue... | /KMeanClusteringPredict.R | no_license | Santosh-Sah/K_Means_Clustering_R | R | false | false | 357 | r | source("KMeanClusteringUtils.R")
library(cluster)
#reading KMeanClustering model
kMeanClusteringModel = readRDS("KMeanClusteringModel.RDS")
inputValue <- importKMeanClusteringDataset("K_Mean_Clustering_Mall_Customers.csv")
inputValue = inputValue[170,]
#predicting new set
KMeanClusteringPredictNewClusters(inputValue... |
#Get data
ENSOindex <- read.table(file="~/Documents/RFiles/enso1950.clean.csv", header=TRUE, sep=",")
head(ENSOindex)
#make zoo object of time series
ENSOws <- zoo(ws, ENSOindex$YEAR)
#plot single series
plot(ENSOws, xlab="Year", type="l", main = "ENSO Index for Jul Aug", ylab = "ENSO Index")
adf.test(ENSOws, alter... | /CatRisk/ENSOts1.R | no_license | bgbutler/R_Scripts | R | false | false | 476 | r | #Get data
ENSOindex <- read.table(file="~/Documents/RFiles/enso1950.clean.csv", header=TRUE, sep=",")
head(ENSOindex)
#make zoo object of time series
ENSOws <- zoo(ws, ENSOindex$YEAR)
#plot single series
plot(ENSOws, xlab="Year", type="l", main = "ENSO Index for Jul Aug", ylab = "ENSO Index")
adf.test(ENSOws, alter... |
################################################################################################################################
###A utility function calculating $int_0^t s^k\lambda_1(s)S_2(s)ds$ where k=0,1,2 and rate1=lambda_1 and S_2 has hazard rate2
## version 1.0 (07/19/2016)
################################... | /R/pwefvplus.R | no_license | cran/PWEALL | R | false | false | 1,067 | r | ################################################################################################################################
###A utility function calculating $int_0^t s^k\lambda_1(s)S_2(s)ds$ where k=0,1,2 and rate1=lambda_1 and S_2 has hazard rate2
## version 1.0 (07/19/2016)
################################... |
#' @importFrom shiny NS dateInput checkboxInput textInput
#' @importFrom htmltools tagList
#' @importFrom R.utils capitalize
edit_user_ui <- function(id, credentials, username = NULL, inputs_list = NULL, lan = NULL) {
ns <- NS(id)
if (is.null(lan)) {
lan <- use_language()
}
if (!is.null(user... | /R/module-edit_user.R | no_license | cran/shinymanager | R | false | false | 6,053 | r |
#' @importFrom shiny NS dateInput checkboxInput textInput
#' @importFrom htmltools tagList
#' @importFrom R.utils capitalize
edit_user_ui <- function(id, credentials, username = NULL, inputs_list = NULL, lan = NULL) {
ns <- NS(id)
if (is.null(lan)) {
lan <- use_language()
}
if (!is.null(user... |
# set up
## load packages,functions, model
library(deSolve)
library(rootSolve)
library(plotrix)
library(parallel)
library(doParallel)
library(foreach)
library(doRNG)
source("~/Documents/GitHub/covid_vaccines_virulence_evolution/functions.R")
system("R CMD SHLIB ~/Documents/GitHub/covid_vaccines_virulence_evolution/ep... | /cluster/dir.33/analysis.cluster.R | no_license | ianfmiller/covid_vaccines_virulence_evolution | R | false | false | 4,333 | r | # set up
## load packages,functions, model
library(deSolve)
library(rootSolve)
library(plotrix)
library(parallel)
library(doParallel)
library(foreach)
library(doRNG)
source("~/Documents/GitHub/covid_vaccines_virulence_evolution/functions.R")
system("R CMD SHLIB ~/Documents/GitHub/covid_vaccines_virulence_evolution/ep... |
#' @title Download HAND, RC, and Cathmask rasters by HUC6
#' @description This function downloads staged HAND data to a local directory.
#' @param HUC6 A HUC6 unit to download
#' @param outdir The folder path where data should be downloaded and extracted
#' @param type The type of data to download. Options include 'cat... | /R/download_ut.R | permissive | DrRoad/FloodMapping | R | false | false | 2,308 | r | #' @title Download HAND, RC, and Cathmask rasters by HUC6
#' @description This function downloads staged HAND data to a local directory.
#' @param HUC6 A HUC6 unit to download
#' @param outdir The folder path where data should be downloaded and extracted
#' @param type The type of data to download. Options include 'cat... |
= class Cairo::SurfacePattern
== Object Hierarchy
* Object
* ((<Cairo::Pattern>))
* Cairo::SurfacePattern
== Class Methods
--- Cairo::SurfacePattern.new
* Returns: self: ((*FIXME*))
== Instance Methods
--- surface
* Returns: self: ((*FIXME*))
== See Also
== ChangeLog
| /en/cairo-surface-pattern.rd | no_license | rcairo/doc | R | false | false | 296 | rd | = class Cairo::SurfacePattern
== Object Hierarchy
* Object
* ((<Cairo::Pattern>))
* Cairo::SurfacePattern
== Class Methods
--- Cairo::SurfacePattern.new
* Returns: self: ((*FIXME*))
== Instance Methods
--- surface
* Returns: self: ((*FIXME*))
== See Also
== ChangeLog
|
##################################################
#
# ECO 6416.0028 Applied Business Research Tools
#
# OLS Regression Demo
# Regression with Simulated Data
#
# Lealand Morin, Ph.D.
# Assistant Professor
# Department of Economics
# College of Business Administration
# University of Central Florida
#
# August 31, 2020
... | /Intro/ECO6416_OLS_Sim.R | no_license | LeeMorinUCF/ECO6416 | R | false | false | 4,490 | r | ##################################################
#
# ECO 6416.0028 Applied Business Research Tools
#
# OLS Regression Demo
# Regression with Simulated Data
#
# Lealand Morin, Ph.D.
# Assistant Professor
# Department of Economics
# College of Business Administration
# University of Central Florida
#
# August 31, 2020
... |
ui <- fluidPage(
titlePanel("Datasaurus exploration"),
sidebarLayout(
sidebarPanel(
wellPanel(
selectizeInput(
'dataset', h5('Chose a dataset to display'),choices = list_dataset,selected = 3
)
),
wellPanel(
checkboxGroupInput("posit", "Position parameters to display", choices = pos... | /week_42/app_datasaurus/UI.r | no_license | FraNoelVet/tidytuesday | R | false | false | 888 | r | ui <- fluidPage(
titlePanel("Datasaurus exploration"),
sidebarLayout(
sidebarPanel(
wellPanel(
selectizeInput(
'dataset', h5('Chose a dataset to display'),choices = list_dataset,selected = 3
)
),
wellPanel(
checkboxGroupInput("posit", "Position parameters to display", choices = pos... |
# title: "BST 611 SAS Lab for Regression "
# author: "BST 611"
# set working directory
#setwd("D:/FuchenchuWang/UAB/BST 611/conversion")
# read your file
lab=read.csv("Binge_Drinking.csv")
# Split the dataset by Gender
# 1 = Male
# 2 = Female""
# change "1/2" to "Male/Female"
lab$gender = gsub(1, "Male",lab$gen... | /downloaded_module2_HW_CODE_NOT_EDITED.R | no_license | rdalejohnson/module2bingedrinking | R | false | false | 1,576 | r |
# title: "BST 611 SAS Lab for Regression "
# author: "BST 611"
# set working directory
#setwd("D:/FuchenchuWang/UAB/BST 611/conversion")
# read your file
lab=read.csv("Binge_Drinking.csv")
# Split the dataset by Gender
# 1 = Male
# 2 = Female""
# change "1/2" to "Male/Female"
lab$gender = gsub(1, "Male",lab$gen... |
###########################################################################
###########################################################################
### ###
### Exercise 18. ###
### ... | /AppliedBiostatsI/Exercices R/Ex18/Ex18_Script.R | no_license | ThibaultSchowing/unistuff | R | false | false | 5,635 | r | ###########################################################################
###########################################################################
### ###
### Exercise 18. ###
### ... |
library(stringr)
load(file = "~/Talks/SportsAnalyticsTutorial/match_stats.RData")
split <- str_split(match_stats, "\n")[[1]]
pattern <- "[a-z]"
stats <- str_detect(split, pattern)
stats <- str_subset(split, pattern)
values <- split[
!str_detect(split, pattern) &
!str_detect(split, "[A-Z]")
] # Get values
co... | /rladies/SportsAnalyticsTutorial/examples.R | no_license | TurRil/satRday | R | false | false | 15,954 | r | library(stringr)
load(file = "~/Talks/SportsAnalyticsTutorial/match_stats.RData")
split <- str_split(match_stats, "\n")[[1]]
pattern <- "[a-z]"
stats <- str_detect(split, pattern)
stats <- str_subset(split, pattern)
values <- split[
!str_detect(split, pattern) &
!str_detect(split, "[A-Z]")
] # Get values
co... |
########################################
# transformation between different scRNA-seq data formats
# date: 2021.01.25 - 01.25
# author: Jing Xiao
# ref: https://jieandze1314.osca.top/03/03-15
########################################
# rm all objects --------------------------------------------------------------
rm(li... | /scRNA-seq/codes/transforming_data_formats_15.R | no_license | hsuh001/project | R | false | false | 5,906 | r | ########################################
# transformation between different scRNA-seq data formats
# date: 2021.01.25 - 01.25
# author: Jing Xiao
# ref: https://jieandze1314.osca.top/03/03-15
########################################
# rm all objects --------------------------------------------------------------
rm(li... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/db.R
\docType{data}
\name{db}
\alias{db}
\title{Allele database}
\format{
A data frame with 324 observations on the following 3 variables:
\describe{
\item{\code{Marker}}{a factor with levels corresponding to name of markers}
\item{\code{All... | /man/db.Rd | no_license | gdorum/relMix | R | false | true | 857 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/db.R
\docType{data}
\name{db}
\alias{db}
\title{Allele database}
\format{
A data frame with 324 observations on the following 3 variables:
\describe{
\item{\code{Marker}}{a factor with levels corresponding to name of markers}
\item{\code{All... |
library(shiny)
data = read.csv("../Data/BodyFat_cleaned.csv", header = TRUE)
data = data[,c("BODYFAT","AGE","ABDOMEN","WRIST")]
ui = shinyUI(pageWithSidebar(
headerPanel("Bodyfat Calculator"),
sidebarPanel(
numericInput("Age", "Age (years):", min = 0, max = 150, value = NA),
helpText("The number you en... | /Code/shiny.R | no_license | ljtljt1997/628-module1-group4 | R | false | false | 4,090 | r | library(shiny)
data = read.csv("../Data/BodyFat_cleaned.csv", header = TRUE)
data = data[,c("BODYFAT","AGE","ABDOMEN","WRIST")]
ui = shinyUI(pageWithSidebar(
headerPanel("Bodyfat Calculator"),
sidebarPanel(
numericInput("Age", "Age (years):", min = 0, max = 150, value = NA),
helpText("The number you en... |
writeEdgeR <- function(df, out){
fdr <- p.adjust(df$PValue,method="BH")
write.table(
x = data.frame(names=rownames(df),
df,
fdr = fdr,
log10p = -log10(df$PValue),
log10fdr = -log10(fdr)),
file = out,
quote = FALSE,
row.... | /R/expression.R | no_license | JohnUrban/sciara-project-tools | R | false | false | 1,638 | r | writeEdgeR <- function(df, out){
fdr <- p.adjust(df$PValue,method="BH")
write.table(
x = data.frame(names=rownames(df),
df,
fdr = fdr,
log10p = -log10(df$PValue),
log10fdr = -log10(fdr)),
file = out,
quote = FALSE,
row.... |
## Coercion for deb_lsd, deb_tetra, and deb_decimal ##
# deb_lsd -----------------------------------------------------------------
# deb_lsd and deb_lsd
#' @export
vec_ptype2.deb_lsd.deb_lsd <- function(x, y, ..., x_arg = "", y_arg = "") {
bases_equal(x, y, x_arg = x_arg, y_arg = y_arg)
new_lsd(bases = deb_bases... | /R/coercion.R | permissive | jessesadler/debkeepr | R | false | false | 2,577 | r | ## Coercion for deb_lsd, deb_tetra, and deb_decimal ##
# deb_lsd -----------------------------------------------------------------
# deb_lsd and deb_lsd
#' @export
vec_ptype2.deb_lsd.deb_lsd <- function(x, y, ..., x_arg = "", y_arg = "") {
bases_equal(x, y, x_arg = x_arg, y_arg = y_arg)
new_lsd(bases = deb_bases... |
#' @title Query development functions
#'
#' @describeIn extensions
#' The \code{RSTACQuery()} function is a constructor of \code{RSTACQuery}
#' objects. Every extension must implement a subclass of \code{RSTACQuery} to
#' represent its queries. This is done by informing to the \code{subclass}
#' parameter the extension... | /R/query.R | permissive | Celsoarruda2021/rstac | R | false | false | 3,216 | r | #' @title Query development functions
#'
#' @describeIn extensions
#' The \code{RSTACQuery()} function is a constructor of \code{RSTACQuery}
#' objects. Every extension must implement a subclass of \code{RSTACQuery} to
#' represent its queries. This is done by informing to the \code{subclass}
#' parameter the extension... |
# run_analysis.R
# This script reads files from the 'UCI HAR Dataset' provided by Coursera Getting and Cleaning Data,
# then constructs three types of tidy data frame from 'UCI HAR Dataset', and writes a table to a '.txt' file.
# ------------------------------------------------------------------------------------------... | /run_analysis.R | no_license | jrtheobald/Getting-and-Cleaning-Data | R | false | false | 3,818 | r | # run_analysis.R
# This script reads files from the 'UCI HAR Dataset' provided by Coursera Getting and Cleaning Data,
# then constructs three types of tidy data frame from 'UCI HAR Dataset', and writes a table to a '.txt' file.
# ------------------------------------------------------------------------------------------... |
library(glmnet)
mydata = read.table("./TrainingSet/RF/kidney.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="mae",alpha=0.3,family="gaussian",standardize=TRUE)
sink('./Model/EN/Classifier/kidney/kidney_043.txt',append=TRUE)
... | /Model/EN/Classifier/kidney/kidney_043.R | no_license | leon1003/QSMART | R | false | false | 349 | r | library(glmnet)
mydata = read.table("./TrainingSet/RF/kidney.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="mae",alpha=0.3,family="gaussian",standardize=TRUE)
sink('./Model/EN/Classifier/kidney/kidney_043.txt',append=TRUE)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_objects.R
\name{DistributionPolicy}
\alias{DistributionPolicy}
\title{DistributionPolicy Object}
\usage{
DistributionPolicy(zones = NULL)
}
\arguments{
\item{zones}{No description}
}
\value{
DistributionPolicy object
}
\description{
D... | /googlecomputealpha.auto/man/DistributionPolicy.Rd | permissive | GVersteeg/autoGoogleAPI | R | false | true | 442 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_objects.R
\name{DistributionPolicy}
\alias{DistributionPolicy}
\title{DistributionPolicy Object}
\usage{
DistributionPolicy(zones = NULL)
}
\arguments{
\item{zones}{No description}
}
\value{
DistributionPolicy object
}
\description{
D... |
numPerPatch50508 <- c(2517,2483)
| /NatureEE-data-archive/Run203071/JAFSdata/JAFSnumPerPatch50508.R | no_license | flaxmans/NatureEE2017 | R | false | false | 33 | r | numPerPatch50508 <- c(2517,2483)
|
\name{AgrMcDt}
\alias{AgrMcDt}
\title{Agregate Micro Data}
\description{
AgrMcDt creates \code{\linkS4class{IData}} objects by agregating a Data Frame of Micro Data.
}
\usage{
AgrMcDt(MicDtDF, agrby, agrcrt="minmax")
}
\arguments{
\item{MicDtDF}{A data frame with the original values of the micro data.}
... | /man/AgrMcDt.Rd | no_license | cran/MAINT.Data | R | false | false | 1,585 | rd | \name{AgrMcDt}
\alias{AgrMcDt}
\title{Agregate Micro Data}
\description{
AgrMcDt creates \code{\linkS4class{IData}} objects by agregating a Data Frame of Micro Data.
}
\usage{
AgrMcDt(MicDtDF, agrby, agrcrt="minmax")
}
\arguments{
\item{MicDtDF}{A data frame with the original values of the micro data.}
... |
library(rpart)
library(treeClust)
library(plotrix)
honest.rpart.structure <- function(X, Y, method="standard", structY=NULL, leaf.size=3, diameter.test=NULL) {
n <- nrow(X)
colnames(X) <- paste("x", 1:ncol(X), sep="")
pass.diameter.check <- FALSE
while (!pass.diameter.check) {
if (method=="random") {
... | /Simulation/honestRpart.R | no_license | siriuz42/Boulevard_pri | R | false | false | 4,817 | r | library(rpart)
library(treeClust)
library(plotrix)
honest.rpart.structure <- function(X, Y, method="standard", structY=NULL, leaf.size=3, diameter.test=NULL) {
n <- nrow(X)
colnames(X) <- paste("x", 1:ncol(X), sep="")
pass.diameter.check <- FALSE
while (!pass.diameter.check) {
if (method=="random") {
... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/ReliefF/breast.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.95,family="gaussian",standardize=FALSE)
sink('./breast_094.txt',append=TRUE)
pr... | /Model/EN/ReliefF/breast/breast_094.R | no_license | esbgkannan/QSMART | R | false | false | 347 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/ReliefF/breast.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.95,family="gaussian",standardize=FALSE)
sink('./breast_094.txt',append=TRUE)
pr... |
######################################################################
#
# Function to read in all data needed for raising from Visstat and Frisbe
# This function uses a number of functions
# 'GetDataCatches'
# 'GetDataSizeclasses'
# 'GetDataFrisbe'
#
# The user has a number of options
#
#################... | /R/GetAlldata_TYPEIa_V1.r | no_license | nielshintzen/visstat-extraction | R | false | false | 16,290 | r |
######################################################################
#
# Function to read in all data needed for raising from Visstat and Frisbe
# This function uses a number of functions
# 'GetDataCatches'
# 'GetDataSizeclasses'
# 'GetDataFrisbe'
#
# The user has a number of options
#
#################... |
\name{hwCalibrProbe1D}
\alias{hwCalibrProbe1D}
\title{Calibração de sensor 1D}
\usage{
hwCalibrProbe1D(probe, E, Ucal, temperature = NULL,
curvefit = kingVel)
}
\description{
Calibração de sensor 1D
}
| /man/hwCalibrProbe1D.Rd | permissive | tunelipt/hotwire | R | false | false | 214 | rd | \name{hwCalibrProbe1D}
\alias{hwCalibrProbe1D}
\title{Calibração de sensor 1D}
\usage{
hwCalibrProbe1D(probe, E, Ucal, temperature = NULL,
curvefit = kingVel)
}
\description{
Calibração de sensor 1D
}
|
library(MSnbase)
### Name: hasSpectra
### Title: Checks if raw data files have any spectra or chromatograms
### Aliases: hasSpectra hasChromatograms
### ** Examples
f <- msdata::proteomics(full.names = TRUE)[1:2]
hasSpectra(f)
hasChromatograms(f)
| /data/genthat_extracted_code/MSnbase/examples/hasSpectraOrChromatograms.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 254 | r | library(MSnbase)
### Name: hasSpectra
### Title: Checks if raw data files have any spectra or chromatograms
### Aliases: hasSpectra hasChromatograms
### ** Examples
f <- msdata::proteomics(full.names = TRUE)[1:2]
hasSpectra(f)
hasChromatograms(f)
|
\name{norminvgamma.shift.sim.group}
\alias{norminvgamma.shift.sim.group}
\title{Simulate phylogenetic comparative data as Brownian motions with inverse gamma distributed rates}
\usage{
norminvgamma.shift.sim.group(phy, alpha, beta, rates, n)
}
\arguments{
\item{phy}{an ape format phylogeny on which to simulate}
\i... | /man/norminvgamma.shift.sim.group.Rd | no_license | cran/PIGShift | R | false | false | 990 | rd | \name{norminvgamma.shift.sim.group}
\alias{norminvgamma.shift.sim.group}
\title{Simulate phylogenetic comparative data as Brownian motions with inverse gamma distributed rates}
\usage{
norminvgamma.shift.sim.group(phy, alpha, beta, rates, n)
}
\arguments{
\item{phy}{an ape format phylogeny on which to simulate}
\i... |
# library(magick)
# pdf <- image_read("~/Desktop/1930126.pdf", density = "144x144")
# samples_per_page <- 10L
# pdf("~/Desktop/test-out.pdf", width = 8, height = 10)
# for (i in seq(2, length(pdf))) {
# info <- image_info(pdf[i])
# width <- info$width
# height <- info$height
# border <- width / 6
# par(mar = c(0, 0, 0,... | /analysis/qaqc.R | no_license | SKuebbing/ecology-trends | R | false | false | 5,296 | r | # library(magick)
# pdf <- image_read("~/Desktop/1930126.pdf", density = "144x144")
# samples_per_page <- 10L
# pdf("~/Desktop/test-out.pdf", width = 8, height = 10)
# for (i in seq(2, length(pdf))) {
# info <- image_info(pdf[i])
# width <- info$width
# height <- info$height
# border <- width / 6
# par(mar = c(0, 0, 0,... |
rm(list = ls())
library(survival)
load("./Data/summary_demographics.Rdata")
load("./Data/summary_geno_pheno.Rdata")
source("SIMTrunc.R")
NSIM <- 1000
set.seed(123)
n <- 29000; p <- 100; q <- 30000-p
Result <- matrix(NA, NSIM, 8)
for(sim in 1:NSIM) {
print(Sys.time())
cat("sim=", sim, "\t")
Result[sim, ] <-... | /cindy/MainTrunc.R | no_license | QingxiaCindyChen/survival_gwas | R | false | false | 405 | r |
rm(list = ls())
library(survival)
load("./Data/summary_demographics.Rdata")
load("./Data/summary_geno_pheno.Rdata")
source("SIMTrunc.R")
NSIM <- 1000
set.seed(123)
n <- 29000; p <- 100; q <- 30000-p
Result <- matrix(NA, NSIM, 8)
for(sim in 1:NSIM) {
print(Sys.time())
cat("sim=", sim, "\t")
Result[sim, ] <-... |
#' Reads in and prepares COVID data
#'
#' @export
confirmed_cases_data <- function()
{
CovidConfirmedCases <- PlottingCountyData <- vroom::vroom("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_US.csv")
CovidConfirmedC... | /R/confirmed_cases_data.R | no_license | Auburngrads/CHAD3 | R | false | false | 6,042 | r | #' Reads in and prepares COVID data
#'
#' @export
confirmed_cases_data <- function()
{
CovidConfirmedCases <- PlottingCountyData <- vroom::vroom("https://raw.githubusercontent.com/CSSEGISandData/COVID-19/master/csse_covid_19_data/csse_covid_19_time_series/time_series_covid19_confirmed_US.csv")
CovidConfirmedC... |
context("Checking path matrix")
test_that("check_path works as expected with matrices", {
some_path = matrix(c(0,0,0,0,0,0,1,1,0), 3, 3, byrow=TRUE)
rownames(some_path) = c("LV1", "LV2", "LV3")
colnames(some_path) = c("LV1", "LV2", "LV3")
expect_that(check_path(some_path), is_identical_to(some_path))
})
te... | /inst/tests/test-check-path.r | no_license | gastonstat/plspm | R | false | false | 970 | r | context("Checking path matrix")
test_that("check_path works as expected with matrices", {
some_path = matrix(c(0,0,0,0,0,0,1,1,0), 3, 3, byrow=TRUE)
rownames(some_path) = c("LV1", "LV2", "LV3")
colnames(some_path) = c("LV1", "LV2", "LV3")
expect_that(check_path(some_path), is_identical_to(some_path))
})
te... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ddf-ml.R
\docType{class}
\name{MLModel-class}
\alias{MLModel}
\alias{MLModel-class}
\title{A S4 class that represents a ML model of DistributedDataFrame}
\usage{
MLModel(jmlmodel)
}
\arguments{
\item{jmlmodel}{Java object reference to the bac... | /R/package/man/MLModel.Rd | permissive | williamdengnewyork/DDF | R | false | true | 419 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ddf-ml.R
\docType{class}
\name{MLModel-class}
\alias{MLModel}
\alias{MLModel-class}
\title{A S4 class that represents a ML model of DistributedDataFrame}
\usage{
MLModel(jmlmodel)
}
\arguments{
\item{jmlmodel}{Java object reference to the bac... |
"make.keys" <-
function(nvars,keys.list,item.labels=NULL,key.labels=NULL) {
if(!is.null(ncol(nvars))) {item.labels <- colnames(nvars)
nvars <- ncol(nvars)} else {
if(!is.numeric(nvars)) {item.labels <- nvars
nvars <- length(item.labels)} }
nkeys <- length(keys.list)
ke... | /R/make.keys.R | no_license | josephck/psych | R | false | false | 1,617 | r | "make.keys" <-
function(nvars,keys.list,item.labels=NULL,key.labels=NULL) {
if(!is.null(ncol(nvars))) {item.labels <- colnames(nvars)
nvars <- ncol(nvars)} else {
if(!is.numeric(nvars)) {item.labels <- nvars
nvars <- length(item.labels)} }
nkeys <- length(keys.list)
ke... |
library(RSQLite)
##Connection a la base de donnees SQLite
filename <- "database.sqlite"
sqlite.driver <- dbDriver("SQLite")
db <- dbConnect(sqlite.driver, dbname = filename)
##Importation des donnees
dbListTables(db)
Country <- dbReadTable(db,"Country")
League <- dbReadTable(db,"League")
Match <- dbReadTable(db,"M... | /scripts/0_Data_Import.R | no_license | SimonGRIMAL/EnsaeProjectSoccer | R | false | false | 573 | r |
library(RSQLite)
##Connection a la base de donnees SQLite
filename <- "database.sqlite"
sqlite.driver <- dbDriver("SQLite")
db <- dbConnect(sqlite.driver, dbname = filename)
##Importation des donnees
dbListTables(db)
Country <- dbReadTable(db,"Country")
League <- dbReadTable(db,"League")
Match <- dbReadTable(db,"M... |
product <- function(firstNumber, secondNumber, thirdNumber){
result = firstNumber * secondNumber * thirdNumber
return (result)
}
firstNumber <- readline(prompt = "Enter firsr number: ")
secondNumber <- readline(prompt = "Enter second number: ")
thirdNumber <- readline(prompt = "Enter third number: ")
#result <- prod... | /r/product.R | no_license | kantiprasanna/programs | R | false | false | 502 | r | product <- function(firstNumber, secondNumber, thirdNumber){
result = firstNumber * secondNumber * thirdNumber
return (result)
}
firstNumber <- readline(prompt = "Enter firsr number: ")
secondNumber <- readline(prompt = "Enter second number: ")
thirdNumber <- readline(prompt = "Enter third number: ")
#result <- prod... |
compute_tie_ratio <- function(matches.team.played.home, matches.team.played.away) {
matches.tied.playing.home <- matches.team.played.home[matches.team.played.home$result == "Tie", ]
matches.tied.playing.away <- matches.team.played.away[matches.team.played.away$result == "Tie", ]
tie.ratio.playing.home <- dim(mat... | /feature_extraction/win_ratios.R | no_license | martin-galajda/ML-soccer-data-project | R | false | false | 6,606 | r | compute_tie_ratio <- function(matches.team.played.home, matches.team.played.away) {
matches.tied.playing.home <- matches.team.played.home[matches.team.played.home$result == "Tie", ]
matches.tied.playing.away <- matches.team.played.away[matches.team.played.away$result == "Tie", ]
tie.ratio.playing.home <- dim(mat... |
library(RSiteCatalyst)
### Name: GetPrivacySettings
### Title: Get Privacy Settings for a Report Suite(s)
### Aliases: GetPrivacySettings
### ** Examples
## Not run:
##D
##D privacy <- GetPrivacySettings("your_report_suite")
##D
##D privacy2 <- GetPrivacySettings(c("your_dev_suite", "your_prod_suite"))
##D
## E... | /data/genthat_extracted_code/RSiteCatalyst/examples/GetPrivacySettings.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 335 | r | library(RSiteCatalyst)
### Name: GetPrivacySettings
### Title: Get Privacy Settings for a Report Suite(s)
### Aliases: GetPrivacySettings
### ** Examples
## Not run:
##D
##D privacy <- GetPrivacySettings("your_report_suite")
##D
##D privacy2 <- GetPrivacySettings(c("your_dev_suite", "your_prod_suite"))
##D
## E... |
library(spectrolab)
library(tidyverse)
setwd("/Alaska_Spectral_Library")
####Read in data as spectra
yKDeltLib_spectra<-read_spectra("original_data/YKDeltLib",
format="sed")
##Remove eightmileflight1 scans
yKDeltLib_spectra<-yKDeltLib_spectra[grep("site21clasticprobe",invert=TRUE,names... | /Processing Scripts/Smooth Spectra/YK_Spectral_Library2_smooth.R | no_license | catherinechan70/Alaska_Spectral_Library | R | false | false | 2,748 | r | library(spectrolab)
library(tidyverse)
setwd("/Alaska_Spectral_Library")
####Read in data as spectra
yKDeltLib_spectra<-read_spectra("original_data/YKDeltLib",
format="sed")
##Remove eightmileflight1 scans
yKDeltLib_spectra<-yKDeltLib_spectra[grep("site21clasticprobe",invert=TRUE,names... |
library(ggplot2)
library(grid)
library(gridExtra)
"Set the minimum QScore to be included in the data"
QScoreMin <- 4
#Pull the data from csv files
EFWBData <- read.csv("./private-localonly/2017_GTAPCLUM_WB.csv")
EFSDGData <- read.csv("./private-localonly/2017_GTAPCLUM_SDG.csv")
EFSDGWBData <- read.csv("./private-loca... | /GFN_Data_Visualization/ScatterVisuals/3b.EFCLUMPlots.R | no_license | EliLazarus/EFCLUM | R | false | false | 7,714 | r | library(ggplot2)
library(grid)
library(gridExtra)
"Set the minimum QScore to be included in the data"
QScoreMin <- 4
#Pull the data from csv files
EFWBData <- read.csv("./private-localonly/2017_GTAPCLUM_WB.csv")
EFSDGData <- read.csv("./private-localonly/2017_GTAPCLUM_SDG.csv")
EFSDGWBData <- read.csv("./private-loca... |
/Codes/GeoCodeurs/code_R_hackathon_joaquim.R | no_license | SSP-Lab/Hackathon-2018 | R | false | false | 5,094 | r | ||
library(shiny)
library(shiny.semantic)
library(readr)
library(dplyr)
library(geosphere)
library(leaflet)
library(ggplot2)
library(DT)
library(htmltools)
global <- list(
data_file_path = file.path("data", "ships.rds"),
mapbox = list(
url = '//api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}/?access_token... | /ShipTracker/global.R | no_license | radbasa/shiptracker | R | false | false | 423 | r | library(shiny)
library(shiny.semantic)
library(readr)
library(dplyr)
library(geosphere)
library(leaflet)
library(ggplot2)
library(DT)
library(htmltools)
global <- list(
data_file_path = file.path("data", "ships.rds"),
mapbox = list(
url = '//api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}/?access_token... |
testlist <- list(Rs = numeric(0), atmp = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = -1.72131968218895e+83, temp = c(8.5728629954997e-31... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615855484-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 872 | r | testlist <- list(Rs = numeric(0), atmp = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = -1.72131968218895e+83, temp = c(8.5728629954997e-31... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/detect_duplicate_genomes.R, R/filter_ld.R
\name{remove_duplicates}
\alias{remove_duplicates}
\alias{ld_pruning}
\title{Read tidy genomic data file ending .rad}
\usage{
remove_duplicates(data = "individuals.pairwise.dist.tsv",
stats = "genot... | /man/remove_duplicates.Rd | no_license | juadiegaitan/radiator | R | false | true | 2,012 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/detect_duplicate_genomes.R, R/filter_ld.R
\name{remove_duplicates}
\alias{remove_duplicates}
\alias{ld_pruning}
\title{Read tidy genomic data file ending .rad}
\usage{
remove_duplicates(data = "individuals.pairwise.dist.tsv",
stats = "genot... |
#' Dataset weights
#'
#' `weight` lets you view and set your user's currently applied weight on the
#' server. `weightVariables` lets you view all of the variables that have been
#' designated as valid to use as weights.
#' @param x a Dataset
#' @param value a Variable, VariableDefinition, or `NULL`. If a
#' VariableDe... | /R/weight.R | no_license | GitBrianLaw/rcrunch | R | false | false | 12,636 | r | #' Dataset weights
#'
#' `weight` lets you view and set your user's currently applied weight on the
#' server. `weightVariables` lets you view all of the variables that have been
#' designated as valid to use as weights.
#' @param x a Dataset
#' @param value a Variable, VariableDefinition, or `NULL`. If a
#' VariableDe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api_tools.R
\name{getGapTolerance}
\alias{getGapTolerance}
\title{Get gap tolerances from AQUARIUS}
\usage{
getGapTolerance(tsID, start, end)
}
\arguments{
\item{tsID}{the time series unique identifier}
\item{start}{the start date of interes... | /man/getGapTolerance.Rd | no_license | PatrickEslick/CWQkitr | R | false | true | 629 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api_tools.R
\name{getGapTolerance}
\alias{getGapTolerance}
\title{Get gap tolerances from AQUARIUS}
\usage{
getGapTolerance(tsID, start, end)
}
\arguments{
\item{tsID}{the time series unique identifier}
\item{start}{the start date of interes... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/callback.R
\name{add_lr_to_history}
\alias{add_lr_to_history}
\title{Modifies the keras history object during training to
include the learning rates of each epoch as a metric}
\usage{
add_lr_to_history(verbose = TRUE)
}
\description{
Modifies... | /man/add_lr_to_history.Rd | no_license | ifrit98/R2deepR | R | false | true | 420 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/callback.R
\name{add_lr_to_history}
\alias{add_lr_to_history}
\title{Modifies the keras history object during training to
include the learning rates of each epoch as a metric}
\usage{
add_lr_to_history(verbose = TRUE)
}
\description{
Modifies... |
## Caching the Inverse of a Matrix
## This function creates a special "matrix" object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y){
x <<- y
i <<- NULL
}
get <- function() x
setinverse <- function(inverse) i <<- inverse
geti... | /cachematrix.R | no_license | carinawagner/Coursera | R | false | false | 916 | r | ## Caching the Inverse of a Matrix
## This function creates a special "matrix" object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y){
x <<- y
i <<- NULL
}
get <- function() x
setinverse <- function(inverse) i <<- inverse
geti... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gamelift_operations.R
\name{gamelift_resolve_alias}
\alias{gamelift_resolve_alias}
\title{Retrieves the fleet ID that an alias is currently pointing to}
\usage{
gamelift_resolve_alias(AliasId)
}
\arguments{
\item{AliasId}{[required] The uniqu... | /cran/paws.game.development/man/gamelift_resolve_alias.Rd | permissive | johnnytommy/paws | R | false | true | 757 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gamelift_operations.R
\name{gamelift_resolve_alias}
\alias{gamelift_resolve_alias}
\title{Retrieves the fleet ID that an alias is currently pointing to}
\usage{
gamelift_resolve_alias(AliasId)
}
\arguments{
\item{AliasId}{[required] The uniqu... |
library(car)
Pllet = read.csv2("pllet.csv")
head(Pllet)
scatterplot(PROD ~ DIES, boxplot=F, smooth=F, regLine=F, Pllet)
# Pregunta a) Model de PROD nomes amb DIES (1)
modela = lm(PROD ~ DIES, Pllet)
summary(modela)
summary(modela)$sigma^2
summary(modela)$adj.r.squared
help(summary.lm)
... | /Q6/EST/problemes+pràctiques/Dades de models per classe/Exercici4b.R | no_license | Atellas23/apunts | R | false | false | 4,667 | r |
library(car)
Pllet = read.csv2("pllet.csv")
head(Pllet)
scatterplot(PROD ~ DIES, boxplot=F, smooth=F, regLine=F, Pllet)
# Pregunta a) Model de PROD nomes amb DIES (1)
modela = lm(PROD ~ DIES, Pllet)
summary(modela)
summary(modela)$sigma^2
summary(modela)$adj.r.squared
help(summary.lm)
... |
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(-5.59219752032505e+72, -1.06823407896587e-87, -4.25255837648531e+71, 1.7951202446173e-155, -8.18790345762274e-12, -4.84876319029531e+202, -3.96895588925774e+304, -1.15261897385914e+41, -4.16286459815484e-108, -2.95899697222989e+94, 0, 0, 0, 0, 0, 0, 0, 0... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615860186-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 542 | r | testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = c(-5.59219752032505e+72, -1.06823407896587e-87, -4.25255837648531e+71, 1.7951202446173e-155, -8.18790345762274e-12, -4.84876319029531e+202, -3.96895588925774e+304, -1.15261897385914e+41, -4.16286459815484e-108, -2.95899697222989e+94, 0, 0, 0, 0, 0, 0, 0, 0... |
library(AlgDesign)
ptrans<-function(dp,q)
{
o=dp[1:q]
f=dp[(q+1):(2*q)]
m=dp[((2*q)+1):(3*q)]
# o,f,m each vector corresponds to multiple markers for one subject
pr=rep(1,q)
for(i in 1:q)
{
if(o[i]==0 & f[i]==1 & m[i]==0) pr[i]=0.5
if(o[i]==1 & f[i]==1 & m[i]==0) pr[i]=0.5
if(o[i]==0 & f[i]==0 & m... | /fullbayes3.R | no_license | gourabd/paper1 | R | false | false | 7,062 | r | library(AlgDesign)
ptrans<-function(dp,q)
{
o=dp[1:q]
f=dp[(q+1):(2*q)]
m=dp[((2*q)+1):(3*q)]
# o,f,m each vector corresponds to multiple markers for one subject
pr=rep(1,q)
for(i in 1:q)
{
if(o[i]==0 & f[i]==1 & m[i]==0) pr[i]=0.5
if(o[i]==1 & f[i]==1 & m[i]==0) pr[i]=0.5
if(o[i]==0 & f[i]==0 & m... |
d <- read.table("household_power_consumption.txt", sep=";", header=T, stringsAsFactors=F, na.strings="?")
d$Date <- as.Date(d$Date, "%d/%m/%Y")
d <- subset(d, d$Date == "2007-02-01" | d$Date == "2007-02-02")
png(file="plot1.png")
hist(d$Global_active_power, xlab="Global Active Power (kilowatts)", main="Global Active Po... | /plot1.r | no_license | andyvienna/ExData_Plotting1 | R | false | false | 347 | r | d <- read.table("household_power_consumption.txt", sep=";", header=T, stringsAsFactors=F, na.strings="?")
d$Date <- as.Date(d$Date, "%d/%m/%Y")
d <- subset(d, d$Date == "2007-02-01" | d$Date == "2007-02-02")
png(file="plot1.png")
hist(d$Global_active_power, xlab="Global Active Power (kilowatts)", main="Global Active Po... |
#' Add clicks to subdistribution curves for reconstructing CIC
#'
#' When there are more clicks in the composite (overall) outcome curve,
#' we need to add them to the subdistribution curves. Find the time points
#' in the composite data that are furthest away from the times in clicksDF,
#' add these times to clicksDF ... | /R/add_clicks.R | no_license | ryanrsun/reconstructKM | R | false | false | 1,463 | r | #' Add clicks to subdistribution curves for reconstructing CIC
#'
#' When there are more clicks in the composite (overall) outcome curve,
#' we need to add them to the subdistribution curves. Find the time points
#' in the composite data that are furthest away from the times in clicksDF,
#' add these times to clicksDF ... |
library(radiant.design)
### Name: doe
### Title: Create (partial) factorial design
### Aliases: doe
### ** Examples
doe(c("price; $10; $13; $16", "food; popcorn; gourmet; no food"))
doe(
c("price; $10; $13; $16", "food; popcorn; gourmet; no food"),
int = "price:food", trials = 9, seed = 1234
)
| /data/genthat_extracted_code/radiant.design/examples/doe.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 307 | r | library(radiant.design)
### Name: doe
### Title: Create (partial) factorial design
### Aliases: doe
### ** Examples
doe(c("price; $10; $13; $16", "food; popcorn; gourmet; no food"))
doe(
c("price; $10; $13; $16", "food; popcorn; gourmet; no food"),
int = "price:food", trials = 9, seed = 1234
)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SampleMPPDesign2.R
\name{SampleMPPDesign2}
\alias{SampleMPPDesign2}
\title{Sample MPP design}
\usage{
SampleMPPDesign2(np_dia = 9, n_ind = 200, MPP_des, np_sel, N = 800,
cr_list, ncr)
}
\arguments{
\item{np_dia}{Parent number in the referen... | /man/SampleMPPDesign2.Rd | no_license | vincentgarin/mppSim | R | false | true | 1,486 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SampleMPPDesign2.R
\name{SampleMPPDesign2}
\alias{SampleMPPDesign2}
\title{Sample MPP design}
\usage{
SampleMPPDesign2(np_dia = 9, n_ind = 200, MPP_des, np_sel, N = 800,
cr_list, ncr)
}
\arguments{
\item{np_dia}{Parent number in the referen... |
#################################################################
###
### This script compatres the scaled Immunoscore vs TP53 mutation
###
###
#################################################################
## Setup environment
rm(list=ls())
setwd("~/Dropbox/BREAST_QATAR/")
## Load Data
immunoscore <- read.csv (... | /Deprecated seperate Cancer Code/Liver/v1.Code/3.9.immunoscore.vs.TP53mutation.LIHC.WHX.R | no_license | dudious/QCRI-SIDRA-ICR | R | false | false | 4,644 | r | #################################################################
###
### This script compatres the scaled Immunoscore vs TP53 mutation
###
###
#################################################################
## Setup environment
rm(list=ls())
setwd("~/Dropbox/BREAST_QATAR/")
## Load Data
immunoscore <- read.csv (... |
library(dlm)
### Name: residuals.dlmFiltered
### Title: One-step forecast errors
### Aliases: residuals.dlmFiltered
### Keywords: misc
### ** Examples
## diagnostic plots
nileMod <- dlmModPoly(1, dV = 15100, dW = 1468)
nileFilt <- dlmFilter(Nile, nileMod)
res <- residuals(nileFilt, sd=FALSE)
qqnorm(res)
tsdiag(nil... | /data/genthat_extracted_code/dlm/examples/residuals.dlmFiltered.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 330 | r | library(dlm)
### Name: residuals.dlmFiltered
### Title: One-step forecast errors
### Aliases: residuals.dlmFiltered
### Keywords: misc
### ** Examples
## diagnostic plots
nileMod <- dlmModPoly(1, dV = 15100, dW = 1468)
nileFilt <- dlmFilter(Nile, nileMod)
res <- residuals(nileFilt, sd=FALSE)
qqnorm(res)
tsdiag(nil... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BFA.R
\name{scBFA}
\alias{scBFA}
\title{Perform BFA model on the expression profile}
\usage{
scBFA(scData, numFactors, X = NULL, Q = NULL, maxit = 300,
method = "L-BFGS-B", initCellcoef = NULL, updateCellcoef = TRUE,
updateGenecoef = TRUE... | /man/scbfa.Rd | permissive | kant/scBFA | R | false | true | 3,709 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BFA.R
\name{scBFA}
\alias{scBFA}
\title{Perform BFA model on the expression profile}
\usage{
scBFA(scData, numFactors, X = NULL, Q = NULL, maxit = 300,
method = "L-BFGS-B", initCellcoef = NULL, updateCellcoef = TRUE,
updateGenecoef = TRUE... |
corr <- function(directory, threshold = 0) {
if (missing(directory)) {
stop("need directory!!")
}
files <- list.files( path = directory )
cr <- c()
for(f in 1:length(files)){
data <- read.csv( paste(directory, "/", files[f], sep="") )
data <- data[complete.cases(data),]
if ( nrow(data) > ... | /intror/hw2/corr.R | no_license | adithep/datasciencecoursera | R | false | false | 415 | r | corr <- function(directory, threshold = 0) {
if (missing(directory)) {
stop("need directory!!")
}
files <- list.files( path = directory )
cr <- c()
for(f in 1:length(files)){
data <- read.csv( paste(directory, "/", files[f], sep="") )
data <- data[complete.cases(data),]
if ( nrow(data) > ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/topical_guide.R
\name{lds_scripture_url}
\alias{lds_scripture_url}
\title{lds_scripture_url}
\usage{
lds_scripture_url(references, text_link = TRUE)
}
\arguments{
\item{text_link}{A boolean that identifies if the output should be an html text... | /man/lds_scripture_url.Rd | no_license | hathawayj/latterdaysaints | R | false | true | 690 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/topical_guide.R
\name{lds_scripture_url}
\alias{lds_scripture_url}
\title{lds_scripture_url}
\usage{
lds_scripture_url(references, text_link = TRUE)
}
\arguments{
\item{text_link}{A boolean that identifies if the output should be an html text... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{parse.multipart}
\alias{parse.multipart}
\title{Parsing of POST request multi-part body}
\usage{
parse.multipart(request = .GlobalEnv$request)
}
\arguments{
\item{request}{Request interface object as defined by the FastRWeb interface.
\code{parse.multipart} wil... | /man/parse.multipart.Rd | no_license | FrancoisGuillem/RWebServer | R | false | false | 1,442 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{parse.multipart}
\alias{parse.multipart}
\title{Parsing of POST request multi-part body}
\usage{
parse.multipart(request = .GlobalEnv$request)
}
\arguments{
\item{request}{Request interface object as defined by the FastRWeb interface.
\code{parse.multipart} wil... |
library(ggplot2)
zipfilename <- "exdata%2Fdata%2FNEI_data.zip"
if (! (file.exists("summarySCC_PM25.rds") | file.exists("Source_Classification_Code.rds") ) )
{
unzip(zipfilename)
}
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
NEISCC <- merge(NEI, SCC, by="SCC")
c... | /plot4.r | no_license | manojg1981/Exploratory-Data-Analysis-Project-2-Coursera | R | false | false | 781 | r |
library(ggplot2)
zipfilename <- "exdata%2Fdata%2FNEI_data.zip"
if (! (file.exists("summarySCC_PM25.rds") | file.exists("Source_Classification_Code.rds") ) )
{
unzip(zipfilename)
}
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
NEISCC <- merge(NEI, SCC, by="SCC")
c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\docType{data}
\name{DivergenceExpressionSetExample}
\alias{DivergenceExpressionSetExample}
\title{An Example DivergenceExpressionSet Data Set}
\source{
http://www.plantphysiol.org/content/156/1/346/suppl/DC1
}
\value{
a standard D... | /man/DivergenceExpressionSetExample.Rd | no_license | AcaDemIQ/myTAI | R | false | true | 1,617 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/datasets.R
\docType{data}
\name{DivergenceExpressionSetExample}
\alias{DivergenceExpressionSetExample}
\title{An Example DivergenceExpressionSet Data Set}
\source{
http://www.plantphysiol.org/content/156/1/346/suppl/DC1
}
\value{
a standard D... |
library(ape)
testtree <- read.tree("3488_1.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="3488_1_unrooted.txt") | /codeml_files/newick_trees_processed/3488_1/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("3488_1.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="3488_1_unrooted.txt") |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bayes4psy-package.R
\docType{package}
\name{bayes4psy-package}
\alias{bayes4psy-package}
\alias{bayes4psy}
\title{The 'bayes4psy' package.}
\description{
A user-friendly implementation of Bayesian statistical methods commonly used in ... | /fuzzedpackages/bayes4psy/man/bayes4psy-package.Rd | no_license | akhikolla/testpackages | R | false | true | 621 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bayes4psy-package.R
\docType{package}
\name{bayes4psy-package}
\alias{bayes4psy-package}
\alias{bayes4psy}
\title{The 'bayes4psy' package.}
\description{
A user-friendly implementation of Bayesian statistical methods commonly used in ... |
# Author: Robert J. Hijmans
# Date: June 2010
# Version 1.0
# Licence GPL v3
.readRowsNetCDF <- function(x, row, nrows=1, col=1, ncols=(ncol(x)-col+1)) {
if ( x@file@toptobottom ) {
row <- x@nrows - row - nrows + 2
}
is.open <- x@file@open
if (is.open) {
nc <- x@file@con
} else {
nc <- nc... | /raster/R/netCDFread.R | no_license | ingted/R-Examples | R | false | false | 4,608 | r | # Author: Robert J. Hijmans
# Date: June 2010
# Version 1.0
# Licence GPL v3
.readRowsNetCDF <- function(x, row, nrows=1, col=1, ncols=(ncol(x)-col+1)) {
if ( x@file@toptobottom ) {
row <- x@nrows - row - nrows + 2
}
is.open <- x@file@open
if (is.open) {
nc <- x@file@con
} else {
nc <- nc... |
#' Boxplot for Payment Methods
#'
#'This function produces a boxplot based on DRG payment methods by DRG code:
#'average Medicare payments, the average total payment, or the average covered charges.
#'
#' @param df a dataframe
#' @param payments three types payment methods:
#' average Medicare payments, the average tot... | /R/Function1.R | no_license | Allxz/DRGproject | R | false | false | 1,631 | r | #' Boxplot for Payment Methods
#'
#'This function produces a boxplot based on DRG payment methods by DRG code:
#'average Medicare payments, the average total payment, or the average covered charges.
#'
#' @param df a dataframe
#' @param payments three types payment methods:
#' average Medicare payments, the average tot... |
source('./R/helper_functions.R')
#source('../R/initialize.R')
library(RColorBrewer)
setClass(
# Set the name for the class
"mapData",
# Define the slots
slots = c(
col_range = "numeric",
scale_size = "numeric",
costYear = "data.frame",
costAll = "data.frame",
costYearNoType = "data.frame... | /R/MapData.R | no_license | ahill187/burden_of_COPD | R | false | false | 5,631 | r | source('./R/helper_functions.R')
#source('../R/initialize.R')
library(RColorBrewer)
setClass(
# Set the name for the class
"mapData",
# Define the slots
slots = c(
col_range = "numeric",
scale_size = "numeric",
costYear = "data.frame",
costAll = "data.frame",
costYearNoType = "data.frame... |
library(wqTools)
library(magrittr)
library(plotly)
ui <-fluidPage(
# Header
headerPanel(
title=tags$a(href='https://deq.utah.gov/division-water-quality/',tags$img(src='deq_dwq_logo.png', height = 75, width = 75*2.85), target="_blank"),
tags$head(tags$link(rel = "icon", type = "image/png", href = "dwq_logo_sm... | /app.r | permissive | utah-dwq/hfdoDashboard | R | false | false | 13,556 | r |
library(wqTools)
library(magrittr)
library(plotly)
ui <-fluidPage(
# Header
headerPanel(
title=tags$a(href='https://deq.utah.gov/division-water-quality/',tags$img(src='deq_dwq_logo.png', height = 75, width = 75*2.85), target="_blank"),
tags$head(tags$link(rel = "icon", type = "image/png", href = "dwq_logo_sm... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convert_ensembl_to_hgnc.R
\name{convert_ensembl_to_hgnc}
\alias{convert_ensembl_to_hgnc}
\title{Ensembl to HGNC Symbol}
\usage{
convert_ensembl_to_hgnc(ensembl_id)
}
\arguments{
\item{ensembl_id}{ensembl id (character)}
}
\value{
HGNC approve... | /man/convert_ensembl_to_hgnc.Rd | permissive | selkamand/GeneIdentifierUtilsR | R | false | true | 433 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convert_ensembl_to_hgnc.R
\name{convert_ensembl_to_hgnc}
\alias{convert_ensembl_to_hgnc}
\title{Ensembl to HGNC Symbol}
\usage{
convert_ensembl_to_hgnc(ensembl_id)
}
\arguments{
\item{ensembl_id}{ensembl id (character)}
}
\value{
HGNC approve... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrikeR-package.R
\docType{package}
\name{wriker-package}
\alias{wriker}
\alias{wriker-package}
\title{wriker: Wrike Project Management API Wrapper for R}
\description{
An API wrapper for pulling data from Wrike's web API via R. Wrike document... | /man/wriker-package.Rd | permissive | aamangold/wriker | R | false | true | 610 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wrikeR-package.R
\docType{package}
\name{wriker-package}
\alias{wriker}
\alias{wriker-package}
\title{wriker: Wrike Project Management API Wrapper for R}
\description{
An API wrapper for pulling data from Wrike's web API via R. Wrike document... |
######################
### Lab 6 on Slack ###
######################
rm(list=ls(all=TRUE))
# install.packages("sp", dependencies = TRUE)
# install.packages("rgdal", dependencies = TRUE)
# install.packages("rgeos", dependencies = TRUE)
# install.packages("raster", dependencies = TRUE)
# install.packages("spatstat", de... | /Lab-06-Development-in-Liberia/liberia.R | no_license | yalotfi/Data-Science-in-Space-and-Time | R | false | false | 10,117 | r | ######################
### Lab 6 on Slack ###
######################
rm(list=ls(all=TRUE))
# install.packages("sp", dependencies = TRUE)
# install.packages("rgdal", dependencies = TRUE)
# install.packages("rgeos", dependencies = TRUE)
# install.packages("raster", dependencies = TRUE)
# install.packages("spatstat", de... |
# Nivel 1
## Quantos são estatisticamente significativos?
mean(resultadotestes$nivel1)
## Tendência (aumenta/diminui a taxa de sucesso quando tem rajada)
significativos <- resultadotestes %>%
filter(nivel1 == 1) %>%
mutate(tendencia = if_else(razao_com_sem_burst1 > 1, 'aumenta', 'diminui'))
pie(table(significativ... | /Resultados.R | no_license | JuvenalJr/DadosRajadas | R | false | false | 1,154 | r | # Nivel 1
## Quantos são estatisticamente significativos?
mean(resultadotestes$nivel1)
## Tendência (aumenta/diminui a taxa de sucesso quando tem rajada)
significativos <- resultadotestes %>%
filter(nivel1 == 1) %>%
mutate(tendencia = if_else(razao_com_sem_burst1 > 1, 'aumenta', 'diminui'))
pie(table(significativ... |
# Script to create "plot2.png" for Coursera - Exploratory Data Analysis - Course Project 1
# Download/unzip the data set, and make it quicker to check first if you've already done that
if (!file.exists("electric_power_consumption.zip")){
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhou... | /plot3.R | no_license | Deebo415/ExData_Plotting1 | R | false | false | 3,217 | r | # Script to create "plot2.png" for Coursera - Exploratory Data Analysis - Course Project 1
# Download/unzip the data set, and make it quicker to check first if you've already done that
if (!file.exists("electric_power_consumption.zip")){
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhou... |
library(mlbstats)
### Name: aera
### Title: Calculates adjusted earned run average (ERA+)
### Aliases: aera
### ** Examples
aera(10, 5.5, 2.5, 8, 7, 15, 6, 4, 10) # for a pair of games (one away, one home)
| /data/genthat_extracted_code/mlbstats/examples/aera.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 213 | r | library(mlbstats)
### Name: aera
### Title: Calculates adjusted earned run average (ERA+)
### Aliases: aera
### ** Examples
aera(10, 5.5, 2.5, 8, 7, 15, 6, 4, 10) # for a pair of games (one away, one home)
|
library(gbm)
source('load_data.R')
process.data <- function(data) {
data$wlk_hrank_last_vs_first <- NULL
data$dol_hrank_last_vs_first <- NULL
data$col_hrank_last_vs_first <- NULL
data$sag_hrank_last_vs_first <- NULL
data$wlk_lrank_last_vs_first <- NULL
data$dol_lrank_last_vs_first <- NULL
d... | /Predicting the Outcome of NCAA March Madness/rscripts/gbm.R | no_license | ekahnke/Projects | R | false | false | 3,707 | r | library(gbm)
source('load_data.R')
process.data <- function(data) {
data$wlk_hrank_last_vs_first <- NULL
data$dol_hrank_last_vs_first <- NULL
data$col_hrank_last_vs_first <- NULL
data$sag_hrank_last_vs_first <- NULL
data$wlk_lrank_last_vs_first <- NULL
data$dol_lrank_last_vs_first <- NULL
d... |
library(proportion)
### Name: pCOpBILR
### Title: p-confidence and p-bias for Likelihood method given n and alpha
### level
### Aliases: pCOpBILR
### ** Examples
n=5; alp=0.05
pCOpBILR(n,alp)
| /data/genthat_extracted_code/proportion/examples/pCOpBILR.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 201 | r | library(proportion)
### Name: pCOpBILR
### Title: p-confidence and p-bias for Likelihood method given n and alpha
### level
### Aliases: pCOpBILR
### ** Examples
n=5; alp=0.05
pCOpBILR(n,alp)
|
### get current directory
getwd()
### set current directory
setwd("C:/Users/BINIT007/Dropbox/My PC (DESKTOP-85QSQ8B)/Documents/R_binitsyamal_work/BASE PLOT")
### read .txt file , the file name is renamed to "HPC.txt" for convenience
E.C <- read.csv("HPC.txt",sep=";")
head(E.C)
# Filter 2 dates in F... | /plot4.R | no_license | jaitasyamal/ExData_Plotting1 | R | false | false | 1,468 | r | ### get current directory
getwd()
### set current directory
setwd("C:/Users/BINIT007/Dropbox/My PC (DESKTOP-85QSQ8B)/Documents/R_binitsyamal_work/BASE PLOT")
### read .txt file , the file name is renamed to "HPC.txt" for convenience
E.C <- read.csv("HPC.txt",sep=";")
head(E.C)
# Filter 2 dates in F... |
#' @include with_.R
NULL
# par ------------------------------------------------------------------------
#' Graphics parameters
#'
#' Temporarily change graphics parameters.
#'
#' @template with
#' @param new,.new `[named list]`\cr New graphics parameters and their values
#' @param no.readonly `[logical(1)]`\cr see [p... | /R/par.R | permissive | AshesITR/withr | R | false | false | 810 | r | #' @include with_.R
NULL
# par ------------------------------------------------------------------------
#' Graphics parameters
#'
#' Temporarily change graphics parameters.
#'
#' @template with
#' @param new,.new `[named list]`\cr New graphics parameters and their values
#' @param no.readonly `[logical(1)]`\cr see [p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/surveyplots.r
\name{mask.test}
\alias{mask.test}
\title{Testing the mask object for a first calls model.}
\usage{
mask.test(fit = NULL, mask, traps, pars, cutoff, lower.cutoff,
surface = FALSE, col = c("black", "blue", "red"), pincol = "red... | /man/mask.test.Rd | no_license | cmjt/ascr | R | false | true | 1,584 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/surveyplots.r
\name{mask.test}
\alias{mask.test}
\title{Testing the mask object for a first calls model.}
\usage{
mask.test(fit = NULL, mask, traps, pars, cutoff, lower.cutoff,
surface = FALSE, col = c("black", "blue", "red"), pincol = "red... |
install.packages("rpart")
install.packages("ctree")
install.packages("dplyr")
install.packages("rattle")
install.packages("ROCR")
install.packages("rpart.plot")
install.packages("RColorBrewer")
install.packages("RGtk2")
library(ctree)
library(party)
library(rpart)
library(dplyr)
library(rattle)
library(R... | /Decision Trees_loan approval_updated.R | no_license | oswaldhanesh59/Decision-Trees | R | false | false | 2,355 | r | install.packages("rpart")
install.packages("ctree")
install.packages("dplyr")
install.packages("rattle")
install.packages("ROCR")
install.packages("rpart.plot")
install.packages("RColorBrewer")
install.packages("RGtk2")
library(ctree)
library(party)
library(rpart)
library(dplyr)
library(rattle)
library(R... |
# - use render Table to display learn list -
output$categories <- renderTable({
if(!is.null(rv$DFl)){
DFlShow <- rv$DFl
list_categories <- DFlShow$Category
list_categories <- str_split(list_categories, pattern = ",")
... | /learn/Tabs_server/Tab07_DisplayTable_Categories.R | no_license | TBrach/shiny_apps | R | false | false | 592 | r | # - use render Table to display learn list -
output$categories <- renderTable({
if(!is.null(rv$DFl)){
DFlShow <- rv$DFl
list_categories <- DFlShow$Category
list_categories <- str_split(list_categories, pattern = ",")
... |
cities <- read.csv("/home/boris/Work/Martin_tutorial/code/word2vec/table_dist_geo.csv")
cityDist <- as.matrix(cities[,2:11], ncol = 10);
rownames(cityDist) <- cities[,1];
plot(cityDist, pch = "")
text(cityDist, rownames(cityDist))
png(file="/home/boris/Work/Martin_tutorial/code/word2vec/geo_vec_map.png", width=800 , h... | /code/word2vec/geomap.R | no_license | nevmenandr/Martin_tutorial | R | false | false | 401 | r | cities <- read.csv("/home/boris/Work/Martin_tutorial/code/word2vec/table_dist_geo.csv")
cityDist <- as.matrix(cities[,2:11], ncol = 10);
rownames(cityDist) <- cities[,1];
plot(cityDist, pch = "")
text(cityDist, rownames(cityDist))
png(file="/home/boris/Work/Martin_tutorial/code/word2vec/geo_vec_map.png", width=800 , h... |
#' Calculates two elastic distance
#'
#' This functions calculates the distances between functions,
#' \eqn{D_y} and \eqn{D_x}, where function 1 is aligned to function 2
#'
#' @param f1 sample function 1
#' @param f2 sample function 2
#' @param time sample points of functions
#' @param lambda controls amount of warping... | /R/elastic.distance.R | no_license | jdtuck/fdasrvf_R | R | false | false | 1,783 | r | #' Calculates two elastic distance
#'
#' This functions calculates the distances between functions,
#' \eqn{D_y} and \eqn{D_x}, where function 1 is aligned to function 2
#'
#' @param f1 sample function 1
#' @param f2 sample function 2
#' @param time sample points of functions
#' @param lambda controls amount of warping... |
sizeData <- read.delim("supplementary_data_file.txt")
timescale <- read.delim("timescale.txt")
#convert character vector to factor
phyla <- as.factor(sizeData$phylum)
#extract the levels from the factor vector (in other words, extract the unique phylum)
phyla <- levels(phyla)
#get the number of unique phylu... | /Heim et al Figure 1 code.R | no_license | adarshambati1/RforSEYI | R | false | false | 1,825 | r | sizeData <- read.delim("supplementary_data_file.txt")
timescale <- read.delim("timescale.txt")
#convert character vector to factor
phyla <- as.factor(sizeData$phylum)
#extract the levels from the factor vector (in other words, extract the unique phylum)
phyla <- levels(phyla)
#get the number of unique phylu... |
# Function to generate a table of standard normal CDF
gen_z_table <- function(from, to, digits = 4){
range <- seq(from, to, by = 0.01)
range %>%
pnorm() %>%
round(digits) %>%
matrix(nrow = length(range) / 10, ncol = 10, byrow = TRUE)
}
| /Tables/gen_z_table.R | no_license | keijioda/STAT521 | R | false | false | 255 | r |
# Function to generate a table of standard normal CDF
gen_z_table <- function(from, to, digits = 4){
range <- seq(from, to, by = 0.01)
range %>%
pnorm() %>%
round(digits) %>%
matrix(nrow = length(range) / 10, ncol = 10, byrow = TRUE)
}
|
#This script performs the one-way ANOVA and subsequently runs the Tukey's post-hoc test
#The output is both sent to stdout and written to ANOVA_R_output.txt in the current working diretory
#
###---USAGE---###
#To run this script, type in the command line the following:
# Rscript --no-save ANOVA_R_script.r input.csv,
# ... | /ANOVA_R_script.r | no_license | VladimirMashanov/R_scripts | R | false | false | 1,198 | r | #This script performs the one-way ANOVA and subsequently runs the Tukey's post-hoc test
#The output is both sent to stdout and written to ANOVA_R_output.txt in the current working diretory
#
###---USAGE---###
#To run this script, type in the command line the following:
# Rscript --no-save ANOVA_R_script.r input.csv,
# ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scan-Data.R
\name{example_data}
\alias{example_data}
\alias{Beretvas2008}
\alias{Borckardt2014}
\alias{Huitema2000}
\alias{Waddell2011}
\alias{byHeart2011}
\alias{Grosche2011}
\alias{Grosche2014}
\alias{GruenkeWilbert2014}
\alias{Huber2014}
\... | /man/example_data.Rd | no_license | cran/scan | R | false | true | 3,863 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scan-Data.R
\name{example_data}
\alias{example_data}
\alias{Beretvas2008}
\alias{Borckardt2014}
\alias{Huitema2000}
\alias{Waddell2011}
\alias{byHeart2011}
\alias{Grosche2011}
\alias{Grosche2014}
\alias{GruenkeWilbert2014}
\alias{Huber2014}
\... |
# PROJECT: FY21Q1 Quarterly Review
# AUTHOR: A.Chafetz | USAID
# PURPOSE: TX partner Trends
# LICENSE: MIT
# DATE: 2021-03-08
# UPDATED: 2021-03-09
# DEPENDENCIES ------------------------------------------------------------
library(tidyverse)
library(glitr)
library(glamr)
library(extrafont)
libr... | /Scripts/FY21Q1_TZA_TX-Large-Partners.R | no_license | USAID-OHA-SI/groundhog_day | R | false | false | 7,118 | r | # PROJECT: FY21Q1 Quarterly Review
# AUTHOR: A.Chafetz | USAID
# PURPOSE: TX partner Trends
# LICENSE: MIT
# DATE: 2021-03-08
# UPDATED: 2021-03-09
# DEPENDENCIES ------------------------------------------------------------
library(tidyverse)
library(glitr)
library(glamr)
library(extrafont)
libr... |
#' Copy the Nowcast Report with an Appended YAML
#'
#' @param yaml Character string giving the path to the YAML to append.
#' @param report Character string giving the path to the report.
#' @param lines_to_cut Numeric, number of lines to remove from the report. Defaults to `NULL`.
#' Useful when updating the author l... | /R/copy_report.R | permissive | laasousa/EpiNow | R | false | false | 1,251 | r | #' Copy the Nowcast Report with an Appended YAML
#'
#' @param yaml Character string giving the path to the YAML to append.
#' @param report Character string giving the path to the report.
#' @param lines_to_cut Numeric, number of lines to remove from the report. Defaults to `NULL`.
#' Useful when updating the author l... |
library(glmnet)
mydata = read.table("./TrainingSet/LassoBIC/liver.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.65,family="gaussian",standardize=FALSE)
sink('./Model/EN/Lasso/liver/liver_070.txt',append=TRUE)
... | /Model/EN/Lasso/liver/liver_070.R | no_license | leon1003/QSMART | R | false | false | 349 | r | library(glmnet)
mydata = read.table("./TrainingSet/LassoBIC/liver.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.65,family="gaussian",standardize=FALSE)
sink('./Model/EN/Lasso/liver/liver_070.txt',append=TRUE)
... |
##script to compare the parent end of a transmission with its child and report the mutations
library(stringr)
for(species in c("cat", "dog", "mink", "deer")){
variant_sites = data.frame(site = character(),
count = numeric())
for(i in 1:10){
tab = read.delim(paste0(species, "_",... | /eLife/eLife_mutation_ancestral_seq_summary.R | no_license | Saannah/Animal.SARS-CoV-2 | R | false | false | 1,456 | r | ##script to compare the parent end of a transmission with its child and report the mutations
library(stringr)
for(species in c("cat", "dog", "mink", "deer")){
variant_sites = data.frame(site = character(),
count = numeric())
for(i in 1:10){
tab = read.delim(paste0(species, "_",... |
# return a list
getPredefinedFolds <- function(fold_id_vec)
{
n_folds <- max(fold_id_vec)
folds <- as.list(rep("",n_folds))
for (i_fold in 1:n_folds)
{
folds[[i_fold]] <- which(fold_id_vec == i_fold)
}
return (folds)
} | /functions/getPredefinedFolds.R | no_license | jzhao0802/MS_InitModel | R | false | false | 256 | r | # return a list
getPredefinedFolds <- function(fold_id_vec)
{
n_folds <- max(fold_id_vec)
folds <- as.list(rep("",n_folds))
for (i_fold in 1:n_folds)
{
folds[[i_fold]] <- which(fold_id_vec == i_fold)
}
return (folds)
} |
library(matrixStats)
### Name: weightedMedian
### Title: Weighted Median Value
### Aliases: weightedMedian
### Keywords: robust univar
### ** Examples
x <- 1:10
n <- length(x)
m1 <- median(x) # 5.5
m2 <- weightedMedian(x) # 5.5
stopifnot(identical(m1, m2))
w <- rep(... | /data/genthat_extracted_code/matrixStats/examples/weightedMedian.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,661 | r | library(matrixStats)
### Name: weightedMedian
### Title: Weighted Median Value
### Aliases: weightedMedian
### Keywords: robust univar
### ** Examples
x <- 1:10
n <- length(x)
m1 <- median(x) # 5.5
m2 <- weightedMedian(x) # 5.5
stopifnot(identical(m1, m2))
w <- rep(... |
testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(-5.6881865269782e+113, 5.87789298401217e+170, 3.23160330247636e-115, 6.21040936048395e+175, 8.38862355187538e+242, 1.1241466614968e+79, 1.11708457999073e+267, 7.486... | /meteor/inst/testfiles/E_Penman/libFuzzer_E_Penman/E_Penman_valgrind_files/1612738334-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 667 | r | testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(-5.6881865269782e+113, 5.87789298401217e+170, 3.23160330247636e-115, 6.21040936048395e+175, 8.38862355187538e+242, 1.1241466614968e+79, 1.11708457999073e+267, 7.486... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clouddebugger_objects.R
\name{UpdateActiveBreakpointResponse}
\alias{UpdateActiveBreakpointResponse}
\title{UpdateActiveBreakpointResponse Object}
\usage{
UpdateActiveBreakpointResponse()
}
\value{
UpdateActiveBreakpointResponse object
}
\des... | /googleclouddebuggerv2.auto/man/UpdateActiveBreakpointResponse.Rd | permissive | GVersteeg/autoGoogleAPI | R | false | true | 544 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/clouddebugger_objects.R
\name{UpdateActiveBreakpointResponse}
\alias{UpdateActiveBreakpointResponse}
\title{UpdateActiveBreakpointResponse Object}
\usage{
UpdateActiveBreakpointResponse()
}
\value{
UpdateActiveBreakpointResponse object
}
\des... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mongrel_methods.R
\name{coef.mongrelfit}
\alias{coef.mongrelfit}
\title{Return regression coefficients of mongrelfit object}
\usage{
\method{coef}{mongrelfit}(m, use_names = TRUE)
}
\arguments{
\item{m}{an object of class mongrelfit}
\item{u... | /man/coef.mongrelfit.Rd | no_license | jimhester/mongrel | R | false | true | 631 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mongrel_methods.R
\name{coef.mongrelfit}
\alias{coef.mongrelfit}
\title{Return regression coefficients of mongrelfit object}
\usage{
\method{coef}{mongrelfit}(m, use_names = TRUE)
}
\arguments{
\item{m}{an object of class mongrelfit}
\item{u... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getParams.R
\name{getAllSector}
\alias{getAllSector}
\title{Get all possible values from SECTOR field}
\usage{
getAllSector(key)
}
\arguments{
\item{key}{your USDA api key}
}
\value{
All possible values of PROGRAM
}
\description{
Get all poss... | /man/getAllSector.Rd | permissive | alexmindeman/tidyUSDA | R | false | true | 394 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getParams.R
\name{getAllSector}
\alias{getAllSector}
\title{Get all possible values from SECTOR field}
\usage{
getAllSector(key)
}
\arguments{
\item{key}{your USDA api key}
}
\value{
All possible values of PROGRAM
}
\description{
Get all poss... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.