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 |
|---|---|---|---|---|---|---|---|---|---|
#1.1
#i)
x <- rnorm(100, -1, sqrt(2.5))
e <- rnorm(100, 0, sqrt(3))
y <- 2.5 + 2 * x + e
par(mfrow = c(1,1))
plot(x, y, xlab = "x", ylab = "y", pch = 20, main = "1.1 Y versus X")
abline(model <- lm(y ~ x))
#ii)
abline(mod25 <- lm(y[1:25] ~ x[1:25]), col = "red")
abline(mod25 <- lm(y[26:100] ~ x[26:100... | /Pset2.R | no_license | Karagul/Applied-Regression-Analysis | R | false | false | 2,303 | r | #1.1
#i)
x <- rnorm(100, -1, sqrt(2.5))
e <- rnorm(100, 0, sqrt(3))
y <- 2.5 + 2 * x + e
par(mfrow = c(1,1))
plot(x, y, xlab = "x", ylab = "y", pch = 20, main = "1.1 Y versus X")
abline(model <- lm(y ~ x))
#ii)
abline(mod25 <- lm(y[1:25] ~ x[1:25]), col = "red")
abline(mod25 <- lm(y[26:100] ~ x[26:100... |
#' BSI - Bare Soil Index
#'
#' BSI can be used for soil mapping and crop identification. This index relates the Blue, Red, Near Infrared and Short Wave Infrared bands.
#'
#' @param B A raster layer object with the reflectance values for the Blue band.
#' @param R A raster layer object with the reflectance values f... | /R/BSI.R | no_license | cran/nightmares | R | false | false | 1,651 | r | #' BSI - Bare Soil Index
#'
#' BSI can be used for soil mapping and crop identification. This index relates the Blue, Red, Near Infrared and Short Wave Infrared bands.
#'
#' @param B A raster layer object with the reflectance values for the Blue band.
#' @param R A raster layer object with the reflectance values f... |
#
# EE622: Advanced Machine Learning
# Prof. Amit Sethi
# Assignment 1: HDLSS Lung Cancer Data Analysis
#
# Name: Duddu Sai Meher Karthik
# Roll No. : 130101084
#
#
library(Biobase)
library(GEOquery)
library(glmnet) #for models + regularization
library(mice) #for data imputation
library(lattice) #for 1D... | /HDLSS_Cancer/AnalyzeGDS2771_130101084.R | no_license | gokart23/ML | R | false | false | 11,492 | r | #
# EE622: Advanced Machine Learning
# Prof. Amit Sethi
# Assignment 1: HDLSS Lung Cancer Data Analysis
#
# Name: Duddu Sai Meher Karthik
# Roll No. : 130101084
#
#
library(Biobase)
library(GEOquery)
library(glmnet) #for models + regularization
library(mice) #for data imputation
library(lattice) #for 1D... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 5829
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 5829
c
c Input Parameter (command line, file):
c input filename QBFLIB/Letombe/Abduction/par16-5-c-50.qdimacs
c output filename... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Letombe/Abduction/par16-5-c-50/par16-5-c-50.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 622 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 5829
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 5829
c
c Input Parameter (command line, file):
c input filename QBFLIB/Letombe/Abduction/par16-5-c-50.qdimacs
c output filename... |
\name{SoilWeb_spatial_query}
\alias{SoilWeb_spatial_query}
\title{Get SSURGO Data via Spatial Query}
\description{Get SSURGO Data via Spatial Query to SoilWeb}
\usage{
SoilWeb_spatial_query(bbox = NULL, coords = NULL, what = "mapunit", source = "soilweb")
}
\arguments{
\item{bbox}{a bounding box in WGS8... | /man/SSURGO_spatial_query.Rd | no_license | bocinsky/soilDB | R | false | false | 1,447 | rd | \name{SoilWeb_spatial_query}
\alias{SoilWeb_spatial_query}
\title{Get SSURGO Data via Spatial Query}
\description{Get SSURGO Data via Spatial Query to SoilWeb}
\usage{
SoilWeb_spatial_query(bbox = NULL, coords = NULL, what = "mapunit", source = "soilweb")
}
\arguments{
\item{bbox}{a bounding box in WGS8... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/twitter.senator.R
\docType{data}
\name{twitter.senator}
\alias{twitter.senator}
\title{Senator Information Data}
\format{A data frame with 91 rows and 4 variables:
\describe{
\item{ screen_name }{ character: Twitter screen name }
\item{ nam... | /man/twitter.senator.Rd | no_license | sugano-nu/qss-package | R | false | true | 1,080 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/twitter.senator.R
\docType{data}
\name{twitter.senator}
\alias{twitter.senator}
\title{Senator Information Data}
\format{A data frame with 91 rows and 4 variables:
\describe{
\item{ screen_name }{ character: Twitter screen name }
\item{ nam... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unstructured_interpolation.R
\name{triangular_interpolation}
\alias{triangular_interpolation}
\title{Function for various types of triangular ['linear'] interpolation of unstructured data.}
\usage{
triangular_interpolation(xy, vals, newPts, u... | /R/rptha/man/triangular_interpolation.Rd | permissive | GeoscienceAustralia/ptha | R | false | true | 3,130 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unstructured_interpolation.R
\name{triangular_interpolation}
\alias{triangular_interpolation}
\title{Function for various types of triangular ['linear'] interpolation of unstructured data.}
\usage{
triangular_interpolation(xy, vals, newPts, u... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/util.R
\name{select}
\alias{select}
\title{Very simple select for mbtools artifacts. Just gets a particular entry.}
\usage{
select(object, entry)
}
\arguments{
\item{object}{A mbtools artifact returned from a workflow step.}
\item{entry}{The... | /man/select.Rd | permissive | Gibbons-Lab/mbtools | R | false | true | 469 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/util.R
\name{select}
\alias{select}
\title{Very simple select for mbtools artifacts. Just gets a particular entry.}
\usage{
select(object, entry)
}
\arguments{
\item{object}{A mbtools artifact returned from a workflow step.}
\item{entry}{The... |
# Folling R:
mgm <- NULL
mgmfit <- NULL
# Null function:
null <- function(...) NULL
### IsingFit ###
# prep fun (make binary if needed):
binarize <- function(x, split = "median", na.rm=TRUE, removeNArows = TRUE, verbose = TRUE){
x <- as.data.frame(x)
if (all(unlist(x) %in% c(0,1))){
return(x)
} else {
... | /R/defaultFunctions.R | no_license | tkasci/bootnet | R | false | false | 24,739 | r | # Folling R:
mgm <- NULL
mgmfit <- NULL
# Null function:
null <- function(...) NULL
### IsingFit ###
# prep fun (make binary if needed):
binarize <- function(x, split = "median", na.rm=TRUE, removeNArows = TRUE, verbose = TRUE){
x <- as.data.frame(x)
if (all(unlist(x) %in% c(0,1))){
return(x)
} else {
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{cytogenetic_bands}
\alias{cytogenetic_bands}
\title{GRCh38 human cytogenetic bands.}
\format{
A data frame with 862 rows and 8 variables:
\describe{
\item{cytogenetic_band}{Cytogenetic band name. See \emph{Cytoge... | /man/cytogenetic_bands.Rd | permissive | ramiromagno/gwasrapidd | R | false | true | 2,448 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{cytogenetic_bands}
\alias{cytogenetic_bands}
\title{GRCh38 human cytogenetic bands.}
\format{
A data frame with 862 rows and 8 variables:
\describe{
\item{cytogenetic_band}{Cytogenetic band name. See \emph{Cytoge... |
## The RAINLINK package. Retrieval algorithm for rainfall mapping from microwave links
## in a cellular communication network.
##
## Version 1.21
## Copyright (C) 2021 Aart Overeem
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as publ... | /Run.R | no_license | ludodiender/RAINLINK | R | false | false | 25,480 | r | ## The RAINLINK package. Retrieval algorithm for rainfall mapping from microwave links
## in a cellular communication network.
##
## Version 1.21
## Copyright (C) 2021 Aart Overeem
##
## This program is free software: you can redistribute it and/or modify
## it under the terms of the GNU General Public License as publ... |
library(ffbase)
### Name: within.ffdf
### Title: Evaluate an expression in a ffdf data environment
### Aliases: within.ffdf
### ** Examples
ffdat <- as.ffdf(data.frame(x=1:10, y=10:1))
# add z to the ffdat
within(ffdat, {z <- x+y})
| /data/genthat_extracted_code/ffbase/examples/within.ffdf.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 240 | r | library(ffbase)
### Name: within.ffdf
### Title: Evaluate an expression in a ffdf data environment
### Aliases: within.ffdf
### ** Examples
ffdat <- as.ffdf(data.frame(x=1:10, y=10:1))
# add z to the ffdat
within(ffdat, {z <- x+y})
|
# Lyon A2018
#
# Simulation loi binomiale negative composée
#
#
# loi de M : binomiale negative
qq<-0.5
rr<-2
EM<-rr*(1-qq)/qq
VarM<-EM/qq
# loi de B : lognormale
mu<-log(10)-0.405
sig<-0.9
EB<-exp(mu+(sig^2)/2)
EB2<-exp(2*mu+2*(sig^2))
VarB<-EB2-EB^2
EX<-EM*EB
VarX<-EM*VarB+VarM*(EB^2)
c(EM,EB,... | /LyonA2018_CodesR_2018-11-07 Binomiale Negative Composee Sinistres Loi LNorm.R | no_license | emarceau/ISFA2019 | R | false | false | 1,660 | r | # Lyon A2018
#
# Simulation loi binomiale negative composée
#
#
# loi de M : binomiale negative
qq<-0.5
rr<-2
EM<-rr*(1-qq)/qq
VarM<-EM/qq
# loi de B : lognormale
mu<-log(10)-0.405
sig<-0.9
EB<-exp(mu+(sig^2)/2)
EB2<-exp(2*mu+2*(sig^2))
VarB<-EB2-EB^2
EX<-EM*EB
VarX<-EM*VarB+VarM*(EB^2)
c(EM,EB,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/03AnalysisClass.R
\docType{methods}
\name{getlongformatminmaxconstructeddata}
\alias{getlongformatminmaxconstructeddata}
\alias{getlongformatminmaxconstructeddata,AnalysisClass-method}
\title{getlongformatminmaxconstructeddata}
\usage{
getlon... | /man/getlongformatminmaxconstructeddata.Rd | no_license | mvattulainen/preproviz | R | false | true | 616 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/03AnalysisClass.R
\docType{methods}
\name{getlongformatminmaxconstructeddata}
\alias{getlongformatminmaxconstructeddata}
\alias{getlongformatminmaxconstructeddata,AnalysisClass-method}
\title{getlongformatminmaxconstructeddata}
\usage{
getlon... |
library(dplyr)
library(reshape)
# set my work directory
wkdir <- setwd("~/Coursera/JHU-DS/GettingCleaningData/wk4")
# file handling
file <- file.path("./", "uci-dataset.zip")
dataset_dir <- file.path("./" , "UCI HAR Dataset")
if (!file.exists(file)){
url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectf... | /GettingCleaningData/wk4/run_analysis.R | no_license | rockyanlin/GettingCleaningData | R | false | false | 2,647 | r | library(dplyr)
library(reshape)
# set my work directory
wkdir <- setwd("~/Coursera/JHU-DS/GettingCleaningData/wk4")
# file handling
file <- file.path("./", "uci-dataset.zip")
dataset_dir <- file.path("./" , "UCI HAR Dataset")
if (!file.exists(file)){
url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectf... |
# HW, - adapted by UN - Estimating Abundance from multiple sampling capture recatpure data via multi-state
# simulating capture recapture data
require(pracma)
# ------------------------------------------------------------------------------
# Code to generate multi-state (multi-period) CRM data for 2 genders
# --... | /simdata_UN_01112019.r | no_license | UlrikeNaumann/CMR_Telfair | R | false | false | 80,608 | r | # HW, - adapted by UN - Estimating Abundance from multiple sampling capture recatpure data via multi-state
# simulating capture recapture data
require(pracma)
# ------------------------------------------------------------------------------
# Code to generate multi-state (multi-period) CRM data for 2 genders
# --... |
library(dplyr)
library(ggplot2)
source('data.R')
# https://dplyr.tidyverse.org/reference/arrange.html
books_by_download <- arrange(books, desc(downloads))
books_refined <- books_by_download %>% select(author, title, words, syllables, sentences)
# guessed, knowing pull from last Proj and how R doesn't chain and head f... | /reading.R | no_license | snychka/R-ClassicLiteratureReadability | R | false | false | 1,789 | r | library(dplyr)
library(ggplot2)
source('data.R')
# https://dplyr.tidyverse.org/reference/arrange.html
books_by_download <- arrange(books, desc(downloads))
books_refined <- books_by_download %>% select(author, title, words, syllables, sentences)
# guessed, knowing pull from last Proj and how R doesn't chain and head f... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/celda_CG.R
\name{celdaUmap,celda_CG-method}
\alias{celdaUmap,celda_CG-method}
\title{umap for celda_CG}
\usage{
\S4method{celdaUmap}{celda_CG}(
counts,
celdaMod,
maxCells = NULL,
minClusterSize = 100,
modules = NULL,
seed = 12345,... | /man/celdaUmap-celda_CG-method.Rd | permissive | AhmedYoussef95/celda | R | false | true | 2,634 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/celda_CG.R
\name{celdaUmap,celda_CG-method}
\alias{celdaUmap,celda_CG-method}
\title{umap for celda_CG}
\usage{
\S4method{celdaUmap}{celda_CG}(
counts,
celdaMod,
maxCells = NULL,
minClusterSize = 100,
modules = NULL,
seed = 12345,... |
# The purpose of this project is to demonstrate ability to collect, work with, and clean a data set.
# The goal is to prepare tidy data that can be used for later analysis.
# The data is built from recordings of subjects performing daily activities while carrying smartphone
# The full description of the data set is ... | /run_analysis.R | no_license | sragam/data-cleansing | R | false | false | 3,707 | r | # The purpose of this project is to demonstrate ability to collect, work with, and clean a data set.
# The goal is to prepare tidy data that can be used for later analysis.
# The data is built from recordings of subjects performing daily activities while carrying smartphone
# The full description of the data set is ... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/sql.r
\name{insert.sql}
\alias{insert.sql}
\title{generate sql insert statement from dataframe}
\usage{
insert.sql(data, table.name)
}
\arguments{
\item{data}{dataframe to import}
\item{table.name}{name of table in db to insert into}... | /man/insert.sql.Rd | no_license | mdelhey/mdutils | R | false | false | 536 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/sql.r
\name{insert.sql}
\alias{insert.sql}
\title{generate sql insert statement from dataframe}
\usage{
insert.sql(data, table.name)
}
\arguments{
\item{data}{dataframe to import}
\item{table.name}{name of table in db to insert into}... |
library(logisticRR)
### Name: printnRR
### Title: Print adjusted relative risk under nominal exposure variable.
### Aliases: printnRR
### ** Examples
n <- 500
set.seed(1234)
W <- rbinom(n, 1, 0.3); W[sample(1:n, n/3)] = 2
dat <- as.data.frame(W)
dat$X <- sample( c("low", "medium", "high"), size = n, replace = TRUE)... | /data/genthat_extracted_code/logisticRR/examples/printnRR.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 615 | r | library(logisticRR)
### Name: printnRR
### Title: Print adjusted relative risk under nominal exposure variable.
### Aliases: printnRR
### ** Examples
n <- 500
set.seed(1234)
W <- rbinom(n, 1, 0.3); W[sample(1:n, n/3)] = 2
dat <- as.data.frame(W)
dat$X <- sample( c("low", "medium", "high"), size = n, replace = TRUE)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apaCorrelationTable.R
\name{apa.cor.table}
\alias{apa.cor.table}
\title{Creates a correlation table in APA style with means and standard deviations}
\usage{
apa.cor.table(
data,
filename = NA,
table.number = NA,
show.conf.interval = T... | /man/apa.cor.table.Rd | no_license | cran/apaTables | R | false | true | 1,169 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/apaCorrelationTable.R
\name{apa.cor.table}
\alias{apa.cor.table}
\title{Creates a correlation table in APA style with means and standard deviations}
\usage{
apa.cor.table(
data,
filename = NA,
table.number = NA,
show.conf.interval = T... |
library(fwPackage, lib.loc="package")
library(tikzDevice)
library(lattice)
library(dbframe)
ltheme <- canonical.theme(color = FALSE) ## in-built B&W theme
ltheme$strip.background$col <- "transparent" ## change strip bg
lattice.options(default.theme = ltheme) ## set as default
dbc <- dbConnect(dbDriver(... | /R/mc-ftest.R | no_license | grayclhn/oos-overfit | R | false | false | 1,759 | r | library(fwPackage, lib.loc="package")
library(tikzDevice)
library(lattice)
library(dbframe)
ltheme <- canonical.theme(color = FALSE) ## in-built B&W theme
ltheme$strip.background$col <- "transparent" ## change strip bg
lattice.options(default.theme = ltheme) ## set as default
dbc <- dbConnect(dbDriver(... |
#Working Directory by default "/home/kartik"
#Change Working Directory
setwd("/home/kartik/Desktop/R-Statistical-Computing/Cars Analysis")
#Reading CSV Data
my_data = read.csv("cars.csv",header = TRUE)
#Display CSV
my_data
| /Cars Analysis/Load_CSV_Data.R | no_license | KartikKannapur/R-Statistical-Computing | R | false | false | 226 | r | #Working Directory by default "/home/kartik"
#Change Working Directory
setwd("/home/kartik/Desktop/R-Statistical-Computing/Cars Analysis")
#Reading CSV Data
my_data = read.csv("cars.csv",header = TRUE)
#Display CSV
my_data
|
#' Denoise an image
#'
#' Denoise an image using a spatially adaptive filter originally described in J. V.
#' Manjon, P. Coupe, Luis Marti-Bonmati, D. L. Collins, and M. Robles. Adaptive
#' Non-Local Means Denoising of MR Images With Spatially Varying Noise Levels,
#' Journal of Magnetic Resonance Imaging, 31:192-203, ... | /R/denoiseImage.R | permissive | ANTsX/ANTsRCore | R | false | false | 2,126 | r | #' Denoise an image
#'
#' Denoise an image using a spatially adaptive filter originally described in J. V.
#' Manjon, P. Coupe, Luis Marti-Bonmati, D. L. Collins, and M. Robles. Adaptive
#' Non-Local Means Denoising of MR Images With Spatially Varying Noise Levels,
#' Journal of Magnetic Resonance Imaging, 31:192-203, ... |
codes <- c(380,124,818)
country <- c("italy","canada","egypt")
names(codes) <- country | /settingColumnNames.r | no_license | faruqa/ds-homework | R | false | false | 88 | r | codes <- c(380,124,818)
country <- c("italy","canada","egypt")
names(codes) <- country |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/serach_functions.R
\name{search_function}
\alias{search_function}
\title{Search functions in a package matching a pattern.}
\usage{
search_function(pattern, pkg_nm)
}
\arguments{
\item{pattern}{Argument passed to \code{\link[base:grepl]{base:... | /man/search_function.Rd | no_license | maurolepore/handy | R | false | true | 1,688 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/serach_functions.R
\name{search_function}
\alias{search_function}
\title{Search functions in a package matching a pattern.}
\usage{
search_function(pattern, pkg_nm)
}
\arguments{
\item{pattern}{Argument passed to \code{\link[base:grepl]{base:... |
library("MASS")
library("lattice")
# scatterplots of lstat and medv by rad
xyplot(medv~lstat|factor(rad), data=Boston) | /inst/examples/data/mgraphics/example_trellis_xyplot.R | no_license | Kale14/mmstat4 | R | false | false | 118 | r | library("MASS")
library("lattice")
# scatterplots of lstat and medv by rad
xyplot(medv~lstat|factor(rad), data=Boston) |
library(SoilR)
### Name: fW.Century
### Title: Effects of moisture on decomposition rates according to the
### CENTURY model
### Aliases: fW.Century
### ** Examples
PPT=seq(0,1500,by=10)
PET=rep(1500,length(PPT))
PPT.PET=fW.Century(PPT,PET)
plot(PPT/PET,PPT.PET,
ylab="f(PPT, PET) (unitless)",
main="Ef... | /data/genthat_extracted_code/SoilR/examples/127.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 404 | r | library(SoilR)
### Name: fW.Century
### Title: Effects of moisture on decomposition rates according to the
### CENTURY model
### Aliases: fW.Century
### ** Examples
PPT=seq(0,1500,by=10)
PET=rep(1500,length(PPT))
PPT.PET=fW.Century(PPT,PET)
plot(PPT/PET,PPT.PET,
ylab="f(PPT, PET) (unitless)",
main="Ef... |
setwd("~/Documents/Dissertation/Writing/manuscripts/Ch1/data/temp/")
getwd()
library(Hmisc)
library(MASS)
library(ggplot2)
library(lme4)
library(multcomp)
library(lubridate)
library(data.table)
require(lsmeans)
library(multcompView)
library(car)
library(dplyr)
library(tidyr)
library(Hmisc)
library(FSA)
#Ofu pool temp... | /temp/AS_Temp-SubsetTest&Plot.R | no_license | BarshisLab/project_reducedtolerance_massivecorals_variablehabitats | R | false | false | 12,345 | r | setwd("~/Documents/Dissertation/Writing/manuscripts/Ch1/data/temp/")
getwd()
library(Hmisc)
library(MASS)
library(ggplot2)
library(lme4)
library(multcomp)
library(lubridate)
library(data.table)
require(lsmeans)
library(multcompView)
library(car)
library(dplyr)
library(tidyr)
library(Hmisc)
library(FSA)
#Ofu pool temp... |
x <- c(1,2,3,4,5)
x
xy <- rnorm(30)
xy
xy
mean(x)
mean(xy)
sort(xy) | /1.R | no_license | whddn5464/R | R | false | false | 68 | r |
x <- c(1,2,3,4,5)
x
xy <- rnorm(30)
xy
xy
mean(x)
mean(xy)
sort(xy) |
library(readr)
plastic <- read.csv('D:/WORK_RSTUDIO/FORECASTING/PlasticSales.csv')
View(plastic)
plot(plastic$Month,plastic$Sales, type = 'b')
#ggplot
library(ggplot2)
ggplot(data = plastic,aes(x =plastic$Month,y =plastic$Sales )) +
geom_point(color='blue') +
geom_line(color='red')
p <- data.frame(outer... | /PlasticSales_modelbased.R | no_license | jayasimha338/Data-Science-2 | R | false | false | 3,255 | r | library(readr)
plastic <- read.csv('D:/WORK_RSTUDIO/FORECASTING/PlasticSales.csv')
View(plastic)
plot(plastic$Month,plastic$Sales, type = 'b')
#ggplot
library(ggplot2)
ggplot(data = plastic,aes(x =plastic$Month,y =plastic$Sales )) +
geom_point(color='blue') +
geom_line(color='red')
p <- data.frame(outer... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
test_loss_cpp <- function(x, y, w, c0, lambda) {
.Call(`_riskslimr_cplex_test_loss_cpp`, x, y, w, c0, lambda)
}
test_loss_grad_cpp <- function(x, y, w, c0, lambda) {
.Call(`_riskslimr_... | /R/RcppExports.R | no_license | zamorarr/riskslimr.cplex | R | false | false | 533 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
test_loss_cpp <- function(x, y, w, c0, lambda) {
.Call(`_riskslimr_cplex_test_loss_cpp`, x, y, w, c0, lambda)
}
test_loss_grad_cpp <- function(x, y, w, c0, lambda) {
.Call(`_riskslimr_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dst_correct_url.R
\name{dst_correct_url}
\alias{dst_correct_url}
\title{Corrects url encoding for Danish letters.}
\usage{
dst_correct_url(url)
}
\arguments{
\item{url}{A build url.}
}
\description{
Corrects url encoding for Danish letters.
}... | /man/dst_correct_url.Rd | no_license | rOpenGov/dkstat | R | false | true | 322 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dst_correct_url.R
\name{dst_correct_url}
\alias{dst_correct_url}
\title{Corrects url encoding for Danish letters.}
\usage{
dst_correct_url(url)
}
\arguments{
\item{url}{A build url.}
}
\description{
Corrects url encoding for Danish letters.
}... |
#' Grafico de residuales de un modelo LM, LMM, GLM, GLMM, GAM, etc
#'
#' Muestra el ajuste del modelo LM, GLM, GLMM, GAM, etc. Esta función crea residuos escalados
#' mediante la simulación del modelo ajustado, 250 simulaciones por default. Los residuos pueden ser extraídos con residuals.DHARMa. Ver
#' testResiduals pa... | /R/resid_DHARMa.R | permissive | mariosandovalmx/tlamatini | R | false | false | 5,401 | r | #' Grafico de residuales de un modelo LM, LMM, GLM, GLMM, GAM, etc
#'
#' Muestra el ajuste del modelo LM, GLM, GLMM, GAM, etc. Esta función crea residuos escalados
#' mediante la simulación del modelo ajustado, 250 simulaciones por default. Los residuos pueden ser extraídos con residuals.DHARMa. Ver
#' testResiduals pa... |
# 데이터 불러오기
HR = read.csv('D:\\R-project\\Must Learning with R\\datasets\\HR_comma_sep.csv')
# /로 경로를 구분하거나 \\로 경로를 구분할 수 있다.
# 데이터 윗부분 띄우기
head(HR, 5)
# 데이터의 strings 파악
str(HR)
# 데이터를 요약해서 보기
summary(HR)
# 데이터 strings 변경
summary(HR$left)
HR$Work_accident=as.factor(HR$Work_accident)
HR$left=as.factor(HR$... | /R/기초/step2.R | no_license | sanha9999/Data_analysis | R | false | false | 1,904 | r | # 데이터 불러오기
HR = read.csv('D:\\R-project\\Must Learning with R\\datasets\\HR_comma_sep.csv')
# /로 경로를 구분하거나 \\로 경로를 구분할 수 있다.
# 데이터 윗부분 띄우기
head(HR, 5)
# 데이터의 strings 파악
str(HR)
# 데이터를 요약해서 보기
summary(HR)
# 데이터 strings 변경
summary(HR$left)
HR$Work_accident=as.factor(HR$Work_accident)
HR$left=as.factor(HR$... |
\name{CPSPPOTevents}
\alias{CPSPPOTevents}
\title{Identifying the occurrence points of the indicator processes in the CPSP from a POT approach}
\description{This function calculates the occurrence times and other characteristics (length, maximum and mean intensity) of the extreme events
of the three ind... | /man/CPSPPOTevents.Rd | no_license | cran/IndTestPP | R | false | false | 6,738 | rd | \name{CPSPPOTevents}
\alias{CPSPPOTevents}
\title{Identifying the occurrence points of the indicator processes in the CPSP from a POT approach}
\description{This function calculates the occurrence times and other characteristics (length, maximum and mean intensity) of the extreme events
of the three ind... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hmob_funcs.R
\name{calc.prop.remain}
\alias{calc.prop.remain}
\title{Proportion of individuals remaining for full epidemic generation}
\usage{
calc.prop.remain(d, gen.t, max.gen = NULL, sub.samp = NULL)
}
\arguments{
\item{d}{a three- or four... | /man/calc.prop.remain.Rd | no_license | gilesjohnr/hmob | R | false | true | 3,105 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hmob_funcs.R
\name{calc.prop.remain}
\alias{calc.prop.remain}
\title{Proportion of individuals remaining for full epidemic generation}
\usage{
calc.prop.remain(d, gen.t, max.gen = NULL, sub.samp = NULL)
}
\arguments{
\item{d}{a three- or four... |
### Course Wrap-up and COmprehensive Assessment: Brexit ###
##PART 1:
#Import the brexit_polls polling data from the dslabs package and set options for the analysis:
library(tidyverse)
options(digits = 3)
library(dslabs)
data(brexit_polls)
#Define p = .481 as the actual percent voting "Remain" and d = 2p-1... | /Section, Course Wrap-up and Comprehensive Assessment, Brexit.R | no_license | vrolo001/Inference-and-modelling | R | false | false | 11,776 | r | ### Course Wrap-up and COmprehensive Assessment: Brexit ###
##PART 1:
#Import the brexit_polls polling data from the dslabs package and set options for the analysis:
library(tidyverse)
options(digits = 3)
library(dslabs)
data(brexit_polls)
#Define p = .481 as the actual percent voting "Remain" and d = 2p-1... |
qqlognorm <- function(x, VarName = "Data", pstyle = 1, MU, SIGMA){
# qqlognorm(x,Name,LineType,MU,SIGMA);
# Quantile/Quantile = QQ-Plot im Vergleich. zur LogNormalverteilung
# INPUT
# x(1:n) data may contain NaN
#
# OPTIONAL
# pstyle bezeichnung der y-achse
# MU,SIGMA ... | /DbtTools/Plot/R/qqlognorm.R | no_license | markus-flicke/KD_Projekt_1 | R | false | false | 1,340 | r | qqlognorm <- function(x, VarName = "Data", pstyle = 1, MU, SIGMA){
# qqlognorm(x,Name,LineType,MU,SIGMA);
# Quantile/Quantile = QQ-Plot im Vergleich. zur LogNormalverteilung
# INPUT
# x(1:n) data may contain NaN
#
# OPTIONAL
# pstyle bezeichnung der y-achse
# MU,SIGMA ... |
quakes_v2 <- function(dataFile) {
# rm(list=ls())
# source("quakes_v2.R")
# quakes_v2("usgsQuery_LA_84-14.csv")
browser()
library(ggmap)
## read in data
data <- read.csv(dataFile, sep = ",", stringsAsFactors = FALSE)
## plot histogram
hist(dataFit, breaks = 30 , col = "red", las = 1, xla... | /quakes_v2.R | no_license | mlr7/earthquake_mapping_R | R | false | false | 779 | r | quakes_v2 <- function(dataFile) {
# rm(list=ls())
# source("quakes_v2.R")
# quakes_v2("usgsQuery_LA_84-14.csv")
browser()
library(ggmap)
## read in data
data <- read.csv(dataFile, sep = ",", stringsAsFactors = FALSE)
## plot histogram
hist(dataFit, breaks = 30 , col = "red", las = 1, xla... |
# TODO: Analysis the relationship between sing and r valude distribtuion
#
# Author: xzhou
###############################################################################
source("SHC.R")
rDistVSSign <- function(totalGenotype, it = 100)
{
m <- nrow(totalGenotype)
n <- ncol(totalGenotype)
#number individual sampl... | /dataAnalysis/rDistVSSign.R | no_license | xzhou/gnome | R | false | false | 3,125 | r | # TODO: Analysis the relationship between sing and r valude distribtuion
#
# Author: xzhou
###############################################################################
source("SHC.R")
rDistVSSign <- function(totalGenotype, it = 100)
{
m <- nrow(totalGenotype)
n <- ncol(totalGenotype)
#number individual sampl... |
hist(weekly$CHANGES*100,breaks = 30,main = "Histogram for Weekly Returns", xlab = "Returns", col = "Grey", border = "Black",xlim = c(-10, 10), ylim=c(0, 35), plot = TRUE)
| /weekly.r | no_license | glorevenhite/gswcapital-stats-r | R | false | false | 171 | r | hist(weekly$CHANGES*100,breaks = 30,main = "Histogram for Weekly Returns", xlab = "Returns", col = "Grey", border = "Black",xlim = c(-10, 10), ylim=c(0, 35), plot = TRUE)
|
\name{initDisplayWindow}
\title{Device management}
\alias{initDisplayWindow}
\description{
Display the device on which the plot will be displayed. For internal use.
}
\usage{
initDisplayWindow(window, filename, path, width, height, scale, res,
mfrow, bg, pty, mar, mgp, n.contrast = 1)
}
\arguments{
... | /man/MRIaggr-initDisplayWindow.Rd | no_license | cran/MRIaggr | R | false | false | 2,005 | rd | \name{initDisplayWindow}
\title{Device management}
\alias{initDisplayWindow}
\description{
Display the device on which the plot will be displayed. For internal use.
}
\usage{
initDisplayWindow(window, filename, path, width, height, scale, res,
mfrow, bg, pty, mar, mgp, n.contrast = 1)
}
\arguments{
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/basic_functions.R
\name{integrate_trapeze}
\alias{integrate_trapeze}
\title{integrate_trapeze}
\usage{
integrate_trapeze(x, y)
}
\arguments{
\item{x}{a numerical vector, the discretization of the domain.}
\item{y}{a numerical valu... | /bliss/man/integrate_trapeze.Rd | no_license | akhikolla/ClusterTests | R | false | true | 610 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/basic_functions.R
\name{integrate_trapeze}
\alias{integrate_trapeze}
\title{integrate_trapeze}
\usage{
integrate_trapeze(x, y)
}
\arguments{
\item{x}{a numerical vector, the discretization of the domain.}
\item{y}{a numerical valu... |
require(testthat)
#filePathOutcomes <- file.path(base::path.package("Wats"), "extdata", "BirthRatesOk.txt")
# filePathOutcomes <- file.path(devtools::inst(name="Wats"), "extdata", "BirthRatesOk.txt") #This approach accounts for working on developmental box.
# filePathOutcomes <- file.path(devtools::inst(name="Wats"), "... | /tests/testthat/test.Augment.R | no_license | andkov/Wats | R | false | false | 3,239 | r | require(testthat)
#filePathOutcomes <- file.path(base::path.package("Wats"), "extdata", "BirthRatesOk.txt")
# filePathOutcomes <- file.path(devtools::inst(name="Wats"), "extdata", "BirthRatesOk.txt") #This approach accounts for working on developmental box.
# filePathOutcomes <- file.path(devtools::inst(name="Wats"), "... |
#' @title For all points in matrix 1, return the distance to and index of the
#' nearest point in matrix 2.
#'
#' @description
#' Find the shortest distance between each point in one data set and the points
#' in a second set.
#'
#' This function determines the distance between every point in mOne and the
#' ne... | /Bioi/R/find_min_dists.R | no_license | akhikolla/ClusterTests | R | false | false | 1,618 | r | #' @title For all points in matrix 1, return the distance to and index of the
#' nearest point in matrix 2.
#'
#' @description
#' Find the shortest distance between each point in one data set and the points
#' in a second set.
#'
#' This function determines the distance between every point in mOne and the
#' ne... |
## Get results for each EWAS (corrected for nearby + distant GIs) and inspect bias and inflation using bacon
## EWAS statistics after correction for inflation/bias using bacon are saved
# Libraries
options('stringsAsFactors' = FALSE)
library(BiocParallel)
library(bacon)
library(GenomicRanges)
library(BatchJobs)
librar... | /R/bacon_corrected_distant_GIs.R | no_license | pjhop/DNAmRegulators | R | false | false | 2,759 | r | ## Get results for each EWAS (corrected for nearby + distant GIs) and inspect bias and inflation using bacon
## EWAS statistics after correction for inflation/bias using bacon are saved
# Libraries
options('stringsAsFactors' = FALSE)
library(BiocParallel)
library(bacon)
library(GenomicRanges)
library(BatchJobs)
librar... |
hpd_data <- "./data/household_power_consumption.txt"
hpd <- read.table(hpd_data, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subSethpd<- hpd[hpd$Date %in% c("1/2/2007","2/2/2007") ,]
datetime <- strptime(paste(subSethpd$Date, subSethpd$Time, sep=" "), "%d/%m/%Y %H:%M:%S")
globalActivePower <- as.numer... | /plot3.R | no_license | Odansereau/ExData_Plotting1 | R | false | false | 875 | r | hpd_data <- "./data/household_power_consumption.txt"
hpd <- read.table(hpd_data, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subSethpd<- hpd[hpd$Date %in% c("1/2/2007","2/2/2007") ,]
datetime <- strptime(paste(subSethpd$Date, subSethpd$Time, sep=" "), "%d/%m/%Y %H:%M:%S")
globalActivePower <- as.numer... |
## Type-generic list- or vector-processing functions
#' List utilities
#'
#' These functions provide small list- or vector-processing utilities, and in
#' some cases are just aliases for functions in base R. In such cases, the
#' point of the alias is to make the function available under the standard
#' Scheme name.
#... | /R/list.R | permissive | wwbrannon/schemeR | R | false | false | 5,656 | r | ## Type-generic list- or vector-processing functions
#' List utilities
#'
#' These functions provide small list- or vector-processing utilities, and in
#' some cases are just aliases for functions in base R. In such cases, the
#' point of the alias is to make the function available under the standard
#' Scheme name.
#... |
gradientDescent <- function(X, y, theta, alpha){
m = length(y)
for (i in 1:10000) {
h <- X %*% theta
theta1 <- c(0,theta[2:length(theta)])
grad <- (t(X) %*% (h-y) + lambda*theta1)/m
theta = theta - alpha * grad
}
theta
} | /4 - Regularized/Linear Regression/gradientDescent.R | no_license | SynStratos/Pizza_ML | R | false | false | 281 | r | gradientDescent <- function(X, y, theta, alpha){
m = length(y)
for (i in 1:10000) {
h <- X %*% theta
theta1 <- c(0,theta[2:length(theta)])
grad <- (t(X) %*% (h-y) + lambda*theta1)/m
theta = theta - alpha * grad
}
theta
} |
####################################################
## ##
## Global climate and population dynamics ##
## ##
## Prior Predictive Simulation ##
## ##
##... | /meta_regression/testing_and_prior_predictive_simulation/prior_predictive_simulation.R | no_license | jjackson-eco/mammal_weather_lifehistory | R | false | false | 7,198 | r | ####################################################
## ##
## Global climate and population dynamics ##
## ##
## Prior Predictive Simulation ##
## ##
##... |
library(dplyr)
library(lubridate)
## English by default
Sys.setlocale("LC_ALL", "English")
data <- read.csv("household_power_consumption.txt", sep=";", stringsAsFactors = FALSE, na.strings="?")
#Convert date column from chr to Date class
data[, c(1)] <- as.Date(data[, c(1)], format="%d/%m/%Y")
##Select only two day... | /plot2.R | no_license | RODCAR0/ExData_Plotting1 | R | false | false | 862 | r | library(dplyr)
library(lubridate)
## English by default
Sys.setlocale("LC_ALL", "English")
data <- read.csv("household_power_consumption.txt", sep=";", stringsAsFactors = FALSE, na.strings="?")
#Convert date column from chr to Date class
data[, c(1)] <- as.Date(data[, c(1)], format="%d/%m/%Y")
##Select only two day... |
library(micropan)
### Name: plot.Binomix
### Title: Plot and summary of 'Binomix' objects
### Aliases: plot.Binomix summary.Binomix
### ** Examples
# See examples in the Help-file for binomixEstimate.
| /data/genthat_extracted_code/micropan/examples/generic.Binomix.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 209 | r | library(micropan)
### Name: plot.Binomix
### Title: Plot and summary of 'Binomix' objects
### Aliases: plot.Binomix summary.Binomix
### ** Examples
# See examples in the Help-file for binomixEstimate.
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lgb.Booster.R
\name{predict.lgb.Booster}
\alias{predict.lgb.Booster}
\title{Predict method for LightGBM model}
\usage{
\method{predict}{lgb.Booster}(
object,
data,
start_iteration = NULL,
num_iteration = NULL,
rawscore = FALSE,
pr... | /R-package/man/predict.lgb.Booster.Rd | permissive | makemebitter/LightGBM | R | false | true | 3,275 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lgb.Booster.R
\name{predict.lgb.Booster}
\alias{predict.lgb.Booster}
\title{Predict method for LightGBM model}
\usage{
\method{predict}{lgb.Booster}(
object,
data,
start_iteration = NULL,
num_iteration = NULL,
rawscore = FALSE,
pr... |
uBlogSavePlot <- function(widget,
file_name) {
# Summary: A function to specifically be used with
# the u_blog developed by Anala (https://github.com/anala-gossai/u_blog)
# that takes and html widget, saves it to the appropriate
# blog folder, and then resets the working direc... | /uBlogSavePlot.R | no_license | anala-gossai/fun_ctions | R | false | false | 1,106 | r | uBlogSavePlot <- function(widget,
file_name) {
# Summary: A function to specifically be used with
# the u_blog developed by Anala (https://github.com/anala-gossai/u_blog)
# that takes and html widget, saves it to the appropriate
# blog folder, and then resets the working direc... |
#' ---
#' title: "Metanálise básio quando os resultados (outcomes) são dados continuos"
#' author: "Geiser Chalco <geiser@alumni.usp.br>"
#' date: "5/14/2021"
#'
#'
#' Prerequisitos:
#'
#' - Instalar R: [https://vps.fmvz.usp.br/CRAN/](https://vps.fmvz.usp.br/CRAN/)
#' - Instalar r-studio: [https://www.rstudio.com... | /simple-for-continuous-data.R | permissive | geiser/example-meta-analysis | R | false | false | 4,290 | r | #' ---
#' title: "Metanálise básio quando os resultados (outcomes) são dados continuos"
#' author: "Geiser Chalco <geiser@alumni.usp.br>"
#' date: "5/14/2021"
#'
#'
#' Prerequisitos:
#'
#' - Instalar R: [https://vps.fmvz.usp.br/CRAN/](https://vps.fmvz.usp.br/CRAN/)
#' - Instalar r-studio: [https://www.rstudio.com... |
library(tidyverse)
library(maps)
library(albersusa)#installed via github
library(ggmap)
library(RColorBrewer)
setwd("/Users/aradhyakasat/Documents/DataScience/")
data = read.csv("NewYorkCrimeDataAnalysis2019/Data/ArrestData2.csv")
data2 = read.csv("NewYorkCrimeDataAnalysis2019/Data/ArrestData3.csv")
table(data$PD_DESC... | /ExploratoryAnalysis.R | no_license | ITWSDataScience/NewYorkCrimeDataAnalysis2019 | R | false | false | 6,771 | r | library(tidyverse)
library(maps)
library(albersusa)#installed via github
library(ggmap)
library(RColorBrewer)
setwd("/Users/aradhyakasat/Documents/DataScience/")
data = read.csv("NewYorkCrimeDataAnalysis2019/Data/ArrestData2.csv")
data2 = read.csv("NewYorkCrimeDataAnalysis2019/Data/ArrestData3.csv")
table(data$PD_DESC... |
library(ggplot2)
library(tidyr)
library(dplyr)
# get the dataset
data <- read.csv("winequality-white.csv")
degrees <- 20 # the number of degrees to test
results.df <- data.frame("degree" = integer(), "train" = double(), "test" = double())
for(i in 1:degrees) {
n <- nrow(data) # get the number of rows
train <- s... | /data_analysis_assignment/regression.R | no_license | elijahverdoorn/MATH384 | R | false | false | 1,308 | r | library(ggplot2)
library(tidyr)
library(dplyr)
# get the dataset
data <- read.csv("winequality-white.csv")
degrees <- 20 # the number of degrees to test
results.df <- data.frame("degree" = integer(), "train" = double(), "test" = double())
for(i in 1:degrees) {
n <- nrow(data) # get the number of rows
train <- s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/greedy_knapsack.R
\name{greedy_knapsack}
\alias{greedy_knapsack}
\title{Greedy}
\usage{
greedy_knapsack(x, W)
}
\arguments{
\item{x}{data.frame}
\item{W}{integer}
}
\value{
list of ideal value and elements that solves the problem
}
\descript... | /man/greedy_knapsack.Rd | no_license | MartinSmel/Knapsack | R | false | true | 374 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/greedy_knapsack.R
\name{greedy_knapsack}
\alias{greedy_knapsack}
\title{Greedy}
\usage{
greedy_knapsack(x, W)
}
\arguments{
\item{x}{data.frame}
\item{W}{integer}
}
\value{
list of ideal value and elements that solves the problem
}
\descript... |
library(dplyr)
library(rstan)
options(mc.cores = 3)
library(ggplot2)
library(patchwork)
library(bayesplot)
cd4 <- read.delim("cd4.txt", header = TRUE)
n_obs <- nrow(cd4)
J <- max(cd4$ID)
x <- seq(from = 1, by = 3, length.out = 7)
df <- tibble(id = rep(1:J, each = 7), visit = rep(x, J))
cd4 <- cd4 %>% s... | /cd4_stan.R | no_license | owenqiz/miscellaneous | R | false | false | 1,317 | r | library(dplyr)
library(rstan)
options(mc.cores = 3)
library(ggplot2)
library(patchwork)
library(bayesplot)
cd4 <- read.delim("cd4.txt", header = TRUE)
n_obs <- nrow(cd4)
J <- max(cd4$ID)
x <- seq(from = 1, by = 3, length.out = 7)
df <- tibble(id = rep(1:J, each = 7), visit = rep(x, J))
cd4 <- cd4 %>% s... |
#'@name cutRange
#'
#'@title Species on a specific elevation range
#'
#'@description Get species distributed on a specific range of altitude.
#'
#'@param data Vector of characters. Name of the input file.
#'
#'@param rd.frmt Vector of characters. File format to read.
#'By default it will be read as a R object using... | /R/cutRange.R | no_license | Dmirandae/geocleaMT | R | false | false | 4,583 | r | #'@name cutRange
#'
#'@title Species on a specific elevation range
#'
#'@description Get species distributed on a specific range of altitude.
#'
#'@param data Vector of characters. Name of the input file.
#'
#'@param rd.frmt Vector of characters. File format to read.
#'By default it will be read as a R object using... |
library(cvTools)
library(glmnet)
# Utilize UAMS dataset for training
training <- combine(eval.data$GSE24080UAMS[[1]]$training,eval.data$GSE24080UAMS[[1]]$test)
emc92.features <- rbind(result.data$emc92$GSE24080UAMS[[1]],test.result.data$emc92$GSE24080UAMS[[1]]);
uams70.features <- rbind(result.data$uams.70$GSE24080UAMS... | /publishedClassifiers/lasso.weighted.ensemble/scratch.R | no_license | bswhite/Celgene-Multiple-Myeloma-Challenge-Baseline-Models | R | false | false | 2,363 | r | library(cvTools)
library(glmnet)
# Utilize UAMS dataset for training
training <- combine(eval.data$GSE24080UAMS[[1]]$training,eval.data$GSE24080UAMS[[1]]$test)
emc92.features <- rbind(result.data$emc92$GSE24080UAMS[[1]],test.result.data$emc92$GSE24080UAMS[[1]]);
uams70.features <- rbind(result.data$uams.70$GSE24080UAMS... |
gfmcRaster <- function(input, GFMCold = 85, time.step = 1, roFL = 0.3,
out = "GFMCandMC") {
#############################################################################
# Description: Calculation of the Grass Fuel Moisture Code. This calculates
# the moisture content of both the... | /R/gfmcRaster.R | no_license | cran/cffdrs | R | false | false | 5,563 | r | gfmcRaster <- function(input, GFMCold = 85, time.step = 1, roFL = 0.3,
out = "GFMCandMC") {
#############################################################################
# Description: Calculation of the Grass Fuel Moisture Code. This calculates
# the moisture content of both the... |
# script to process original raw data
# this is based on a number of notes made by Pete Lenaker in
# the file: 'M:/QW Monitoring Team/GLRI toxics/GLRI II/WY2017/Data/GLRI PAH Battelle Data Notes_READ ME'
process_sample_merge <- function(raw_sample, raw_site){
dat.clean <- raw_sample
dat.clean$STAT_ID[dat.clean$ST... | /2_process_data/src/process_data.R | no_license | limnoliver/pah_glri | R | false | false | 5,093 | r | # script to process original raw data
# this is based on a number of notes made by Pete Lenaker in
# the file: 'M:/QW Monitoring Team/GLRI toxics/GLRI II/WY2017/Data/GLRI PAH Battelle Data Notes_READ ME'
process_sample_merge <- function(raw_sample, raw_site){
dat.clean <- raw_sample
dat.clean$STAT_ID[dat.clean$ST... |
library(shiny)
library(shinyjs)
require(shinyWidgets)
library(shinyModulesTuto)
ui <- fluidPage(
useShinyjs(),
loadModulesCSS("modules_styling.css"),
tags$h1("Application with dynamic module calls"),
tags$br(),
fluidRow(
column(
width = 4,
panel(
hea... | /inst/applications/dynamic-call2/app.R | no_license | ardata-fr/Shiny-Modules-Tutorials | R | false | false | 1,542 | r | library(shiny)
library(shinyjs)
require(shinyWidgets)
library(shinyModulesTuto)
ui <- fluidPage(
useShinyjs(),
loadModulesCSS("modules_styling.css"),
tags$h1("Application with dynamic module calls"),
tags$br(),
fluidRow(
column(
width = 4,
panel(
hea... |
#Power Curves#
#n1=n2=6,n=6#
mu=c(0,0.1,0.2,0.5,0.8,0.9,0.95,0.98,1,1.2,1.5)
p=c(0.04559,0.0623,0.08435,0.18236,0.33245,0.38964,0.42036,0.43863,0.45049,0.57184,0.73988)
plot(mu,p,cex.lab=2,col="red",main="Power Curve for 4 different sample sizes",sub="red:curve for n=6,blue:curve for n=10,green:curve for n=15,b... | /7.R | no_license | AnupriyaHalder99/Dissertation | R | false | false | 963 | r | #Power Curves#
#n1=n2=6,n=6#
mu=c(0,0.1,0.2,0.5,0.8,0.9,0.95,0.98,1,1.2,1.5)
p=c(0.04559,0.0623,0.08435,0.18236,0.33245,0.38964,0.42036,0.43863,0.45049,0.57184,0.73988)
plot(mu,p,cex.lab=2,col="red",main="Power Curve for 4 different sample sizes",sub="red:curve for n=6,blue:curve for n=10,green:curve for n=15,b... |
library(kaphom)
### Name: mlscorehom
### Title: Modified Likelihood Score test for homogeneity of kappa
### statistics
### Aliases: mlscorehom
### ** Examples
library(kaphom)
pp <- c(11,26,22)
pm <- c(6,5,14)
mm <- c(22,10,39)
mlscorehom(pp,pm,mm)
| /data/genthat_extracted_code/kaphom/examples/mlscorehom.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 279 | r | library(kaphom)
### Name: mlscorehom
### Title: Modified Likelihood Score test for homogeneity of kappa
### statistics
### Aliases: mlscorehom
### ** Examples
library(kaphom)
pp <- c(11,26,22)
pm <- c(6,5,14)
mm <- c(22,10,39)
mlscorehom(pp,pm,mm)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/power_utils.R
\name{PlotPowerProfile}
\alias{PlotPowerProfile}
\title{Plot power profile}
\usage{
PlotPowerProfile(mSetObj=NA, fdr.lvl, smplSize, imgName, format, dpi, width)
}
\arguments{
\item{mSetObj}{Input the name of the created mSetObj ... | /man/PlotPowerProfile.Rd | permissive | xia-lab/MetaboAnalystR | R | false | true | 1,128 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/power_utils.R
\name{PlotPowerProfile}
\alias{PlotPowerProfile}
\title{Plot power profile}
\usage{
PlotPowerProfile(mSetObj=NA, fdr.lvl, smplSize, imgName, format, dpi, width)
}
\arguments{
\item{mSetObj}{Input the name of the created mSetObj ... |
context("Rendering a graph object")
test_that("rendering a graph is indeed possible", {
# Create a node data frame
ndf <-
create_node_df(
n = 26,
type = "letter",
shape = sample(c("circle", "rectangle"),
length(1:26),
replace = TRUE),
fillcolor... | /tests/testthat/test-render_graph_series.R | no_license | DataXujing/DiagrammeR | R | false | false | 3,043 | r | context("Rendering a graph object")
test_that("rendering a graph is indeed possible", {
# Create a node data frame
ndf <-
create_node_df(
n = 26,
type = "letter",
shape = sample(c("circle", "rectangle"),
length(1:26),
replace = TRUE),
fillcolor... |
##### function for calculating the rank-order correlations between two performed MAGMA protocols #####
# author: Juliska E Boer
# date: 04 Nov 2020
calc_rank_cor <- function(kyoko, skene, all){
kyoko$R = rank(kyoko$P)
skene$R = rank(skene$P)
if (all==TRUE){
colnames(kyoko) = c("VARIABLE", "P-kyoko", "Dataset... | /MAGMA/Plots/MAGMA_RankOrderFunct.R | no_license | liekevandehaar/Dev_Hb_mouse | R | false | false | 786 | r | ##### function for calculating the rank-order correlations between two performed MAGMA protocols #####
# author: Juliska E Boer
# date: 04 Nov 2020
calc_rank_cor <- function(kyoko, skene, all){
kyoko$R = rank(kyoko$P)
skene$R = rank(skene$P)
if (all==TRUE){
colnames(kyoko) = c("VARIABLE", "P-kyoko", "Dataset... |
#
# This test file has been generated by kwb.test::create_test_files()
#
test_that("vs2dh.ConfigureBoundaryFluxes() works", {
kwb.vs2dh:::vs2dh.ConfigureBoundaryFluxes()
})
| /tests/testthat/test-function-vs2dh.ConfigureBoundaryFluxes.R | permissive | KWB-R/kwb.vs2dh | R | false | false | 179 | r | #
# This test file has been generated by kwb.test::create_test_files()
#
test_that("vs2dh.ConfigureBoundaryFluxes() works", {
kwb.vs2dh:::vs2dh.ConfigureBoundaryFluxes()
})
|
testlist <- list(x = c(NA, 0L, 0L, 0L), y = integer(0))
result <- do.call(diffrprojects:::dist_mat_absolute,testlist)
str(result) | /diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609961548-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 129 | r | testlist <- list(x = c(NA, 0L, 0L, 0L), y = integer(0))
result <- do.call(diffrprojects:::dist_mat_absolute,testlist)
str(result) |
#' Basic function to convert human to mouse gene names
#' @export
convertHumanGeneList <- function(x){
human <- useMart("ensembl", dataset = "hsapiens_gene_ensembl")
mouse <- useMart("ensembl", dataset = "mmusculus_gene_ensembl")
tmp <- getLDS(attributes = c("hgnc_symbol"), filters = "hgnc_symbol", values = x , mart... | /R/humanMouseConversion.R | no_license | vincent-van-hoef/myFunctions | R | false | false | 439 | r | #' Basic function to convert human to mouse gene names
#' @export
convertHumanGeneList <- function(x){
human <- useMart("ensembl", dataset = "hsapiens_gene_ensembl")
mouse <- useMart("ensembl", dataset = "mmusculus_gene_ensembl")
tmp <- getLDS(attributes = c("hgnc_symbol"), filters = "hgnc_symbol", values = x , mart... |
#' rerf-package
#'
#' The rerf package provides an R implementation of the randomer forest
#' algorithm developed by Tomita et al.(2016) <arXiv:1506.03410v2>,
#' along with variants such as Structured Randomer Forest (S-RerF) and
#' Similarity Randomer Forest (SmerF).
#'
#'
#' @section The main function \code{RerF}:
... | /R-Project/R/rerf-package.R | permissive | neurodata/SPORF | R | false | false | 1,338 | r | #' rerf-package
#'
#' The rerf package provides an R implementation of the randomer forest
#' algorithm developed by Tomita et al.(2016) <arXiv:1506.03410v2>,
#' along with variants such as Structured Randomer Forest (S-RerF) and
#' Similarity Randomer Forest (SmerF).
#'
#'
#' @section The main function \code{RerF}:
... |
\name{add-package}
\alias{add-package}
\docType{package}
\title{
\packageTitle{add}
}
\description{
\packageDescription{add}
}
\details{
The DESCRIPTION file:
\packageDESCRIPTION{add}
\packageIndices{add}
The package is a minimal example including function \code{add()} which
is trivial.
}
\author{
\packageAuthor{add}... | /man/add-package.Rd | no_license | RobinHankin/add | R | false | false | 402 | rd | \name{add-package}
\alias{add-package}
\docType{package}
\title{
\packageTitle{add}
}
\description{
\packageDescription{add}
}
\details{
The DESCRIPTION file:
\packageDESCRIPTION{add}
\packageIndices{add}
The package is a minimal example including function \code{add()} which
is trivial.
}
\author{
\packageAuthor{add}... |
## Nothing to Export.
## this is a bit messy. (model, section) picks out the right model in
## the correct section. this model has a default setting for
## 'hyper'. simply replace these entries with given ones, first in
## 'hyper', then in 'initial', 'fixed', 'prior' and 'param'. somewhat
## tricky is that the length ... | /rinla/R/hyper.R | no_license | ThierryO/r-inla | R | false | false | 14,096 | r | ## Nothing to Export.
## this is a bit messy. (model, section) picks out the right model in
## the correct section. this model has a default setting for
## 'hyper'. simply replace these entries with given ones, first in
## 'hyper', then in 'initial', 'fixed', 'prior' and 'param'. somewhat
## tricky is that the length ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/cluster.R
\docType{methods}
\name{cluster}
\alias{cluster}
\alias{cluster,daFrame-method}
\title{FlowSOM clustering & ConsensusClusterPlus metaclustering}
\usage{
cluster(x, ...)
\S4method{cluster}{daFrame}(x, cols_to_use, x... | /man/cluster.Rd | no_license | lmweber/CATALYST | R | false | true | 3,228 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AllGenerics.R, R/cluster.R
\docType{methods}
\name{cluster}
\alias{cluster}
\alias{cluster,daFrame-method}
\title{FlowSOM clustering & ConsensusClusterPlus metaclustering}
\usage{
cluster(x, ...)
\S4method{cluster}{daFrame}(x, cols_to_use, x... |
#'@title Import a dataset
#'
#'@description
#'The import function can import data from
#'delimited text files, EXCEL spreadsheets, and
#'statistical packages such as SAS, SPSS, and Stata.
#'
#'@param file datafile to import. If missing, the user
#'is prompted to select a file interactively.
#'@param ... parameters pass... | /R/import.R | permissive | jnguyen01/importR | R | false | false | 1,885 | r | #'@title Import a dataset
#'
#'@description
#'The import function can import data from
#'delimited text files, EXCEL spreadsheets, and
#'statistical packages such as SAS, SPSS, and Stata.
#'
#'@param file datafile to import. If missing, the user
#'is prompted to select a file interactively.
#'@param ... parameters pass... |
ebic.multinom.bsreg <- function(target, dataset, wei = NULL, gam = NULL) {
dm <- dim(dataset)
if ( is.null(dm) ) {
n <- length(target)
p <- 1
} else {
n <- dm[1] ## sample size
p <- dm[2] ## number of variables
}
if ( p > n ) {
res <- paste("The number of variables is hi... | /R/ebic.multinom.bsreg.R | no_license | JokerWhy233/MXM | R | false | false | 4,259 | r | ebic.multinom.bsreg <- function(target, dataset, wei = NULL, gam = NULL) {
dm <- dim(dataset)
if ( is.null(dm) ) {
n <- length(target)
p <- 1
} else {
n <- dm[1] ## sample size
p <- dm[2] ## number of variables
}
if ( p > n ) {
res <- paste("The number of variables is hi... |
`hmm.vitFUN.rils` <-
function (geno, position, geno.probability, transitionFUN = phy2get.haldane.rils,
emissionFUN = makeEmissionFUN(errorRate = 0.01), ...)
{
n.obs <- length(geno)
n.state <- length(geno.probability)
psi <- delta <- matrix(0, nrow = n.state, ncol = n.obs)
n.con <- geno.cr <- numer... | /MPR_genotyping/MPR/R/hmm.vitFUN.rils.R | no_license | JinfengChen/MPR_install | R | false | false | 1,144 | r | `hmm.vitFUN.rils` <-
function (geno, position, geno.probability, transitionFUN = phy2get.haldane.rils,
emissionFUN = makeEmissionFUN(errorRate = 0.01), ...)
{
n.obs <- length(geno)
n.state <- length(geno.probability)
psi <- delta <- matrix(0, nrow = n.state, ncol = n.obs)
n.con <- geno.cr <- numer... |
\name{fasttle-methods}
\docType{methods}
\alias{fasttle-methods}
\alias{fasttle,IData-method}
\alias{fasttle}
\title{ Methods for Function fasttle in Package \sQuote{MAINT.Data}}
\description{Performs maximum trimmed likelihood estimation by the fasttle algorithm}
\usage{fasttle(Sdt,
CovCase=1:4,
S... | /man/fasttle-methods.Rd | no_license | cran/MAINT.Data | R | false | false | 10,076 | rd | \name{fasttle-methods}
\docType{methods}
\alias{fasttle-methods}
\alias{fasttle,IData-method}
\alias{fasttle}
\title{ Methods for Function fasttle in Package \sQuote{MAINT.Data}}
\description{Performs maximum trimmed likelihood estimation by the fasttle algorithm}
\usage{fasttle(Sdt,
CovCase=1:4,
S... |
tally(child ~ parents, data = Smoking, format="prop", margins=TRUE)
diffprop(child ~ parents, data = Smoking)
| /inst/snippets/Figure5.10.R | no_license | rpruim/ISIwithR | R | false | false | 111 | r | tally(child ~ parents, data = Smoking, format="prop", margins=TRUE)
diffprop(child ~ parents, data = Smoking)
|
## Equations For Hill equation
# dS1/dt = (k1 / (1 + ((S2/M2)^n1))) - (k3 * S1)
# dS2/dt = (k2 / (1 + ((S1/M1)^n2))) - (k4 * S2)
library(deSolve)
library(rootSolve)
# Define Hill equation function with t, initial values, parameter
hill = function(t, init, para){
S1 <- init[1]
S2 <- init[2]
n1 <- para[1]
n2<... | /rootSolve/Hill_Eqn.R | no_license | swetaleena2206/systems_biology | R | false | false | 2,551 | r | ## Equations For Hill equation
# dS1/dt = (k1 / (1 + ((S2/M2)^n1))) - (k3 * S1)
# dS2/dt = (k2 / (1 + ((S1/M1)^n2))) - (k4 * S2)
library(deSolve)
library(rootSolve)
# Define Hill equation function with t, initial values, parameter
hill = function(t, init, para){
S1 <- init[1]
S2 <- init[2]
n1 <- para[1]
n2<... |
#### Script to create the dataset used by first draft model ####
library(dplyr)
library(reshape)
setwd("~/")
#### Read in raw dataset #######
electionsRaw <- read.csv("midterms/inputData/electionsNew2006_2018.csv", stringsAsFactors = TRUE, na.strings = c("#N/A", "NA"))
#setwd("~/MSPA/590-Thesis") # Work
#electionsRaw... | /dailyRun.R | no_license | vmandela99/Congressional-Elections-Predictive-Model | R | false | false | 24,040 | r | #### Script to create the dataset used by first draft model ####
library(dplyr)
library(reshape)
setwd("~/")
#### Read in raw dataset #######
electionsRaw <- read.csv("midterms/inputData/electionsNew2006_2018.csv", stringsAsFactors = TRUE, na.strings = c("#N/A", "NA"))
#setwd("~/MSPA/590-Thesis") # Work
#electionsRaw... |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
library(data.table)
shinyUI(
navbarPage("Car fuel consumptions and emissions 2000-2013",
tabPanel("Plot",
sidebarPan... | /ui.R | no_license | maolong/DDP_Project | R | false | false | 1,489 | r |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
library(data.table)
shinyUI(
navbarPage("Car fuel consumptions and emissions 2000-2013",
tabPanel("Plot",
sidebarPan... |
#' Treatment of outliers
#'
#' Takes the COIN object and Winsorises indicators where necessary or specified, or reverts to log transform or similar. This is done
#' one indicator at a time.
#'
#' Outliers are identified according to skewness and kurtosis thresholds. The algorithm attempts to reduce the absolute skew an... | /R/coin_treat.R | permissive | Lucas-OlivCouto/COINr | R | false | false | 23,596 | r | #' Treatment of outliers
#'
#' Takes the COIN object and Winsorises indicators where necessary or specified, or reverts to log transform or similar. This is done
#' one indicator at a time.
#'
#' Outliers are identified according to skewness and kurtosis thresholds. The algorithm attempts to reduce the absolute skew an... |
## ----setup, include=FALSE-------------------------------------------
options(formatR.indent = 4, width = 70)
knitr::opts_chunk$set(tidy = TRUE)
## ----eval=FALSE-----------------------------------------------------
# install.packages('formatR', repos = 'http://cran.rstudio.com')
# # or development version
# optio... | /formatR/doc/formatR.R | no_license | r-tutor/libs2 | R | false | false | 8,340 | r | ## ----setup, include=FALSE-------------------------------------------
options(formatR.indent = 4, width = 70)
knitr::opts_chunk$set(tidy = TRUE)
## ----eval=FALSE-----------------------------------------------------
# install.packages('formatR', repos = 'http://cran.rstudio.com')
# # or development version
# optio... |
zagreb1 <- function(g,deg=NULL){
if(class(g)[1]!="graphNEL"){
stop("'g' must be a 'graphNEL' object")
}
stopifnot(.validateGraph(g))
if(is.null(deg)){
deg <- graph::degree(g)
}
sum(deg)
}
| /QuACN/R/zagreb1.R | no_license | ingted/R-Examples | R | false | false | 212 | r | zagreb1 <- function(g,deg=NULL){
if(class(g)[1]!="graphNEL"){
stop("'g' must be a 'graphNEL' object")
}
stopifnot(.validateGraph(g))
if(is.null(deg)){
deg <- graph::degree(g)
}
sum(deg)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree.HDOM.r
\name{tree.HDOM}
\alias{tree.HDOM}
\title{Calculate dominant height for a plot based on tree-level data.}
\usage{
tree.HDOM(HT, DBH, AREA)
}
\arguments{
\item{HT}{Vector of tree heights (ft) for a given plot (must be comp... | /Code/man/tree.HDOM.Rd | no_license | carlos-alberto-silva/slashGY | R | false | true | 1,024 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tree.HDOM.r
\name{tree.HDOM}
\alias{tree.HDOM}
\title{Calculate dominant height for a plot based on tree-level data.}
\usage{
tree.HDOM(HT, DBH, AREA)
}
\arguments{
\item{HT}{Vector of tree heights (ft) for a given plot (must be comp... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ModStore.R
\name{ModStore}
\alias{ModStore}
\title{R6 Class Representing a ModStore}
\description{
This class is used to create a storage for tidymodules objects.
}
\details{
Manage applications, sessions and modules.
}
\examples{
## -------... | /man/ModStore.Rd | permissive | jonas-hag/tidymodules | R | false | true | 7,004 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ModStore.R
\name{ModStore}
\alias{ModStore}
\title{R6 Class Representing a ModStore}
\description{
This class is used to create a storage for tidymodules objects.
}
\details{
Manage applications, sessions and modules.
}
\examples{
## -------... |
# Ensure that you have working Dataset and BEC Pair Table in your working directory:
# When you start with a new dataset, make sure to follow "When You Have New Dataset" below first:
#set library
.libPaths("E:/R packages")
# Install the following R packages:
install.packages("caret")
install.packages("rattle")
... | /Build_BGC_RndFor_Model_ver8.R | no_license | FLNRO-Smithers-Research/Tree-Species-Selection-Tool | R | false | false | 9,883 | r | # Ensure that you have working Dataset and BEC Pair Table in your working directory:
# When you start with a new dataset, make sure to follow "When You Have New Dataset" below first:
#set library
.libPaths("E:/R packages")
# Install the following R packages:
install.packages("caret")
install.packages("rattle")
... |
# This script converts the raw experimental data into the cleaned files that appear in experiment/data. The raw data aren't included in this repository so it's not possible to actually run this script -- but it's included to document the processing pipeline.
# Use tidyverse
library(dplyr)
library(tidyverse)
library(he... | /experiment/preprocessing/preprocess_pictographic_ratings.R | permissive | cskemp/chinesecharacters | R | false | false | 2,935 | r | # This script converts the raw experimental data into the cleaned files that appear in experiment/data. The raw data aren't included in this repository so it's not possible to actually run this script -- but it's included to document the processing pipeline.
# Use tidyverse
library(dplyr)
library(tidyverse)
library(he... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/JSTOR_clusterbywords.R
\name{JSTOR_clusterbywords}
\alias{JSTOR_clusterbywords}
\title{Cluster documents by similarities in word frequencies}
\usage{
JSTOR_clusterbywords(nouns, word, custom_stopwords = NULL, f = 0.01)
}
\arguments{
\... | /man/JSTOR_clusterbywords.Rd | no_license | brooksambrose/JSTORr | R | false | false | 1,731 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/JSTOR_clusterbywords.R
\name{JSTOR_clusterbywords}
\alias{JSTOR_clusterbywords}
\title{Cluster documents by similarities in word frequencies}
\usage{
JSTOR_clusterbywords(nouns, word, custom_stopwords = NULL, f = 0.01)
}
\arguments{
\... |
context("wflow_build")
# Setup ------------------------------------------------------------------------
library(workflowr)
# start project in a tempdir
site_dir <- tempfile("test-wflow_build-")
suppressMessages(wflow_start(site_dir, change_wd = FALSE, user.name = "Test Name",
user.email ... | /tests/testthat/test-wflow_build.R | permissive | jdblischak/fsDirDeleteError | R | false | false | 2,842 | r | context("wflow_build")
# Setup ------------------------------------------------------------------------
library(workflowr)
# start project in a tempdir
site_dir <- tempfile("test-wflow_build-")
suppressMessages(wflow_start(site_dir, change_wd = FALSE, user.name = "Test Name",
user.email ... |
context("Testing pfr's peer()")
test_that("peer with D2 penalty", {
skip_on_cran()
data(DTI)
DTI = DTI[which(DTI$case == 1),]
fit.D2 <- pfr(pasat ~ peer(cca, pentype="D"), data=DTI)
expect_is(fit.D2, "pfr")
})
test_that("peer with structured penalty works", {
skip_on_cran()
data(PEER.Sim, Q)
# Sett... | /tests/testthat/test-peer.R | no_license | refunders/refund | R | false | false | 492 | r | context("Testing pfr's peer()")
test_that("peer with D2 penalty", {
skip_on_cran()
data(DTI)
DTI = DTI[which(DTI$case == 1),]
fit.D2 <- pfr(pasat ~ peer(cca, pentype="D"), data=DTI)
expect_is(fit.D2, "pfr")
})
test_that("peer with structured penalty works", {
skip_on_cran()
data(PEER.Sim, Q)
# Sett... |
kaptár=dir("méhészet")
# teszt
for (segéd in 1:3) {
kaptár1=read.csv(paste("méhészet",kaptár[segéd],sep="/"),encoding="latin1")
print(summary(kaptár1[,3]))
}
# lista
kaptárlista=list()
for (segéd in 1:3) {
kaptárlista[[segéd]]=read.csv(paste("méhészet",kaptár[segéd],sep="/"),encoding="latin1")
}
(summary(kaptárlis... | /beolvasás.R | no_license | emese95/kaptar | R | false | false | 511 | r | kaptár=dir("méhészet")
# teszt
for (segéd in 1:3) {
kaptár1=read.csv(paste("méhészet",kaptár[segéd],sep="/"),encoding="latin1")
print(summary(kaptár1[,3]))
}
# lista
kaptárlista=list()
for (segéd in 1:3) {
kaptárlista[[segéd]]=read.csv(paste("méhészet",kaptár[segéd],sep="/"),encoding="latin1")
}
(summary(kaptárlis... |
# optimisation
# prerun the model with glm to find some parameter values that are not jointly constrained
# use logits
model = function(params, dat, step= 1)
{
st0 = dat$st0
st1 = dat$st1
ET = dat$ET
EB = dat$EB
EM = dat$EM
ENV1 = dat$ENV1
ENV2 = dat$ENV2
itime = dat$itime
na... | /5-Validation/model.r | no_license | QUICC-FOR/STModel-CompAnalysis | R | false | false | 2,917 | r | # optimisation
# prerun the model with glm to find some parameter values that are not jointly constrained
# use logits
model = function(params, dat, step= 1)
{
st0 = dat$st0
st1 = dat$st1
ET = dat$ET
EB = dat$EB
EM = dat$EM
ENV1 = dat$ENV1
ENV2 = dat$ENV2
itime = dat$itime
na... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layout.R
\name{add_layout_}
\alias{add_layout_}
\title{Add layout to graph}
\usage{
add_layout_(graph, ..., overwrite = TRUE)
}
\arguments{
\item{graph}{The input graph.}
\item{...}{Additional arguments are passed to \code{\link{layout_}}.}
... | /man/add_layout_.Rd | no_license | DavisVaughan/rigraph | R | false | true | 1,401 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/layout.R
\name{add_layout_}
\alias{add_layout_}
\title{Add layout to graph}
\usage{
add_layout_(graph, ..., overwrite = TRUE)
}
\arguments{
\item{graph}{The input graph.}
\item{...}{Additional arguments are passed to \code{\link{layout_}}.}
... |
rm(list=ls(all=TRUE))
setwd("C:/Users/Hai/Desktop/insofe/Cute3")
library(caret)
library(DMwR)
#bankdata=read.csv("UniversalBank.csv", header=TRUE, sep=",")
data=read.csv("train.csv", header=TRUE, sep=",",na.strings=c("","NA"))
str(data)
dat2 <- read.csv("train.csv", header=T, na.strings=c("","NA"))
str(data)
test=read.... | /Predict_Fradulent_Transactions_Classification/Code/ada.R | no_license | pranakum/DSProjects | R | false | false | 3,406 | r | rm(list=ls(all=TRUE))
setwd("C:/Users/Hai/Desktop/insofe/Cute3")
library(caret)
library(DMwR)
#bankdata=read.csv("UniversalBank.csv", header=TRUE, sep=",")
data=read.csv("train.csv", header=TRUE, sep=",",na.strings=c("","NA"))
str(data)
dat2 <- read.csv("train.csv", header=T, na.strings=c("","NA"))
str(data)
test=read.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.