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 |
|---|---|---|---|---|---|---|---|---|---|
#' @title Multivariate Sequential Normal Scores
#' @description Transform a matrix \code{X} into SNS using initial observations \code{Y} if available
#' SNS follow the order of \code{X}.
#' @section Comments:
#' If ties, average ranks are used.
#' @seealso \code{\link{MNS}} for multivariate normal scores
#' @inhe... | /R/MultivariateSequentialNormalScores.R | no_license | cran/SNSchart | R | false | false | 8,762 | r | #' @title Multivariate Sequential Normal Scores
#' @description Transform a matrix \code{X} into SNS using initial observations \code{Y} if available
#' SNS follow the order of \code{X}.
#' @section Comments:
#' If ties, average ranks are used.
#' @seealso \code{\link{MNS}} for multivariate normal scores
#' @inhe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PlotSteinertree.R
\name{PlotSteinertree}
\alias{PlotSteinertree}
\title{Plot steiner tree}
\usage{
PlotSteinertree(
object,
ident = NULL,
geneset1 = NULL,
geneset2 = NULL,
nodes = NULL,
method = "sp",
weighted = T,
onlysteiner... | /man/PlotSteinertree.Rd | no_license | RebeccaShao/RSCORE | R | false | true | 1,340 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PlotSteinertree.R
\name{PlotSteinertree}
\alias{PlotSteinertree}
\title{Plot steiner tree}
\usage{
PlotSteinertree(
object,
ident = NULL,
geneset1 = NULL,
geneset2 = NULL,
nodes = NULL,
method = "sp",
weighted = T,
onlysteiner... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/route53_operations.R
\name{route53_disassociate_vpc_from_hosted_zone}
\alias{route53_disassociate_vpc_from_hosted_zone}
\title{Disassociates an Amazon Virtual Private Cloud (Amazon VPC) from an
Amazon Route 53 private hosted zone}
\usage{
rou... | /cran/paws.networking/man/route53_disassociate_vpc_from_hosted_zone.Rd | permissive | paws-r/paws | R | false | true | 1,003 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/route53_operations.R
\name{route53_disassociate_vpc_from_hosted_zone}
\alias{route53_disassociate_vpc_from_hosted_zone}
\title{Disassociates an Amazon Virtual Private Cloud (Amazon VPC) from an
Amazon Route 53 private hosted zone}
\usage{
rou... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "boston")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn = makeLearne... | /models/openml_boston/classification_binaryClass/9fcf3b3ad41578bae1725107d501a6f2/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 685 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "boston")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn = makeLearne... |
# Load data
finaldata <- read.csv("schizRep_finaldata.csv", header=T)
dim(finaldata) # 337106
# Load num_partners
nsp <- read.csv("nsp_pooled.csv")
dim(nsp)
# Merge
finaldata <- merge(finaldata, nsp, by=c("id"), finaldata=T) # 337 104
finaldataAll <- finaldata
## work with finaldata and delete rest o... | /Generating outcome summary statistics number partners.R | no_license | RezaJF/Schizophrenia_Fertility_Paper | R | false | false | 3,786 | r |
# Load data
finaldata <- read.csv("schizRep_finaldata.csv", header=T)
dim(finaldata) # 337106
# Load num_partners
nsp <- read.csv("nsp_pooled.csv")
dim(nsp)
# Merge
finaldata <- merge(finaldata, nsp, by=c("id"), finaldata=T) # 337 104
finaldataAll <- finaldata
## work with finaldata and delete rest o... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pipeline_functions.R
\name{draw.eset.QC}
\alias{draw.eset.QC}
\title{QC plots for ExpressionSet class object.}
\usage{
draw.eset.QC(eset, outdir = ".", do.logtransform = FALSE,
intgroup = NULL, prefix = "", choose_plot = c("heatmap", "pca",... | /man/draw.eset.QC.Rd | permissive | gatechatl/NetBID | R | false | true | 3,172 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pipeline_functions.R
\name{draw.eset.QC}
\alias{draw.eset.QC}
\title{QC plots for ExpressionSet class object.}
\usage{
draw.eset.QC(eset, outdir = ".", do.logtransform = FALSE,
intgroup = NULL, prefix = "", choose_plot = c("heatmap", "pca",... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filter_monomorphic.R
\name{filter_monomorphic}
\alias{filter_monomorphic}
\title{Filter monomorphic markers}
\usage{
filter_monomorphic(data, verbose = FALSE)
}
\arguments{
\item{data}{A tidy data frame object in the global environment or
a t... | /man/filter_monomorphic.Rd | no_license | Maschette/radiator | R | false | true | 1,347 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/filter_monomorphic.R
\name{filter_monomorphic}
\alias{filter_monomorphic}
\title{Filter monomorphic markers}
\usage{
filter_monomorphic(data, verbose = FALSE)
}
\arguments{
\item{data}{A tidy data frame object in the global environment or
a t... |
Sys.setlocale("LC_ALL", "fr_FR.UTF-8")
options(encoding="UTF-8")
package <- c("shiny", "shinydashboard", "rgdal", "yaml",'dygraphs',"gridExtra","stringr",
'xts','ggplot2','plyr','scales','grid','googleVis','DT','dplyr','shinyBS',
"plotly","shinyjs","sp","tidyr","lubridate","magrittr","ggmap","... | /ui.R | no_license | ClaireCasagranda/Keto-app | R | false | false | 29,393 | r | Sys.setlocale("LC_ALL", "fr_FR.UTF-8")
options(encoding="UTF-8")
package <- c("shiny", "shinydashboard", "rgdal", "yaml",'dygraphs',"gridExtra","stringr",
'xts','ggplot2','plyr','scales','grid','googleVis','DT','dplyr','shinyBS',
"plotly","shinyjs","sp","tidyr","lubridate","magrittr","ggmap","... |
########## Code to gather results from across all simulations
# Everything gets saved to a single file: Outputs.Rdata
library(reshape2)
library(ggplot2)
library(plyr)
nReps <- 100
##### Load pre-saved summary tables
simtable <- read.csv("S0_simtable.csv")
fname <- simtable$fname
modeloutput <- simtable$mode... | /Sims/SimZero/Compile_simzero.R | no_license | AdamMS/TimeToDetect | R | false | false | 4,099 | r | ########## Code to gather results from across all simulations
# Everything gets saved to a single file: Outputs.Rdata
library(reshape2)
library(ggplot2)
library(plyr)
nReps <- 100
##### Load pre-saved summary tables
simtable <- read.csv("S0_simtable.csv")
fname <- simtable$fname
modeloutput <- simtable$mode... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ls_by_expiry.R
\name{ls_by_expiry}
\alias{ls_by_expiry}
\alias{rm_by_expiry}
\alias{rm_by_expiry}
\title{list or remove instruments by expiration date}
\usage{
ls_by_expiry(expiry, pattern = NULL, match = TRUE)
rm_by_expiry(x, expiry)
}
\arg... | /man/ls_by_expiry.Rd | no_license | cran/FinancialInstrument | R | false | true | 1,275 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ls_by_expiry.R
\name{ls_by_expiry}
\alias{ls_by_expiry}
\alias{rm_by_expiry}
\alias{rm_by_expiry}
\title{list or remove instruments by expiration date}
\usage{
ls_by_expiry(expiry, pattern = NULL, match = TRUE)
rm_by_expiry(x, expiry)
}
\arg... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree_function.R
\name{tree_function}
\alias{tree_function}
\title{Title}
\usage{
tree_function(log.odds, sigma)
}
\arguments{
\item{sigma}{}
}
\description{
Title
}
| /man/tree_function.Rd | no_license | andrewhaoyu/bcutility | R | false | true | 243 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree_function.R
\name{tree_function}
\alias{tree_function}
\title{Title}
\usage{
tree_function(log.odds, sigma)
}
\arguments{
\item{sigma}{}
}
\description{
Title
}
|
library(ade4) #dist.binary
library(GGally) # ggpairs
library(tidyverse)
# Distances of base::dist -------------------------------------------------
ds <- tribble(~iter, ~manhattan, ~euclidean, ~p3, ~p4, ~chebyshev, ~binary)
for(i in 1:10000) {
vs <- data.frame(replicate(10,sample(0:1,2,rep=TRUE))) # binary pairs of... | /distances/relationship.R | no_license | noeliarico/knnrr | R | false | false | 6,098 | r | library(ade4) #dist.binary
library(GGally) # ggpairs
library(tidyverse)
# Distances of base::dist -------------------------------------------------
ds <- tribble(~iter, ~manhattan, ~euclidean, ~p3, ~p4, ~chebyshev, ~binary)
for(i in 1:10000) {
vs <- data.frame(replicate(10,sample(0:1,2,rep=TRUE))) # binary pairs of... |
# Urbanicity
# Use tract-weighted density by PUMA.
# Need tract-level population or households, area, plus tract-to-puma crosswalk.
# We need number of households in each census tract and the land area of each tract.
# These files are published tables from the Census Bureau.
# Area is from table GCT-PH1 from the 2010... | /density_analysis.R | no_license | BenCasselman/planet_money | R | false | false | 2,280 | r | # Urbanicity
# Use tract-weighted density by PUMA.
# Need tract-level population or households, area, plus tract-to-puma crosswalk.
# We need number of households in each census tract and the land area of each tract.
# These files are published tables from the Census Bureau.
# Area is from table GCT-PH1 from the 2010... |
# Data is preloaded
# This creates plot
g <- ggplot(mpg, aes(displ,hwy) )
g + geom_point(aes(color = drv),size=6,alpha=1/2) + geom_smooth(size=1,linetype=1,method="lm",se=TRUE)+ labs(title="Gas Mileage By Transmission") + labs(x="Displacement", y="Hwy Mileage")
# Summary of data
summary(mpg)
manufacturer ... | /ggplot-demo.R | no_license | lincourtl/Arrrr-R | R | false | false | 2,138 | r | # Data is preloaded
# This creates plot
g <- ggplot(mpg, aes(displ,hwy) )
g + geom_point(aes(color = drv),size=6,alpha=1/2) + geom_smooth(size=1,linetype=1,method="lm",se=TRUE)+ labs(title="Gas Mileage By Transmission") + labs(x="Displacement", y="Hwy Mileage")
# Summary of data
summary(mpg)
manufacturer ... |
PC2Area = function(PC) {
if(is.na(PC)) return("Unknown")
if( PC %in% c(2600, 2601, 2610) ) return("Canberra CBD")
if( PC >= 2601 && ... | /R/matchPostcodeToArea.R | no_license | Anjs04/UM | R | false | false | 5,643 | r | PC2Area = function(PC) {
if(is.na(PC)) return("Unknown")
if( PC %in% c(2600, 2601, 2610) ) return("Canberra CBD")
if( PC >= 2601 && ... |
#' Selection of survey sites maximizing uniformity in geography
#'
#' @description Selection of sites to be sampled in a survey, with the goal of
#' maximizing uniformity of points in geographic space.
#'
#' @param master master_matrix object derived from function
#' \code{\link{prepare_master_matrix}} or master_... | /R/uniformG_selection.R | no_license | cran/biosurvey | R | false | false | 12,590 | r | #' Selection of survey sites maximizing uniformity in geography
#'
#' @description Selection of sites to be sampled in a survey, with the goal of
#' maximizing uniformity of points in geographic space.
#'
#' @param master master_matrix object derived from function
#' \code{\link{prepare_master_matrix}} or master_... |
library(httr)
library(CSS)
####################################################
# getListPageUrls via boardName
####################################################
library(rvest)
# function input: boardName
boardName = "Gossiping"
boardUrl = sprintf("https://www.ptt.cc/bbs/%s/index.html",boardName)
res = GET(boar... | /refactor_20160129.R | no_license | vickynaiyi/Sinopac_RCourse | R | false | false | 2,976 | r |
library(httr)
library(CSS)
####################################################
# getListPageUrls via boardName
####################################################
library(rvest)
# function input: boardName
boardName = "Gossiping"
boardUrl = sprintf("https://www.ptt.cc/bbs/%s/index.html",boardName)
res = GET(boar... |
library(ggplot2)
#Directorio de trabajo
setwd("/home/fer/Desktop/Desarrollo_exp/Simulaciones")
#Leer datos
datos1 <- read.table("gr 0.050.dat") #Tipo ASCII
datos2 <- read.table("gr 0.200.dat") #Tipo ASCII
datos3 <- read.table("gr 0.500.dat") #Tipo ASCII
datos4 <- read.table("gr 0.700.dat") #Tipo ASCII
datos5 <- read.... | /Grs.R | no_license | Xerkkun/PlotScripts | R | false | false | 846 | r | library(ggplot2)
#Directorio de trabajo
setwd("/home/fer/Desktop/Desarrollo_exp/Simulaciones")
#Leer datos
datos1 <- read.table("gr 0.050.dat") #Tipo ASCII
datos2 <- read.table("gr 0.200.dat") #Tipo ASCII
datos3 <- read.table("gr 0.500.dat") #Tipo ASCII
datos4 <- read.table("gr 0.700.dat") #Tipo ASCII
datos5 <- read.... |
somepct <- 115/198
print(somepct) | /arinanalysis.R | no_license | arinbasu/arinsRcodes | R | false | false | 33 | r | somepct <- 115/198
print(somepct) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{sys_path}
\alias{sys_path}
\title{Format a path for \code{\link{system}}.}
\usage{
sys_path(R_path)
}
\arguments{
\item{R_path}{The name of the file. It should be properly formatted: if it
exists, \code{file.exists(R_p... | /man/sys_path.Rd | no_license | yoaman/r-cran-ciftiTools | R | false | true | 472 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{sys_path}
\alias{sys_path}
\title{Format a path for \code{\link{system}}.}
\usage{
sys_path(R_path)
}
\arguments{
\item{R_path}{The name of the file. It should be properly formatted: if it
exists, \code{file.exists(R_p... |
#Reads data
library(lubridate)
data<-read.table("household_power_consumption.txt",header=TRUE,sep=";",na.strings="?")
datetime<-paste(data$Date,data$Time)
datetime<-dmy_hms(datetime)
data<-cbind(datetime,data)
remove(datetime)
data$Date<-as.Date(data$Date,"%d/%m/%Y")
#Filters data
data<-data[data$Date == "2007-02-01" ... | /figure/plot4.R | no_license | sschaffrath/ExData_Plotting1 | R | false | false | 1,076 | r | #Reads data
library(lubridate)
data<-read.table("household_power_consumption.txt",header=TRUE,sep=";",na.strings="?")
datetime<-paste(data$Date,data$Time)
datetime<-dmy_hms(datetime)
data<-cbind(datetime,data)
remove(datetime)
data$Date<-as.Date(data$Date,"%d/%m/%Y")
#Filters data
data<-data[data$Date == "2007-02-01" ... |
if(!require("data.table")) install.packages("data.table"); library("data.table")
if(!require("klaR")) install.packages("klaR"); library("klaR")
if(!require("mlr")) install.packages("mlr"); library("mlr")
..standardize <- function(x){
mu <- mean(x)
std <- sd(x)
result <- (x - mu)/std
return(result)
}
..mod... | /load_data.R | no_license | ececaliskan123/Predictive-Analytics-and-Customer-Return-Data | R | false | false | 5,064 | r | if(!require("data.table")) install.packages("data.table"); library("data.table")
if(!require("klaR")) install.packages("klaR"); library("klaR")
if(!require("mlr")) install.packages("mlr"); library("mlr")
..standardize <- function(x){
mu <- mean(x)
std <- sd(x)
result <- (x - mu)/std
return(result)
}
..mod... |
# ---- SelCriterion2SelCriterionStd --------------------------------------------------------------
#' Selection criterion to stand. selection criterion
#'
#' `SelCriterion2SelCriterionStd` standardizes selection criterion
#'
#' @param SelCriterion numeric, selection criterion
#' @param Mean numeric, mean of selection... | /Functions.R | permissive | janaobsteter/Genotype_CODES | R | false | false | 19,725 | r |
# ---- SelCriterion2SelCriterionStd --------------------------------------------------------------
#' Selection criterion to stand. selection criterion
#'
#' `SelCriterion2SelCriterionStd` standardizes selection criterion
#'
#' @param SelCriterion numeric, selection criterion
#' @param Mean numeric, mean of selection... |
data <- SCC[SCC$Data.Category == "Onroad",]
data <- data[,c(1)]
BALTNEI1999 <- c("Baltimore",1999, sum(NEI[NEI$year == 1999 & NEI$SCC %in% data & NEI$fips == "24510",c("Emissions")]))
BALTNEI2002 <- c("Baltimore",2002, sum(NEI[NEI$year == 2002 & NEI$SCC %in% data & NEI$fips == "24510",c("Emissions")]))
BALTNEI2005 <- ... | /Exploratory Data Analysis/Project2/plot6.R | no_license | tjfarwel/datasciencecoursera | R | false | false | 1,506 | r | data <- SCC[SCC$Data.Category == "Onroad",]
data <- data[,c(1)]
BALTNEI1999 <- c("Baltimore",1999, sum(NEI[NEI$year == 1999 & NEI$SCC %in% data & NEI$fips == "24510",c("Emissions")]))
BALTNEI2002 <- c("Baltimore",2002, sum(NEI[NEI$year == 2002 & NEI$SCC %in% data & NEI$fips == "24510",c("Emissions")]))
BALTNEI2005 <- ... |
# Title : code based in Chatzilena2019
# Objective : TODO
# Created by: saul
# Created on: 7/1/20
library(deSolve)
library(dplyr)
library(rstan)
library(outbreaks)
library(bayesplot)
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())
#### load data from outbreaks package ####
onset <- i... | /tex_sources/r_sources/mcmc_parameter_estimation_DGPS/main_sir.R | no_license | SaulDiazInfante/NovelCovid19-OptimalPiecewiseControlModelling | R | false | false | 6,280 | r | # Title : code based in Chatzilena2019
# Objective : TODO
# Created by: saul
# Created on: 7/1/20
library(deSolve)
library(dplyr)
library(rstan)
library(outbreaks)
library(bayesplot)
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())
#### load data from outbreaks package ####
onset <- i... |
model{
# priors for within site model (process)
alpha2 ~ dnorm(0, 5)
sigma ~ dunif(0, 50)
tau <- 1/sigma^2
### priors for intercept model
mu.alpha1 ~ dnorm(15, 30)
sigma.alpha1 ~ dunif(0, 50) #notated varsigma in model documentation
tau.alpha1 <- 1/sigma.alpha1^2
... | /sbs_bayes/models/hier1_JAGS.R | permissive | elahi/sbs_analysis | R | false | false | 1,101 | r |
model{
# priors for within site model (process)
alpha2 ~ dnorm(0, 5)
sigma ~ dunif(0, 50)
tau <- 1/sigma^2
### priors for intercept model
mu.alpha1 ~ dnorm(15, 30)
sigma.alpha1 ~ dunif(0, 50) #notated varsigma in model documentation
tau.alpha1 <- 1/sigma.alpha1^2
... |
/R/baidumig.R | no_license | wuyu84/baidumig | R | false | false | 1,576 | r | ||
rm(list = ls(all.names = TRUE))
# Packages
# Loading CSV file
prj <- read.csv("prjDetPanel-Jan2011.csv")
# Display summary of all columns
# Numeric will have 5-point summary + Mean
# Category will have counts per case
# Date/Time are being treated as category as it is plain text
summary(prj)
# License summary
summar... | /test_param.R | no_license | nxrmrz/quantitativeAnalysis | R | false | false | 37,227 | r | rm(list = ls(all.names = TRUE))
# Packages
# Loading CSV file
prj <- read.csv("prjDetPanel-Jan2011.csv")
# Display summary of all columns
# Numeric will have 5-point summary + Mean
# Category will have counts per case
# Date/Time are being treated as category as it is plain text
summary(prj)
# License summary
summar... |
library(AMORE)
### Name: newff
### Title: Create a Multilayer Feedforward Neural Network
### Aliases: newff
### Keywords: neural
### ** Examples
#Example 1
library(AMORE)
# P is the input vector
P <- matrix(sample(seq(-1,1,length=1000), 1000, replace=FALSE), ncol=1)
# The network will try to approximate the targe... | /data/genthat_extracted_code/AMORE/examples/newff.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 988 | r | library(AMORE)
### Name: newff
### Title: Create a Multilayer Feedforward Neural Network
### Aliases: newff
### Keywords: neural
### ** Examples
#Example 1
library(AMORE)
# P is the input vector
P <- matrix(sample(seq(-1,1,length=1000), 1000, replace=FALSE), ncol=1)
# The network will try to approximate the targe... |
#Objetivo: mostrar Repeated Random Sub Sampling Validation
#Modelo con libreria rpart
#Estimo la ganancia con Repeated Random Sub Sampling Validation ( Monte Carlo Cross Validation )
#source( "M:\\codigoR\\inicial\\MiPrimerModelo_02.r" )
#limpio la memoria
rm( list=ls() )
gc()
library( "rpart" )
library( "d... | /codigoR/inicial/MiPrimerModelo_02.r | no_license | fdmenendez/cloud1 | R | false | false | 3,636 | r | #Objetivo: mostrar Repeated Random Sub Sampling Validation
#Modelo con libreria rpart
#Estimo la ganancia con Repeated Random Sub Sampling Validation ( Monte Carlo Cross Validation )
#source( "M:\\codigoR\\inicial\\MiPrimerModelo_02.r" )
#limpio la memoria
rm( list=ls() )
gc()
library( "rpart" )
library( "d... |
library(ape)
testtree <- read.tree("8584_1.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="8584_1_unrooted.txt") | /codeml_files/newick_trees_processed/8584_1/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("8584_1.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="8584_1_unrooted.txt") |
#' @include components.R
NULL
#' @param dashboard A \linkS4class{i2dashboard}.
#' @param map A character vector containing colors and possible the levels they map to (as names).
#' @param name A name for the color mapping.
#'
#' @rdname i2dashboard-content
setMethod("add_colormap", "i2dashboard", function(dashboard, m... | /R/colormap.R | permissive | loosolab/i2dash | R | false | false | 404 | r | #' @include components.R
NULL
#' @param dashboard A \linkS4class{i2dashboard}.
#' @param map A character vector containing colors and possible the levels they map to (as names).
#' @param name A name for the color mapping.
#'
#' @rdname i2dashboard-content
setMethod("add_colormap", "i2dashboard", function(dashboard, m... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/contrastClass.R
\name{contrastClass}
\alias{contrastClass}
\title{Soil Color Contrast}
\usage{
contrastClass(v1, c1, v2, c2, dH, dV, dC, verbose = FALSE)
}
\arguments{
\item{v1}{Munsell value of first color}
\item{c1}{Munsell chroma of first... | /man/contrastClass.Rd | no_license | Memo1986/aqp | R | false | true | 1,473 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/contrastClass.R
\name{contrastClass}
\alias{contrastClass}
\title{Soil Color Contrast}
\usage{
contrastClass(v1, c1, v2, c2, dH, dV, dC, verbose = FALSE)
}
\arguments{
\item{v1}{Munsell value of first color}
\item{c1}{Munsell chroma of first... |
setClusterColor <- function(seuratObj, clustType, Lineage = NULL){
#This snippet sets a color code for all cells according to their clusters from obj@ident. Used to draw slingshot lineages
clusters <- unique(seuratObj@ident)
cellColors <- rep("grey", length( seuratObj@ident)) # initiate all cells as grey
#greyClus... | /setClusterColor.r | no_license | SevaVigg/DrNCC | R | false | false | 1,015 | r | setClusterColor <- function(seuratObj, clustType, Lineage = NULL){
#This snippet sets a color code for all cells according to their clusters from obj@ident. Used to draw slingshot lineages
clusters <- unique(seuratObj@ident)
cellColors <- rep("grey", length( seuratObj@ident)) # initiate all cells as grey
#greyClus... |
data <- 1:4
dimension <- c(4)
row.names <- c("row1", "row2", "row3", "row4")
a1 <- array(data, dim=dimension, dimnames=list(row.names))
print(a1)
lst <- as.list(a1)
print(lst)
print(length(lst))
print(class(lst))
| /05-lists-and-data-frames/16-B-from-1D-array-colnames.R | no_license | xmorgan/r-examples | R | false | false | 217 | r | data <- 1:4
dimension <- c(4)
row.names <- c("row1", "row2", "row3", "row4")
a1 <- array(data, dim=dimension, dimnames=list(row.names))
print(a1)
lst <- as.list(a1)
print(lst)
print(length(lst))
print(class(lst))
|
library(tidyverse)
# import data ----
# data does not contain column names, so we need to identify them
column_names <- c('age','work_class','final_weight','education','education_number','marital_status','occupation','relationship','race','sex','capital_gain','capital_loss','hours_per_week','native_country','salary... | /analysis-script.R | permissive | nikdata/hackerusa-tech | R | false | false | 15,506 | r | library(tidyverse)
# import data ----
# data does not contain column names, so we need to identify them
column_names <- c('age','work_class','final_weight','education','education_number','marital_status','occupation','relationship','race','sex','capital_gain','capital_loss','hours_per_week','native_country','salary... |
###############################################
# 13.02.2018
# Forage qualitz modelling with SVMR
# JW
###############################################
# Loading required packages
rm(list=ls())
library(data.table)
library(dplyr)
library(hsdar)
library(ggplot2)
library(caret)
library(purrr)
library(readr)
library(ppls... | /scripts/svm_with_all.R | no_license | jmatics/fq_modelling_2018 | R | false | false | 5,719 | r | ###############################################
# 13.02.2018
# Forage qualitz modelling with SVMR
# JW
###############################################
# Loading required packages
rm(list=ls())
library(data.table)
library(dplyr)
library(hsdar)
library(ggplot2)
library(caret)
library(purrr)
library(readr)
library(ppls... |
with(ac2dd5dcf725e4348a94d73c5873ec73d, {ROOT <- 'C:/tools/111719/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/80bb2a25-ac5d-47d0-abfc-b3f3811f0936';FRAME878836$business_application[FRAME878836$business_application == ""] <- "None";}); | /80bb2a25-ac5d-47d0-abfc-b3f3811f0936/R/Temp/aCOq5Oe6XjHHf.R | no_license | ayanmanna8/test | R | false | false | 277 | r | with(ac2dd5dcf725e4348a94d73c5873ec73d, {ROOT <- 'C:/tools/111719/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/80bb2a25-ac5d-47d0-abfc-b3f3811f0936';FRAME878836$business_application[FRAME878836$business_application == ""] <- "None";}); |
setwd("D:/AP/linear")
insurance = read.csv("insurance.csv")
head(insurance)
### pre checks
### target variable should follow normal distribution
hist(insurance$charges)
### target variable is right skewed
## apply transformation
insurance$log_charges = log( insurance$charges)
hist(insurance$l... | /Linear_Regression.R | no_license | srivnamrata/psychic-engine | R | false | false | 1,361 | r | setwd("D:/AP/linear")
insurance = read.csv("insurance.csv")
head(insurance)
### pre checks
### target variable should follow normal distribution
hist(insurance$charges)
### target variable is right skewed
## apply transformation
insurance$log_charges = log( insurance$charges)
hist(insurance$l... |
library(dplyr)
data <- read.csv(file = "data/data.csv", header = T, sep = ";", stringsAsFactors = F)
d2 <- read.csv(file = "data/join_ct_on_map.csv", header = T, sep = ";", stringsAsFactors = F)
data <- inner_join(data, d2, by = "census_tract")
write.table(data, "data/mp_data.csv", quote = F, row.names = F, sep=";"... | /join_map_data.R | permissive | tatianass/nij-challenge | R | false | false | 346 | r | library(dplyr)
data <- read.csv(file = "data/data.csv", header = T, sep = ";", stringsAsFactors = F)
d2 <- read.csv(file = "data/join_ct_on_map.csv", header = T, sep = ";", stringsAsFactors = F)
data <- inner_join(data, d2, by = "census_tract")
write.table(data, "data/mp_data.csv", quote = F, row.names = F, sep=";"... |
testlist <- list(A = structure(c(2.31584307392677e+77, 9.56013676510828e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613114113-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 251 | r | testlist <- list(A = structure(c(2.31584307392677e+77, 9.56013676510828e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) |
###
printArgument <- function(name, value)
{
cat(sprintf("%17s = %s\n", name, as.character(value)))
}
###
confirmArguments <- function(proc_args)
{
cat("\n")
for (arg in names(proc_args)) {
printArgument(arg, proc_args[[arg]])
}
# cat("\nPress [enter] to run")
# scan("stdin", raw(), n=1, blank.lines.sk... | /scripts/run/test.R | no_license | karenenes/selectiveharvesting | R | false | false | 2,422 | r | ###
printArgument <- function(name, value)
{
cat(sprintf("%17s = %s\n", name, as.character(value)))
}
###
confirmArguments <- function(proc_args)
{
cat("\n")
for (arg in names(proc_args)) {
printArgument(arg, proc_args[[arg]])
}
# cat("\nPress [enter] to run")
# scan("stdin", raw(), n=1, blank.lines.sk... |
## Put comments here that give an overall description of what your
## functions do
# makeCacheMatrix establishes a cache (containing a matrix or the NULL value)
# for storing the computed result, and also establishes a list of functions
# which operate on the cache.
# makeCacheMatrix must be called first to initialise ... | /cachematrix.R | no_license | rag2dst/ProgrammingAssignment2 | R | false | false | 2,754 | r | ## Put comments here that give an overall description of what your
## functions do
# makeCacheMatrix establishes a cache (containing a matrix or the NULL value)
# for storing the computed result, and also establishes a list of functions
# which operate on the cache.
# makeCacheMatrix must be called first to initialise ... |
# `pistar.uv` with S4 class output
# Juraj Medzihorsky
# 2014-12-08
pistar.uv <-
function(data,
dfn,
n_par = NULL,
inits = NULL,
discrete = FALSE,
freq = FALSE,
lower = NULL,
upper = NULL,
jack = FALSE,
method = "Nelder-Mead",
control = list(maxit = 2e3),
... | /R/pistar.uv.R | no_license | jmedzihorsky/pistar | R | false | false | 5,180 | r | # `pistar.uv` with S4 class output
# Juraj Medzihorsky
# 2014-12-08
pistar.uv <-
function(data,
dfn,
n_par = NULL,
inits = NULL,
discrete = FALSE,
freq = FALSE,
lower = NULL,
upper = NULL,
jack = FALSE,
method = "Nelder-Mead",
control = list(maxit = 2e3),
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glue_operations.R
\name{glue_batch_get_dev_endpoints}
\alias{glue_batch_get_dev_endpoints}
\title{Returns a list of resource metadata for a given list of development
endpoint names}
\usage{
glue_batch_get_dev_endpoints(DevEndpointNames)
}
\ar... | /cran/paws.analytics/man/glue_batch_get_dev_endpoints.Rd | permissive | TWarczak/paws | R | false | true | 2,107 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glue_operations.R
\name{glue_batch_get_dev_endpoints}
\alias{glue_batch_get_dev_endpoints}
\title{Returns a list of resource metadata for a given list of development
endpoint names}
\usage{
glue_batch_get_dev_endpoints(DevEndpointNames)
}
\ar... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lorenz.R
\name{make_lorenz_fromQuantile}
\alias{make_lorenz_fromQuantile}
\title{Makes a Lorenz Curve Function out of a quantile function}
\usage{
make_lorenz_fromQuantile(qf, gridIntegration = NULL)
}
\arguments{
\item{gridIntegration}{(opti... | /man/make_lorenz_fromQuantile.Rd | no_license | antrologos/inequalityTools | R | false | true | 655 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lorenz.R
\name{make_lorenz_fromQuantile}
\alias{make_lorenz_fromQuantile}
\title{Makes a Lorenz Curve Function out of a quantile function}
\usage{
make_lorenz_fromQuantile(qf, gridIntegration = NULL)
}
\arguments{
\item{gridIntegration}{(opti... |
#########################
#scalar & mode of numbers
#########################
x <- 1 # default behaviour
print(x)
mode(x)
class(x)
typeof(x)
y <- 1L # forced to be an integer
print(y)
mode(y)
class(y)
typeof(y)
## attributes
x <- 1
attributes(x)
##Vectors: scalar & character strings
text <- "message"
print(text)
len... | /src/data_types.r | permissive | pparacch/PlayingWithDataScience | R | false | false | 1,384 | r | #########################
#scalar & mode of numbers
#########################
x <- 1 # default behaviour
print(x)
mode(x)
class(x)
typeof(x)
y <- 1L # forced to be an integer
print(y)
mode(y)
class(y)
typeof(y)
## attributes
x <- 1
attributes(x)
##Vectors: scalar & character strings
text <- "message"
print(text)
len... |
##############################################################
## MACHINE LEARNING MODEL FOR PREDICTION ##
## OF MOVIE RATINGS IN AN ONLINE MEDIA SERVICE ##
## USING THE MATRIX FACTORIZATION METHOD ##
##############################################################
### S... | /Amaya_MovieLens_CODE.r | no_license | andresamayachaves/movieMatrix | R | false | false | 13,244 | r | ##############################################################
## MACHINE LEARNING MODEL FOR PREDICTION ##
## OF MOVIE RATINGS IN AN ONLINE MEDIA SERVICE ##
## USING THE MATRIX FACTORIZATION METHOD ##
##############################################################
### S... |
setwd('V:/my work in OU/All eCO2 samples/180samples')
rm(list=ls(all=TRUE))
fg.dat = read.table("all180_corrected.txt", sep="\t", row.names=1, header=T)
samp.name = colnames(fg.dat)
samp.pair = read.table("sample_combine.txt", sep="\t", header=T)
left.col = c()
for(i in 1:nrow(samp.pair)){
left.col = ... | /分析及画图/1. 多样性_排序_距离/comb_samples.r | no_license | mrzhangqjankun/R-code-for-myself | R | false | false | 778 | r |
setwd('V:/my work in OU/All eCO2 samples/180samples')
rm(list=ls(all=TRUE))
fg.dat = read.table("all180_corrected.txt", sep="\t", row.names=1, header=T)
samp.name = colnames(fg.dat)
samp.pair = read.table("sample_combine.txt", sep="\t", header=T)
left.col = c()
for(i in 1:nrow(samp.pair)){
left.col = ... |
# BioC 3.0
# Created 2 June 2015
# Updated 10 June 2015
# Update 16 June 2015
# - compare the Data_DM_0_1_5 results
############################################################################################
setwd("/home/Shared/data/seq/GEUVADIS/")
library(DM)
library(limma)
source("/home/gosia/R/R_Multinomial_p... | /analysis_geuvadis/DM_0.1.4_compare.R | no_license | gosianow/multinomial_project | R | false | false | 13,058 | r | # BioC 3.0
# Created 2 June 2015
# Updated 10 June 2015
# Update 16 June 2015
# - compare the Data_DM_0_1_5 results
############################################################################################
setwd("/home/Shared/data/seq/GEUVADIS/")
library(DM)
library(limma)
source("/home/gosia/R/R_Multinomial_p... |
network_features <- function(L='label',data_train,data_test,nf,p,corr,f_type,s,nc)
{
classes <- unique(data_train$label)
names(data_train)[colnames(data_train)==L] <- paste("label")
names(data_test)[colnames(data_test)==L] <- paste("label")
data_trainm <- data_train[,colnames(data_train)!=L]
data_testm <- d... | /R/network_features.R | no_license | xinying17/FeatureV3 | R | false | false | 1,784 | r | network_features <- function(L='label',data_train,data_test,nf,p,corr,f_type,s,nc)
{
classes <- unique(data_train$label)
names(data_train)[colnames(data_train)==L] <- paste("label")
names(data_test)[colnames(data_test)==L] <- paste("label")
data_trainm <- data_train[,colnames(data_train)!=L]
data_testm <- d... |
library("data.table")
#Reads in data from file then subsets data for specified dates
powerDT <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?"
)
# Prevents Scientific Notation
powerDT[, Global_active_power := lapply(.SD, as.numeric), .SDcols = c("... | /plot2.R | no_license | jhonatanalfred7/ExData_Plotting1 | R | false | false | 839 | r | library("data.table")
#Reads in data from file then subsets data for specified dates
powerDT <- data.table::fread(input = "household_power_consumption.txt"
, na.strings="?"
)
# Prevents Scientific Notation
powerDT[, Global_active_power := lapply(.SD, as.numeric), .SDcols = c("... |
workspace_init <- function(target, pipeline) {
target <- target_workspace_copy(target)
subpipeline <- pipeline_produce_subpipeline(
pipeline,
target_get_name(target),
keep_value = FALSE
)
workspace_new(target = target, subpipeline = subpipeline)
}
workspace_new <- function(target = NULL, subpipelin... | /R/class_workspace.R | permissive | billdenney/targets | R | false | false | 1,277 | r | workspace_init <- function(target, pipeline) {
target <- target_workspace_copy(target)
subpipeline <- pipeline_produce_subpipeline(
pipeline,
target_get_name(target),
keep_value = FALSE
)
workspace_new(target = target, subpipeline = subpipeline)
}
workspace_new <- function(target = NULL, subpipelin... |
complete <- function(directory, id = 1:332) {
result<-sapply(id, function(i){
csvFileName<-sprintf("%s/%.3d.csv", directory, i)
csv<-read.csv(csvFileName)
# c(i,sum(lapply(csv[,2,3], function(x){!is.na(x)})))
c(i,sum(complete.cases(csv)))
})
id = result[1,]
nobs = result[2,]
data... | /R/complete.R | no_license | javamonkey79/datasciencecoursera | R | false | false | 338 | r | complete <- function(directory, id = 1:332) {
result<-sapply(id, function(i){
csvFileName<-sprintf("%s/%.3d.csv", directory, i)
csv<-read.csv(csvFileName)
# c(i,sum(lapply(csv[,2,3], function(x){!is.na(x)})))
c(i,sum(complete.cases(csv)))
})
id = result[1,]
nobs = result[2,]
data... |
library(dplyr)
ss.bounds <- readRDS("ss.bounds.rds")
alpha <- 0.025
method <- 'fm'
scenario <- 13
param <- 1
anal_type <- "mice"
ss <- ss.bounds%>%
dplyr::filter(method == "fm", scenario.id == scenario)
do_val <- 0.1
x1 <- parallel::mclapply(X = 1:10000,
mc.cores = parallel::detectCore... | /sim_pgms/fm/do10/2xcontH0_sc13_do10_mice.R | no_license | yuliasidi/nibinom_apply | R | false | false | 3,317 | r | library(dplyr)
ss.bounds <- readRDS("ss.bounds.rds")
alpha <- 0.025
method <- 'fm'
scenario <- 13
param <- 1
anal_type <- "mice"
ss <- ss.bounds%>%
dplyr::filter(method == "fm", scenario.id == scenario)
do_val <- 0.1
x1 <- parallel::mclapply(X = 1:10000,
mc.cores = parallel::detectCore... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setsolve <- function(solve) m <<- solve
getsolve ... | /cachematrix.R | no_license | RiturajBajpai/ProgrammingAssignment2 | R | false | false | 720 | 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()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setsolve <- function(solve) m <<- solve
getsolve ... |
#### BMI ####
# Description: BMI
# cat1: bmi
# cat2: NA
# score: NA
source('setup.R')
bmi <- read_csv("lists_in/Elsie/bmi_codes_elsie.csv") %>%
select(read_code, read_term = desc, cat2 = cat) %>%
mutate_at('read_code', list(~ str_extract(., pattern = '^.{5}'))) %>%
mutate(cat1 = 'bmi') %>%
distinct()
# chec... | /scripts/BMI.R | no_license | rprigge-uoe/read_codes | R | false | false | 1,619 | r | #### BMI ####
# Description: BMI
# cat1: bmi
# cat2: NA
# score: NA
source('setup.R')
bmi <- read_csv("lists_in/Elsie/bmi_codes_elsie.csv") %>%
select(read_code, read_term = desc, cat2 = cat) %>%
mutate_at('read_code', list(~ str_extract(., pattern = '^.{5}'))) %>%
mutate(cat1 = 'bmi') %>%
distinct()
# chec... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-quantiles.R
\name{geom_quantiles}
\alias{geom_quantiles}
\title{Add quantile layers on serial axes coordinate}
\usage{
geom_quantiles(
mapping = NULL,
data = NULL,
stat = "quantile",
position = "identity",
...,
lineend = "but... | /man/geom_quantiles.Rd | no_license | LucyNjoki/ggmulti | R | false | true | 3,540 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-quantiles.R
\name{geom_quantiles}
\alias{geom_quantiles}
\title{Add quantile layers on serial axes coordinate}
\usage{
geom_quantiles(
mapping = NULL,
data = NULL,
stat = "quantile",
position = "identity",
...,
lineend = "but... |
/01.R | permissive | jpinonrg/TFM_SALUD | R | false | false | 4,012 | r | ||
rm(list=ls()) #reset work space
# Load library
library(readr)
library(ggplot2)
library(grid)
library(gridExtra)
library(reshape)
library("vegan")
# Import Dataset
# Original 3 months
july <- read_csv("C:/.../Data Files/july.csv")
aug <- read_csv("C:/.../Data Files/aug.csv")
sep <- read_csv("C:/.../Data Files/sep.csv... | /Jefferson Project.R | no_license | Ramoooona/RPI-Projects | R | false | false | 9,746 | r | rm(list=ls()) #reset work space
# Load library
library(readr)
library(ggplot2)
library(grid)
library(gridExtra)
library(reshape)
library("vegan")
# Import Dataset
# Original 3 months
july <- read_csv("C:/.../Data Files/july.csv")
aug <- read_csv("C:/.../Data Files/aug.csv")
sep <- read_csv("C:/.../Data Files/sep.csv... |
\name{Unconstrained log-contrast logistic or Poisson regression with compositional predictor variables}
\alias{ulc.glm}
\title{
Unconstrained log-contrast logistic or Poisson regression with compositional predictor variables
}
\description{
Unconstrained log-contrast logistic or Poisson regression with composit... | /man/ulc.glm.Rd | no_license | cran/Compositional | R | false | false | 2,606 | rd | \name{Unconstrained log-contrast logistic or Poisson regression with compositional predictor variables}
\alias{ulc.glm}
\title{
Unconstrained log-contrast logistic or Poisson regression with compositional predictor variables
}
\description{
Unconstrained log-contrast logistic or Poisson regression with composit... |
library(ggplot2)
library(grid)
library(reshape2)
figure_path = "../tex/figures"
label_total_supported_tunnels = "Total supported tunnels"
label_blocking_probability = "Blocking probability"
label_relative_blocking_probability = "Rel. increase of\n blocking probability"
label_max_instances = "Max. number of instances"... | /ggsn-models/R/plot_settings.R | no_license | fmetzger/ggsn-simulation | R | false | false | 3,341 | r | library(ggplot2)
library(grid)
library(reshape2)
figure_path = "../tex/figures"
label_total_supported_tunnels = "Total supported tunnels"
label_blocking_probability = "Blocking probability"
label_relative_blocking_probability = "Rel. increase of\n blocking probability"
label_max_instances = "Max. number of instances"... |
rm(list = ls())
working_directory = "/Users/oscar/Documents/Network_code"
setwd(working_directory)
source("auxiliary_functions.R")
#
source("functions.R")
source("BinarySegmentation.R")
source("localrefine.R")
# load packages
# ==========
#library('hdbinseg')
library('InspectChangepoint')
library('R.utils')
libra... | /Scenario_2.R | no_license | hernanmp/RDPG | R | false | false | 7,064 | r |
rm(list = ls())
working_directory = "/Users/oscar/Documents/Network_code"
setwd(working_directory)
source("auxiliary_functions.R")
#
source("functions.R")
source("BinarySegmentation.R")
source("localrefine.R")
# load packages
# ==========
#library('hdbinseg')
library('InspectChangepoint')
library('R.utils')
libra... |
library(checkarg)
### Name: isNonZeroNumberOrNanOrInfVector
### Title: Wrapper for the checkarg function, using specific parameter
### settings.
### Aliases: isNonZeroNumberOrNanOrInfVector
### ** Examples
isNonZeroNumberOrNanOrInfVector(2)
# returns TRUE (argument is valid)
isNonZeroNumberOrNanOrInfVector("X"... | /data/genthat_extracted_code/checkarg/examples/isNonZeroNumberOrNanOrInfVector.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 887 | r | library(checkarg)
### Name: isNonZeroNumberOrNanOrInfVector
### Title: Wrapper for the checkarg function, using specific parameter
### settings.
### Aliases: isNonZeroNumberOrNanOrInfVector
### ** Examples
isNonZeroNumberOrNanOrInfVector(2)
# returns TRUE (argument is valid)
isNonZeroNumberOrNanOrInfVector("X"... |
library("gpuR")
options(gpuR.default.type = "float")
# verify you hmatrix_1ve vmatrix_1lid GPUs
detectGPUs()
# CPU vs GPU performance
result <- data.frame()
evalSeq<-seq(1,2501,500)
for (dimpower in evalSeq){
print(dimpower)
Mat1 = matrix(rnorm(dimpower^2), nrow=dimpower)
Mat2 = matrix(rnorm(dimpower^2), nrow=... | /R-Deep-Learning-Cookbook-master/Chapter 10/src/Chapter10_4_GPU_vs_CPU.R | no_license | cyrsis/RSandBox | R | false | false | 623 | r |
library("gpuR")
options(gpuR.default.type = "float")
# verify you hmatrix_1ve vmatrix_1lid GPUs
detectGPUs()
# CPU vs GPU performance
result <- data.frame()
evalSeq<-seq(1,2501,500)
for (dimpower in evalSeq){
print(dimpower)
Mat1 = matrix(rnorm(dimpower^2), nrow=dimpower)
Mat2 = matrix(rnorm(dimpower^2), nrow=... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lightsail_operations.R
\name{lightsail_create_domain_entry}
\alias{lightsail_create_domain_entry}
\title{Creates one of the following domain name system (DNS) records in a
domain DNS zone: Address (A), canonical name (CNAME), mail exchanger
(... | /cran/paws.compute/man/lightsail_create_domain_entry.Rd | permissive | TWarczak/paws | R | false | true | 4,190 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lightsail_operations.R
\name{lightsail_create_domain_entry}
\alias{lightsail_create_domain_entry}
\title{Creates one of the following domain name system (DNS) records in a
domain DNS zone: Address (A), canonical name (CNAME), mail exchanger
(... |
chooseCRANmirror(graphics=FALSE, ind=1)
knitr::opts_chunk$set(echo = TRUE)
install.packages("webshot")
webshot::install_phantomjs()
install.packages("xgboost")
install.packages("tidyverse")
install.packages("DiagrammeR")
# libraries we're going to use
library(xgboost) # for xgboost
library(tidyverse) # g... | /Himanshu Singh_XGBoost_Input file.R | no_license | HimanshuTechGeek/Machine-Learning-with-XGBoost | R | false | false | 6,753 | r | chooseCRANmirror(graphics=FALSE, ind=1)
knitr::opts_chunk$set(echo = TRUE)
install.packages("webshot")
webshot::install_phantomjs()
install.packages("xgboost")
install.packages("tidyverse")
install.packages("DiagrammeR")
# libraries we're going to use
library(xgboost) # for xgboost
library(tidyverse) # g... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/classroom_functions.R
\name{gc_courses_announcements_list}
\alias{gc_courses_announcements_list}
\title{Announcements List}
\usage{
gc_courses_announcements_list(
courseId,
announcementStates = NULL,
orderBy = NULL,
pageToken = NULL,
... | /man/gc_courses_announcements_list.Rd | no_license | curso-r/googleclassroom | R | false | true | 1,723 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/classroom_functions.R
\name{gc_courses_announcements_list}
\alias{gc_courses_announcements_list}
\title{Announcements List}
\usage{
gc_courses_announcements_list(
courseId,
announcementStates = NULL,
orderBy = NULL,
pageToken = NULL,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate.R
\name{simulate_matrix}
\alias{simulate_matrix}
\title{Generate a list of simulated sample matrices sampled from the Wishart distribution}
\usage{
simulate_matrix(sigma, n, k = 1, as_cor = FALSE)
}
\arguments{
\item{sigma}{Populatio... | /man/simulate_matrix.Rd | no_license | abblake/psychmeta | R | false | true | 1,430 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate.R
\name{simulate_matrix}
\alias{simulate_matrix}
\title{Generate a list of simulated sample matrices sampled from the Wishart distribution}
\usage{
simulate_matrix(sigma, n, k = 1, as_cor = FALSE)
}
\arguments{
\item{sigma}{Populatio... |
#requires Rtools
#requires JAGS
#install.packages("bbsBayes")
library(bbsBayes)
library(tidyverse)
library(raster)
#install.packages("sf")
library(sf)
#install.packages("rgeos")
library(rgeos)
library(landscapemetrics)
library(landscapetools)
library(dplyr)
library(rgdal)
library(ggplot2)
#install.p... | /CD Shapefile Overlay.R | no_license | CourtneyDonkersteeg/CD-BBS-Overlay | R | false | false | 7,095 | r | #requires Rtools
#requires JAGS
#install.packages("bbsBayes")
library(bbsBayes)
library(tidyverse)
library(raster)
#install.packages("sf")
library(sf)
#install.packages("rgeos")
library(rgeos)
library(landscapemetrics)
library(landscapetools)
library(dplyr)
library(rgdal)
library(ggplot2)
#install.p... |
clean_date <- function(dat){
# Convert date - remove commas
dat$date <- (gsub(",","",dat$date))
# replace spaces with blackslash
dat$date <- (gsub(" ","/",dat$date))
# replace dash with backslash
dat$date <- gsub("-", "/", dat$date)
# Hockey Fights data has a different date format in 2016
if(as.n... | /r_progs/functions.R | no_license | frutoper/Hockey_Fights_Elo | R | false | false | 2,116 | r |
clean_date <- function(dat){
# Convert date - remove commas
dat$date <- (gsub(",","",dat$date))
# replace spaces with blackslash
dat$date <- (gsub(" ","/",dat$date))
# replace dash with backslash
dat$date <- gsub("-", "/", dat$date)
# Hockey Fights data has a different date format in 2016
if(as.n... |
#' @title Aggregate Taxa
#' @description Summarize phyloseq data into a higher phylogenetic level.
#' @details This provides a convenient way to aggregate phyloseq OTUs
#' (or other taxa) when the phylogenetic tree is missing. Calculates the
#' sum of OTU abundances over all OTUs that map to the same higher-level
#' gr... | /R/aggregate_taxa.R | no_license | pythseq/microbiome | R | false | false | 4,462 | r | #' @title Aggregate Taxa
#' @description Summarize phyloseq data into a higher phylogenetic level.
#' @details This provides a convenient way to aggregate phyloseq OTUs
#' (or other taxa) when the phylogenetic tree is missing. Calculates the
#' sum of OTU abundances over all OTUs that map to the same higher-level
#' gr... |
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... | /r/R/parquet.R | permissive | naman1996/arrow | R | false | false | 22,334 | r | # Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not u... |
# Copyright (c) 2018, Brandseye PTY (LTD)
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish... | /R/filter_brand.R | permissive | brandseye/brandseyer2 | R | false | false | 2,419 | r | # Copyright (c) 2018, Brandseye PTY (LTD)
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish... |
#' @title Variance of CUB models without covariates
#' @description Compute the variance of a CUB model without covariates.
#' @aliases varcub00
#' @usage varcub00(m,pai,csi)
#' @param m Number of ordinal categories
#' @param pai Uncertainty parameter
#' @param csi Feeling parameter
#' @export varcub00
#' @seealso \c... | /R/varcub00.R | no_license | cran/CUB | R | false | false | 746 | r | #' @title Variance of CUB models without covariates
#' @description Compute the variance of a CUB model without covariates.
#' @aliases varcub00
#' @usage varcub00(m,pai,csi)
#' @param m Number of ordinal categories
#' @param pai Uncertainty parameter
#' @param csi Feeling parameter
#' @export varcub00
#' @seealso \c... |
## Exploratory data analysis -- Week 1 project
##
## Mort Goldman
## This script expects the household power consumption file to already have been
## installed in working directory. If not it produces an error. If the file is
## in place and has the expected format, then this script produces the "plot4.png"
## fig... | /plot4.R | no_license | mortgoldman/ExData_Plotting1 | R | false | false | 3,347 | r | ## Exploratory data analysis -- Week 1 project
##
## Mort Goldman
## This script expects the household power consumption file to already have been
## installed in working directory. If not it produces an error. If the file is
## in place and has the expected format, then this script produces the "plot4.png"
## fig... |
# Load the library.
library(ggplot2)
# Load the data.
wines <- read.csv2('winequality-red.csv', dec = '.', header=TRUE)
# Histogram - Fixed acidity and quality.
wines$Fixed.Acidity <- cut(wines$fixed.acidity, c(-Inf, 3, 5, 7, 8, 9, 11, 13, 15, Inf))
ggplot(wines, aes(x=Fixed.Acidity)) + geom_histogram(binwidth=0.5,fi... | /hw1/code.R | no_license | silverdev/cs199 | R | false | false | 868 | r | # Load the library.
library(ggplot2)
# Load the data.
wines <- read.csv2('winequality-red.csv', dec = '.', header=TRUE)
# Histogram - Fixed acidity and quality.
wines$Fixed.Acidity <- cut(wines$fixed.acidity, c(-Inf, 3, 5, 7, 8, 9, 11, 13, 15, Inf))
ggplot(wines, aes(x=Fixed.Acidity)) + geom_histogram(binwidth=0.5,fi... |
f2e715c1bb768c87850fdc8342291de1 b20_PR_4_2.qdimacs 10749 31205 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/A1/Database/Sauer-Reimer/ITC99/b20_PR_4_2/b20_PR_4_2.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 63 | r | f2e715c1bb768c87850fdc8342291de1 b20_PR_4_2.qdimacs 10749 31205 |
/pruebas_modelo3_v2.R | no_license | Adoracion2020/Machine-Learning-TenYearCHD | R | false | false | 14,484 | r | ||
library(vegan)
library(vioplot)
map <- read.csv("data/ASD_map.csv",
header=TRUE,
row.names=1)
map$sample.id <- paste0(map$mouse,
".",
substr(map$genotype, 1, 1),
".",
map$time)
otu <- read... | /Figure_3/Figure_3_Panel_C.22.11.29.R | no_license | nvpinkham/Dysautonomia | R | false | false | 2,913 | r |
library(vegan)
library(vioplot)
map <- read.csv("data/ASD_map.csv",
header=TRUE,
row.names=1)
map$sample.id <- paste0(map$mouse,
".",
substr(map$genotype, 1, 1),
".",
map$time)
otu <- read... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/udp-payload.R
\name{udp_send_payload}
\alias{udp_send_payload}
\title{Send a UDP payload and return the response (if any)}
\usage{
udp_send_payload(host, port, payload, timeout = 5,
max_response_size = 4096)
}
\arguments{
\item{host}{host o... | /man/udp_send_payload.Rd | permissive | johndrummond/udpprobe | R | false | true | 791 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/udp-payload.R
\name{udp_send_payload}
\alias{udp_send_payload}
\title{Send a UDP payload and return the response (if any)}
\usage{
udp_send_payload(host, port, payload, timeout = 5,
max_response_size = 4096)
}
\arguments{
\item{host}{host o... |
\name{pc_a}
\alias{pca}
\title{Principle component analysis of the data}
\usage{
pc_ana(x,...)
}
\description{
Visulaising the data as a result from principle component analysis. This is performed to identify the similar clusters of the samples in a data.
}
\arguments{
\item{x}{
data that has been imported as matri... | /man/pc_ana.Rd | no_license | SanthoshKumarKarthikeyan/skkr | R | false | false | 442 | rd | \name{pc_a}
\alias{pca}
\title{Principle component analysis of the data}
\usage{
pc_ana(x,...)
}
\description{
Visulaising the data as a result from principle component analysis. This is performed to identify the similar clusters of the samples in a data.
}
\arguments{
\item{x}{
data that has been imported as matri... |
#' A function to drive the assignment and reporting of the genotypes of each allele on every gamete
#'
#' This function builds and applies a hidden Markov model to categorize each allele on each gamete.
#' It then fills the positions missing data with the nearest haplotype assignment.
#' If the user asks for unsmooth... | /R/impute_gamete_genotypes.R | no_license | mccoy-lab/rhapsodi | R | false | false | 4,854 | r | #' A function to drive the assignment and reporting of the genotypes of each allele on every gamete
#'
#' This function builds and applies a hidden Markov model to categorize each allele on each gamete.
#' It then fills the positions missing data with the nearest haplotype assignment.
#' If the user asks for unsmooth... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 32406
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 32406
c
c Input Parameter (command line, file):
c input filename QBFLIB/Tentrup/mult-matrix/mult_bool_matrix_8_10_9.unsat.qdim... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Tentrup/mult-matrix/mult_bool_matrix_8_10_9.unsat/mult_bool_matrix_8_10_9.unsat.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 668 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 32406
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 32406
c
c Input Parameter (command line, file):
c input filename QBFLIB/Tentrup/mult-matrix/mult_bool_matrix_8_10_9.unsat.qdim... |
library(TropFishR)
### Name: synLFQ5
### Title: Synthetic length-frequency data V (without seasonal oscillation)
### Aliases: synLFQ5
### Keywords: data dataset length-frequency
### ** Examples
data(synLFQ5)
# plot of length frequencies
plot(synLFQ5, Fname = "catch")
# plot of restructured length frequencies
synL... | /data/genthat_extracted_code/TropFishR/examples/synLFQ5.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 399 | r | library(TropFishR)
### Name: synLFQ5
### Title: Synthetic length-frequency data V (without seasonal oscillation)
### Aliases: synLFQ5
### Keywords: data dataset length-frequency
### ** Examples
data(synLFQ5)
# plot of length frequencies
plot(synLFQ5, Fname = "catch")
# plot of restructured length frequencies
synL... |
#' Reconstruct a track from pitch, heading and depth data, given a starting position
#'
#' This function will use data from a tag to reconstruct a track by fitting a state space model using a Kalman filter. If no x,y observations are provided then this corresponds to a pseudo-track obtained via dead reckoning and extr... | /R/tagtools/R/track3D.R | no_license | yejoo24/TagTools | R | false | false | 8,450 | r | #' Reconstruct a track from pitch, heading and depth data, given a starting position
#'
#' This function will use data from a tag to reconstruct a track by fitting a state space model using a Kalman filter. If no x,y observations are provided then this corresponds to a pseudo-track obtained via dead reckoning and extr... |
#Share & Tell Presentation
#Exploratory Analysis on World Health Report
#Progrmmer: Yagna Venkitasamy
rm(list=ls())
library(rio)
library(moments)
library(tidyverse)
library(corrplot)
library(car)
library(plotly)
library(ggplot2)
library(dplyr)
library(lattice)
library(wildcard)
library(stargazer)
#Da... | /WHR.R | no_license | yagnad/World-Happiness-Report | R | false | false | 7,236 | r | #Share & Tell Presentation
#Exploratory Analysis on World Health Report
#Progrmmer: Yagna Venkitasamy
rm(list=ls())
library(rio)
library(moments)
library(tidyverse)
library(corrplot)
library(car)
library(plotly)
library(ggplot2)
library(dplyr)
library(lattice)
library(wildcard)
library(stargazer)
#Da... |
if (Sys.getenv("CDM5_IMPALA_CDM_SCHEMA") != "") {
library(testthat)
library(FeatureExtraction)
options(dbms = "impala")
options(test = "perPerson")
test_check("FeatureExtraction")
} | /tests/testOnImpalaPerPerson.R | permissive | MaoxueJie/FeatureExtraction | R | false | false | 191 | r | if (Sys.getenv("CDM5_IMPALA_CDM_SCHEMA") != "") {
library(testthat)
library(FeatureExtraction)
options(dbms = "impala")
options(test = "perPerson")
test_check("FeatureExtraction")
} |
# define string formatting
`%--%` <- function(x, y)
# from stack exchange:
# https://stackoverflow.com/questions/46085274/is-there-a-string-formatting-operator-in-r-similar-to-pythons
{
do.call(sprintf, c(list(x), y))
}
results <- data.frame(matrix(0, ncol = 6, nrow = 4))
colnames(results) <- c("BART-Int", "BA... | /figures_code/plot_high_dimensionality.r | permissive | ImperialCollegeLondon/BART-Int | R | false | false | 1,193 | r | # define string formatting
`%--%` <- function(x, y)
# from stack exchange:
# https://stackoverflow.com/questions/46085274/is-there-a-string-formatting-operator-in-r-similar-to-pythons
{
do.call(sprintf, c(list(x), y))
}
results <- data.frame(matrix(0, ncol = 6, nrow = 4))
colnames(results) <- c("BART-Int", "BA... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AzureBlob.R
\name{azureListStorageBlobs}
\alias{azureListStorageBlobs}
\title{List storage blobs for specified storage account.}
\usage{
azureListStorageBlobs(azureActiveContext, storageAccount, storageKey, container,
resourceGroup, subscri... | /man/azureListStorageBlobs.Rd | no_license | gittu4/AzureSMR | R | false | true | 1,327 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AzureBlob.R
\name{azureListStorageBlobs}
\alias{azureListStorageBlobs}
\title{List storage blobs for specified storage account.}
\usage{
azureListStorageBlobs(azureActiveContext, storageAccount, storageKey, container,
resourceGroup, subscri... |
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615836393-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 2,048 | r | testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... |
#################################################################################################################
### Purpose: R program to build the Sections import file
### Author: Nirupam Sharma
### Date: 03/15/2018
### Version: v01
####################################################################################... | /Rcode/Function_SectionFileTemplates.R | no_license | nirupam1sharma/InternshipProject | R | false | false | 2,687 | r | #################################################################################################################
### Purpose: R program to build the Sections import file
### Author: Nirupam Sharma
### Date: 03/15/2018
### Version: v01
####################################################################################... |
# Documenting and Publishing your Data Worksheet
# Preparing Data for Publication
library(tidyverse)
stm_dat <- read_csv("data/StormEvents.csv")
head(stm_dat)
tail(stm_dat)
str(stm_dat)
unique(stm_dat$EVENT_NARRATIVE)
dir.create('storm_project', showWarnings = FALSE)
write_csv(stm_dat, "storm_project/StormEvents_... | /worksheet-10.R | no_license | rmuenich/handouts | R | false | false | 2,584 | r | # Documenting and Publishing your Data Worksheet
# Preparing Data for Publication
library(tidyverse)
stm_dat <- read_csv("data/StormEvents.csv")
head(stm_dat)
tail(stm_dat)
str(stm_dat)
unique(stm_dat$EVENT_NARRATIVE)
dir.create('storm_project', showWarnings = FALSE)
write_csv(stm_dat, "storm_project/StormEvents_... |
# Challenge 03 - "Sums of Pairs"
# 1 Point + 2 Bonus Point
# Challenge Description:
# Now we are given several pairs of values we want to calculate the sum for each pair.
# Bonus:
# Handle the pairs as strings explicitly (i.e. do not read the pairs into a dataframe,
# but read the pairs in as a string and handle app... | /challenges/challenge_03.R | no_license | dallinwebb/dss_coding_challenge | R | false | false | 1,465 | r | # Challenge 03 - "Sums of Pairs"
# 1 Point + 2 Bonus Point
# Challenge Description:
# Now we are given several pairs of values we want to calculate the sum for each pair.
# Bonus:
# Handle the pairs as strings explicitly (i.e. do not read the pairs into a dataframe,
# but read the pairs in as a string and handle app... |
#
# Sami Hossain
# 03/17/2021
# Custom Implementation of Edmonds-Karp's (Maximum Flow) Algorithm
# (Ford-fulkerson Method)
#
##############
### SETUP ##
##############
library(igraph)
library(sna)
#generate a random network graph
graph <- rgraph(7,tp=10/11, mode="digraph") %>%
... | /edmonds-karp-max-flow.R | no_license | Arboghast/Graph-Theory-Algorithms | R | false | false | 3,054 | r | #
# Sami Hossain
# 03/17/2021
# Custom Implementation of Edmonds-Karp's (Maximum Flow) Algorithm
# (Ford-fulkerson Method)
#
##############
### SETUP ##
##############
library(igraph)
library(sna)
#generate a random network graph
graph <- rgraph(7,tp=10/11, mode="digraph") %>%
... |
#' @include arc_bar.R
#' @include shape.R
NULL
#' Circles based on center and radius
#'
#' This set of stats and geoms makes it possible to draw circles based on a
#' center point and a radius. In contrast to using
#' [ggplot2::geom_point()], the size of the circles are related to the
#' coordinate system and not to a... | /R/circle.R | permissive | teunbrand/ggforce | R | false | false | 3,158 | r | #' @include arc_bar.R
#' @include shape.R
NULL
#' Circles based on center and radius
#'
#' This set of stats and geoms makes it possible to draw circles based on a
#' center point and a radius. In contrast to using
#' [ggplot2::geom_point()], the size of the circles are related to the
#' coordinate system and not to a... |
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/1615766031-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... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Correlation/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="mse",alpha=0.25,family="gaussian",standardize=FALSE)
sink('./kidney_038.txt',append=TRUE... | /Model/EN/Correlation/kidney/kidney_038.R | no_license | esbgkannan/QSMART | R | false | false | 351 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Correlation/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="mse",alpha=0.25,family="gaussian",standardize=FALSE)
sink('./kidney_038.txt',append=TRUE... |
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(ggplot2)
# Define UI for application that draws a histogram
ui <- fluidPage(
# Appl... | /workout02/app.R | no_license | stat133-sp19/hw-stat133-leecarol | R | false | false | 7,180 | r | #
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(ggplot2)
# Define UI for application that draws a histogram
ui <- fluidPage(
# Appl... |
`overdominant.default` <-
function (o)
{
if(!inherits(o,"factor")) o<-codominant(o)
if(length(levels(o))==3) # collapses 1+3 vs 2
{
o[o == levels(o)[3]] <- levels(o)[1]
levels(o)[1] <- paste(levels(o)[c(1, 3)], collapse = "-")
o<-factor(o,levels=levels(o)[1:2])
} # if <3 levels, return f... | /R/overdominant.default.R | no_license | xiaolaiyuguo/SNPassoc | R | false | false | 337 | r | `overdominant.default` <-
function (o)
{
if(!inherits(o,"factor")) o<-codominant(o)
if(length(levels(o))==3) # collapses 1+3 vs 2
{
o[o == levels(o)[3]] <- levels(o)[1]
levels(o)[1] <- paste(levels(o)[c(1, 3)], collapse = "-")
o<-factor(o,levels=levels(o)[1:2])
} # if <3 levels, return f... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.