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 |
|---|---|---|---|---|---|---|---|---|---|
#Loading the first sample dataset and plotting the data.
# ================================================================================================================================
dataset4 = read.table(file="svar-set4.dat", header=FALSE)
attach(dataset4)
print(dataset4)
plot(dataset4)
# ========================... | /Parametric Regression/Code/Univariate/asg1_sv4.r | no_license | afcarl/Machine-Learning-Work | R | false | false | 8,514 | r | #Loading the first sample dataset and plotting the data.
# ================================================================================================================================
dataset4 = read.table(file="svar-set4.dat", header=FALSE)
attach(dataset4)
print(dataset4)
plot(dataset4)
# ========================... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/AvgRank/oesophagus.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.03,family="gaussian",standardize=TRUE)
sink('./oesophagus_015.txt',append=T... | /Model/EN/AvgRank/oesophagus/oesophagus_015.R | no_license | esbgkannan/QSMART | R | false | false | 354 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/AvgRank/oesophagus.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.03,family="gaussian",standardize=TRUE)
sink('./oesophagus_015.txt',append=T... |
\name{plot.termstrc_cs}
\Rdversion{1.1}
\alias{plot.termstrc_cs}
\title{S3 Plot Method for Cubic Splines }
\description{
S3 plot method for an object of the class \command{"termstrc_cs"}.
}
\usage{
\method{plot}{termstrc_cs}(x, matrange = c(min(mapply(function(i) min(x$y[[i]][, 1]),
seq(x$n_group))), max(mapply(fu... | /man/plot.termstrc_cs.Rd | no_license | gcamilo/termstrc | R | false | false | 2,639 | rd | \name{plot.termstrc_cs}
\Rdversion{1.1}
\alias{plot.termstrc_cs}
\title{S3 Plot Method for Cubic Splines }
\description{
S3 plot method for an object of the class \command{"termstrc_cs"}.
}
\usage{
\method{plot}{termstrc_cs}(x, matrange = c(min(mapply(function(i) min(x$y[[i]][, 1]),
seq(x$n_group))), max(mapply(fu... |
convert_title <- function(name) {
title <- sub(' ', '', strsplit(name, '[,.]')[[1]][2]);
if (title %in% c('Mlle')) {
return('Miss');
} else if (title %in% c('Mme', 'Mrs')) {
return('Ms');
} else if (title %in% c('Capt', 'Col', 'Don', 'Dr', 'Major', 'Rev', 'Sir',... | /devdataprod/project1/titanic_app/titanic.R | permissive | cowboysmall-moocs/jhudatascience | R | false | false | 1,574 | r |
convert_title <- function(name) {
title <- sub(' ', '', strsplit(name, '[,.]')[[1]][2]);
if (title %in% c('Mlle')) {
return('Miss');
} else if (title %in% c('Mme', 'Mrs')) {
return('Ms');
} else if (title %in% c('Capt', 'Col', 'Don', 'Dr', 'Major', 'Rev', 'Sir',... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities_fsvdraws.R
\name{predh}
\alias{predh}
\title{Predicts factor and idiosyncratic log-volatilities h}
\usage{
predh(x, ahead = 1, each = 1)
}
\arguments{
\item{x}{Object of class \code{'fsvdraws'}, usually resulting from a call
to \cod... | /man/predh.Rd | no_license | gregorkastner/factorstochvol | R | false | true | 1,846 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities_fsvdraws.R
\name{predh}
\alias{predh}
\title{Predicts factor and idiosyncratic log-volatilities h}
\usage{
predh(x, ahead = 1, each = 1)
}
\arguments{
\item{x}{Object of class \code{'fsvdraws'}, usually resulting from a call
to \cod... |
#compile gemini library and reinstall it
library(roxygen2)
library(devtools)
setwd("C:/Users/guoyi/Documents/Code/gemini/gemini")
document()
setwd("..")
install("gemini")
library(gemini)
| /gemini_package_reinstall.R | no_license | yishan-guo/gemini | R | false | false | 188 | r | #compile gemini library and reinstall it
library(roxygen2)
library(devtools)
setwd("C:/Users/guoyi/Documents/Code/gemini/gemini")
document()
setwd("..")
install("gemini")
library(gemini)
|
with(a16ac79ca56b240d38c4812a65500d860, {ROOT <- 'D:/SEMOSS/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/80bb2a25-ac5d-47d0-abfc-b3f3811f0936';FRAME878836[,(c('report_run_end_date','modified_date','created_date','report_run_date')) := lapply(.SD, function(x) as.Date(x, format='... | /80bb2a25-ac5d-47d0-abfc-b3f3811f0936/R/Temp/a1mVUEDI6XSQU.R | no_license | ayanmanna8/test | R | false | false | 420 | r | with(a16ac79ca56b240d38c4812a65500d860, {ROOT <- 'D:/SEMOSS/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/80bb2a25-ac5d-47d0-abfc-b3f3811f0936';FRAME878836[,(c('report_run_end_date','modified_date','created_date','report_run_date')) := lapply(.SD, function(x) as.Date(x, format='... |
defineModule(sim, list(
name = "CBM_dataPrep_RIA",
description = "A data preparation module to format and prepare user-provided input to the SpaDES forest-carbon modelling familly.",
keywords = NA,
authors = c(
person("Celine", "Boisvenue", email = "Celine.Boisvenue@canada.ca", role = c("aut", "cre"))
... | /modules/CBM_dataPrep_RIA/CBM_dataPrep_RIA.R | no_license | ianmseddy/spadesCBM_RIA | R | false | false | 36,480 | r | defineModule(sim, list(
name = "CBM_dataPrep_RIA",
description = "A data preparation module to format and prepare user-provided input to the SpaDES forest-carbon modelling familly.",
keywords = NA,
authors = c(
person("Celine", "Boisvenue", email = "Celine.Boisvenue@canada.ca", role = c("aut", "cre"))
... |
# Implied packages:
require(stats)
require(signal)
require(zoo)
#-----------------------------------------------------------------------------------------
## dense_area_motivation.R
#' Make a dataset to showcase the benefit of having L>0
make_dam_data_2d <- function(N0, out.prc = 0.2,
m... | /experiments/experiment_tools.R | permissive | jutako/multivariate-ci | R | false | false | 6,531 | r |
# Implied packages:
require(stats)
require(signal)
require(zoo)
#-----------------------------------------------------------------------------------------
## dense_area_motivation.R
#' Make a dataset to showcase the benefit of having L>0
make_dam_data_2d <- function(N0, out.prc = 0.2,
m... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ImmuneSpaceR.R
\name{ImmuneSpaceR-package}
\alias{ImmuneSpaceR-package}
\alias{ImmuneSpaceR}
\title{A Thin Wrapper Around ImmuneSpace}
\description{
ImmuneSpaceR provides a convenient API for accessing data sets
within the ImmuneSpace databas... | /man/ImmuneSpaceR-package.Rd | no_license | RGLab/ImmuneSpaceR | R | false | true | 500 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ImmuneSpaceR.R
\name{ImmuneSpaceR-package}
\alias{ImmuneSpaceR-package}
\alias{ImmuneSpaceR}
\title{A Thin Wrapper Around ImmuneSpace}
\description{
ImmuneSpaceR provides a convenient API for accessing data sets
within the ImmuneSpace databas... |
#K means clustering
install.packages("clue")
library(cluster)
library(caTools)
library(clue)
library(rfUtilities)
data = read.csv("Mall_customers.csv")
data = data[4:5]
train_set = data[1:150,] #giving only 75% data
test_set = data[151:200,] #25% for testing
#elbow method : used to find optimum ... | /k_means_clustering.R | no_license | mehul275/ML-USING-R | R | false | false | 1,173 | r | #K means clustering
install.packages("clue")
library(cluster)
library(caTools)
library(clue)
library(rfUtilities)
data = read.csv("Mall_customers.csv")
data = data[4:5]
train_set = data[1:150,] #giving only 75% data
test_set = data[151:200,] #25% for testing
#elbow method : used to find optimum ... |
library(treemap)
ts<-read.table('pages_per_user.txt')
ts$V3<-as.character(runif(length(ts$V2),max=11)+1)
#ts$V3<-as.character(seq(1,length(ts$V2)))
pdf(file="pages_per_user.pdf",width=64,height=48,pointsize=50)
tmPlot(ts,index='V1',vSize='V2',vColor='V1',type='linked',fontsize.labels=200,lowerbound.cex.labels=1,title=... | /monitoring/pages_per_user/plot_pages_per_user.R | no_license | LawrenceSpencer/oldWeather3 | R | false | false | 324 | r | library(treemap)
ts<-read.table('pages_per_user.txt')
ts$V3<-as.character(runif(length(ts$V2),max=11)+1)
#ts$V3<-as.character(seq(1,length(ts$V2)))
pdf(file="pages_per_user.pdf",width=64,height=48,pointsize=50)
tmPlot(ts,index='V1',vSize='V2',vColor='V1',type='linked',fontsize.labels=200,lowerbound.cex.labels=1,title=... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/drop_constant_cols.R
\name{drop_constant_cols}
\alias{drop_constant_cols}
\title{Drop constant columns}
\usage{
drop_constant_cols(DT, copy = FALSE)
}
\arguments{
\item{DT}{A \code{data.table}.}
\item{copy}{(logical, default: \cod... | /man/drop_constant_cols.Rd | no_license | cran/hutils | R | false | true | 1,330 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/drop_constant_cols.R
\name{drop_constant_cols}
\alias{drop_constant_cols}
\title{Drop constant columns}
\usage{
drop_constant_cols(DT, copy = FALSE)
}
\arguments{
\item{DT}{A \code{data.table}.}
\item{copy}{(logical, default: \cod... |
#### ENSEMBLER 1 ####
#### MODEL NNET ZE ZMIENNYMI WOE ####
df <- train_clean %>% select(., default, one_of(zmienne_ens1_woe))
ctrl_nnet <- ctrl
ctrl_nnet$sampling <- "down"
parametry <- expand.grid(
size = seq(4,8,1),
decay = c(10^seq(-4, -1, 1)),
#decay = 10^(-4),
bag = TRUE
)
# zrownoleglenie oblicz... | /skrypty/modele/nnet_ens1.R | no_license | kubasmolik/magisterka | R | false | false | 2,797 | r |
#### ENSEMBLER 1 ####
#### MODEL NNET ZE ZMIENNYMI WOE ####
df <- train_clean %>% select(., default, one_of(zmienne_ens1_woe))
ctrl_nnet <- ctrl
ctrl_nnet$sampling <- "down"
parametry <- expand.grid(
size = seq(4,8,1),
decay = c(10^seq(-4, -1, 1)),
#decay = 10^(-4),
bag = TRUE
)
# zrownoleglenie oblicz... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.R
\name{locationservice}
\alias{locationservice}
\title{Amazon Location Service}
\usage{
locationservice(
config = list(),
credentials = list(),
endpoint = NULL,
region = NULL
)
}
\arguments{
\item{config}{Optional configuration ... | /cran/paws/man/locationservice.Rd | permissive | paws-r/paws | R | false | true | 13,542 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.R
\name{locationservice}
\alias{locationservice}
\title{Amazon Location Service}
\usage{
locationservice(
config = list(),
credentials = list(),
endpoint = NULL,
region = NULL
)
}
\arguments{
\item{config}{Optional configuration ... |
##run second to put all data into useable formats
library(tidyverse)
library(data.table)
#set current wd to saved file location
setwd(dirname(rstudioapi::getSourceEditorContext()$path))
##list all files, both hc and pd, into an array
file_list <- list.files(path="~/PG-400/data2/raw/")
#Take a sample of six subject... | /dataProcessing4f.R | permissive | M1V0/PG-400 | R | false | false | 21,131 | r | ##run second to put all data into useable formats
library(tidyverse)
library(data.table)
#set current wd to saved file location
setwd(dirname(rstudioapi::getSourceEditorContext()$path))
##list all files, both hc and pd, into an array
file_list <- list.files(path="~/PG-400/data2/raw/")
#Take a sample of six subject... |
# GetScalingDocsizeData.r
source("../common/DataUtil.r")
# G E T D A T A
rm(results)
results <- fndfGetGiantData("./")
# Get fewer columns to work with, easier to see.
dat.docsize <- fndfGetDocsizeData(results)
# T A B U L A T E D A T A
# Tabulate columns by copies and sector lifetime.
tbl.docsize <- data.fra... | /oldpictures/largerdocs/GetScalingDocsizeData.r | permissive | MIT-Informatics/PreservationSimulation | R | false | false | 4,036 | r | # GetScalingDocsizeData.r
source("../common/DataUtil.r")
# G E T D A T A
rm(results)
results <- fndfGetGiantData("./")
# Get fewer columns to work with, easier to see.
dat.docsize <- fndfGetDocsizeData(results)
# T A B U L A T E D A T A
# Tabulate columns by copies and sector lifetime.
tbl.docsize <- data.fra... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MultiPhasesGap.R
\name{MultiPhasesGap}
\alias{MultiPhasesGap}
\title{Gap or hiatus between a succession of groups (for groups in temporal order constraint)}
\usage{
MultiPhasesGap(
data,
position_minimum,
position_maximum = position_min... | /man/MultiPhasesGap.Rd | no_license | tsdye/ArchaeoPhases | R | false | true | 1,976 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MultiPhasesGap.R
\name{MultiPhasesGap}
\alias{MultiPhasesGap}
\title{Gap or hiatus between a succession of groups (for groups in temporal order constraint)}
\usage{
MultiPhasesGap(
data,
position_minimum,
position_maximum = position_min... |
##第十二届全国人民代表大会常务委员会 15
#http://www.gov.cn/test/2013-03/14/content_2353702.htm
##中华人民共和国主席 2
#http://www.gov.cn/test/2013-03/14/content_2353936.htm
## 中华人民共和国国务院 11
#http://www.gov.cn/test/2013-03/16/content_2355707.htm
## 中华人民共和国中央军事委员会 3
#http://www.gov.cn/test/2013-03/14/content_2354022.htm
## 人民法院和人民检察院 1
#... | /face/leader_face_get.R | no_license | xxxw567/myRproj | R | false | false | 4,570 | r | ##第十二届全国人民代表大会常务委员会 15
#http://www.gov.cn/test/2013-03/14/content_2353702.htm
##中华人民共和国主席 2
#http://www.gov.cn/test/2013-03/14/content_2353936.htm
## 中华人民共和国国务院 11
#http://www.gov.cn/test/2013-03/16/content_2355707.htm
## 中华人民共和国中央军事委员会 3
#http://www.gov.cn/test/2013-03/14/content_2354022.htm
## 人民法院和人民检察院 1
#... |
library(toxEval)
library(dplyr)
library(ggplot2)
library(tidyr)
library(grid)
get_colors <- function(){
cbValues <- c("#DCDA4B","#999999","#00FFFF","#CEA226","#CC79A7","#4E26CE",
"#FFFF00","#78C15A","#79AEAE","#FF0000","#00FF00","#B1611D",
"#FFA500","#F4426e")
return(cbValues)
}
be... | /30_reports/src/create_figures.R | permissive | srcorsi-USGS/GLRI_CEC_2016 | R | false | false | 15,873 | r | library(toxEval)
library(dplyr)
library(ggplot2)
library(tidyr)
library(grid)
get_colors <- function(){
cbValues <- c("#DCDA4B","#999999","#00FFFF","#CEA226","#CC79A7","#4E26CE",
"#FFFF00","#78C15A","#79AEAE","#FF0000","#00FF00","#B1611D",
"#FFA500","#F4426e")
return(cbValues)
}
be... |
############################################################
# Automatic calculation of NBR reference composites
#
# by Alexandra Erbach, BFH-HAFL
############################################################
start_time <- Sys.time()
setwd("~/Digital-Forest-Monitoring/methods")
# source functions
source("use-case2/bu... | /methods/use-case2/build_composites_main.R | permissive | HousyHarry/Digital-Forest-Monitoring | R | false | false | 837 | r | ############################################################
# Automatic calculation of NBR reference composites
#
# by Alexandra Erbach, BFH-HAFL
############################################################
start_time <- Sys.time()
setwd("~/Digital-Forest-Monitoring/methods")
# source functions
source("use-case2/bu... |
require(mxnet)
require(argparse)
get_iterator <- function(data.shape) {
data_dir <- args$data_dir
data.shape <- data.shape
train <- mx.io.ImageRecordIter(
path.imgrec = paste0(data_dir, "train.rec"),
batch.size = args$batch_size,
data.shape = data.shape,
rand.crop = TRUE,
... | /example/image-classification/train_cifar10.R | permissive | Jopyth/BMXNet | R | false | false | 4,279 | r | require(mxnet)
require(argparse)
get_iterator <- function(data.shape) {
data_dir <- args$data_dir
data.shape <- data.shape
train <- mx.io.ImageRecordIter(
path.imgrec = paste0(data_dir, "train.rec"),
batch.size = args$batch_size,
data.shape = data.shape,
rand.crop = TRUE,
... |
rm(list=ls())
## Need these for Rscript
library(microbenchmark)
library(rstiefel)
library(tidyverse)
library(cowplot)
library(colorspace)
source("fit-subspace.R")
source("generateData.R")
source("subspace-functions.R")
########################################################
############# Data Generation ###########... | /initialization_simulations.R | no_license | afranks86/shared-subspace | R | false | false | 2,847 | r | rm(list=ls())
## Need these for Rscript
library(microbenchmark)
library(rstiefel)
library(tidyverse)
library(cowplot)
library(colorspace)
source("fit-subspace.R")
source("generateData.R")
source("subspace-functions.R")
########################################################
############# Data Generation ###########... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{simdf_elra}
\alias{simdf_elra}
\title{Simulated data with cumulative effects}
\format{
An object of class \code{nested_fdf} (inherits from \code{sim_df}, \code{tbl_df}, \code{tbl}, \code{data.frame}) with 250 rows ... | /man/simdf_elra.Rd | permissive | adibender/pammtools | R | false | true | 658 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{simdf_elra}
\alias{simdf_elra}
\title{Simulated data with cumulative effects}
\format{
An object of class \code{nested_fdf} (inherits from \code{sim_df}, \code{tbl_df}, \code{tbl}, \code{data.frame}) with 250 rows ... |
#' @name sparseHessianFD-package
#' @aliases sparseHessianFD-package
#' @docType package
#' @title Estimate sparse Hessians using finite differences of
#' gradients.
#' @description Estimate sparse Hessians using finite differences of
#' gradients.
#' @details The Hessian is returned as a sparse Matrix
#' (dgCMatrix-c... | /R/sparseHessianFD.R | no_license | braunm/sparseHessianFD | R | false | false | 1,775 | r |
#' @name sparseHessianFD-package
#' @aliases sparseHessianFD-package
#' @docType package
#' @title Estimate sparse Hessians using finite differences of
#' gradients.
#' @description Estimate sparse Hessians using finite differences of
#' gradients.
#' @details The Hessian is returned as a sparse Matrix
#' (dgCMatrix-c... |
#' Escape a JS String
#'
#' Escape a String to be sent to JavaScript
#' @param text The text to escape
#'
#' @author Jeff Allen \email{jeff@@trestletech.com}
jsQuote <- function(text){
toReturn <- shQuote(text)
toReturn <- gsub('\f', '\\\\f', toReturn)
toReturn <- gsub('\r', '\\\\r', toReturn)
gsub('\n', '\\\... | /R/js-quote.R | permissive | DivadNojnarg/shinyAce | R | false | false | 336 | r | #' Escape a JS String
#'
#' Escape a String to be sent to JavaScript
#' @param text The text to escape
#'
#' @author Jeff Allen \email{jeff@@trestletech.com}
jsQuote <- function(text){
toReturn <- shQuote(text)
toReturn <- gsub('\f', '\\\\f', toReturn)
toReturn <- gsub('\r', '\\\\r', toReturn)
gsub('\n', '\\\... |
setwd('C:\\Users\\sprot\\Documents\\GitHub\\yTest\\Autodesk_Adoption-yifu_test\\Jan_8')
#setwd to 2018_first_week
load("dataset.RData")
library(tidyverse)
library(lubridate)
library(forcats)
library(scales)
library(purrr)
library(RColorBrewer)
library(stringr)
Sys.setlocale("LC_ALL","English")
#------------------------... | /Collection_Analysis/codes/product_update.R | no_license | xuhzhang0918/Practicum_Project_Autodesk_Adoption | R | false | false | 11,292 | r | setwd('C:\\Users\\sprot\\Documents\\GitHub\\yTest\\Autodesk_Adoption-yifu_test\\Jan_8')
#setwd to 2018_first_week
load("dataset.RData")
library(tidyverse)
library(lubridate)
library(forcats)
library(scales)
library(purrr)
library(RColorBrewer)
library(stringr)
Sys.setlocale("LC_ALL","English")
#------------------------... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pt.R
\name{pt.cut0}
\alias{pt.cut0}
\title{pt.cut0}
\usage{
pt.cut0(pt, tStart = -Inf, tEnd = Inf)
}
\arguments{
\item{pt}{PitchTier object}
\item{tStart}{beginning time of interval to be cut (default \code{-Inf} = cut from the \code{tmin} o... | /man/pt.cut0.Rd | permissive | bbTomas/rPraat | R | false | true | 1,278 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pt.R
\name{pt.cut0}
\alias{pt.cut0}
\title{pt.cut0}
\usage{
pt.cut0(pt, tStart = -Inf, tEnd = Inf)
}
\arguments{
\item{pt}{PitchTier object}
\item{tStart}{beginning time of interval to be cut (default \code{-Inf} = cut from the \code{tmin} o... |
N <- 21
y <-
c(-0.555520423880492, -0.45409063421027,
-0.375325065475225, -0.303736167223768, -0.2524249642909,
-0.151959094900659, -0.0940523684788975,
-0.0444270215906998, -0.00626377764661846,
0.0217870444656814, 0.110156331678157, 0.44741105318946,
0.452878033816443, 0.470356109365662, 0.484353094306456,
0.5004290... | /revision_2/code/calls/mix.data.R | no_license | jrlewi/brlm_paper | R | false | false | 728 | r | N <- 21
y <-
c(-0.555520423880492, -0.45409063421027,
-0.375325065475225, -0.303736167223768, -0.2524249642909,
-0.151959094900659, -0.0940523684788975,
-0.0444270215906998, -0.00626377764661846,
0.0217870444656814, 0.110156331678157, 0.44741105318946,
0.452878033816443, 0.470356109365662, 0.484353094306456,
0.5004290... |
library(hdnom)
### Name: hdnom.validate
### Title: Validate High-Dimensional Cox Models with Time-Dependent AUC
### Aliases: hdnom.validate
### ** Examples
library("survival")
# Load imputed SMART data
data(smart)
x = as.matrix(smart[, -c(1, 2)])[1:500, ]
time = smart$TEVENT[1:500]
event = smart$EVENT[1:500]
y = S... | /data/genthat_extracted_code/hdnom/examples/hdnom.validate.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,799 | r | library(hdnom)
### Name: hdnom.validate
### Title: Validate High-Dimensional Cox Models with Time-Dependent AUC
### Aliases: hdnom.validate
### ** Examples
library("survival")
# Load imputed SMART data
data(smart)
x = as.matrix(smart[, -c(1, 2)])[1:500, ]
time = smart$TEVENT[1:500]
event = smart$EVENT[1:500]
y = S... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/change_e.r
\name{change_e}
\alias{change_e}
\title{Methods to alter which parameters are estimated in a SS3 \code{.ctl} file.}
\usage{
change_e(ctl_file_in = "em.ctl", ctl_file_out = "em.ctl", dat_list = NULL,
for_file_in = "forecasts.ss", ... | /man/change_e.Rd | no_license | heavywatal/ss3sim | R | false | true | 6,541 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/change_e.r
\name{change_e}
\alias{change_e}
\title{Methods to alter which parameters are estimated in a SS3 \code{.ctl} file.}
\usage{
change_e(ctl_file_in = "em.ctl", ctl_file_out = "em.ctl", dat_list = NULL,
for_file_in = "forecasts.ss", ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{e_inspect}
\alias{e_inspect}
\alias{echarts_from_json}
\title{To & From JSON}
\usage{
e_inspect(e, json = FALSE, ...)
echarts_from_json(txt)
}
\arguments{
\item{e}{An \code{echarts4r} object as returned by \code{\link{e_chart... | /man/echartsNJSON.Rd | permissive | Japrin/echarts4r | R | false | true | 1,344 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{e_inspect}
\alias{e_inspect}
\alias{echarts_from_json}
\title{To & From JSON}
\usage{
e_inspect(e, json = FALSE, ...)
echarts_from_json(txt)
}
\arguments{
\item{e}{An \code{echarts4r} object as returned by \code{\link{e_chart... |
library(DescTools)
DID_NB2_mean <- function(can_type,...) {
#generate random number
R_year = floor(mean(Mode(floor(runif(99, 2012, 2016)))))
#select bd_law year
if ( R_year == 2012) {
bd_law = ms$bd_2012
} else if ( R_year==2013) {
bd_law = ms$bd_2013
} else if ( R_year == 2014) {
... | /r code/final_means_sim_up.R | no_license | jsemprini/breastdensity | R | false | false | 7,206 | r | library(DescTools)
DID_NB2_mean <- function(can_type,...) {
#generate random number
R_year = floor(mean(Mode(floor(runif(99, 2012, 2016)))))
#select bd_law year
if ( R_year == 2012) {
bd_law = ms$bd_2012
} else if ( R_year==2013) {
bd_law = ms$bd_2013
} else if ( R_year == 2014) {
... |
#' Find and remove empty columns and/or rows
#'
#' @param mydf data.table; if it is a data.frame it will be converted into a data.table
#' @return data.table without empty rows and columns
#' @export
#' @examples
#' dempty(mydf)
dempty = function(mydf) {
if(!is.data.table(mydf)) {
warning("Sorry, I want a data.... | /R/dempty.R | no_license | chrisorwa/crud | R | false | false | 950 | r | #' Find and remove empty columns and/or rows
#'
#' @param mydf data.table; if it is a data.frame it will be converted into a data.table
#' @return data.table without empty rows and columns
#' @export
#' @examples
#' dempty(mydf)
dempty = function(mydf) {
if(!is.data.table(mydf)) {
warning("Sorry, I want a data.... |
library("ggplot2")
# Generate a scatter plot – have population on the X axis,
# the percent over 18 on the y axis,
# and the size & color represent the murder rate
scplot <- ggplot(clean_data_merged, aes(x= population, y = percentOver18))
scplot <- scplot + geom_point(aes(size = Murder, color = Murder))
scplot <- scpl... | /scatter_plot.R | no_license | fall2018-saltz/ist687_homework_6 | R | false | false | 358 | r |
library("ggplot2")
# Generate a scatter plot – have population on the X axis,
# the percent over 18 on the y axis,
# and the size & color represent the murder rate
scplot <- ggplot(clean_data_merged, aes(x= population, y = percentOver18))
scplot <- scplot + geom_point(aes(size = Murder, color = Murder))
scplot <- scpl... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dots-ellipsis.R
\name{check_dots_unnamed}
\alias{check_dots_unnamed}
\title{Check that all dots are unnamed}
\usage{
check_dots_unnamed(
env = caller_env(),
error = NULL,
call = caller_env(),
action = abort
)
}
\arguments{
\item{env}{... | /man/check_dots_unnamed.Rd | permissive | seankross/rlang | R | false | true | 1,298 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dots-ellipsis.R
\name{check_dots_unnamed}
\alias{check_dots_unnamed}
\title{Check that all dots are unnamed}
\usage{
check_dots_unnamed(
env = caller_env(),
error = NULL,
call = caller_env(),
action = abort
)
}
\arguments{
\item{env}{... |
#' min with NA handling
#'
#' @param ... numeric or character vector
#' @return minimum or NA if all values are NA
#' @export
#'
#' @examples
#' min_na(2, 3, NA)
#' min_na(NA, NA)
min_na <- function(...) {
if (all(is.na(c(...)))) {
return(NA)
}
min(..., na.rm = TRUE)
}
#' max with NA handling
#'
#' @param .... | /R/min_max.R | permissive | jakubnowicki/dibbler | R | false | false | 867 | r | #' min with NA handling
#'
#' @param ... numeric or character vector
#' @return minimum or NA if all values are NA
#' @export
#'
#' @examples
#' min_na(2, 3, NA)
#' min_na(NA, NA)
min_na <- function(...) {
if (all(is.na(c(...)))) {
return(NA)
}
min(..., na.rm = TRUE)
}
#' max with NA handling
#'
#' @param .... |
# @file PackageMaintenance
#
# Copyright 2020 Observational Health Data Sciences and Informatics
#
# This file is part of PatientLevelPrediction
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License ... | /extras/PackageMaintenance.R | permissive | Owain-S/PatientLevelPrediction | R | false | false | 6,561 | r | # @file PackageMaintenance
#
# Copyright 2020 Observational Health Data Sciences and Informatics
#
# This file is part of PatientLevelPrediction
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License ... |
#1. loading required library and data
library(dplyr)
library(ggplot2)
house_1=read.csv("C:/Users/I340968/Desktop/ed-code/R programming-elective/Week_5/housingdata_v2.0.csv")
View(house_1)
#2. Understanding data structure
nrow(house_1)
summary(house_1)
names(house_1)
str(house_1)
#3. Scatter plot creadite record on x-... | /R_programming-elective/Week_5/week_5_Case_study.R | no_license | janakiraam/R_Programming_Basics | R | false | false | 4,170 | r | #1. loading required library and data
library(dplyr)
library(ggplot2)
house_1=read.csv("C:/Users/I340968/Desktop/ed-code/R programming-elective/Week_5/housingdata_v2.0.csv")
View(house_1)
#2. Understanding data structure
nrow(house_1)
summary(house_1)
names(house_1)
str(house_1)
#3. Scatter plot creadite record on x-... |
##' R-MongoDB driver
##'
##' Provides an interface to MongoDB for R
##'
##' @name rmongodb-package
##' @aliases rmongodb-package rmongodb
##' @export mongo.binary.function
##' @export mongo.binary.md5
##' @export mongo.binary.old
##' @export mongo.binary.user
##' @export mongo.binary.uuid
##' @export mongo.bson.eoo m... | /rmongodb/R/rmongodb-package.R | permissive | kenahoo/rmongodb | R | false | false | 24,005 | r | ##' R-MongoDB driver
##'
##' Provides an interface to MongoDB for R
##'
##' @name rmongodb-package
##' @aliases rmongodb-package rmongodb
##' @export mongo.binary.function
##' @export mongo.binary.md5
##' @export mongo.binary.old
##' @export mongo.binary.user
##' @export mongo.binary.uuid
##' @export mongo.bson.eoo m... |
library(tidyr)
library(dplyr)
library(ggplot2); theme_set(theme_bw())
library(gridExtra)
source("ebola_param_seminr.R")
load("seminr_full_sim.rda")
load("seminr_full_mle_example.rda")
scale_colour_discrete <- function(...,palette="Dark2") scale_colour_brewer(...,palette=palette)
scale_fill_discrete <- function(...,pa... | /contact_trace/seminr_full_example_fig.R | no_license | parksw3/networkSEIR | R | false | false | 2,312 | r | library(tidyr)
library(dplyr)
library(ggplot2); theme_set(theme_bw())
library(gridExtra)
source("ebola_param_seminr.R")
load("seminr_full_sim.rda")
load("seminr_full_mle_example.rda")
scale_colour_discrete <- function(...,palette="Dark2") scale_colour_brewer(...,palette=palette)
scale_fill_discrete <- function(...,pa... |
source("/home/bsuuv/Opinnot/RUOVA/Tutkimus/tutkimusanalyysi_apufunktioita.R")
#Luetaan data muuttujaan
data <- formatRUOVAData("/home/bsuuv/Opinnot/RUOVA/Tutkimus/tutkimusdata.xlsx", luvut = TRUE)
data <- yhdistaKuvat(data)
#Kategorisoidaan terveellisyys
data$Terveellinen[data$Terveellinen >= 0.67] <- "Terveellinen"... | /main_analysis_categorised.R | no_license | ArttuOll/Eating-Behavior-Questionnaire-Analysis | R | false | false | 2,489 | r | source("/home/bsuuv/Opinnot/RUOVA/Tutkimus/tutkimusanalyysi_apufunktioita.R")
#Luetaan data muuttujaan
data <- formatRUOVAData("/home/bsuuv/Opinnot/RUOVA/Tutkimus/tutkimusdata.xlsx", luvut = TRUE)
data <- yhdistaKuvat(data)
#Kategorisoidaan terveellisyys
data$Terveellinen[data$Terveellinen >= 0.67] <- "Terveellinen"... |
stems <- 0
veg <- 0
lake <- 1
linpred_pq <- 0.75 + -0.14 * stems + -0.88 * veg + 2.15 * lake
linpred_cq <- -2.56 + 0.06 * stems + 1.27 * veg - 2.02 * lake
zero_prob_q = 1/ (1 + exp( - linpred_pq ) )
exp(linpred_cq * zero_prob_q) - 0.1757492
| /src/analysis_3_habitat_correlates_of_snail_density/R/Dev/expected_count.R | no_license | dondealban/Wood_et_al_2019_PNAS | R | false | false | 246 | r |
stems <- 0
veg <- 0
lake <- 1
linpred_pq <- 0.75 + -0.14 * stems + -0.88 * veg + 2.15 * lake
linpred_cq <- -2.56 + 0.06 * stems + 1.27 * veg - 2.02 * lake
zero_prob_q = 1/ (1 + exp( - linpred_pq ) )
exp(linpred_cq * zero_prob_q) - 0.1757492
|
################# server for ShinyApp to explore clinical accuracy and clinical utility ################
# inputs
#
# DxCondition
# DxTestName
# prevalence
# n
# sensitivity
# specificity
# DxRuleInDecision
# RuleInDecisionThreshold
# IndeterminateDecision
# DxRuleOutDecision
# RuleOutDecisionThreshold
shinyServer... | /ShinyApps/Archive/archive_from utility app/server.R | no_license | NIHRDECncl/R-tools | R | false | false | 16,572 | r | ################# server for ShinyApp to explore clinical accuracy and clinical utility ################
# inputs
#
# DxCondition
# DxTestName
# prevalence
# n
# sensitivity
# specificity
# DxRuleInDecision
# RuleInDecisionThreshold
# IndeterminateDecision
# DxRuleOutDecision
# RuleOutDecisionThreshold
shinyServer... |
#' Suitable for ANOVA:
#' The function AverageWithNoisePerCase averages: each original dependent
#' variable value (Y) and random noise that is drawn for each GROUP from a
#' distribution that is based on the mean(Y) and sd(Y).
#'
#' @param df_original # original dataframe
#' @param y # name of dependent varia... | /R/blindDataAnova_AverageWithNoisePerGroup.R | no_license | rjbderooij/blindData_Git | R | false | false | 2,141 | r | #' Suitable for ANOVA:
#' The function AverageWithNoisePerCase averages: each original dependent
#' variable value (Y) and random noise that is drawn for each GROUP from a
#' distribution that is based on the mean(Y) and sd(Y).
#'
#' @param df_original # original dataframe
#' @param y # name of dependent varia... |
library(covsep)
### Name: rmtnorm
### Title: Generate a sample from a Matrix Gaussian distribution
### Aliases: rmtnorm
### ** Examples
Data = rmtnorm(30, C1, C2)
| /data/genthat_extracted_code/covsep/examples/rmtnorm.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 170 | r | library(covsep)
### Name: rmtnorm
### Title: Generate a sample from a Matrix Gaussian distribution
### Aliases: rmtnorm
### ** Examples
Data = rmtnorm(30, C1, C2)
|
context("Lints")
if (requireNamespace("lintr",quietly = TRUE)) {
test_that("Package has good style (no lints)", {
lintr::expect_lint_free()
})
}
| /tests/testthat/test-lints.R | no_license | cran/Wmisc | R | false | false | 161 | r | context("Lints")
if (requireNamespace("lintr",quietly = TRUE)) {
test_that("Package has good style (no lints)", {
lintr::expect_lint_free()
})
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ProbitSpatial.R
\docType{package}
\name{ProbitSpatial-package}
\alias{ProbitSpatial}
\alias{ProbitSpatial-package}
\title{Probit with Spatial Dependence, SAR, SEM, and SARAR Models.}
\description{
\code{ProbitSpatial} package allows to fit sp... | /man/ProbitSpatial-package.Rd | no_license | cran/ProbitSpatial | R | false | true | 4,753 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ProbitSpatial.R
\docType{package}
\name{ProbitSpatial-package}
\alias{ProbitSpatial}
\alias{ProbitSpatial-package}
\title{Probit with Spatial Dependence, SAR, SEM, and SARAR Models.}
\description{
\code{ProbitSpatial} package allows to fit sp... |
\name{timeEvent-class}
\alias{timeEvent-class}
\alias{==,timeEvent,timeEvent-method}
\alias{Math2,timeEvent-method}
\alias{Math,timeEvent-method}
\alias{Ops,ANY,timeEvent-method}
\alias{Ops,timeEvent,ANY-method}
\alias{Summary,timeEvent-method}
\alias{[<-,timeEvent,ANY,ANY,timeEvent-method}
\alias{coerce,positionsCalen... | /man/class.event.Rd | no_license | cran/splusTimeDate | R | false | false | 2,001 | rd | \name{timeEvent-class}
\alias{timeEvent-class}
\alias{==,timeEvent,timeEvent-method}
\alias{Math2,timeEvent-method}
\alias{Math,timeEvent-method}
\alias{Ops,ANY,timeEvent-method}
\alias{Ops,timeEvent,ANY-method}
\alias{Summary,timeEvent-method}
\alias{[<-,timeEvent,ANY,ANY,timeEvent-method}
\alias{coerce,positionsCalen... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/class.R
\name{Enrichment-class}
\alias{Enrichment-class}
\alias{enrichment}
\alias{enrichment,ANY-method}
\title{An S4 class \linkS4class{Enrichment}}
\description{
This class is defined to summarize the enrichment analysis on each chromosome... | /man/Enrichment-class.Rd | no_license | aldembert/snpEnrichment | R | false | true | 3,227 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/class.R
\name{Enrichment-class}
\alias{Enrichment-class}
\alias{enrichment}
\alias{enrichment,ANY-method}
\title{An S4 class \linkS4class{Enrichment}}
\description{
This class is defined to summarize the enrichment analysis on each chromosome... |
library(NlsyLinks)
### Name: Links79PairExpanded
### Title: Kinship linking file for pairs of relatives. It builds upon the
### 'Links79Pair' dataset.
### Aliases: Links79PairExpanded
### Keywords: datasets
### ** Examples
library(NlsyLinks) #Load the package into the current R session.
olderR <- Links79PairExp... | /data/genthat_extracted_code/NlsyLinks/examples/Links79PairExpanded.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 845 | r | library(NlsyLinks)
### Name: Links79PairExpanded
### Title: Kinship linking file for pairs of relatives. It builds upon the
### 'Links79Pair' dataset.
### Aliases: Links79PairExpanded
### Keywords: datasets
### ** Examples
library(NlsyLinks) #Load the package into the current R session.
olderR <- Links79PairExp... |
#
#======================= Initialize EM algorithm
#
# Copyright (C) 2021 - Michael Fop
init_em <- function(learn, parameters, data, H, hc_start, init)
# Initialization for the EM algorithm
{
Xnames <- colnames(learn$sigma[,,1])
varnames <- colnames(data)
obs <- match( Xnames, varnames )
ext <- match( setd... | /R/init_em.R | no_license | michaelfop/damda | R | false | false | 6,692 | r | #
#======================= Initialize EM algorithm
#
# Copyright (C) 2021 - Michael Fop
init_em <- function(learn, parameters, data, H, hc_start, init)
# Initialization for the EM algorithm
{
Xnames <- colnames(learn$sigma[,,1])
varnames <- colnames(data)
obs <- match( Xnames, varnames )
ext <- match( setd... |
setwd("G:\\math\\514")
source("hw5_514.r")
mtrain <- read.csv("G:\\math\\mnist_train.csv" , header = F)
x <- unname( mtrain[,-1] )
x <- t(x)
x <- x / 255
y <- as.matrix( unname( mtrain[,1] ))
fit <- nnet1.fit.batch( x , (y) , 1 , 2000 , 30 , 10, .15,
Activation = relu, Output = stable.softmax); beep("coin")
y... | /sm.R | no_license | mleibert/514 | R | false | false | 2,495 | r | setwd("G:\\math\\514")
source("hw5_514.r")
mtrain <- read.csv("G:\\math\\mnist_train.csv" , header = F)
x <- unname( mtrain[,-1] )
x <- t(x)
x <- x / 255
y <- as.matrix( unname( mtrain[,1] ))
fit <- nnet1.fit.batch( x , (y) , 1 , 2000 , 30 , 10, .15,
Activation = relu, Output = stable.softmax); beep("coin")
y... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatialPlot.R
\name{.select_subspot_positions}
\alias{.select_subspot_positions}
\title{Helper to pull out subspot position columns
Probably redundant with select_spot_positions above, but we need subspot.idx}
\usage{
.select_subspot_position... | /man/dot-select_subspot_positions.Rd | permissive | JunqiangWang/BayesSpace | R | false | true | 613 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatialPlot.R
\name{.select_subspot_positions}
\alias{.select_subspot_positions}
\title{Helper to pull out subspot position columns
Probably redundant with select_spot_positions above, but we need subspot.idx}
\usage{
.select_subspot_position... |
library(dplyr)
# Read file
activity <- read.table("./UCI HAR Dataset/activity_labels.txt")
feature <- read.table("./UCI HAR Dataset/features.txt")
testSubject <- read.table("./UCI HAR Dataset/test/subject_test.txt")
testActivity <- read.table("./UCI HAR Dataset/test/y_test.txt")
testMeasure <- read.table("./UCI HAR Da... | /run_analysis.R | no_license | XiaoqiZhang963/Getting-and-cleaning-data | R | false | false | 1,411 | r | library(dplyr)
# Read file
activity <- read.table("./UCI HAR Dataset/activity_labels.txt")
feature <- read.table("./UCI HAR Dataset/features.txt")
testSubject <- read.table("./UCI HAR Dataset/test/subject_test.txt")
testActivity <- read.table("./UCI HAR Dataset/test/y_test.txt")
testMeasure <- read.table("./UCI HAR Da... |
library(tidyverse)
fs::dir_create("data")
f <- "data/epsa2023-program.tsv"
if (!fs::file_exists(f)) {
"https://raw.githubusercontent.com/briatte/epsa2023/master/data/program.tsv" %>%
download.file(f, mode = "wb")
}
d <- readr::read_tsv(f, col_types = cols(.default = "c"))
# edges ---------------------------... | /05-import-epsa2023.r | no_license | briatte/epsaconf | R | false | false | 2,418 | r | library(tidyverse)
fs::dir_create("data")
f <- "data/epsa2023-program.tsv"
if (!fs::file_exists(f)) {
"https://raw.githubusercontent.com/briatte/epsa2023/master/data/program.tsv" %>%
download.file(f, mode = "wb")
}
d <- readr::read_tsv(f, col_types = cols(.default = "c"))
# edges ---------------------------... |
library(ggplot2)
library(ggpubr)
library(reshape2)
ggplot(melt(table(tcga_clinical[,c("CANCER_TYPE_ACRONYM","dicer_muts")])),
aes(x=factor(CANCER_TYPE_ACRONYM,levels=rownames(data.frame(sort(rowSums(table(tcga_clinical[,c("CANCER_TYPE_ACRONYM","dicer_muts")])[,c(1,2,3,5,6)]) /
... | /TCGA_DICER_BARPLOT_CODE.R | no_license | dicerhotspot/code | R | false | false | 1,698 | r | library(ggplot2)
library(ggpubr)
library(reshape2)
ggplot(melt(table(tcga_clinical[,c("CANCER_TYPE_ACRONYM","dicer_muts")])),
aes(x=factor(CANCER_TYPE_ACRONYM,levels=rownames(data.frame(sort(rowSums(table(tcga_clinical[,c("CANCER_TYPE_ACRONYM","dicer_muts")])[,c(1,2,3,5,6)]) /
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PIExtendedTimedValue.r
\name{PIExtendedTimedValue}
\alias{PIExtendedTimedValue}
\title{Generate an instance of the PIExtendedTimedValue PI Web API class}
\usage{
PIExtendedTimedValue(annotations = NULL, timestamp = NULL,
units... | /man/PIExtendedTimedValue.Rd | permissive | eddyrene/PI-Web-API-Client-R | R | false | true | 1,143 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/PIExtendedTimedValue.r
\name{PIExtendedTimedValue}
\alias{PIExtendedTimedValue}
\title{Generate an instance of the PIExtendedTimedValue PI Web API class}
\usage{
PIExtendedTimedValue(annotations = NULL, timestamp = NULL,
units... |
p <- function()
{
#dataLoc <- "http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
#download.file(dataLoc, "power.zip")
unzipDataLoc <- unzip("power.zip")
#Reading in between the dates
data <- read.csv(unzipDataLoc, na.strings = "?", skip=66637, nrow=2880, col.names = ... | /project1.R | no_license | RachelBunder/ExData_Plotting1 | R | false | false | 2,257 | r |
p <- function()
{
#dataLoc <- "http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
#download.file(dataLoc, "power.zip")
unzipDataLoc <- unzip("power.zip")
#Reading in between the dates
data <- read.csv(unzipDataLoc, na.strings = "?", skip=66637, nrow=2880, col.names = ... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.99939408264402e-241, 1.97274569258757e-154, 5.47446293784591e+109, 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), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta... | /CNull/inst/testfiles/communities_individual_based_sampling_beta_interleaved_matrices/AFL_communities_individual_based_sampling_beta_interleaved_matrices/communities_individual_based_sampling_beta_interleaved_matrices_valgrind_files/1615838643-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 363 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.99939408264402e-241, 1.97274569258757e-154, 5.47446293784591e+109, 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), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_based_sampling_beta... |
context("sfg_to_multipolygon")
test_that("sfg multipolygon",{
l1 <- matrix(c(0,0,0,1,1,1,1,0,0,0), ncol = 2, byrow = T)
l2 <- matrix(c(2,2,2,5,5,5,5,2,2,2), ncol = 2, byrow = T)
l3 <- matrix(c(3,3,3,4,4,4,4,3,3,3), ncol = 2, byrow = T)
l1 <- cbind(1, l1)
l2 <- cbind(1, l2)
l3 <- cbind(2, l3)
l1 <- cbind... | /tests/testthat/test-sfg_to_multipolygon.R | no_license | nemochina2008/sfheaders | R | false | false | 886 | r | context("sfg_to_multipolygon")
test_that("sfg multipolygon",{
l1 <- matrix(c(0,0,0,1,1,1,1,0,0,0), ncol = 2, byrow = T)
l2 <- matrix(c(2,2,2,5,5,5,5,2,2,2), ncol = 2, byrow = T)
l3 <- matrix(c(3,3,3,4,4,4,4,3,3,3), ncol = 2, byrow = T)
l1 <- cbind(1, l1)
l2 <- cbind(1, l2)
l3 <- cbind(2, l3)
l1 <- cbind... |
getVarReclassification <-
function (object,data,Outcome="Class", type = c("LOGIT", "LM","COX"),testData=NULL)
{
if (is.null(testData))
{
testData <- data;
}
model_zidi <- vector();
model_znri <- vector();
model_idi <- vector();
model_nri <- vector();
t.model_zidi <- vector();
t.model_znri ... | /R/getVarReclassification.R | no_license | Sandy4321/FRESA.CAD | R | false | false | 2,207 | r | getVarReclassification <-
function (object,data,Outcome="Class", type = c("LOGIT", "LM","COX"),testData=NULL)
{
if (is.null(testData))
{
testData <- data;
}
model_zidi <- vector();
model_znri <- vector();
model_idi <- vector();
model_nri <- vector();
t.model_zidi <- vector();
t.model_znri ... |
#' Google Map Url
#'
#' Opens a Google Map in a browser
#'
#' @param center vector of lat/lon coordinates which defines the centre of the map window
#' @param zoom number that sets the zoom level of the map (from 0 to 21)
#' @param basemap defines the typ eof map to display.
#' @param layer defines an extra layer to d... | /R/google_map_urls.R | no_license | guzhongru/googleway | R | false | false | 9,995 | r |
#' Google Map Url
#'
#' Opens a Google Map in a browser
#'
#' @param center vector of lat/lon coordinates which defines the centre of the map window
#' @param zoom number that sets the zoom level of the map (from 0 to 21)
#' @param basemap defines the typ eof map to display.
#' @param layer defines an extra layer to d... |
#'Test heterozygosity at each locus
#'@details This function test the heterozygosity of each individuals at each locus.Output a table and Usually followed by write.csv(as.data.frame(y),file = "~/*.csv") to export the results.
#'@usage Heterozygous(x,sep)
#'@param x a dataset of genotypes with rownames of sample ID and ... | /R/Heterozygous.R | no_license | ice4prince/mixIndependR | R | false | false | 1,228 | r | #'Test heterozygosity at each locus
#'@details This function test the heterozygosity of each individuals at each locus.Output a table and Usually followed by write.csv(as.data.frame(y),file = "~/*.csv") to export the results.
#'@usage Heterozygous(x,sep)
#'@param x a dataset of genotypes with rownames of sample ID and ... |
test_that("check find_similar_colour() for Euclidean distance", {
expect_equal(find_similar_colour("green3"), "green3")
expect_equal(find_similar_colour("#56d4a7"), "aquamarine3")
expect_equal(find_similar_colour(c(63, 135, 253)), "royalblue1")
expect_equal(find_similar_colour(col2rgb("blue2")), "blue2")
})
te... | /revdep/checks/ibawds/new/ibawds.Rcheck/tests/testthat/test-find_similar_colour.R | no_license | friendly/HistData | R | false | false | 2,261 | r | test_that("check find_similar_colour() for Euclidean distance", {
expect_equal(find_similar_colour("green3"), "green3")
expect_equal(find_similar_colour("#56d4a7"), "aquamarine3")
expect_equal(find_similar_colour(c(63, 135, 253)), "royalblue1")
expect_equal(find_similar_colour(col2rgb("blue2")), "blue2")
})
te... |
#Loading the rvest package
library(rvest)
# Specifying the url for desired website to be scrapped
url <- "https://www.onepetro.org/search?start=0&q=neural+networks&from_year=&peer_reviewed=&published_between=&rows=999&to_year="
form_input <- list(dummy = "dummy", query = "?q=", peer_reviewed = "peer_reviewed=",
... | /R/url.R | no_license | libiner/petro.One | R | false | false | 9,017 | r |
#Loading the rvest package
library(rvest)
# Specifying the url for desired website to be scrapped
url <- "https://www.onepetro.org/search?start=0&q=neural+networks&from_year=&peer_reviewed=&published_between=&rows=999&to_year="
form_input <- list(dummy = "dummy", query = "?q=", peer_reviewed = "peer_reviewed=",
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/assess_models.R
\name{assess_models}
\alias{assess_models}
\title{Create Model Assessment}
\usage{
assess_models(...)
}
\arguments{
\item{...}{Models generated by the \code{\link{language_model}} function, and/or two-column dataframes with a ... | /man/assess_models.Rd | no_license | nlanderson9/languagePredictR | R | false | true | 2,179 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/assess_models.R
\name{assess_models}
\alias{assess_models}
\title{Create Model Assessment}
\usage{
assess_models(...)
}
\arguments{
\item{...}{Models generated by the \code{\link{language_model}} function, and/or two-column dataframes with a ... |
#' Retrieve and repair names
#'
#' @description
#'
#' `vec_as_names()` takes a character vector of names and repairs it
#' according to the `repair` argument. It is the r-lib and tidyverse
#' equivalent of [base::make.names()].
#'
#' vctrs deals with a few levels of name repair:
#'
#' * `minimal` names exist. The `name... | /R/names.R | no_license | rcodo/vctrs | R | false | false | 17,837 | r | #' Retrieve and repair names
#'
#' @description
#'
#' `vec_as_names()` takes a character vector of names and repairs it
#' according to the `repair` argument. It is the r-lib and tidyverse
#' equivalent of [base::make.names()].
#'
#' vctrs deals with a few levels of name repair:
#'
#' * `minimal` names exist. The `name... |
w <- data.frame(mtcars)
w
dput(w)
dput(w, file= "~/Actuaria 3er Semestre/Programacion/Programacion_Actuarial_III/Carros.R")
x <- dget(file ="~/Actuaria 3er Semestre/Programacion/Programacion_Actuarial_III/Carros.R")
CarrosCarolina <- data.frame(x)
| /Lectura y Escritura de Datos.R | no_license | CarolinaGM/Programacion_Actuarial_III | R | false | false | 248 | r | w <- data.frame(mtcars)
w
dput(w)
dput(w, file= "~/Actuaria 3er Semestre/Programacion/Programacion_Actuarial_III/Carros.R")
x <- dget(file ="~/Actuaria 3er Semestre/Programacion/Programacion_Actuarial_III/Carros.R")
CarrosCarolina <- data.frame(x)
|
/非参数统计/第二章 单总体位置参数的推断/6.Wilcoxon符号秩检验.r | no_license | tiny-boat/my-R-code | R | false | false | 659 | r | ||
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/runittotestthat-package.R
\docType{package}
\name{runittotestthat}
\alias{runittotestthat}
\alias{runittotestthat-package}
\title{Convert RUnit tests to testthat tests.}
\description{
\code{testthat} has some nice features lik... | /man/runittotestthat.Rd | no_license | cran/runittotestthat | R | false | false | 1,135 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/runittotestthat-package.R
\docType{package}
\name{runittotestthat}
\alias{runittotestthat}
\alias{runittotestthat-package}
\title{Convert RUnit tests to testthat tests.}
\description{
\code{testthat} has some nice features lik... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SDPSyn.R
\name{good.sample.parameters}
\alias{good.sample.parameters}
\title{Select only arguments for sampling.}
\usage{
good.sample.parameters(method, synparameters)
}
\arguments{
\item{method}{a string. currently only method="ctree".}
\it... | /man/good.sample.parameters.Rd | no_license | DanielBonnery/BigSyn | R | false | true | 561 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SDPSyn.R
\name{good.sample.parameters}
\alias{good.sample.parameters}
\title{Select only arguments for sampling.}
\usage{
good.sample.parameters(method, synparameters)
}
\arguments{
\item{method}{a string. currently only method="ctree".}
\it... |
facet_wrap <- function(p, pad=0.05) {
# get facet font attributes
th = theme_get()
if (length(p$theme) > 0L)
th = th + p$theme
require("grid")
grobs <- ggplotGrob(p)
# wrap strip x text
if ((class(p$facet)[1] == "grid" && !is.null(names(p$facet$cols))) ||
class(p$facet)[1] == "wrap")
{
... | /facet_wrap.R | no_license | sarance/R | R | false | false | 2,582 | r | facet_wrap <- function(p, pad=0.05) {
# get facet font attributes
th = theme_get()
if (length(p$theme) > 0L)
th = th + p$theme
require("grid")
grobs <- ggplotGrob(p)
# wrap strip x text
if ((class(p$facet)[1] == "grid" && !is.null(names(p$facet$cols))) ||
class(p$facet)[1] == "wrap")
{
... |
# Input: DEEP results
# Output: average number of nodes
library(matrixStats)
# data_name = 'US_census'
# data_name = 'marketing_campaign'
# data_name = 'email_analytics'
# data_name = 'email_analytics_women'
# data_name = 'email_analytics_men'
# data_name = 'adult_binary'
# data_name = 'criteo_uplift'
# d... | /real_world_data/sz102_count_patterns.R | no_license | JuliusZSS/DEEP_2021 | R | false | false | 1,244 | r | # Input: DEEP results
# Output: average number of nodes
library(matrixStats)
# data_name = 'US_census'
# data_name = 'marketing_campaign'
# data_name = 'email_analytics'
# data_name = 'email_analytics_women'
# data_name = 'email_analytics_men'
# data_name = 'adult_binary'
# data_name = 'criteo_uplift'
# d... |
#'@title Render Depth of Field
#'
#'@description Adds depth of field to the current RGL scene by simulating a synthetic aperture.
#'
#'The size of the circle of confusion is determined by the following formula (z_depth is from the image's depth map).
#'
#'\code{abs(z_depth-focus)*focal_length^2/(f_stop*z_depth*(focus ... | /R/render_depth.R | no_license | lazycrazyowl/rayshader | R | false | false | 3,933 | r | #'@title Render Depth of Field
#'
#'@description Adds depth of field to the current RGL scene by simulating a synthetic aperture.
#'
#'The size of the circle of confusion is determined by the following formula (z_depth is from the image's depth map).
#'
#'\code{abs(z_depth-focus)*focal_length^2/(f_stop*z_depth*(focus ... |
# This tests that the C++ code for emptyDrops does what it says it does.
# library(DropletUtils); library(testthat); source("test-empty.R")
test_that("multinomial calculations are correct without alpha", {
set.seed(1000)
prop <- runif(100)
X <- matrix(rpois(100000, lambda=prop*2), nrow=length(prop))
#... | /tests/testthat/test-empty.R | no_license | friedue/DropletUtils | R | false | false | 9,478 | r | # This tests that the C++ code for emptyDrops does what it says it does.
# library(DropletUtils); library(testthat); source("test-empty.R")
test_that("multinomial calculations are correct without alpha", {
set.seed(1000)
prop <- runif(100)
X <- matrix(rpois(100000, lambda=prop*2), nrow=length(prop))
#... |
pcaClass <- R6::R6Class(
"pcaClass",
inherit = pcaBase,
private = list(
#### Member variables ----
analysis = 'pca',
eigen = NULL,
simEigen = NULL,
#### Init + run functions ----
.init = function() {
private$.initLoadingsTable()
priv... | /R/pca.b.R | no_license | jonathon-love/jmv | R | false | false | 14,814 | r |
pcaClass <- R6::R6Class(
"pcaClass",
inherit = pcaBase,
private = list(
#### Member variables ----
analysis = 'pca',
eigen = NULL,
simEigen = NULL,
#### Init + run functions ----
.init = function() {
private$.initLoadingsTable()
priv... |
library(ICcalib)
### Name: FitCalibCoxRS
### Title: Fitting Proportional Hazards Risk-Set Calibration Models with
### Covariates
### Aliases: FitCalibCoxRS FitCalibCoxRSInts
### ** Examples
set.seed(2)
sim.data <- ICcalib:::SimCoxIntervalCensCox(n.sample = 50, lambda = 0.1,
... | /data/genthat_extracted_code/ICcalib/examples/FitCalibCoxRSInts.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,368 | r | library(ICcalib)
### Name: FitCalibCoxRS
### Title: Fitting Proportional Hazards Risk-Set Calibration Models with
### Covariates
### Aliases: FitCalibCoxRS FitCalibCoxRSInts
### ** Examples
set.seed(2)
sim.data <- ICcalib:::SimCoxIntervalCensCox(n.sample = 50, lambda = 0.1,
... |
## Helper function for predict.
## Assert that we can use old model (data.tmb0) as basis for
## predictions using the new data (data.tmb1):
assertIdenticalModels <- function(data.tmb1, data.tmb0, allow.new.levels=FALSE) {
## Check terms. Only 'blockReps' and 'blockSize' are allowed to
## change. Note that we a... | /R/predict.R | no_license | cran/glmmTMB | R | false | false | 19,475 | r | ## Helper function for predict.
## Assert that we can use old model (data.tmb0) as basis for
## predictions using the new data (data.tmb1):
assertIdenticalModels <- function(data.tmb1, data.tmb0, allow.new.levels=FALSE) {
## Check terms. Only 'blockReps' and 'blockSize' are allowed to
## change. Note that we a... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helper-functions.R
\name{createFromSCE}
\alias{createFromSCE}
\title{Creates a `TreeViz`` object from `SingleCellExperiment`. Generates
clusters based on Walktrap algorithm if no default is provided}
\usage{
createFromSCE(
object,
check_c... | /man/createFromSCE.Rd | no_license | animesh/scTreeViz | R | false | true | 1,477 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helper-functions.R
\name{createFromSCE}
\alias{createFromSCE}
\title{Creates a `TreeViz`` object from `SingleCellExperiment`. Generates
clusters based on Walktrap algorithm if no default is provided}
\usage{
createFromSCE(
object,
check_c... |
#########################################
## ##
## Analyse information extraction task ##
## ##
#########################################
library(openxlsx)
library(xtable)
library(gridExtra)
library(coefplot)
library(dummies)
library(nnet)
library... | /2_iet_analysis.R | no_license | rayduch/Nativist-policy-Trumpian-politics | R | false | false | 7,868 | r | #########################################
## ##
## Analyse information extraction task ##
## ##
#########################################
library(openxlsx)
library(xtable)
library(gridExtra)
library(coefplot)
library(dummies)
library(nnet)
library... |
#' Summary of the results obtained from Tariff algorithm
#'
#' This function prints the summary message of the fitted results.
#'
#' @param object fitted object from \code{\link{tariff}}
#' @param top number of top CSMF to show
#' @param id the ID of a specific death to show
#' @param ... not used
#' @keywords Tariff
#... | /Tariff/R/Tarrif.summary.r | no_license | ingted/R-Examples | R | false | false | 2,201 | r | #' Summary of the results obtained from Tariff algorithm
#'
#' This function prints the summary message of the fitted results.
#'
#' @param object fitted object from \code{\link{tariff}}
#' @param top number of top CSMF to show
#' @param id the ID of a specific death to show
#' @param ... not used
#' @keywords Tariff
#... |
#' Keras backend tensor engine
#'
#' Obtain a reference to the `keras.backend` Python module used to implement
#' tensor operations.
#'
#' @inheritParams reticulate::import
#'
#' @note See the documentation here <https://keras.io/backend/> for
#' additional details on the available functions.
#'
#' @return Refere... | /R/backend.R | no_license | LeeGyeongTak/keras | R | false | false | 72,351 | r |
#' Keras backend tensor engine
#'
#' Obtain a reference to the `keras.backend` Python module used to implement
#' tensor operations.
#'
#' @inheritParams reticulate::import
#'
#' @note See the documentation here <https://keras.io/backend/> for
#' additional details on the available functions.
#'
#' @return Refere... |
smk.test <-
function(x){
## Copyright (C) 2015, 2016 Thorsten Pohlert
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your... | /trend/R/smk.test.R | no_license | ingted/R-Examples | R | false | false | 1,300 | r | smk.test <-
function(x){
## Copyright (C) 2015, 2016 Thorsten Pohlert
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as published by
## the Free Software Foundation, either version 3 of the License, or
## (at your... |
#' Maximum utility method
#'
#' Maximum utility method to estimate market shares
#' @param conjanal A conjanal object
#' @param simp A data frame of scenarios
#' @return A matrix of scenarios and the estimated market shares
#' @export
maxconj<-function(conjanal,simp) {
fit.conj<-conjanal$lm
#predicted unil... | /R/max.conjanal.R | no_license | cwkwanstat/conjanal | R | false | false | 728 | r | #' Maximum utility method
#'
#' Maximum utility method to estimate market shares
#' @param conjanal A conjanal object
#' @param simp A data frame of scenarios
#' @return A matrix of scenarios and the estimated market shares
#' @export
maxconj<-function(conjanal,simp) {
fit.conj<-conjanal$lm
#predicted unil... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/whatsforlunch.R
\name{set_my_lunch_alerts}
\alias{set_my_lunch_alerts}
\title{Customize lunch alerts}
\usage{
set_my_lunch_alerts(alerts, append = T)
}
\arguments{
\item{alerts}{character vector of food alerts.}
\item{append}{add to previous... | /man/set_my_lunch_alerts.Rd | no_license | T-Engel/lunch | R | false | true | 491 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/whatsforlunch.R
\name{set_my_lunch_alerts}
\alias{set_my_lunch_alerts}
\title{Customize lunch alerts}
\usage{
set_my_lunch_alerts(alerts, append = T)
}
\arguments{
\item{alerts}{character vector of food alerts.}
\item{append}{add to previous... |
#' Fit a simple, non-informative model
#'
#' Fit a single mean or largest class model. `nullmodel()` is the underlying
#' computational function for the `null_model()` specification.
#'
#' `nullmodel()` emulates other model building functions, but returns the
#' simplest model possible given a training set: a single me... | /R/nullmodel.R | no_license | patr1ckm/parsnip | R | false | false | 5,810 | r | #' Fit a simple, non-informative model
#'
#' Fit a single mean or largest class model. `nullmodel()` is the underlying
#' computational function for the `null_model()` specification.
#'
#' `nullmodel()` emulates other model building functions, but returns the
#' simplest model possible given a training set: a single me... |
wt <-
function(x, start = 1, dt = 1, dj = 1/20,
lowerPeriod = 2*dt, upperPeriod = floor(length(x)*dt/3),
make.pval = T, method = "white.noise", params = NULL,
n.sim = 100, save.sim = F, outfile) {
########################################################... | /R/wt.R | no_license | jjuod/WaveletComp | R | false | false | 3,859 | r | wt <-
function(x, start = 1, dt = 1, dj = 1/20,
lowerPeriod = 2*dt, upperPeriod = floor(length(x)*dt/3),
make.pval = T, method = "white.noise", params = NULL,
n.sim = 100, save.sim = F, outfile) {
########################################################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{depression}
\alias{depression}
\title{Fabricated Multidimensional Depression Scale}
\format{A polytomous response data set with 2000 examinees and 20 items.
\describe{The item names range from "item1" to "item20". ... | /man/depression.Rd | no_license | zhengchengfan/hemp | R | false | true | 897 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{depression}
\alias{depression}
\title{Fabricated Multidimensional Depression Scale}
\format{A polytomous response data set with 2000 examinees and 20 items.
\describe{The item names range from "item1" to "item20". ... |
#' Custom conditions for vctrs package
#'
#' These functions are called for their side effect of raising
#' errors and warnings.
#' These conditions have custom classes and structures to make
#' testing easier.
#'
#' @param x,y Vectors
#' @param details Any additional human readable details
#' @param subclass Use if yo... | /R/conditions.R | no_license | dpprdan/vctrs | R | false | false | 12,031 | r | #' Custom conditions for vctrs package
#'
#' These functions are called for their side effect of raising
#' errors and warnings.
#' These conditions have custom classes and structures to make
#' testing easier.
#'
#' @param x,y Vectors
#' @param details Any additional human readable details
#' @param subclass Use if yo... |
# Copyright 2019 Battelle Memorial Institute; see the LICENSE file.
#' module_climate_xml_hector_xml
#'
#' Construct XML data structure for \code{hector.xml}.
#'
#' @param command API command to execute
#' @param ... other optional parameters, depending on command
#' @return Depends on \code{command}: either a vector ... | /input/gcamdata/R/zclimate_xml_hector.R | permissive | JGCRI/gcam-core | R | false | false | 1,207 | r | # Copyright 2019 Battelle Memorial Institute; see the LICENSE file.
#' module_climate_xml_hector_xml
#'
#' Construct XML data structure for \code{hector.xml}.
#'
#' @param command API command to execute
#' @param ... other optional parameters, depending on command
#' @return Depends on \code{command}: either a vector ... |
library(glmnet)
mydata = read.table("./TrainingSet/RF/soft_tissue.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.05,family="gaussian",standardize=FALSE)
sink('./Model/EN/Classifier/soft_tissue/soft_tissue_022.t... | /Model/EN/Classifier/soft_tissue/soft_tissue_022.R | no_license | leon1003/QSMART | R | false | false | 366 | r | library(glmnet)
mydata = read.table("./TrainingSet/RF/soft_tissue.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.05,family="gaussian",standardize=FALSE)
sink('./Model/EN/Classifier/soft_tissue/soft_tissue_022.t... |
#' Author: Ted Kwartler
#' Date: 4-3-2019
#' Purpose: Demonstrate getting json API information
# Libraries
library(jsonlite)
library(pbapply)
# Options
options(stringsAsFactors = F)
# www.newsapi.org Key
apiKey <- 'c6166540623e4588b2b8b53143c1299a'
# Top headlines in the US endpoint:
usURL <- paste0('https://newsap... | /Lessons/I_APIs_NewDataSources_ReportingAutomation/scripts/2_newsAPI_example.R | no_license | guptasan98/Harvard_DataMining_Business_Student | R | false | false | 1,531 | r | #' Author: Ted Kwartler
#' Date: 4-3-2019
#' Purpose: Demonstrate getting json API information
# Libraries
library(jsonlite)
library(pbapply)
# Options
options(stringsAsFactors = F)
# www.newsapi.org Key
apiKey <- 'c6166540623e4588b2b8b53143c1299a'
# Top headlines in the US endpoint:
usURL <- paste0('https://newsap... |
% Generated by roxygen2 (4.0.0): do not edit by hand
\name{nnetClassification}
\alias{nnetClassification}
\alias{nnetPrediction}
\title{nnet classification}
\usage{
nnetClassification(object, assessRes, scores = c("prediction", "all", "none"),
decay, size, fcol = "markers", ...)
}
\arguments{
\item{object}{An instanc... | /man/nnetClassification.Rd | no_license | tnaake/pRoloc | R | false | false | 1,680 | rd | % Generated by roxygen2 (4.0.0): do not edit by hand
\name{nnetClassification}
\alias{nnetClassification}
\alias{nnetPrediction}
\title{nnet classification}
\usage{
nnetClassification(object, assessRes, scores = c("prediction", "all", "none"),
decay, size, fcol = "markers", ...)
}
\arguments{
\item{object}{An instanc... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/subnational_nid_subset.R
\name{subnational_nid_subset}
\alias{subnational_nid_subset}
\title{FUNCTION_TITLE}
\usage{
subnational_nid_subset(df)
}
\arguments{
\item{df}{PARAM_DESCRIPTION}
}
\value{
OUTPUT_DESCRIPTION
}
\description{
FUNCTION_D... | /mbg/mbg_core_code/mbg_central/LBDCore/man/subnational_nid_subset.Rd | no_license | The-Oxford-GBD-group/typhi_paratyphi_modelling_code | R | false | true | 414 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/subnational_nid_subset.R
\name{subnational_nid_subset}
\alias{subnational_nid_subset}
\title{FUNCTION_TITLE}
\usage{
subnational_nid_subset(df)
}
\arguments{
\item{df}{PARAM_DESCRIPTION}
}
\value{
OUTPUT_DESCRIPTION
}
\description{
FUNCTION_D... |
rm(list = ls())
library(utils)
#'''Read an lara text file and write an spectra file for PENELOPE''''
####..... Input data ....#####
nuclide1 = "Am-241" # nucliede "symbol-massnumber-m/D(If needed)"
nuclide2 = "Cs-137" # nucliede "symbol-massnumber-m/D(If needed)"
nuclide3 = "Eu-152" # nucliede "symbol-massnumber-m/D(... | /laradata_nodownload_allnuclides.r | no_license | hasanmoudud/laradata_read | R | false | false | 3,323 | r | rm(list = ls())
library(utils)
#'''Read an lara text file and write an spectra file for PENELOPE''''
####..... Input data ....#####
nuclide1 = "Am-241" # nucliede "symbol-massnumber-m/D(If needed)"
nuclide2 = "Cs-137" # nucliede "symbol-massnumber-m/D(If needed)"
nuclide3 = "Eu-152" # nucliede "symbol-massnumber-m/D(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-movie.R
\docType{data}
\name{movie_84}
\alias{movie_84}
\title{Barry Lyndon}
\format{igraph object}
\source{
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3
https://www.imdb.com/title/tt0072684
}
\usage{
... | /man/movie_84.Rd | permissive | physthoth/networkdata | R | false | true | 648 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data-movie.R
\docType{data}
\name{movie_84}
\alias{movie_84}
\title{Barry Lyndon}
\format{igraph object}
\source{
https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3
https://www.imdb.com/title/tt0072684
}
\usage{
... |
## First create a special type of matrix that will cache its inverse once it is computed
## Then a matching solve function is created to compute and cache the inverse (or use existing cached value)
## Makes a special matrix where the inverse is cached when possible
makeCacheMatrix <- function(x = matrix()) {
# cre... | /cachematrix.R | no_license | stephmajor/ProgrammingAssignment2 | R | false | false | 1,295 | r | ## First create a special type of matrix that will cache its inverse once it is computed
## Then a matching solve function is created to compute and cache the inverse (or use existing cached value)
## Makes a special matrix where the inverse is cached when possible
makeCacheMatrix <- function(x = matrix()) {
# cre... |
# Testcase 166
Data_1 <- matrix(c(7,3,5,6,7,8,10,
4,8,2,1,3,2,4,
1,7,5,5,6,7,8,
2,1,4,8,3,5,4),byrow=TRUE, nrow=4);
Input = matrix(c(7,5,7,
4,2,3,
1,5,6,
2,4,3), byrow = TRUE, nrow = 4);
Output... | /2_nsbm_approach/Nsbm.function/tests/Test_case_166.R | no_license | thomaskrupa/thesis | R | false | false | 1,877 | r | # Testcase 166
Data_1 <- matrix(c(7,3,5,6,7,8,10,
4,8,2,1,3,2,4,
1,7,5,5,6,7,8,
2,1,4,8,3,5,4),byrow=TRUE, nrow=4);
Input = matrix(c(7,5,7,
4,2,3,
1,5,6,
2,4,3), byrow = TRUE, nrow = 4);
Output... |
#=================================================Summary Tab=================================================
#' @title Server logic of shiny web application
#' @description This function implements the complete server logic. All calculations (MDS-visualization, PCA visualisation,
#' silhouette measure calculation, si... | /Taxonomy/R/Server_logic.R | no_license | DDTD-IS/DDTD-IS | R | false | false | 23,116 | r | #=================================================Summary Tab=================================================
#' @title Server logic of shiny web application
#' @description This function implements the complete server logic. All calculations (MDS-visualization, PCA visualisation,
#' silhouette measure calculation, si... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.