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 |
|---|---|---|---|---|---|---|---|---|---|
pollutantmean <- function(directory, pollutant, id = 1:332) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
## 'pollutant' is a character vector of length 1 indicating
## the name of the pollutant for which we will calculate the
## mean; either "sulfate" or "n... | /assignment-1-air-pollution/pollutantmean.R | no_license | luizyamaoka/r-programming-coursera | R | false | false | 880 | r | pollutantmean <- function(directory, pollutant, id = 1:332) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
## 'pollutant' is a character vector of length 1 indicating
## the name of the pollutant for which we will calculate the
## mean; either "sulfate" or "n... |
dyn.load('/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib')
setwd("/Users/mengmengjiang/all datas/chap5")
library(xlsx)
#针头为25G
nj<-read.xlsx("he-25g.xlsx",sheetName="2kv18",header=TRUE)
nk<-read.xlsx("he-25g.xlsx",sheetName="2kv54",header=TRUE)
nl<-read.xlsx("he-25g.xlsx... | /thesis/chap5/chap5-fig5-1.R | permissive | shuaimeng/r | R | false | false | 7,439 | r | dyn.load('/Library/Java/JavaVirtualMachines/jdk1.8.0_131.jdk/Contents/Home/jre/lib/server/libjvm.dylib')
setwd("/Users/mengmengjiang/all datas/chap5")
library(xlsx)
#针头为25G
nj<-read.xlsx("he-25g.xlsx",sheetName="2kv18",header=TRUE)
nk<-read.xlsx("he-25g.xlsx",sheetName="2kv54",header=TRUE)
nl<-read.xlsx("he-25g.xlsx... |
rels = function(path) UseMethod("rels")
rels.default = function(x, ...) {
stop("Invalid object. Must supply path object.")
}
rels.path = function(path) {
urls = attr(path, "relationships")
header = setHeaders(path)
FUN <- function(x) {
url = x
response = http_request(url, "GET", "OK", httpheader=heade... | /R/rels.R | permissive | noelnamai/RNeo4j | R | false | false | 575 | r | rels = function(path) UseMethod("rels")
rels.default = function(x, ...) {
stop("Invalid object. Must supply path object.")
}
rels.path = function(path) {
urls = attr(path, "relationships")
header = setHeaders(path)
FUN <- function(x) {
url = x
response = http_request(url, "GET", "OK", httpheader=heade... |
suppressPackageStartupMessages(library(Seurat))
suppressPackageStartupMessages(library(stringr))
suppressPackageStartupMessages(library(argparse))
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(reshape2))
library(pheatmap)
print("*** Configure Parameters ***")
parser <- ArgumentP... | /20200315/FindMarkers_BC_CellType.R | no_license | RyanYip-Kat/CovID2019 | R | false | false | 3,135 | r | suppressPackageStartupMessages(library(Seurat))
suppressPackageStartupMessages(library(stringr))
suppressPackageStartupMessages(library(argparse))
suppressPackageStartupMessages(library(dplyr))
suppressPackageStartupMessages(library(reshape2))
library(pheatmap)
print("*** Configure Parameters ***")
parser <- ArgumentP... |
library(shinytest2)
test_that("Migrated shinytest test: mytest.R", {
app <- AppDriver$new(variant = shinytest2::platform_variant(),
seed = 100, shiny_args = list(display.mode = "normal"))
app$expect_values()
app$expect_screenshot()
app$set_inputs(dataset = "pressure")
app$set_inputs(dataset = "cars")
... | /tests/testthat/migrate-apps/10ex/tests/testthat/test-mytest.R | permissive | rstudio/shinytest2 | R | false | false | 534 | r | library(shinytest2)
test_that("Migrated shinytest test: mytest.R", {
app <- AppDriver$new(variant = shinytest2::platform_variant(),
seed = 100, shiny_args = list(display.mode = "normal"))
app$expect_values()
app$expect_screenshot()
app$set_inputs(dataset = "pressure")
app$set_inputs(dataset = "cars")
... |
library(shiny)
#Posterior function
posterior = function(theta, alpha, beta){
(theta^(alpha-1))*((1-theta)^(beta+9)) +
10* (theta^(alpha ))*((1-theta)^(beta+8)) +
45* (theta^(alpha+1))*((1-theta)^(beta+7))
}
# Define server logic required to draw a histogram
shinyServer(function(input, output) {
# Expre... | /lasso/server.R | permissive | efancher/shiny_stat | R | false | false | 1,151 | r | library(shiny)
#Posterior function
posterior = function(theta, alpha, beta){
(theta^(alpha-1))*((1-theta)^(beta+9)) +
10* (theta^(alpha ))*((1-theta)^(beta+8)) +
45* (theta^(alpha+1))*((1-theta)^(beta+7))
}
# Define server logic required to draw a histogram
shinyServer(function(input, output) {
# Expre... |
##MY CODE FOR CACHING THE INVERSE OF A MATRIX AND
#FUNCTION TO CREATE MATRIX AND ITS INVERSE FOR A SQUARE 2X2
makeCacheMatrix <- function(x = matrix()) {
Mtx<-NULL
MtxID <<- diag(nrow = 2, ncol = 2)
set<-function(y){
x <<- y
Mtx <<- NULL
}
get<- function() x
setMtxInverse <-function(inverse) Mtx... | /cachematrix.R | no_license | xzmilan/ProgrammingAssignment2 | R | false | false | 1,025 | r | ##MY CODE FOR CACHING THE INVERSE OF A MATRIX AND
#FUNCTION TO CREATE MATRIX AND ITS INVERSE FOR A SQUARE 2X2
makeCacheMatrix <- function(x = matrix()) {
Mtx<-NULL
MtxID <<- diag(nrow = 2, ncol = 2)
set<-function(y){
x <<- y
Mtx <<- NULL
}
get<- function() x
setMtxInverse <-function(inverse) Mtx... |
library(gplots)
### Name: lmplot2
### Title: Plots to assess the goodness of fit for the linear model objects
### Aliases: lmplot2
### Keywords: hplot
### ** Examples
ctl <- rnorm(100, 4)
trt <- rnorm(100, 4.5)
group <- gl(2,100,200, labels=c("Ctl","Trt"))
weight <- c(ctl, trt)
wt.err <- rnorm(length(weight), mean=... | /data/genthat_extracted_code/gplots/examples/lmplot2.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 451 | r | library(gplots)
### Name: lmplot2
### Title: Plots to assess the goodness of fit for the linear model objects
### Aliases: lmplot2
### Keywords: hplot
### ** Examples
ctl <- rnorm(100, 4)
trt <- rnorm(100, 4.5)
group <- gl(2,100,200, labels=c("Ctl","Trt"))
weight <- c(ctl, trt)
wt.err <- rnorm(length(weight), mean=... |
testlist <- list(bytes1 = c(-2105352971L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), pmutation = 0)
result <- do.call(mcga:::ByteCodeMutation,t... | /mcga/inst/testfiles/ByteCodeMutation/libFuzzer_ByteCodeMutation/ByteCodeMutation_valgrind_files/1612802629-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 340 | r | testlist <- list(bytes1 = c(-2105352971L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), pmutation = 0)
result <- do.call(mcga:::ByteCodeMutation,t... |
#' pfam2go
#'
#' assign for pfam ids the corresponding go ids, go ontologies and
#' ancestor strings from the mapping object
#'
#' @description convert a pfam count table into a new data.frame
#' with the following fields:
#' db - origin of annotation
#' pfam - ... | /lib/go.functions.R | permissive | psikon/functional.analysis | R | false | false | 4,931 | r | #' pfam2go
#'
#' assign for pfam ids the corresponding go ids, go ontologies and
#' ancestor strings from the mapping object
#'
#' @description convert a pfam count table into a new data.frame
#' with the following fields:
#' db - origin of annotation
#' pfam - ... |
change_chr <- function(chromosome){
chr = strsplit(chromosome,"_|\\.|-")[[1]][1]
chrnumb = substr(chr,4,5)
return(chrnumb)
}
transformdata <- function(data,transf){
aa_idx = regexpr("i?[A-Z][a-z]{2}[A-Z]{3}",rownames(data))==1
data = data[aa_idx,]
if (transf=="log"){
outdata = sapply(data,log)
# Rem... | /tumor/10-2_analyze_scna_methylation_allsamples.R | no_license | mywanuo/tRNA_TCGA | R | false | false | 4,774 | r | change_chr <- function(chromosome){
chr = strsplit(chromosome,"_|\\.|-")[[1]][1]
chrnumb = substr(chr,4,5)
return(chrnumb)
}
transformdata <- function(data,transf){
aa_idx = regexpr("i?[A-Z][a-z]{2}[A-Z]{3}",rownames(data))==1
data = data[aa_idx,]
if (transf=="log"){
outdata = sapply(data,log)
# Rem... |
#####################################################
#Geocode Location
#####################################################
# Need experimental version of ggmap
# also need to download and install rtools off of the internet
library(devtools)
devtools::install_github("dkahle/ggmap", ref = "tidyup")
##################... | /clust/r_code/Geocode.R | no_license | dhbrand/iaa_fall3_hw | R | false | false | 1,952 | r |
#####################################################
#Geocode Location
#####################################################
# Need experimental version of ggmap
# also need to download and install rtools off of the internet
library(devtools)
devtools::install_github("dkahle/ggmap", ref = "tidyup")
##################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cosinor2.R
\docType{data}
\name{PANAS_november}
\alias{PANAS_november}
\title{Self-reported mood}
\format{A data frame with 19 rows and 30 variables:
\describe{
\item{X01, X02, X03, X04, X05, X06, X07, X08, X09, X10, X11, X12, X13, ... | /man/PANAS_november.Rd | no_license | cran/cosinor2 | R | false | true | 1,473 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cosinor2.R
\docType{data}
\name{PANAS_november}
\alias{PANAS_november}
\title{Self-reported mood}
\format{A data frame with 19 rows and 30 variables:
\describe{
\item{X01, X02, X03, X04, X05, X06, X07, X08, X09, X10, X11, X12, X13, ... |
# This is package documentation for stampr.
# roxygen will use this file to create a NAMESPACE file.
# Of importance is the @import command, as it lists package dependencies.
#' stampr: Spatial Temporal Analysis of Moving Polygons
#'
#' The Package \code{stampr} provides tools for performing spatial temporal ana... | /R/stampr-package.r | no_license | jedalong/stampr | R | false | false | 1,622 | r | # This is package documentation for stampr.
# roxygen will use this file to create a NAMESPACE file.
# Of importance is the @import command, as it lists package dependencies.
#' stampr: Spatial Temporal Analysis of Moving Polygons
#'
#' The Package \code{stampr} provides tools for performing spatial temporal ana... |
scatter <- passers_2020 %>%
ungroup() %>%
arrange(desc(avg_ayoe)) %>%
mutate(rank = row_number()) %>%
select(rank, passer, passes, mean_epa, avg_ayoe, posteam)
scatter <- scatter %>%
left_join(teams_colors_logos, by = c('posteam' = 'team_abbr'))
scatter_plot <- scatter %>%
ggplot() +
geom_smooth(aes(x ... | /ayoe_dataviz.R | no_license | tejseth/AYOE | R | false | false | 4,841 | r | scatter <- passers_2020 %>%
ungroup() %>%
arrange(desc(avg_ayoe)) %>%
mutate(rank = row_number()) %>%
select(rank, passer, passes, mean_epa, avg_ayoe, posteam)
scatter <- scatter %>%
left_join(teams_colors_logos, by = c('posteam' = 'team_abbr'))
scatter_plot <- scatter %>%
ggplot() +
geom_smooth(aes(x ... |
context("Test of extraction of BreathID files from zip file ")
test_that("Test ok cases during file extraction without date comparison",{
# Prepare zip file and directories
tmpdir = tempdir()
zipPath = file.path(tmpdir,"zipped")
suppressWarnings(dir.create(zipPath))
destinationPath = file.path(tmpdir,"zipdes... | /tests/testthat/test_UnzipBreathID.R | no_license | dmenne/d13cbreath | R | false | false | 5,298 | r | context("Test of extraction of BreathID files from zip file ")
test_that("Test ok cases during file extraction without date comparison",{
# Prepare zip file and directories
tmpdir = tempdir()
zipPath = file.path(tmpdir,"zipped")
suppressWarnings(dir.create(zipPath))
destinationPath = file.path(tmpdir,"zipdes... |
testlist <- list(id = NULL, score = NULL, id = NULL, booklet_id = integer(0), item_score = integer(0), person_id = c(50326507L, 724249387L, 721420523L, -336860373L, 724249387L, 724249387L, 724249387L, 724249387L, 724298528L, 638582784L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... | /dexterMST/inst/testfiles/mutate_booklet_score/libFuzzer_mutate_booklet_score/mutate_booklet_score_valgrind_files/1612727949-test.R | no_license | akhikolla/updatedatatype-list1 | R | false | false | 666 | r | testlist <- list(id = NULL, score = NULL, id = NULL, booklet_id = integer(0), item_score = integer(0), person_id = c(50326507L, 724249387L, 721420523L, -336860373L, 724249387L, 724249387L, 724249387L, 724249387L, 724298528L, 638582784L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... |
#' Plots decomposed mutational signatures or APOBEC enrichment plot.
#'
#' @description If input is results from \code{\link{extractSignatures}} plots decomposed mutational signatures as a barplot. If input is results from \code{\link{trinucleotideMatrix}}
#' plots APOBEC enrichment plot.
#'
#' @param nmfRes results fr... | /R/plotSignatures.R | permissive | xflicsu/maftools | R | false | false | 5,602 | r | #' Plots decomposed mutational signatures or APOBEC enrichment plot.
#'
#' @description If input is results from \code{\link{extractSignatures}} plots decomposed mutational signatures as a barplot. If input is results from \code{\link{trinucleotideMatrix}}
#' plots APOBEC enrichment plot.
#'
#' @param nmfRes results fr... |
lsEspaCreateConnection<-function(username,password){
c.handle = new_handle()
handle_setopt(c.handle,
referer=getRGISToolsOpt("LS.ESPA.API"),
useragent = getRGISToolsOpt("USERAGENT"),
followlocation = TRUE,
autoreferer = TRUE,
use... | /R/lsEspaConnection.R | no_license | cran/RGISTools | R | false | false | 394 | r | lsEspaCreateConnection<-function(username,password){
c.handle = new_handle()
handle_setopt(c.handle,
referer=getRGISToolsOpt("LS.ESPA.API"),
useragent = getRGISToolsOpt("USERAGENT"),
followlocation = TRUE,
autoreferer = TRUE,
use... |
context("Test utility functions")
test_that("merge vectors error works", {
expect_error(
mergeVectors.(1:4, 5:8),
"Vectors must be either NULL or have names for all elements"
)
})
test_that("l_left_join merge compound lists", {
res <-
l_left_join(
list(
x = 1,
y = 1,
h ... | /tests/testthat/test-utils.R | no_license | csetraynor/ggPMX | R | false | false | 591 | r | context("Test utility functions")
test_that("merge vectors error works", {
expect_error(
mergeVectors.(1:4, 5:8),
"Vectors must be either NULL or have names for all elements"
)
})
test_that("l_left_join merge compound lists", {
res <-
l_left_join(
list(
x = 1,
y = 1,
h ... |
library(tidyverse)
library(cowplot)
library(ggplot2)
library(funk)
library(scales)
library(here)
library(rethinking)
setwd(here('grazing-gradients'))
pal <- wesanderson::wes_palette("Zissou1", 21, type = "continuous")
cols<-c(pal[1], pal[8], pal[12], pal[20])
cols.named<-c('Cetoscarus' = cols[1], 'Chlorurus' = cols... | /scripts/figures/FigureS1_scrape_size_effects.R | no_license | jpwrobinson/grazing-gradients | R | false | false | 2,488 | r |
library(tidyverse)
library(cowplot)
library(ggplot2)
library(funk)
library(scales)
library(here)
library(rethinking)
setwd(here('grazing-gradients'))
pal <- wesanderson::wes_palette("Zissou1", 21, type = "continuous")
cols<-c(pal[1], pal[8], pal[12], pal[20])
cols.named<-c('Cetoscarus' = cols[1], 'Chlorurus' = cols... |
#!/usr/bin/env Rscript
### libraries
library(data.table)
library(ggplot2)
### Load file
shannonh <- fread("ShannonsHforR.csv")
### Graph
ggplot(data=shannonh, aes(x=Year, y=ShannonsH, group=Pond, color=Pond)) + geom_line() +
theme_bw() + theme(panel.border = element_blank(), panel.grid.major = element_bl... | /AlanFigures/SFigure4_ShannonsH/ShannonsH.R | no_license | kbkubow/DaphniaPulex20162017Sequencing | R | false | false | 411 | r | #!/usr/bin/env Rscript
### libraries
library(data.table)
library(ggplot2)
### Load file
shannonh <- fread("ShannonsHforR.csv")
### Graph
ggplot(data=shannonh, aes(x=Year, y=ShannonsH, group=Pond, color=Pond)) + geom_line() +
theme_bw() + theme(panel.border = element_blank(), panel.grid.major = element_bl... |
#=========================================
# Task5 Exercise 9: split the dtm into trainning (80%) and testing (20%)
dtm_train <- dtm[1:4459,] # about 80%
dtm_test <- dtm[4460:5574,] # the rest
sms_train<- sms[1:4459,]
sms_test <- sms[4460:5574,]
corpus_train = corpus[1:4459]
corpus_test = corpus[4460:5574]
print(dtm... | /task5-Text Analytics/Code/e9.r | no_license | AlexGithubbb/Data-Analysis-using-R | R | false | false | 470 | r | #=========================================
# Task5 Exercise 9: split the dtm into trainning (80%) and testing (20%)
dtm_train <- dtm[1:4459,] # about 80%
dtm_test <- dtm[4460:5574,] # the rest
sms_train<- sms[1:4459,]
sms_test <- sms[4460:5574,]
corpus_train = corpus[1:4459]
corpus_test = corpus[4460:5574]
print(dtm... |
## Kaamna Rishi, Info 201
# Exercise 3: writing and executing functions
# Chap 6, E3
# Define a function `add_three` that takes a single argument and
# returns a value 3 greater than the input
add_three <- function(number) {
return(number + 3)
}
add_three(4)
# Create a variable `ten` that is the result of passing 7... | /chapter-06-exercises/exercise-3/exercise.R | permissive | kaamnarishi/book-exercises | R | false | false | 676 | r | ## Kaamna Rishi, Info 201
# Exercise 3: writing and executing functions
# Chap 6, E3
# Define a function `add_three` that takes a single argument and
# returns a value 3 greater than the input
add_three <- function(number) {
return(number + 3)
}
add_three(4)
# Create a variable `ten` that is the result of passing 7... |
#
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(quantmod)
library(xts)
library(tseries)
library(forecast... | /ui.R | no_license | houcembouguila/Stock-Price-Prediction-Shiny-App | R | false | false | 6,946 | r | #
# This is the user-interface definition of a Shiny web application. You can
# run the application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(quantmod)
library(xts)
library(tseries)
library(forecast... |
# Laboratory exam SLM 03.06.2020
# Duration: 2h
# Index number: 67821
# Task1(12p)
# In the task, use the data from 'http://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/german.data-numeric'
# You can load the data using:
read.fwf('http://archive.ics.uci.edu/ml/machine-learning-databases/statlog/ge... | /ExamG104/SLM_Exam_S1920_67821.R | no_license | mczerwinski97/SLM_S1920 | R | false | false | 4,940 | r | # Laboratory exam SLM 03.06.2020
# Duration: 2h
# Index number: 67821
# Task1(12p)
# In the task, use the data from 'http://archive.ics.uci.edu/ml/machine-learning-databases/statlog/german/german.data-numeric'
# You can load the data using:
read.fwf('http://archive.ics.uci.edu/ml/machine-learning-databases/statlog/ge... |
# Script to merge test data & train data together
# Headers of dataset can be found in feature.txt
# Subject is the identifier for the volunteers (i.e. 1 to 30)
# Activity (1 to 6) is the code for activity (e.g. walking) carried out by volunteers.
# Before running this script, the necessary text files must be
# in R's ... | /run_analysis.R | no_license | EricSoh/cleanData | R | false | false | 3,514 | r | # Script to merge test data & train data together
# Headers of dataset can be found in feature.txt
# Subject is the identifier for the volunteers (i.e. 1 to 30)
# Activity (1 to 6) is the code for activity (e.g. walking) carried out by volunteers.
# Before running this script, the necessary text files must be
# in R's ... |
#Load in data
liwc <- read_tsv("./liwc/liwc_w_meta.tsv")
#Grouping by LIWC categories
liwc_categories <- tibble(liwc_var = names(liwc)[9:89]) %>%
mutate(category = c("word count", rep("summary language", 7),
rep("linguistic dimensions", 15),
rep("other grammar", 6),
... | /sem-topics/sem-liwc.R | permissive | tedunderwood/period-cohort | R | false | false | 6,568 | r |
#Load in data
liwc <- read_tsv("./liwc/liwc_w_meta.tsv")
#Grouping by LIWC categories
liwc_categories <- tibble(liwc_var = names(liwc)[9:89]) %>%
mutate(category = c("word count", rep("summary language", 7),
rep("linguistic dimensions", 15),
rep("other grammar", 6),
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/olive.R
\docType{data}
\name{olive}
\alias{olive}
\title{The olive data set}
\format{A data frame contains 573 observations and 10 variables}
\usage{
data(olive)
}
\description{
contains 572 observations and 10 variables
\itemize{
\item{Regi... | /PPforest/man/olive.Rd | no_license | akhikolla/TestedPackages-NoIssues | R | false | true | 866 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/olive.R
\docType{data}
\name{olive}
\alias{olive}
\title{The olive data set}
\format{A data frame contains 573 observations and 10 variables}
\usage{
data(olive)
}
\description{
contains 572 observations and 10 variables
\itemize{
\item{Regi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/abundance_change.R
\name{abundance_change}
\alias{abundance_change}
\title{Species Abundance Changes}
\usage{
abundance_change(df, time.var, species.var, abundance.var,
replicate.var = NULL, reference.time = NULL)
}
\arguments{
\item{df}{A ... | /man/abundance_change.Rd | permissive | TankMermaid/codyn | R | false | true | 2,748 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/abundance_change.R
\name{abundance_change}
\alias{abundance_change}
\title{Species Abundance Changes}
\usage{
abundance_change(df, time.var, species.var, abundance.var,
replicate.var = NULL, reference.time = NULL)
}
\arguments{
\item{df}{A ... |
source('code/load.R')
deflator = WDI(indicator = c('deflator' = 'NY.GDP.DEFL.ZS'),
country = 'US', start = 1960, end = 2018) %>%
dplyr::mutate(deflator = deflator / max(deflator)) %>%
dplyr::arrange(year) %>%
dplyr::select(year, deflator)
fn = paste0('data_clean/deflato... | /code/deflator.R | permissive | jimqian911/opic | R | false | false | 388 | r | source('code/load.R')
deflator = WDI(indicator = c('deflator' = 'NY.GDP.DEFL.ZS'),
country = 'US', start = 1960, end = 2018) %>%
dplyr::mutate(deflator = deflator / max(deflator)) %>%
dplyr::arrange(year) %>%
dplyr::select(year, deflator)
fn = paste0('data_clean/deflato... |
# Import datasets
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
# Calculate and plot total PM2.5 emission from all Baltimore city sources (1999 - 2008)
Baltimore<- NEI[NEI$fips=="24510",]
total_Baltimore <- aggregate(Emissions ~ year, Baltimore,sum)
png(filename="~... | /plot2.R | no_license | BLijnen/Exploratory_data_analysis_plots | R | false | false | 779 | r | # Import datasets
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
# Calculate and plot total PM2.5 emission from all Baltimore city sources (1999 - 2008)
Baltimore<- NEI[NEI$fips=="24510",]
total_Baltimore <- aggregate(Emissions ~ year, Baltimore,sum)
png(filename="~... |
##############################################################
## Script3 - Feature Creation Using Book and click rate
# We use these features for the purpose of training KNN
#Model
##############################################################
##install.packages('dplyr')
library(dplyr)
##install.packages('class')
lib... | /features-from-booksClicks.R | no_license | sarikayamehmet/master_project | R | false | false | 13,387 | r | ##############################################################
## Script3 - Feature Creation Using Book and click rate
# We use these features for the purpose of training KNN
#Model
##############################################################
##install.packages('dplyr')
library(dplyr)
##install.packages('class')
lib... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_functions.R
\name{fars_summarize_years}
\alias{fars_summarize_years}
\title{Summary of number of observation per month and year}
\usage{
fars_summarize_years(years)
}
\arguments{
\item{years}{a vector}
}
\value{
Returns a tibble summary ... | /man/fars_summarize_years.Rd | no_license | jamesbertschy/fars | R | false | true | 587 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_functions.R
\name{fars_summarize_years}
\alias{fars_summarize_years}
\title{Summary of number of observation per month and year}
\usage{
fars_summarize_years(years)
}
\arguments{
\item{years}{a vector}
}
\value{
Returns a tibble summary ... |
#' Implementation of MetaRanking function for Multi-Criteria Decision Making Problems.
#'
#' @description The \code{MetaRanking} function internally calls functions \code{FuzzyMMOORA}, \code{FuzzyTOPSISLinear}, \code{FuzzyTOPSISVector}, \code{FuzzyVIKOR} and \code{FuzzyWASPAS} and then calculates a sum of the their ... | /R/MetaRanking.R | no_license | Hong-Sung-Hyun/FuzzyMCDM | R | false | false | 3,389 | r | #' Implementation of MetaRanking function for Multi-Criteria Decision Making Problems.
#'
#' @description The \code{MetaRanking} function internally calls functions \code{FuzzyMMOORA}, \code{FuzzyTOPSISLinear}, \code{FuzzyTOPSISVector}, \code{FuzzyVIKOR} and \code{FuzzyWASPAS} and then calculates a sum of the their ... |
## title: figures for selecting time period
## author: trond
## date: 26.05
library(ggplot2)
library(data.table)
treatment_vec <- c(rep('pre', 3), 'treatment', rep('post', 8))
period_dt <- melt(data.table(year = seq(2004, 2018),
id_1 = c(treatment_vec, rep(NA, 2018 - 2004 - 11)),
... | /src/timeperiod_figs.R | no_license | trondhusby/vinex | R | false | false | 1,086 | r | ## title: figures for selecting time period
## author: trond
## date: 26.05
library(ggplot2)
library(data.table)
treatment_vec <- c(rep('pre', 3), 'treatment', rep('post', 8))
period_dt <- melt(data.table(year = seq(2004, 2018),
id_1 = c(treatment_vec, rep(NA, 2018 - 2004 - 11)),
... |
library(shiny)
library(DT)
ui <- fluidPage(
titlePanel("Datatable for dynamic text selection"),
sidebarLayout(
sidebarPanel(
dataTableOutput("pairs")
),
mainPanel(
strong("Sentence"), htmlOutput("content"),
strong("Selection"),textOutput("selection")
)
)
)
server <- function(inp... | /app.R | no_license | beyond2013/shinydatatable | R | false | false | 1,487 | r | library(shiny)
library(DT)
ui <- fluidPage(
titlePanel("Datatable for dynamic text selection"),
sidebarLayout(
sidebarPanel(
dataTableOutput("pairs")
),
mainPanel(
strong("Sentence"), htmlOutput("content"),
strong("Selection"),textOutput("selection")
)
)
)
server <- function(inp... |
library(rifle)
### Name: rifle-package
### Title: Sparse Generalized Eigenvalue Problem
### Aliases: rifle-package
### Keywords: package
### ** Examples
# Example on Fisher's Discriminant Analysis on two class classification
# A small toy example
n <- 50
p <- 25
# Generate block diagonal covariance matrix with ... | /data/genthat_extracted_code/rifle/examples/rifle-package.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,825 | r | library(rifle)
### Name: rifle-package
### Title: Sparse Generalized Eigenvalue Problem
### Aliases: rifle-package
### Keywords: package
### ** Examples
# Example on Fisher's Discriminant Analysis on two class classification
# A small toy example
n <- 50
p <- 25
# Generate block diagonal covariance matrix with ... |
# computing my own measure of internal consistency simmilar to the silhouette
# Given a solution with a coupling distance h, we have for each element of the
# system their corresponding cluster.
# Fron this solution we want compute a internal consistency to determine which
# groups of clusters are more choesive and fi... | /my_own_silhouette_function.R | no_license | MAValle/DATA_ClusterAgr_ISING | R | false | false | 4,105 | r | # computing my own measure of internal consistency simmilar to the silhouette
# Given a solution with a coupling distance h, we have for each element of the
# system their corresponding cluster.
# Fron this solution we want compute a internal consistency to determine which
# groups of clusters are more choesive and fi... |
/databuilding.R | no_license | hirayamma/masterthesis | R | false | false | 6,428 | r | ||
# install.packages('keras')
# install.packages('purrr')
# install.packages('functional')
library(e1071) #bs
library(MASS)
library(caret)
library(fGarch)
library(fitdistrplus)
library(pracma)
library(BBmisc)
library(functional)
library(dplyr)
library(keras)
library(lubridate)
library(tensorflow)
Sys.sleep(5)
install_ten... | /bs1/Model2_bpi2013_100.R | no_license | paai-lab/Online-Anomaly-Detection-Extension-2021 | R | false | false | 16,602 | r | # install.packages('keras')
# install.packages('purrr')
# install.packages('functional')
library(e1071) #bs
library(MASS)
library(caret)
library(fGarch)
library(fitdistrplus)
library(pracma)
library(BBmisc)
library(functional)
library(dplyr)
library(keras)
library(lubridate)
library(tensorflow)
Sys.sleep(5)
install_ten... |
# Libraries
library(readr)
library(leaps)
library(glmnet)
library(dplyr)
library(psych)
library(base)
library(boot)
library(randomForest)
library(caret)
library(mlbench)
library(ROCR)
# Loading the Data
Project_Train <- read_csv("E:/4.3 Semester 3 - Fall '20/ISEN 613 - Engineering Data Analysis/Prof Ce... | /Group Project - Final Code.R | no_license | jshah3110/Predict-Rate-of-COVID-19-Spread | R | false | false | 2,003 | r | # Libraries
library(readr)
library(leaps)
library(glmnet)
library(dplyr)
library(psych)
library(base)
library(boot)
library(randomForest)
library(caret)
library(mlbench)
library(ROCR)
# Loading the Data
Project_Train <- read_csv("E:/4.3 Semester 3 - Fall '20/ISEN 613 - Engineering Data Analysis/Prof Ce... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/theme-smpl.R
\name{hc_theme_smpl}
\alias{hc_theme_smpl}
\title{Simple Theme}
\usage{
hc_theme_smpl(...)
}
\arguments{
\item{...}{Named argument to modify the theme}
}
\description{
Desing inspired by \url{https://github.com/hrbrms... | /man/hc_theme_smpl.Rd | no_license | sz-cgt/highcharter | R | false | true | 499 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/theme-smpl.R
\name{hc_theme_smpl}
\alias{hc_theme_smpl}
\title{Simple Theme}
\usage{
hc_theme_smpl(...)
}
\arguments{
\item{...}{Named argument to modify the theme}
}
\description{
Desing inspired by \url{https://github.com/hrbrms... |
find_transform <- function(source_image,
target_image,
max_iter = 50,
inner_iter = 10,
max_search = 15,
window_size = 15,
resolution = 12,
... | /R/find_transform.R | no_license | neuroimaginador/utils4ni | R | false | false | 17,879 | r | find_transform <- function(source_image,
target_image,
max_iter = 50,
inner_iter = 10,
max_search = 15,
window_size = 15,
resolution = 12,
... |
\name{extract_numbers}
\alias{extract_numbers}
\title{Extract just the numbers from a string, including decimal points}
\usage{
extract_numbers(tmpstr)
}
\arguments{
\item{tmpstr}{An input string.}
}
\value{
\code{x2} The list of numbers
}
\description{
This function extracts numbers from a string. Contiguous
... | /man/extract_numbers.Rd | no_license | pedroreys/BioGeoBEARS | R | false | false | 998 | rd | \name{extract_numbers}
\alias{extract_numbers}
\title{Extract just the numbers from a string, including decimal points}
\usage{
extract_numbers(tmpstr)
}
\arguments{
\item{tmpstr}{An input string.}
}
\value{
\code{x2} The list of numbers
}
\description{
This function extracts numbers from a string. Contiguous
... |
library(Rmpi)
library(snow)
library(RODBC)
conn <- odbcConnect(dsn = "eRMA", uid = "David79", pwd = "d@v1d79")
dat_all <- sqlQuery(conn, "SELECT Product_Name, Order_DT, Barcode, Warranty_DT, Receive_DT,
Ship_DT, MES_Shipping_DT, Order_No, item_No, warranty_Type
FROM [SBA].[dbo]... | /rmaCompFnF2.R | no_license | kstseng/rma-forecasting | R | false | false | 56,208 | r | library(Rmpi)
library(snow)
library(RODBC)
conn <- odbcConnect(dsn = "eRMA", uid = "David79", pwd = "d@v1d79")
dat_all <- sqlQuery(conn, "SELECT Product_Name, Order_DT, Barcode, Warranty_DT, Receive_DT,
Ship_DT, MES_Shipping_DT, Order_No, item_No, warranty_Type
FROM [SBA].[dbo]... |
library("optimParallel")
mn_optim <- function(parameter_values) {
factorial <- function(n, acc=1) {
if (n <= 0) {
return(acc)
} else {
return(factorial(n-1, acc * n))
}
}
P.gen <- function(m, sigma, E_m_lagged, tau_d, n, gamma, i) {
return(m * sigma * E_m_lagged * exp(-n*gamma*tau_d)*... | /R/Covid19_Prediction/MN-SEIR-MODELS/m1n5.R | no_license | kujbika/MCS_in_hyperparam_optim_APPENDIX | R | false | false | 9,799 | r | library("optimParallel")
mn_optim <- function(parameter_values) {
factorial <- function(n, acc=1) {
if (n <= 0) {
return(acc)
} else {
return(factorial(n-1, acc * n))
}
}
P.gen <- function(m, sigma, E_m_lagged, tau_d, n, gamma, i) {
return(m * sigma * E_m_lagged * exp(-n*gamma*tau_d)*... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sheets_objects.R
\name{BatchClearValuesResponse}
\alias{BatchClearValuesResponse}
\title{BatchClearValuesResponse Object}
\usage{
BatchClearValuesResponse(spreadsheetId = NULL, clearedRanges = NULL)
}
\arguments{
\item{spreadsheetId}{The spre... | /googlesheetsv4.auto/man/BatchClearValuesResponse.Rd | permissive | GVersteeg/autoGoogleAPI | R | false | true | 660 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sheets_objects.R
\name{BatchClearValuesResponse}
\alias{BatchClearValuesResponse}
\title{BatchClearValuesResponse Object}
\usage{
BatchClearValuesResponse(spreadsheetId = NULL, clearedRanges = NULL)
}
\arguments{
\item{spreadsheetId}{The spre... |
library('splatter')
library('scran')
library('scDD')
library('pscl')
library('ggpubr')
library(ggplot2)
lunsim<-readRDS("../data/SupplementaryFigure5_lunsim.RDS")
load("../data/SupplementaryFigure5_lun2sim.Rdata")
load("../data/SupplementaryFigure5_simplesim.Rdata")
load("../data/SupplementaryFigure5_Kallisto.Rdata")
... | /scripts/SupplementaryFigure5.R | no_license | jenni-westoby/Benchmark_figures | R | false | false | 789 | r | library('splatter')
library('scran')
library('scDD')
library('pscl')
library('ggpubr')
library(ggplot2)
lunsim<-readRDS("../data/SupplementaryFigure5_lunsim.RDS")
load("../data/SupplementaryFigure5_lun2sim.Rdata")
load("../data/SupplementaryFigure5_simplesim.Rdata")
load("../data/SupplementaryFigure5_Kallisto.Rdata")
... |
library(phyclust)
### Name: seqgen
### Title: Seq-Gen
### Aliases: seqgen 'Class seqgen'
### Keywords: Seq-Gen
### ** Examples
## Not run:
##D library(phyclust, quiet = TRUE)
##D
##D set.seed(123)
##D ret.ms <- ms(nsam = 5, nreps = 1, opts = "-T")
##D seqgen(opts = "-mHKY -l40 -s0.2", newick.tree = ret.ms[3])
##D... | /data/genthat_extracted_code/phyclust/examples/seqgen.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 341 | r | library(phyclust)
### Name: seqgen
### Title: Seq-Gen
### Aliases: seqgen 'Class seqgen'
### Keywords: Seq-Gen
### ** Examples
## Not run:
##D library(phyclust, quiet = TRUE)
##D
##D set.seed(123)
##D ret.ms <- ms(nsam = 5, nreps = 1, opts = "-T")
##D seqgen(opts = "-mHKY -l40 -s0.2", newick.tree = ret.ms[3])
##D... |
/Hazard_Ratio_clinics_data.R | no_license | karafede/Health_Cox_HR | R | false | false | 49,330 | r | ||
#' Estimation process for the WRTDS (Weighted Regressions on Time, Discharge, and Season)
#'
#' This one function does three things.
#' 1) a jack-knife cross-validation of a WRTDS model in which it augments the Sample data frame in the eList
#' 2) fits the WRTDS model creating the, fits the surfaces matrix and places ... | /R/modelEstimation.R | no_license | hangqianyu/EGRET | R | false | false | 7,085 | r | #' Estimation process for the WRTDS (Weighted Regressions on Time, Discharge, and Season)
#'
#' This one function does three things.
#' 1) a jack-knife cross-validation of a WRTDS model in which it augments the Sample data frame in the eList
#' 2) fits the WRTDS model creating the, fits the surfaces matrix and places ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/species_plan.R
\name{species_plan}
\alias{species_plan}
\title{Generate a drake plan for a species}
\usage{
species_plan(
species,
clum_classes,
nvis_classes,
host_path,
pathways,
include_abiotic_weight = TRUE,
climate_suitabili... | /man/species_plan.Rd | no_license | jscamac/edmaps | R | false | true | 11,452 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/species_plan.R
\name{species_plan}
\alias{species_plan}
\title{Generate a drake plan for a species}
\usage{
species_plan(
species,
clum_classes,
nvis_classes,
host_path,
pathways,
include_abiotic_weight = TRUE,
climate_suitabili... |
# Polynomial Regression
# Data Preprocessing Template
# Importing the dataset
dataset = read.csv('Position_Salaries.csv')
dataset = dataset[2:3]
# Splitting the dataset into the Training set and Test set
# install.packages('caTools')
# library(caTools)
# set.seed(123)
# split = sample.split(dataset$DependentVariable... | /Machine-Learning-A-Z-Udemy-master/Machine Learning A-Z Template Folder/Part 2 - Regression/Section 6 - Polynomial Regression/Polynomial_Regression/Polynomial_Regression/Mpolynomial_regression.R | permissive | CT83/Independent-Coursework | R | false | false | 1,943 | r | # Polynomial Regression
# Data Preprocessing Template
# Importing the dataset
dataset = read.csv('Position_Salaries.csv')
dataset = dataset[2:3]
# Splitting the dataset into the Training set and Test set
# install.packages('caTools')
# library(caTools)
# set.seed(123)
# split = sample.split(dataset$DependentVariable... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_functions.R
\name{asha_zones}
\alias{asha_zones}
\title{Estrutura a base de zonas necessaria para usar \code{asha_dists}}
\usage{
asha_zones(sf1, sf2, id1, id2)
}
\arguments{
\item{sf1}{Um objeto sf com coluna de id (por exemplo pontos ... | /man/asha_zones.Rd | no_license | bruno-pinheiro/asha | R | false | true | 1,199 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/model_functions.R
\name{asha_zones}
\alias{asha_zones}
\title{Estrutura a base de zonas necessaria para usar \code{asha_dists}}
\usage{
asha_zones(sf1, sf2, id1, id2)
}
\arguments{
\item{sf1}{Um objeto sf com coluna de id (por exemplo pontos ... |
function(input, output, session) {
# Combine the selected variables into a new data frame
selectedData <- reactive({
switch(input$Dataset,
"Swiss" = swiss,
"Beaver1" = beaver1,
"Beaver2" = beaver2,
"Anscombe" = anscombe,
"MT Cars" = mtcars
... | /server.r | no_license | Peidyen/K-Means-Visualization-for-R | R | false | false | 765 | r | function(input, output, session) {
# Combine the selected variables into a new data frame
selectedData <- reactive({
switch(input$Dataset,
"Swiss" = swiss,
"Beaver1" = beaver1,
"Beaver2" = beaver2,
"Anscombe" = anscombe,
"MT Cars" = mtcars
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/services.r
\docType{data}
\name{wqp-report-services}
\alias{wqp-report-services}
\alias{report.pdm.service}
\title{Report Services}
\format{
a URL part.
An object of class \code{character} of length 1.
}
\usage{
report.pdm.service
}
\descrip... | /man/wqp-report-services.Rd | no_license | mkoohafkan/wqpr-clone | R | false | true | 368 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/services.r
\docType{data}
\name{wqp-report-services}
\alias{wqp-report-services}
\alias{report.pdm.service}
\title{Report Services}
\format{
a URL part.
An object of class \code{character} of length 1.
}
\usage{
report.pdm.service
}
\descrip... |
#library(EValue)
detach("package:EValue")
# also search "@@"
# confounded_meta(method = "calibrated",
# q = log(.9),
# r=.1,
# muB= -5,
# tail="below",
# yi.name = "yi",
# vi.name = "vi",
# dat = d,
# ... | /Aux code/issues.R | no_license | justinhylee/evalue_package | R | false | false | 886 | r |
#library(EValue)
detach("package:EValue")
# also search "@@"
# confounded_meta(method = "calibrated",
# q = log(.9),
# r=.1,
# muB= -5,
# tail="below",
# yi.name = "yi",
# vi.name = "vi",
# dat = d,
# ... |
# Get top loci
#' @title Creates a panel of the top n unlinked loci, and exports the list of loci
#' @description Extract the genotypes of individuals at the top n (by Fst) unlinked loci. The default threshold of r2>0.2 is employed for assigning 'linked' loci (default for plink).
#' @param genepop A file path to the ge... | /R/genepop_toploci.R | no_license | zhenbinHU/genepopedit | R | false | false | 19,151 | r | # Get top loci
#' @title Creates a panel of the top n unlinked loci, and exports the list of loci
#' @description Extract the genotypes of individuals at the top n (by Fst) unlinked loci. The default threshold of r2>0.2 is employed for assigning 'linked' loci (default for plink).
#' @param genepop A file path to the ge... |
source('static/script/mesh-viz/viz-batch-init.R')
library('rayrender')
library('vetr')
source('viz-lib.R')
source('rtin-vec.R')
source('extract-vec.R')
f <- tempfile()
f2 <- tempfile()
f3 <- tempfile()
f4 <- tempfile()
# Glass full rez mesh
mesh.tri <- mx_to_mesh(vsq)
mesh.tri.s <- scale_mesh(mesh.tri)
mesh.shard ... | /static/script/mesh-viz/viz-batch-2.R | no_license | brodieG/website | R | false | false | 6,046 | r | source('static/script/mesh-viz/viz-batch-init.R')
library('rayrender')
library('vetr')
source('viz-lib.R')
source('rtin-vec.R')
source('extract-vec.R')
f <- tempfile()
f2 <- tempfile()
f3 <- tempfile()
f4 <- tempfile()
# Glass full rez mesh
mesh.tri <- mx_to_mesh(vsq)
mesh.tri.s <- scale_mesh(mesh.tri)
mesh.shard ... |
#' Retrieves weather data from the AnitaWeather collection in the PLMResearch database.
#'
#' This function retrieves weather data from Anita's Belmont trial to the MongoDB database.
#' @name getwow
#' @param timestamp a list of timestamps
#' @param username username for use with Anita's App
#' @param password password... | /R/getwow.R | no_license | PrecisionLivestockManagement/AppAnita | R | false | false | 1,519 | r | #' Retrieves weather data from the AnitaWeather collection in the PLMResearch database.
#'
#' This function retrieves weather data from Anita's Belmont trial to the MongoDB database.
#' @name getwow
#' @param timestamp a list of timestamps
#' @param username username for use with Anita's App
#' @param password password... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parameterCalculation.R
\name{parameterCalculation}
\alias{parameterCalculation}
\title{useful paramter calculation with help of fits}
\usage{
parameterCalculation(parameterVector, stepSize = 1e-05)
}
\arguments{
\item{parameterVector}{Output ... | /man/parameterCalculation.Rd | no_license | wilkelab/sicegar | R | false | true | 2,348 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parameterCalculation.R
\name{parameterCalculation}
\alias{parameterCalculation}
\title{useful paramter calculation with help of fits}
\usage{
parameterCalculation(parameterVector, stepSize = 1e-05)
}
\arguments{
\item{parameterVector}{Output ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale-pattern.R
\name{scale_pattern_type_continuous}
\alias{scale_pattern_type_continuous}
\alias{scale_pattern_type_discrete}
\title{Scales for pattern_type}
\usage{
scale_pattern_type_continuous(
name = waiver(),
breaks = waiver(),
la... | /man/scale_pattern_type_continuous.Rd | permissive | idavydov/ggpattern | R | false | true | 710 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale-pattern.R
\name{scale_pattern_type_continuous}
\alias{scale_pattern_type_continuous}
\alias{scale_pattern_type_discrete}
\title{Scales for pattern_type}
\usage{
scale_pattern_type_continuous(
name = waiver(),
breaks = waiver(),
la... |
#load data frame from working directory
temp <- tempfile()
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp)
eeframe<-read.csv(unz(temp, "household_power_consumption.txt"),sep = ";", header = T)
unlink(temp)
# do some conversions from time and date
eeframe$Da... | /plot4.R | no_license | unaizorrilla/ExData_Plotting1 | R | false | false | 1,695 | r | #load data frame from working directory
temp <- tempfile()
download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp)
eeframe<-read.csv(unz(temp, "household_power_consumption.txt"),sep = ";", header = T)
unlink(temp)
# do some conversions from time and date
eeframe$Da... |
library(multcomp)
attach(cholesterol)
table(trt)
aggregate(response, by=list(trt), FUN=mean)
aggregate(response, by=list(trt), FUN=sd)
fit <- aov(response ~ trt)
summary(fit)
library(gplots)
# The ANOVA F test for treatment (trt) is significant (p < .0001), providing evidence that the five treatments aren’t all eq... | /R/R_in_action/anova/aov_example.R | no_license | 8589/codes | R | false | false | 505 | r | library(multcomp)
attach(cholesterol)
table(trt)
aggregate(response, by=list(trt), FUN=mean)
aggregate(response, by=list(trt), FUN=sd)
fit <- aov(response ~ trt)
summary(fit)
library(gplots)
# The ANOVA F test for treatment (trt) is significant (p < .0001), providing evidence that the five treatments aren’t all eq... |
#' @importFrom methods new
#' @export
GetCtree <- function(object, k=1) {
dt <- object@data@get("input")
tr <- party::prettytree(object@ensemble[[k]], names(dt))
tr_updated <- update_tree(tr, dt)
methods::new("BinaryTree", tree=tr_updated, data=object@data, responses=object@responses,
cond_distr_respon... | /R/GetCtree.R | no_license | nicolas-robette/moreparty | R | false | false | 1,104 | r | #' @importFrom methods new
#' @export
GetCtree <- function(object, k=1) {
dt <- object@data@get("input")
tr <- party::prettytree(object@ensemble[[k]], names(dt))
tr_updated <- update_tree(tr, dt)
methods::new("BinaryTree", tree=tr_updated, data=object@data, responses=object@responses,
cond_distr_respon... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summarize_h5df.r
\name{summarize_h5df}
\alias{summarize_h5df}
\title{summarize_h5df}
\usage{
summarize_h5df(h5in, dataset = NULL, colnames = FALSE)
}
\arguments{
\item{h5in}{Input file.}
\item{dataset}{Name of the data within the HDF5 file. ... | /man/summarize_h5df.Rd | permissive | RBigData/hdfio | R | false | true | 456 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summarize_h5df.r
\name{summarize_h5df}
\alias{summarize_h5df}
\title{summarize_h5df}
\usage{
summarize_h5df(h5in, dataset = NULL, colnames = FALSE)
}
\arguments{
\item{h5in}{Input file.}
\item{dataset}{Name of the data within the HDF5 file. ... |
library(shiny)
library(shinydashboard)
library(shinyjs)
library(shinyBS)
library(shinycssloaders)
library(shinythemes)
library(tidycwl)
library(tidyverse)
library(shinyFiles) # This is for getting the file path of a file (maybe a later implementation of the app?)
library(ymlthis)
# Global Functions -------------------... | /App.R | permissive | srp33/Throughput | R | false | false | 19,463 | r | library(shiny)
library(shinydashboard)
library(shinyjs)
library(shinyBS)
library(shinycssloaders)
library(shinythemes)
library(tidycwl)
library(tidyverse)
library(shinyFiles) # This is for getting the file path of a file (maybe a later implementation of the app?)
library(ymlthis)
# Global Functions -------------------... |
context("sanity check diff_expr")
library(Biobase)
library(limma)
# Simulate gene expression data for 100 probes and 6 microarrays
# Microarray are in two groups
# First two probes are differentially expressed in second group
# Std deviations vary between genes with prior df=4
sd <- 0.3*sqrt(4/rchisq(1000,df=4))
y <- ... | /tests/testthat/test-diff_expr.R | no_license | alexvpickering/crossmeta | R | false | false | 1,573 | r | context("sanity check diff_expr")
library(Biobase)
library(limma)
# Simulate gene expression data for 100 probes and 6 microarrays
# Microarray are in two groups
# First two probes are differentially expressed in second group
# Std deviations vary between genes with prior df=4
sd <- 0.3*sqrt(4/rchisq(1000,df=4))
y <- ... |
library(car)
library(mvtnorm)
detach("package:datasets", unload=TRUE)
attach(Prestige)
source(file = "Linear_model.R")
## Initilize
alpha<- 1
beta<- c(0, 0, 0, 0)
tau<- 1
## Sampling posterior distribution
iter = 20000
## Store trace
alpha.mh.trace<- c(alpha)
beta.mh.trace<- beta
tau.mh.trace<- c(tau)
## Step setti... | /Metropolis-Hasting.R | no_license | HumbleLu/Bayesian-Linear-Model-Comparison | R | false | false | 1,770 | r | library(car)
library(mvtnorm)
detach("package:datasets", unload=TRUE)
attach(Prestige)
source(file = "Linear_model.R")
## Initilize
alpha<- 1
beta<- c(0, 0, 0, 0)
tau<- 1
## Sampling posterior distribution
iter = 20000
## Store trace
alpha.mh.trace<- c(alpha)
beta.mh.trace<- beta
tau.mh.trace<- c(tau)
## Step setti... |
# This forms part of the 'Getting and Cleaning Data' course project.
# The default working directory used by the 'run_analysis' function; if the
# scriptis loaded using the 'source' function, then this is the directory that
# contains the 'run_analysis.R' script. Otherwise (if the script is pasted
# directly into the... | /run_analysis.R | no_license | iwalt/data-cleaning-project | R | false | false | 5,479 | r |
# This forms part of the 'Getting and Cleaning Data' course project.
# The default working directory used by the 'run_analysis' function; if the
# scriptis loaded using the 'source' function, then this is the directory that
# contains the 'run_analysis.R' script. Otherwise (if the script is pasted
# directly into the... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-voronoi.r
\docType{data}
\name{geom_voronoi}
\alias{geom_voronoi}
\alias{StatVoronoi}
\title{Voronoi tesselation}
\format{An object of class \code{StatVoronoi} (inherits from \code{Stat}, \code{ggproto}, \code{gg}) of length 3.}
\usage{
... | /man/geom_voronoi.Rd | no_license | zorrodong/destiny | R | false | true | 3,976 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom-voronoi.r
\docType{data}
\name{geom_voronoi}
\alias{geom_voronoi}
\alias{StatVoronoi}
\title{Voronoi tesselation}
\format{An object of class \code{StatVoronoi} (inherits from \code{Stat}, \code{ggproto}, \code{gg}) of length 3.}
\usage{
... |
#' Nonparametric Test of Isotropy Using the Sample Covariogram
#'
#' This function performs the nonparametric test of isotropy using the sample covariogram from Maity and Sherman (2012) for spatial data with sampling locations following any general spatial sampling design. It uses the Epanechnikov kernel function with ... | /spTest/R/MaityTest.R | no_license | ingted/R-Examples | R | false | false | 10,646 | r | #' Nonparametric Test of Isotropy Using the Sample Covariogram
#'
#' This function performs the nonparametric test of isotropy using the sample covariogram from Maity and Sherman (2012) for spatial data with sampling locations following any general spatial sampling design. It uses the Epanechnikov kernel function with ... |
library(forecast)
library(ggplot2)
#Leitura do Arquivo vendas.txt
dfFood = read.table('serieVendas.csv',
header=TRUE,
sep=";")
dfFood$venda <- as.numeric(dfFood$venda)
#Serie Temporal
serieTemporal <- ts(dfFood$venda,
start=c(2010, 1),
... | /05-Linguagens de Programacao Estatistica - R/Trabalho01 - Feito/timeSeries.R | no_license | gustavoprimolan/mba-machine-leaning-and-data-science | R | false | false | 1,867 | r | library(forecast)
library(ggplot2)
#Leitura do Arquivo vendas.txt
dfFood = read.table('serieVendas.csv',
header=TRUE,
sep=";")
dfFood$venda <- as.numeric(dfFood$venda)
#Serie Temporal
serieTemporal <- ts(dfFood$venda,
start=c(2010, 1),
... |
options(scipen=999)
### librarries to be loaded are as follows
library(caret)
library(lmtest)
library(MKmisc)
library(survey)
library(ROCR)
library(aod)
library(Rcpp)
library(eeptools)
library(reshape2)
library(stringr)
library(scales)
library(ggplot2)
library(corrplot)
library(pscl)
library(Epi)
lib... | /IE590_Project_Pazhamalai_Yuvaraj_02292016.R | no_license | yuvarajp90/R_Purdue_Adv_Analytics | R | false | false | 18,639 | r | options(scipen=999)
### librarries to be loaded are as follows
library(caret)
library(lmtest)
library(MKmisc)
library(survey)
library(ROCR)
library(aod)
library(Rcpp)
library(eeptools)
library(reshape2)
library(stringr)
library(scales)
library(ggplot2)
library(corrplot)
library(pscl)
library(Epi)
lib... |
#' Tests for Absolute Agreement with Replicates
#' @description agree_nest produces an absolute agreement analysis for data where there is multiple observations per subject but the mean does not vary within subjects as described by Zou (2013). Output mirrors that of agree_test but CCC is calculated via U-statistics.
#'... | /R/agree_reps.R | no_license | hyunsooseol/SimplyAgree | R | false | false | 8,523 | r | #' Tests for Absolute Agreement with Replicates
#' @description agree_nest produces an absolute agreement analysis for data where there is multiple observations per subject but the mean does not vary within subjects as described by Zou (2013). Output mirrors that of agree_test but CCC is calculated via U-statistics.
#'... |
context("uninformative 8-parent markers")
test_that("Check that the eight-parent uninformative marker combination gives an RF estimate of NA in the right cases",
{
testInfiniteSelfing <- function(pedigree)
{
pedigree@selfing <- "infinite"
map <- qtl::sim.map(len = 10, n.mar = 2, anchor.tel=TRUE, include.x=FA... | /tests/testthat/test-approximatelyUninformative8.R | no_license | rohan-shah/mpMap2 | R | false | false | 2,292 | r | context("uninformative 8-parent markers")
test_that("Check that the eight-parent uninformative marker combination gives an RF estimate of NA in the right cases",
{
testInfiniteSelfing <- function(pedigree)
{
pedigree@selfing <- "infinite"
map <- qtl::sim.map(len = 10, n.mar = 2, anchor.tel=TRUE, include.x=FA... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rpack2.R
\name{spearfootG}
\alias{spearfootG}
\title{Spearman's Footrule for any Number of Ties}
\usage{
spearfootG(x, y)
}
\arguments{
\item{x, y}{integer vectors}
}
\value{
Returns Spearman's footrule between the two rankings.
}
\descriptio... | /man/spearfootG.Rd | no_license | lucyov26/RankMetric | R | false | true | 576 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rpack2.R
\name{spearfootG}
\alias{spearfootG}
\title{Spearman's Footrule for any Number of Ties}
\usage{
spearfootG(x, y)
}
\arguments{
\item{x, y}{integer vectors}
}
\value{
Returns Spearman's footrule between the two rankings.
}
\descriptio... |
# 시각화 도구
library(dplyr)
library(ggplot2)
library(gapminder)
# 1. plot
head(cars)
plot(cars, type='p', main='cars') # p - point , main - title
plot(cars, type='l', main='cars') # l - line
plot(cars, type='b', main='cars') # b - both point and line
plot(cars, type='h', main='cars') # h - 히스토그램과 같은 막대 그래프
# 2. pie & bar... | /1.R/ch 06/ch 06-3 시각화 도구.R | no_license | KIM7751/R-Python-Lecture-2021 | R | false | false | 3,340 | r | # 시각화 도구
library(dplyr)
library(ggplot2)
library(gapminder)
# 1. plot
head(cars)
plot(cars, type='p', main='cars') # p - point , main - title
plot(cars, type='l', main='cars') # l - line
plot(cars, type='b', main='cars') # b - both point and line
plot(cars, type='h', main='cars') # h - 히스토그램과 같은 막대 그래프
# 2. pie & bar... |
#' Find bibtex tags in a document, scrape entries from external bib file, save new
#'
#' @param rmd_in chr string of path to Rmd file
#' @param bib_new path for output .bib file
#' @param ext_bib chr string of url for external bib file to scrape
#'
#' @details Currently only works for .Rmd files with the Rmarkdown form... | /R/bib_scrp.R | no_license | fawda123/Jabbrev | R | false | false | 1,997 | r | #' Find bibtex tags in a document, scrape entries from external bib file, save new
#'
#' @param rmd_in chr string of path to Rmd file
#' @param bib_new path for output .bib file
#' @param ext_bib chr string of url for external bib file to scrape
#'
#' @details Currently only works for .Rmd files with the Rmarkdown form... |
#Load Dependencies
source('collect.R')
source('ebola-MobilityDist.R')
#Read in data
data <- collect.wa()
mobsen <- get.mobility.wa('sen')
#Calculate distance matrix
dist <- makedist(rbind(data$x,data$y))
#Estimate model parameters
beta <- getbeta(mobsen, dist, data$infectionDate, c(5.59, 3.33e-6, 1.05))
#Simulate f... | /background-materials/EbolaDataAndCode/DataAndCode/distmob.runner.R | no_license | jclifton333/spatial-RL | R | false | false | 625 | r | #Load Dependencies
source('collect.R')
source('ebola-MobilityDist.R')
#Read in data
data <- collect.wa()
mobsen <- get.mobility.wa('sen')
#Calculate distance matrix
dist <- makedist(rbind(data$x,data$y))
#Estimate model parameters
beta <- getbeta(mobsen, dist, data$infectionDate, c(5.59, 3.33e-6, 1.05))
#Simulate f... |
library(RUnit)
getAirportArrivalsTest <- getAirportArrivals(airport="EDDF", startTime="2018-01-29 12:00:00",
endTime="2018-01-29 12:40:00", timeZone="Europe/Berlin")
getAirportDeparturesTest <- getAirportDepartures(airport="EDDF", startTime="2018-01-29 12:00:00",
... | /inst/unitTests/test_all.R | no_license | pebbleshx/openSkies | R | false | false | 1,949 | r | library(RUnit)
getAirportArrivalsTest <- getAirportArrivals(airport="EDDF", startTime="2018-01-29 12:00:00",
endTime="2018-01-29 12:40:00", timeZone="Europe/Berlin")
getAirportDeparturesTest <- getAirportDepartures(airport="EDDF", startTime="2018-01-29 12:00:00",
... |
# Yolo Bypass Inlet-Outlet Study
# Purpose: A script that calculates the total loads for the inputs, outputs, and below
# Liberty Island and formats it to be used in further calculations.
# Author: Dave Bosworth
# Load packages
library(tidyverse)
library(openwaterhg)
# Calculate total loads for each LocType
loads_t... | /YB_Mass_Balance/Loads/Import_Total_Load_Data.R | permissive | mountaindboz/Open-Water-Hg-Studies | R | false | false | 526 | r | # Yolo Bypass Inlet-Outlet Study
# Purpose: A script that calculates the total loads for the inputs, outputs, and below
# Liberty Island and formats it to be used in further calculations.
# Author: Dave Bosworth
# Load packages
library(tidyverse)
library(openwaterhg)
# Calculate total loads for each LocType
loads_t... |
## Dale W.R. Rosenthal, 2018
## You are free to distribute and use this code so long as you attribute
## it to me or cite the text.
## The legal disclaimer in _A Quantitative Primer on Investments with R_
## applies to this code. Use or distribution without these comment lines
## is forbidden.
# The fields in an 11Ac... | /FIN500_source/ch4-exercises.r | no_license | chicago-joe/RScripts | R | false | false | 1,998 | r | ## Dale W.R. Rosenthal, 2018
## You are free to distribute and use this code so long as you attribute
## it to me or cite the text.
## The legal disclaimer in _A Quantitative Primer on Investments with R_
## applies to this code. Use or distribution without these comment lines
## is forbidden.
# The fields in an 11Ac... |
# Permute seminar February 20, 2014
# Anusha Shankar
# Set working directory
setwd("C://Users/Anusha/Documents/GitHub/PermuteSeminar-2014/Week-4/")
# Read in csv file
hormone <- read.csv("hormone_data.csv")
# Define number of samples
n <- nrow(hormone)
# Calculate mean hormone level and deviations from the mean
z0 <... | /Week-4/Anusha_week4.R | permissive | mlammens/PermuteSeminar-2014 | R | false | false | 931 | r | # Permute seminar February 20, 2014
# Anusha Shankar
# Set working directory
setwd("C://Users/Anusha/Documents/GitHub/PermuteSeminar-2014/Week-4/")
# Read in csv file
hormone <- read.csv("hormone_data.csv")
# Define number of samples
n <- nrow(hormone)
# Calculate mean hormone level and deviations from the mean
z0 <... |
# Sandbox for R group data cleaning/manip
# Forest Hayes
################################################################################
# Packages
library(dplyr)
################################################################################
# Load data
dat <- readr::read_csv(
"./data/collar_data.csv",
col_typ... | /meeting_2/clean_data_workflow.R | permissive | foresthayes/rgroup_fall19 | R | false | false | 1,394 | r | # Sandbox for R group data cleaning/manip
# Forest Hayes
################################################################################
# Packages
library(dplyr)
################################################################################
# Load data
dat <- readr::read_csv(
"./data/collar_data.csv",
col_typ... |
# Course project for Getting & Cleaning Data (Coursera)
#
# 03May2017 Brian K Hurley
library(dplyr)
library(data.table)
##############################################################################
# Functions
##############################################################################
# Combines subject, feature... | /src/run_analysis.R | no_license | bkhurley/getting_and_cleaning_data_project | R | false | false | 5,879 | r | # Course project for Getting & Cleaning Data (Coursera)
#
# 03May2017 Brian K Hurley
library(dplyr)
library(data.table)
##############################################################################
# Functions
##############################################################################
# Combines subject, feature... |
##############################################################################################################################
##R CODE FOR THE BRASS RELATIONAL LOGIT MODEL OF MORTALITY
##
##EDDIE HUNSINGER, FEBRUARY 2011 (LAST UPDATED OCTOBER 2022)
##http://www.demog.berkeley.edu/~eddieh/
##edyhsgr@gmail.com
##... | /BrassRelationalLogitCode.R | no_license | AppliedDemogToolbox/Hunsinger_BrassRelationalLogit | R | false | false | 5,807 | r | ##############################################################################################################################
##R CODE FOR THE BRASS RELATIONAL LOGIT MODEL OF MORTALITY
##
##EDDIE HUNSINGER, FEBRUARY 2011 (LAST UPDATED OCTOBER 2022)
##http://www.demog.berkeley.edu/~eddieh/
##edyhsgr@gmail.com
##... |
R_input_ph_exp <- read.csv("~/Desktop/Skin_experiment/R_input_skin_exp_mean.csv")
x<-R_input_ph_exp
rownames(x)<-x[,1]
x<-x[,-1]
x<-as.matrix(x)
x[,1:3]<-log10(x[,1:3])
library(ggplot2)
dx<-as.data.frame(x)
dx$Var<-as.factor(dx$Var)
dxl<-split(dx,dx$Var)
library(reshape)
plotlist<-list()
plotlist1<-list()
names<-rownam... | /code/R/Figure6_skin_experiment_plot.R | no_license | SystemsBioinformatics/funciminer | R | false | false | 1,324 | r | R_input_ph_exp <- read.csv("~/Desktop/Skin_experiment/R_input_skin_exp_mean.csv")
x<-R_input_ph_exp
rownames(x)<-x[,1]
x<-x[,-1]
x<-as.matrix(x)
x[,1:3]<-log10(x[,1:3])
library(ggplot2)
dx<-as.data.frame(x)
dx$Var<-as.factor(dx$Var)
dxl<-split(dx,dx$Var)
library(reshape)
plotlist<-list()
plotlist1<-list()
names<-rownam... |
library(eRm)
library(difR)
rasch_3 <- covid_dat %>%
filter(lockdown == "lvl3") %>%
select(starts_with("Fof")) %>%
RSM()
rasch_4 <- covid_dat %>%
filter(lockdown == "lvl4") %>%
select(starts_with("Fof")) %>%
RSM()
rasch
plotPImap(rasch, cex.gen = .55)
summary(rasch_4)
plotPWmap(rasch_4, pmap = TR... | /eRm.R | no_license | haututu/fear_of_covid_validation | R | false | false | 637 | r | library(eRm)
library(difR)
rasch_3 <- covid_dat %>%
filter(lockdown == "lvl3") %>%
select(starts_with("Fof")) %>%
RSM()
rasch_4 <- covid_dat %>%
filter(lockdown == "lvl4") %>%
select(starts_with("Fof")) %>%
RSM()
rasch
plotPImap(rasch, cex.gen = .55)
summary(rasch_4)
plotPWmap(rasch_4, pmap = TR... |
##########
# plot 4 #
##########
#read household consumption data and convert Date into "date" format
household_power_consumption <- read.csv("C:/Users/MDetomaso/Desktop/household_power_consumption.txt", sep = ";", na.strings = "?", stringsAsFactors = FALSE)
household_power_consumption$datetime <- strptime(paste... | /plot4.R | no_license | MDetomaso/ExData_Plotting1 | R | false | false | 1,805 | r | ##########
# plot 4 #
##########
#read household consumption data and convert Date into "date" format
household_power_consumption <- read.csv("C:/Users/MDetomaso/Desktop/household_power_consumption.txt", sep = ";", na.strings = "?", stringsAsFactors = FALSE)
household_power_consumption$datetime <- strptime(paste... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Classifier/liver.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0,family="gaussian",standardize=FALSE)
sink('./liver_002.txt',append=TRUE)
prin... | /Model/EN/Classifier/liver/liver_002.R | no_license | esbgkannan/QSMART | R | false | false | 345 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Classifier/liver.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0,family="gaussian",standardize=FALSE)
sink('./liver_002.txt',append=TRUE)
prin... |
##' QGIS Algorithm provided by GRASS r.mode (grass7:r.mode)
##'
##' @title QGIS algorithm r.mode
##'
##' @param base `raster` - Base layer to be reclassified. Path to a raster layer.
##' @param cover `raster` - Categories layer. Path to a raster layer.
##' @param output `rasterDestination` - Mode. Path for new raster l... | /R/grass7_r_mode.R | permissive | VB6Hobbyst7/r_package_qgis | R | false | false | 2,269 | r | ##' QGIS Algorithm provided by GRASS r.mode (grass7:r.mode)
##'
##' @title QGIS algorithm r.mode
##'
##' @param base `raster` - Base layer to be reclassified. Path to a raster layer.
##' @param cover `raster` - Categories layer. Path to a raster layer.
##' @param output `rasterDestination` - Mode. Path for new raster l... |
#####################################################################################################
# leetcode 276: Paint Fence
#There is a fence with n posts, each post can be painted with one of the k colors.
#You have to paint all the posts such that no more than two adjacent fence posts have the same color.
#Ret... | /DynamicProgramming/PaintFence.R | no_license | songyuzhou324/LeetCode_RSolution | R | false | false | 940 | r | #####################################################################################################
# leetcode 276: Paint Fence
#There is a fence with n posts, each post can be painted with one of the k colors.
#You have to paint all the posts such that no more than two adjacent fence posts have the same color.
#Ret... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cards.R
\name{delete_card}
\alias{delete_card}
\title{Delete a card in a GitHub project}
\usage{
delete_card(card, ...)
}
\arguments{
\item{card}{(integer) The ID of the card.}
\item{...}{Parameters passed to \code{\link[=gh_request]{gh_requ... | /man/delete_card.Rd | permissive | jfontestad/githapi | R | false | true | 1,024 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cards.R
\name{delete_card}
\alias{delete_card}
\title{Delete a card in a GitHub project}
\usage{
delete_card(card, ...)
}
\arguments{
\item{card}{(integer) The ID of the card.}
\item{...}{Parameters passed to \code{\link[=gh_request]{gh_requ... |
#' @rdname duckdb_connection-class
#' @inheritParams DBI::dbGetInfo
#' @usage NULL
dbGetInfo__duckdb_connection <- function(dbObj, ...) {
info <- dbGetInfo(dbObj@driver)
list(
dbname = info$dbname,
db.version = info$driver.version,
username = NA,
host = NA,
port = NA
)
}
#' @rdname duckdb_con... | /tools/rpkg/R/dbGetInfo__duckdb_connection.R | permissive | duckdb/duckdb | R | false | false | 419 | r | #' @rdname duckdb_connection-class
#' @inheritParams DBI::dbGetInfo
#' @usage NULL
dbGetInfo__duckdb_connection <- function(dbObj, ...) {
info <- dbGetInfo(dbObj@driver)
list(
dbname = info$dbname,
db.version = info$driver.version,
username = NA,
host = NA,
port = NA
)
}
#' @rdname duckdb_con... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/optimpute.R
\name{single_knn_imputation_learner}
\alias{single_knn_imputation_learner}
\title{Learner for conducting heuristic k-NN imputation}
\usage{
single_knn_imputation_learner(...)
}
\arguments{
\item{...}{Use keyword arguments to set p... | /man/single_knn_imputation_learner.Rd | no_license | cran/iai | R | false | true | 655 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/optimpute.R
\name{single_knn_imputation_learner}
\alias{single_knn_imputation_learner}
\title{Learner for conducting heuristic k-NN imputation}
\usage{
single_knn_imputation_learner(...)
}
\arguments{
\item{...}{Use keyword arguments to set p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SPRTwoState.R
\docType{class}
\name{SensorgramData-class}
\alias{SensorgramData-class}
\title{S4 class definition of SensorgramData}
\arguments{
\item{associationData}{Dataframe holding the association phase data.
It has a fixed form... | /man/SensorgramData-class.Rd | no_license | ffeng23/SPRATS | R | false | true | 2,312 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SPRTwoState.R
\docType{class}
\name{SensorgramData-class}
\alias{SensorgramData-class}
\title{S4 class definition of SensorgramData}
\arguments{
\item{associationData}{Dataframe holding the association phase data.
It has a fixed form... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Classifier/pancreas.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.45,family="gaussian",standardize=TRUE)
sink('./pancreas_053.txt',append=TR... | /Model/EN/Classifier/pancreas/pancreas_053.R | no_license | esbgkannan/QSMART | R | false | false | 353 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Classifier/pancreas.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.45,family="gaussian",standardize=TRUE)
sink('./pancreas_053.txt',append=TR... |
# read_stata --------------------------------------------------------------
test_that("stata data types read into expected types (#45)", {
df <- read_stata(test_path("stata/types.dta"))
types <- vapply(df, typeof, character(1))
expect_equal(types, c(
vfloat = "double",
vdouble = "double",
vlong = "d... | /tests/testthat/test-haven-stata.R | permissive | tidyverse/haven | R | false | false | 7,819 | r | # read_stata --------------------------------------------------------------
test_that("stata data types read into expected types (#45)", {
df <- read_stata(test_path("stata/types.dta"))
types <- vapply(df, typeof, character(1))
expect_equal(types, c(
vfloat = "double",
vdouble = "double",
vlong = "d... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.