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 |
|---|---|---|---|---|---|---|---|---|---|
library(ape)
testtree <- read.tree("9142_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="9142_0_unrooted.txt") | /codeml_files/newick_trees_processed/9142_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("9142_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="9142_0_unrooted.txt") |
####################
## DEPRECATED ######
####################
#' Deprecated functions
#'
#' Functions deprecated due to changed naming or because functionality is discarded. Deprecated functions are made defunct
#' every 1 major or every 2 minor package updates. See the NEWS file for more information about since whe... | /R/deprecated.R | no_license | vanpeltj/sentometrics | R | false | false | 9,110 | r |
####################
## DEPRECATED ######
####################
#' Deprecated functions
#'
#' Functions deprecated due to changed naming or because functionality is discarded. Deprecated functions are made defunct
#' every 1 major or every 2 minor package updates. See the NEWS file for more information about since whe... |
library(ape)
testtree <- read.tree("2006_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="2006_0_unrooted.txt") | /codeml_files/newick_trees_processed/2006_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("2006_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="2006_0_unrooted.txt") |
####Gütemaß improvements
rm(list = ls())
setwd("~/Workspace/RioSaoFrancisco/ResultsCalibration/Paper/NewExe/6000runs")
png(file = "ObjectiveFunctions_irriNoirri.png", bg = "white", width = 1500 , height = 2480, res = 300)
par(mfrow = c(2, 1), mai = c(1,1,0.2,0.2), oma = c(2, 2, .5, .5), mgp = c(2, .6, 0))
# for bar... | /Paper/Barplot_ObjectiveFunction.R | no_license | plvoit/RSF | R | false | false | 14,986 | r | ####Gütemaß improvements
rm(list = ls())
setwd("~/Workspace/RioSaoFrancisco/ResultsCalibration/Paper/NewExe/6000runs")
png(file = "ObjectiveFunctions_irriNoirri.png", bg = "white", width = 1500 , height = 2480, res = 300)
par(mfrow = c(2, 1), mai = c(1,1,0.2,0.2), oma = c(2, 2, .5, .5), mgp = c(2, .6, 0))
# for bar... |
#' Harmonize a set of education variables all at once
#' @param data.frame
#' @value data.frame
#' @export
build_geography_municipality2010standard_1970 <- function(CensusData,
state_var_name = "uf"){
if(!is.data.frame(CensusData)){
sto... | /R/build_geography_municipality2010standard_1970.R | no_license | claudiacerqn/harmonizeIBGE | R | false | false | 2,315 | r | #' Harmonize a set of education variables all at once
#' @param data.frame
#' @value data.frame
#' @export
build_geography_municipality2010standard_1970 <- function(CensusData,
state_var_name = "uf"){
if(!is.data.frame(CensusData)){
sto... |
###11.0.0.4 Excercise ###
X <- read.csv('ChlorellaGrowth.csv',comment.char='#')
# using '#' as a comment character allows us the CSV file to be self-documenting
par(cex=1.5,cex.main=0.9,mfcol=c(2,1))
plot(rmax~light,data=X,xlab="light intensity (uE/m2/s)",ylab="maximum growth rate (1/d)",pch=16)
title(main="Data fro... | /11.0.0.4.R | no_license | ediamant/BootcampAssignments | R | false | false | 1,846 | r | ###11.0.0.4 Excercise ###
X <- read.csv('ChlorellaGrowth.csv',comment.char='#')
# using '#' as a comment character allows us the CSV file to be self-documenting
par(cex=1.5,cex.main=0.9,mfcol=c(2,1))
plot(rmax~light,data=X,xlab="light intensity (uE/m2/s)",ylab="maximum growth rate (1/d)",pch=16)
title(main="Data fro... |
# install.packages(c("ggvis","dplyr"))
library(dplyr)
library(ggvis)
mtcars %>%
ggvis(~mpg, ~wt,
fill = input_radiobuttons(label = "Choose fill variable:",
choices = c("vs","carb"), map = as.name)) %>%
layer_points() %>%
layer_smooths()
mtcars %>%
ggvis(~mpg) %>%
layer_histograms(width... | /Presentation/ggvis.R | no_license | cimentadaj/Rseminars | R | false | false | 1,823 | r | # install.packages(c("ggvis","dplyr"))
library(dplyr)
library(ggvis)
mtcars %>%
ggvis(~mpg, ~wt,
fill = input_radiobuttons(label = "Choose fill variable:",
choices = c("vs","carb"), map = as.name)) %>%
layer_points() %>%
layer_smooths()
mtcars %>%
ggvis(~mpg) %>%
layer_histograms(width... |
#Run everything in the main .Rmd to set up the dataframes for these models.
#Note: modelling takes a while.
library(WARN)
kellis <- subset(egyptCN, siteName == "Kellis 1" | siteName == "Kellis 2" & sampleType == "Bone") %>%
filter(!is.na(d15N))
kellis2 <- subset(kellis, select = c(refIndividualInPubli, humanSex... | /warn.R | no_license | stantis/IsoArchEAA | R | false | false | 1,309 | r | #Run everything in the main .Rmd to set up the dataframes for these models.
#Note: modelling takes a while.
library(WARN)
kellis <- subset(egyptCN, siteName == "Kellis 1" | siteName == "Kellis 2" & sampleType == "Bone") %>%
filter(!is.na(d15N))
kellis2 <- subset(kellis, select = c(refIndividualInPubli, humanSex... |
# article: Gromov–Wasserstein Distances and the
# Metric Approach to Object Matching
# author : Facundo Mémoli
# implementation of FLB (lk 467)
# constraints to mu (lk 466)
mu_constraints <- function(mu_X,mu_Y)
{
mu <- matrix(NA, nrow = length(mu_X),
ncol = length(mu_Y), byrow = T)
... | /R/mu_constraints.R | no_license | rendrikson/gwDist | R | false | false | 1,172 | r | # article: Gromov–Wasserstein Distances and the
# Metric Approach to Object Matching
# author : Facundo Mémoli
# implementation of FLB (lk 467)
# constraints to mu (lk 466)
mu_constraints <- function(mu_X,mu_Y)
{
mu <- matrix(NA, nrow = length(mu_X),
ncol = length(mu_Y), byrow = T)
... |
# rekreirati SPSS-ov FREQUENCIES
frre <- function(x,...){
UseMethod("frre")
}
# labelled ----------------------------------------------------------------
frre.labelled <- function (x, lab.duljina = 40, ime="",
N = TRUE,
levels = "prefixed", sort_levels = "a... | /FUN_frre.R | no_license | ipuzek/R_funkcije | R | false | false | 5,743 | r | # rekreirati SPSS-ov FREQUENCIES
frre <- function(x,...){
UseMethod("frre")
}
# labelled ----------------------------------------------------------------
frre.labelled <- function (x, lab.duljina = 40, ime="",
N = TRUE,
levels = "prefixed", sort_levels = "a... |
#' Visualize data using ggplot2 \url{http://docs.ggplot2.org/current/}
#'
#' @details See \url{http://vnijs.github.io/radiant/base/visualize.html} for an example in Radiant
#'
#' @param dataset Dataset name (string). This can be a dataframe in the global environment or an element in an r_data list from Radiant
#' @para... | /certus/R/visualize.R | no_license | gvanzin/shiny | R | false | false | 7,077 | r | #' Visualize data using ggplot2 \url{http://docs.ggplot2.org/current/}
#'
#' @details See \url{http://vnijs.github.io/radiant/base/visualize.html} for an example in Radiant
#'
#' @param dataset Dataset name (string). This can be a dataframe in the global environment or an element in an r_data list from Radiant
#' @para... |
library(yardstick)
### Name: rsq
### Title: R squared
### Aliases: rsq rsq.data.frame rsq_vec
### ** Examples
# Supply truth and predictions as bare column names
rsq(solubility_test, solubility, prediction)
library(dplyr)
set.seed(1234)
size <- 100
times <- 10
# create 10 resamples
solubility_resampled <- bind_r... | /data/genthat_extracted_code/yardstick/examples/rsq.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 962 | r | library(yardstick)
### Name: rsq
### Title: R squared
### Aliases: rsq rsq.data.frame rsq_vec
### ** Examples
# Supply truth and predictions as bare column names
rsq(solubility_test, solubility, prediction)
library(dplyr)
set.seed(1234)
size <- 100
times <- 10
# create 10 resamples
solubility_resampled <- bind_r... |
# Version info: R 3.2.3, Biobase 2.30.0, GEOquery 2.40.0, limma 3.26.8
# R scripts generated Mon Sep 24 22:18:03 EDT 2018
################################################################
# Differential expression analysis with limma
library(Biobase)
library(GEOquery)
library(limma)
# load series and platform data ... | /gse71034_cotex_primary_neuron_fragile_x.r | no_license | cgh2797/GEO2R | R | false | false | 3,023 | r | # Version info: R 3.2.3, Biobase 2.30.0, GEOquery 2.40.0, limma 3.26.8
# R scripts generated Mon Sep 24 22:18:03 EDT 2018
################################################################
# Differential expression analysis with limma
library(Biobase)
library(GEOquery)
library(limma)
# load series and platform data ... |
#' Construct lower tolerance limit, upper tolerance limit and tolerance interval for a
#' proportion of future measurements from the gamma distribution.
#'
#' @param x observations of a gamma distribution.
#' @param alpha value of alpha, such that a (beta, 1-alpha) lower tolerance limit, a (beta, 1-alpha)
#' upper... | /R/tollimits.R | no_license | statcp/gammadist | R | false | false | 2,988 | r | #' Construct lower tolerance limit, upper tolerance limit and tolerance interval for a
#' proportion of future measurements from the gamma distribution.
#'
#' @param x observations of a gamma distribution.
#' @param alpha value of alpha, such that a (beta, 1-alpha) lower tolerance limit, a (beta, 1-alpha)
#' upper... |
#' @title summary method for funreg object
#' @description Returns summary information on a \code{funreg} object.
#' @param object An object of class \code{funreg}
#' @param digits The number of digits past the decimal place to use when printing numbers
#' @param silent If \code{TRUE}, indicates that the summary sh... | /funreg/R/SummaryFunReg.r | no_license | ingted/R-Examples | R | false | false | 3,652 | r | #' @title summary method for funreg object
#' @description Returns summary information on a \code{funreg} object.
#' @param object An object of class \code{funreg}
#' @param digits The number of digits past the decimal place to use when printing numbers
#' @param silent If \code{TRUE}, indicates that the summary sh... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12400894659582e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
st... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615782950-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 329 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12400894659582e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(8L, 3L)))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
st... |
\name{pedIBD}
\Rdversion{1.1}
\alias{pedIBD}
\title{Calculates the Pedigree-based Kinship Matrix
}
\description{
Calculates the \bold{ped}igree based probability of alleles to be \bold{IBD}. This pedigree based kinship matrix is also called coancestry matrix and i... | /fuzzedpackages/optiSel/man/pedIBD.Rd | no_license | akhikolla/testpackages | R | false | false | 1,701 | rd | \name{pedIBD}
\Rdversion{1.1}
\alias{pedIBD}
\title{Calculates the Pedigree-based Kinship Matrix
}
\description{
Calculates the \bold{ped}igree based probability of alleles to be \bold{IBD}. This pedigree based kinship matrix is also called coancestry matrix and i... |
library(psych)
# Matrix Transformations
# cbind(as.matrix(d1[1:30]),as.matrix(d2[1:30]), as.matrix(d3[1:30]),as.matrix(d4[1:30]),as.matrix(d5[1:30]))
#-- change dtm term weighting with log.
nV <- nV[,order(nV[1,],decreasing = TRUE)] # this is just ordering according to first row= 1. doc, maybe not represenatativ... | /code/R/Transformations.R | no_license | cklaussner/thesis-stylometry | R | false | false | 4,031 | r | library(psych)
# Matrix Transformations
# cbind(as.matrix(d1[1:30]),as.matrix(d2[1:30]), as.matrix(d3[1:30]),as.matrix(d4[1:30]),as.matrix(d5[1:30]))
#-- change dtm term weighting with log.
nV <- nV[,order(nV[1,],decreasing = TRUE)] # this is just ordering according to first row= 1. doc, maybe not represenatativ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/easyVP.R
\name{easyVP}
\alias{easyVP}
\title{easyVP}
\usage{
easyVP(DEGlist, main, FCcol1, FCcol2, FCcol3, FClimit, PVALlimit, LegendPlace)
}
\arguments{
\item{DEGlist}{limma output. List of differentially expressed features with mandatory co... | /man/easyVP.Rd | no_license | nahtan/easyVP | R | false | true | 1,317 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/easyVP.R
\name{easyVP}
\alias{easyVP}
\title{easyVP}
\usage{
easyVP(DEGlist, main, FCcol1, FCcol2, FCcol3, FClimit, PVALlimit, LegendPlace)
}
\arguments{
\item{DEGlist}{limma output. List of differentially expressed features with mandatory co... |
library(shiny)
shinyServer(function(input,output,session){
thedata <- reactive({
input$update # when update is pressed
isolate({
withProgress({
setProgress(message = "Processing corpus...")
getTDM(input$input_file)
})
})#isolate ends
})# reactive code
w... | /server.R | no_license | saitej09/basic-text-mining | R | false | false | 724 | r | library(shiny)
shinyServer(function(input,output,session){
thedata <- reactive({
input$update # when update is pressed
isolate({
withProgress({
setProgress(message = "Processing corpus...")
getTDM(input$input_file)
})
})#isolate ends
})# reactive code
w... |
library(dplyr)
library(lubridate)
library(magrittr)
library(readr)
library(stringr)
power <- read_delim("~/Data Science/household_power_consumption.txt",
";", col_types = cols(.default = "c"))
power$datetime <- str_c(power$Date, power$Time, sep = " ")
power$datetime <-dmy_hms(power$datet... | /plot2.R | no_license | edavidaja/ExData_Plotting1 | R | false | false | 650 | r | library(dplyr)
library(lubridate)
library(magrittr)
library(readr)
library(stringr)
power <- read_delim("~/Data Science/household_power_consumption.txt",
";", col_types = cols(.default = "c"))
power$datetime <- str_c(power$Date, power$Time, sep = " ")
power$datetime <-dmy_hms(power$datet... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/list_scientific_names.R
\name{list_scientific_names}
\alias{list_scientific_names}
\title{List all available scientific names}
\usage{
list_scientific_names(connection = con)
}
\arguments{
\item{connection}{A connection to the ETN database. D... | /man/list_scientific_names.Rd | permissive | inbo/etn | R | false | true | 495 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/list_scientific_names.R
\name{list_scientific_names}
\alias{list_scientific_names}
\title{List all available scientific names}
\usage{
list_scientific_names(connection = con)
}
\arguments{
\item{connection}{A connection to the ETN database. D... |
library(Matrix)
library(dplyr)
library(irlba)
library(Rtsne)
library(ggplot2)
library(scatterpie)
library(gplots)
library(SummarizedExperiment)
simulateAltReadCount <- function(n_snps, n_strain, n_samples, n_mixture, min_depth, max_depth, n_max_mixture, n_pc, beta, min_alt, max_alt, seed){
set.seed(seed)
#... | /simulateAltReadCount.r | no_license | yyw-informatics/MixtureDetection_KNN | R | false | false | 2,433 | r | library(Matrix)
library(dplyr)
library(irlba)
library(Rtsne)
library(ggplot2)
library(scatterpie)
library(gplots)
library(SummarizedExperiment)
simulateAltReadCount <- function(n_snps, n_strain, n_samples, n_mixture, min_depth, max_depth, n_max_mixture, n_pc, beta, min_alt, max_alt, seed){
set.seed(seed)
#... |
##' @title archive_timing
##'
##' @description Get or set the number of seconds to wait after trying to
##' retrieve a file from the CRAN Archive.
##'
##' This is intended to stop intermittent install failures
##' due to failing to retrieve files that *are* in the
##' archive but are not downloading properly when a la... | /R/accessors.R | no_license | cran/switchr | R | false | false | 21,895 | r |
##' @title archive_timing
##'
##' @description Get or set the number of seconds to wait after trying to
##' retrieve a file from the CRAN Archive.
##'
##' This is intended to stop intermittent install failures
##' due to failing to retrieve files that *are* in the
##' archive but are not downloading properly when a la... |
#### Read in NRS Stillbirths ####
data_nrs_stillbirths_raw <- as_tibble(
dbGetQuery(
SMRAConnection, paste0(
"
SELECT MOTHER_DERIVED_CHI, MOTHER_UPI_NUMBER, POSTCODE, DATE_OF_BIRTH,
DURATION_OF_PREGNANCY, TOTAL_BIRTHS_LIVE_AND_STILL, SEX, WEIGHT_OF_FOETUS,
PRIMARY_CAUSE_OF_DEATH, SECONDARY_CAUSE_... | /COPS code/1f. read in nrs stillbirths.r | no_license | Public-Health-Scotland/COPS-public | R | false | false | 3,785 | r | #### Read in NRS Stillbirths ####
data_nrs_stillbirths_raw <- as_tibble(
dbGetQuery(
SMRAConnection, paste0(
"
SELECT MOTHER_DERIVED_CHI, MOTHER_UPI_NUMBER, POSTCODE, DATE_OF_BIRTH,
DURATION_OF_PREGNANCY, TOTAL_BIRTHS_LIVE_AND_STILL, SEX, WEIGHT_OF_FOETUS,
PRIMARY_CAUSE_OF_DEATH, SECONDARY_CAUSE_... |
a <- 1
f <- function(x) {
return (x^2)
}
f(1)
round(1.5)
round(2.500001)
l <- list(name="Jane", age=3, grades = c(4,56,6,3))
str(l)
df <- data.frame(a=c(1,2,3), b = c("A", "B", "C")) ; df
str(df)
str(mtcars)
View(iris)
kml <- mtcars$mpg * 0.425144
mtcars$kml <- kml
mtcars
| /workScript.R | no_license | NLAHAM3/r-training | R | false | false | 295 | r | a <- 1
f <- function(x) {
return (x^2)
}
f(1)
round(1.5)
round(2.500001)
l <- list(name="Jane", age=3, grades = c(4,56,6,3))
str(l)
df <- data.frame(a=c(1,2,3), b = c("A", "B", "C")) ; df
str(df)
str(mtcars)
View(iris)
kml <- mtcars$mpg * 0.425144
mtcars$kml <- kml
mtcars
|
## Creates a matrix that caches it's inverse when it is calculated using the
## cacheSolve() function
## Creates a matrix that can cache it's own inverse.
## Returns a list of functions that operate on the matrix.
makeCacheMatrix <- function(x = matrix()) {
m_inverse <- NULL
set <- function(y) {
x... | /cachematrix.R | no_license | karlfsia/ProgrammingAssignment2 | R | false | false | 968 | r | ## Creates a matrix that caches it's inverse when it is calculated using the
## cacheSolve() function
## Creates a matrix that can cache it's own inverse.
## Returns a list of functions that operate on the matrix.
makeCacheMatrix <- function(x = matrix()) {
m_inverse <- NULL
set <- function(y) {
x... |
# Red Neuranal R ----------------------------------------------------------
#########################
# Implementando #
# Redes Neuronales en R #
#########################
install.packages("NeuralNetTools")
install.packages("neuralnet")
library(neuralnet)
library(NeuralNetTools)
# cualida... | /caperucita_example.R | no_license | GenoKiller777/PythonMyFirstNeuronalNetwork | R | false | false | 1,704 | r |
# Red Neuranal R ----------------------------------------------------------
#########################
# Implementando #
# Redes Neuronales en R #
#########################
install.packages("NeuralNetTools")
install.packages("neuralnet")
library(neuralnet)
library(NeuralNetTools)
# cualida... |
# Reading, naming and subsetting power consumption data
power <- read.table("household_power_consumption.txt",skip=1,sep=";")
names(power) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
subpower <- subset(power,power$D... | /Plot4.R | no_license | GeorgePergeris/ExData_Plotting1 | R | false | false | 1,834 | r | # Reading, naming and subsetting power consumption data
power <- read.table("household_power_consumption.txt",skip=1,sep=";")
names(power) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
subpower <- subset(power,power$D... |
library(tidyverse)
library(caret)
library(doParallel)
library(ROCR)
#AUCを算出するための関数
calAUC <- function(predictions, labels){
pred <- prediction(predictions, labels)
auc.tmp <- performance(pred,"auc")
auc <- as.numeric(auc.tmp@y.values)
message(paste0("> AUC:",auc))
return(auc)
}
# selective lavelsのデータセットの... | /selective_labels_program.R | no_license | saltcooky/Learning_under_selective_labels | R | false | false | 5,484 | r | library(tidyverse)
library(caret)
library(doParallel)
library(ROCR)
#AUCを算出するための関数
calAUC <- function(predictions, labels){
pred <- prediction(predictions, labels)
auc.tmp <- performance(pred,"auc")
auc <- as.numeric(auc.tmp@y.values)
message(paste0("> AUC:",auc))
return(auc)
}
# selective lavelsのデータセットの... |
#' Comparing two Kaplan Meier curves in one plot
#'
#' @description The function compares two Kaplan Meier curves in one plot
#'
#' @param x1 Nx2 data matrix,first columen represents survival time of the i-th subject, second column represents censored flag (0 if not censored, 1 if censored)
#' @param x2 Nx2 data matri... | /R/km_combine.R | no_license | baihongguo/RPEXE.RPEXT-1 | R | false | false | 2,025 | r | #' Comparing two Kaplan Meier curves in one plot
#'
#' @description The function compares two Kaplan Meier curves in one plot
#'
#' @param x1 Nx2 data matrix,first columen represents survival time of the i-th subject, second column represents censored flag (0 if not censored, 1 if censored)
#' @param x2 Nx2 data matri... |
library(ggplot2)
library(dplyr)
library(tidyr)
out.dir="output"
#Mean GOM zooplankton abundance anomalies from Ryan Morse (GOM_mean_seasonal_anomalies.csv)
GOMseasonZooAbund <- readr::read_csv(here::here(data.dir, "GOM_mean_seasonal_anomalies.csv"))
GOMsummerZoop <- GOMseasonZooAbund %>% dplyr::filter(year >= 1992,... | /R/RegimeShifts_EnvirVar.R | no_license | Laurels1/Condition | R | false | false | 43,494 | r |
library(ggplot2)
library(dplyr)
library(tidyr)
out.dir="output"
#Mean GOM zooplankton abundance anomalies from Ryan Morse (GOM_mean_seasonal_anomalies.csv)
GOMseasonZooAbund <- readr::read_csv(here::here(data.dir, "GOM_mean_seasonal_anomalies.csv"))
GOMsummerZoop <- GOMseasonZooAbund %>% dplyr::filter(year >= 1992,... |
Set2_Fittness <- function(BW)
{
for(EvaNr in seq(1,nEva))
{
for(St in Dist_Lev.Train) #Loop distance level
{
# Pause Density
dfPause <- approxfun(density(Act_Veh.Train$Dist_Pause[which(Act_Veh.Train$Distance == St)],BW[which(Dist_Lev.Train == St)]))
# Pause to the last such drive (w... | /Set2_Fittness.R | no_license | ChenyangZhou/Trip-Prediction | R | false | false | 2,114 | r | Set2_Fittness <- function(BW)
{
for(EvaNr in seq(1,nEva))
{
for(St in Dist_Lev.Train) #Loop distance level
{
# Pause Density
dfPause <- approxfun(density(Act_Veh.Train$Dist_Pause[which(Act_Veh.Train$Distance == St)],BW[which(Dist_Lev.Train == St)]))
# Pause to the last such drive (w... |
# currently "outliers" is not used by the functions in the package
# but it may be useful to define the input of some functions,
# e.g. argument "mo" in functions "outliers.effects" and "outliers.regressors"
outliers <- function(type, ind, weight = NULL)
{
if (is.null(weight))
weight <- rep(1, length(type))
... | /outliers-data-frame.R | no_license | stevejobsmyguru/TSOOutlier-Mini-R | R | false | false | 478 | r |
# currently "outliers" is not used by the functions in the package
# but it may be useful to define the input of some functions,
# e.g. argument "mo" in functions "outliers.effects" and "outliers.regressors"
outliers <- function(type, ind, weight = NULL)
{
if (is.null(weight))
weight <- rep(1, length(type))
... |
#reference to professor's code on course website
wdat<-read.csv('pima-indians-diabetes.csv', header=FALSE)
library(klaR)
library(caret)
wdat[, 3][wdat[, 3] == 0] <- NA
wdat[, 4][wdat[, 4] == 0] <- NA
wdat[, 6][wdat[, 6] == 0] <- NA
wdat[, 8][wdat[, 8] == 0] <- NA
features<-wdat[,-c(9)]
labels<-wdat[,9]
... | /hw1/hw1_1B.R | no_license | conniehuang98/CS498-Applied-Machine-Learning | R | false | false | 2,093 | r | #reference to professor's code on course website
wdat<-read.csv('pima-indians-diabetes.csv', header=FALSE)
library(klaR)
library(caret)
wdat[, 3][wdat[, 3] == 0] <- NA
wdat[, 4][wdat[, 4] == 0] <- NA
wdat[, 6][wdat[, 6] == 0] <- NA
wdat[, 8][wdat[, 8] == 0] <- NA
features<-wdat[,-c(9)]
labels<-wdat[,9]
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pipe_helpers.R
\name{iff}
\alias{iff}
\alias{iffn}
\title{Apply a function if and only if test is TRUE}
\usage{
iff(obj, test, fun, ...)
iffn(obj, test, fun, ...)
}
\arguments{
\item{obj}{object to apply test and fun to}
\item{test}{logical... | /man/iff.Rd | no_license | cran/manifestoR | R | false | true | 523 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pipe_helpers.R
\name{iff}
\alias{iff}
\alias{iffn}
\title{Apply a function if and only if test is TRUE}
\usage{
iff(obj, test, fun, ...)
iffn(obj, test, fun, ...)
}
\arguments{
\item{obj}{object to apply test and fun to}
\item{test}{logical... |
testlist <- list(id = NULL, id = NULL, booklet_id = c(8168473L, 2127314835L, 171177770L, -1942759639L, -1815221204L, 601253144L, -804651186L, 2094281728L, 860713787L, -971707632L, -1475044502L, 870040598L, -1182814578L, -1415711445L, 1901326755L, -1882837573L, 1340545259L, 1156041943L, 823641785L, -1106109928L, -10... | /dexterMST/inst/testfiles/is_person_booklet_sorted/AFL_is_person_booklet_sorted/is_person_booklet_sorted_valgrind_files/1615939935-test.R | no_license | akhikolla/updatedatatype-list1 | R | false | false | 826 | r | testlist <- list(id = NULL, id = NULL, booklet_id = c(8168473L, 2127314835L, 171177770L, -1942759639L, -1815221204L, 601253144L, -804651186L, 2094281728L, 860713787L, -971707632L, -1475044502L, 870040598L, -1182814578L, -1415711445L, 1901326755L, -1882837573L, 1340545259L, 1156041943L, 823641785L, -1106109928L, -10... |
testlist <- list(A = structure(c(1.38997190089718e-309, 3.81575932257023e-236, 3.8157142318935e-236), .Dim = c(1L, 3L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613126058-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 225 | r | testlist <- list(A = structure(c(1.38997190089718e-309, 3.81575932257023e-236, 3.8157142318935e-236), .Dim = c(1L, 3L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) |
#' Add a new factor with a change between the values of two factors in a tidy table
#'
#'This function is used to calculate changes between values of categories (dates, ages, countries, etc).
#'
#'The data may come as TIDY, meaning that all values are in 1 column and other columns show information related to the value,... | /R/addcht.R | no_license | aalvaradob/utildf | R | false | false | 1,640 | r | #' Add a new factor with a change between the values of two factors in a tidy table
#'
#'This function is used to calculate changes between values of categories (dates, ages, countries, etc).
#'
#'The data may come as TIDY, meaning that all values are in 1 column and other columns show information related to the value,... |
####### --Ignore if already load the data-- ########################################
####################################################################################
### Read the data data.table format
library(data.table)
library(dplyr)
power_consumption <- fread("household_power_consumption.txt")
### subset ... | /plot4.R | no_license | QSFTW/ExData_Plotting1 | R | false | false | 2,797 | r | ####### --Ignore if already load the data-- ########################################
####################################################################################
### Read the data data.table format
library(data.table)
library(dplyr)
power_consumption <- fread("household_power_consumption.txt")
### subset ... |
source("gini Function.R")
source("utils.R")
RpartModel <- function(data, cp) {
dataset <- data
# create a model
tree_model <- rpart(DefFlag ~ .,
data=dataset,
control=rpart.control(minsplit=2,
minbucket=1,
... | /models.R | no_license | adamsqi/srd | R | false | false | 1,503 | r | source("gini Function.R")
source("utils.R")
RpartModel <- function(data, cp) {
dataset <- data
# create a model
tree_model <- rpart(DefFlag ~ .,
data=dataset,
control=rpart.control(minsplit=2,
minbucket=1,
... |
##1
# Consider the mtcars data set. Fit a model with mpg as the outcome that
# includes number of cylinders as a factor variable and weight as confounder.
# Give the adjusted estimate for the expected change in mpg comparing 8
# cylinders to 4.
fit <- lm(mpg ~ factor(cyl) + wt, data = mtcars)
summary(fit)
##2
# Con... | /regression_models/reg_quiz3.R | no_license | alambike123/coursera | R | false | false | 2,753 | r | ##1
# Consider the mtcars data set. Fit a model with mpg as the outcome that
# includes number of cylinders as a factor variable and weight as confounder.
# Give the adjusted estimate for the expected change in mpg comparing 8
# cylinders to 4.
fit <- lm(mpg ~ factor(cyl) + wt, data = mtcars)
summary(fit)
##2
# Con... |
# load packages, get data
packages <- c("data.table", "reshape2")
sapply(packages, require, character.only=TRUE, quietly=TRUE)
path <- getwd()
url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(url, file.path(path, "dataFiles.zip"))
unzip(zipfile = "dataFiles.z... | /run_analysis.R | no_license | wdang4/get_clean_data_proj | R | false | false | 2,334 | r | # load packages, get data
packages <- c("data.table", "reshape2")
sapply(packages, require, character.only=TRUE, quietly=TRUE)
path <- getwd()
url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(url, file.path(path, "dataFiles.zip"))
unzip(zipfile = "dataFiles.z... |
library(data.table)
library(ggplot2)
library(ggrepel)
## DEPRECATED
# see format_coloc_v2.R
setwd('/oak/stanford/groups/smontgom/nicolerg/LAVA/REVISED_COLOC')
if(!file.exists('all_merged-egenes_coloc_finemap-1e-04-20200415.RData')){
load('master_coloc-1e-04-20200414.RData') # filtered down to loci of interest (... | /colocalization/merge_coloc_finemap.R | no_license | nicolerg/gtex-admixture-la | R | false | false | 4,422 | r | library(data.table)
library(ggplot2)
library(ggrepel)
## DEPRECATED
# see format_coloc_v2.R
setwd('/oak/stanford/groups/smontgom/nicolerg/LAVA/REVISED_COLOC')
if(!file.exists('all_merged-egenes_coloc_finemap-1e-04-20200415.RData')){
load('master_coloc-1e-04-20200414.RData') # filtered down to loci of interest (... |
library(lhs)
### Name: improvedLHS
### Title: Improved Latin Hypercube Sample
### Aliases: improvedLHS
### Keywords: design
### ** Examples
improvedLHS(4, 3, 2)
| /data/genthat_extracted_code/lhs/examples/improvedLHS.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 170 | r | library(lhs)
### Name: improvedLHS
### Title: Improved Latin Hypercube Sample
### Aliases: improvedLHS
### Keywords: design
### ** Examples
improvedLHS(4, 3, 2)
|
#' Marginal Response for a Single Variable
#'
#' Calculates the average model response as a function of a single selected variable.
#' Use the 'type' parameter to select the type of marginal response to be calculated.
#' Currently we have Partial Dependency and Accumulated Local Effects implemented.
#' Current implemen... | /R/single_variable.R | no_license | benzei/DALEX | R | false | false | 3,148 | r | #' Marginal Response for a Single Variable
#'
#' Calculates the average model response as a function of a single selected variable.
#' Use the 'type' parameter to select the type of marginal response to be calculated.
#' Currently we have Partial Dependency and Accumulated Local Effects implemented.
#' Current implemen... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pack.R
\name{pack}
\alias{pack}
\alias{unpack}
\title{Pack and unpack}
\usage{
pack(.data, ..., .names_sep = NULL, .error_call = current_env())
unpack(
data,
cols,
...,
names_sep = NULL,
names_repair = "check_unique",
error_call ... | /man/pack.Rd | permissive | tidyverse/tidyr | R | false | true | 3,941 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pack.R
\name{pack}
\alias{pack}
\alias{unpack}
\title{Pack and unpack}
\usage{
pack(.data, ..., .names_sep = NULL, .error_call = current_env())
unpack(
data,
cols,
...,
names_sep = NULL,
names_repair = "check_unique",
error_call ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unwrapLon.r
\name{unwrapLon}
\alias{unwrapLon}
\title{unwrapLon}
\usage{
unwrapLon(lon, lmin = -180)
}
\description{
unwrapLon
}
\details{
Internal function not normally called by user
}
| /R/duckConfit/man/unwrapLon.Rd | no_license | SCAR/RAATD | R | false | true | 265 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/unwrapLon.r
\name{unwrapLon}
\alias{unwrapLon}
\title{unwrapLon}
\usage{
unwrapLon(lon, lmin = -180)
}
\description{
unwrapLon
}
\details{
Internal function not normally called by user
}
|
# FireCloud
#
# FireCloud API
#
# The version of the OpenAPI document: 0.1
#
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title CuratorStatus
#'
#' @description CuratorStatus Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field curator character
#'
#' @importFrom R6 R6Class
#... | /R/curator_status.R | no_license | vjcitn/terraClientR | R | false | false | 1,609 | r | # FireCloud
#
# FireCloud API
#
# The version of the OpenAPI document: 0.1
#
# Generated by: https://openapi-generator.tech
#' @docType class
#' @title CuratorStatus
#'
#' @description CuratorStatus Class
#'
#' @format An \code{R6Class} generator object
#'
#' @field curator character
#'
#' @importFrom R6 R6Class
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AlleleComp.R
\name{AlleleComp}
\alias{AlleleComp}
\title{Copynumber estimation}
\usage{
AlleleComp(data, AD, file.name, method, uniform.break)
}
\arguments{
\item{data}{A \code{vcfR} object of the sequencing calls.}
\item{AD}{a \code{charact... | /man/AlleleComp.Rd | no_license | Subhayan18/CRUST | R | false | true | 1,795 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AlleleComp.R
\name{AlleleComp}
\alias{AlleleComp}
\title{Copynumber estimation}
\usage{
AlleleComp(data, AD, file.name, method, uniform.break)
}
\arguments{
\item{data}{A \code{vcfR} object of the sequencing calls.}
\item{AD}{a \code{charact... |
# Brett W.
# LIS4761 - Data Mining
# Sentiment Analysis
# Necessary libraries.
require(readr)
require(tm)
require(XML)
require(ggplot2)
# Read in list of positive and negative words.
pos <- "/home/brett/LIS4761_Data_Mining/data/opinion-lexicon-English/positive-words.txt"
neg <- "/home/brett/LIS4761_Data_Mining/dat... | /sentimentAnalysis.R | no_license | WaughB/LIS4761_Data_Mining | R | false | false | 4,286 | r | # Brett W.
# LIS4761 - Data Mining
# Sentiment Analysis
# Necessary libraries.
require(readr)
require(tm)
require(XML)
require(ggplot2)
# Read in list of positive and negative words.
pos <- "/home/brett/LIS4761_Data_Mining/data/opinion-lexicon-English/positive-words.txt"
neg <- "/home/brett/LIS4761_Data_Mining/dat... |
#9.9, SVM example
install.packages("kernlab")
library(kernlab)
bank_data = read.csv(datafile, sep',', header=TRUE)
str(bank_data)
summary(bank_data)
nrows <- nrows(bank_data)
cutpoint <- floor(nrows/3*2)
cutpoint
rand <- sample(1:nrows)
bd.train <- bd[rand[1:cutpoint],]
bd.test <- bd[rand[(1:cutpoint+1):nrows],]
#1... | /ClassWork/Week 9_Data Mining /9.9 R SVM Example.R | no_license | josepicon/IST-687 | R | false | false | 986 | r | #9.9, SVM example
install.packages("kernlab")
library(kernlab)
bank_data = read.csv(datafile, sep',', header=TRUE)
str(bank_data)
summary(bank_data)
nrows <- nrows(bank_data)
cutpoint <- floor(nrows/3*2)
cutpoint
rand <- sample(1:nrows)
bd.train <- bd[rand[1:cutpoint],]
bd.test <- bd[rand[(1:cutpoint+1):nrows],]
#1... |
# Quantifying the contribution of occupational
# segregation to racial disparities in health:
# A gap-closing perspective
# Ian Lundberg
# ilundberg@princeton.edu
# See run_all.R where this file is called.
# Start with an environment with no objects so this code can be run independently
rm(list = ls(all = TRUE))
# ... | /occupational_segregation_health/sample_restrictions.R | no_license | ilundberg/replication | R | false | false | 1,987 | r | # Quantifying the contribution of occupational
# segregation to racial disparities in health:
# A gap-closing perspective
# Ian Lundberg
# ilundberg@princeton.edu
# See run_all.R where this file is called.
# Start with an environment with no objects so this code can be run independently
rm(list = ls(all = TRUE))
# ... |
library(FSAdata)
### Name: RWhitefishIR
### Title: Ages and lengths of Round Whitefish.
### Aliases: RWhitefishIR
### Keywords: datasets
### ** Examples
data(RWhitefishIR)
str(RWhitefishIR)
head(RWhitefishIR)
plot(tl~age,data=RWhitefishIR)
| /data/genthat_extracted_code/FSAdata/examples/RWhitefishIR.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 248 | r | library(FSAdata)
### Name: RWhitefishIR
### Title: Ages and lengths of Round Whitefish.
### Aliases: RWhitefishIR
### Keywords: datasets
### ** Examples
data(RWhitefishIR)
str(RWhitefishIR)
head(RWhitefishIR)
plot(tl~age,data=RWhitefishIR)
|
#
# Updates parent pids by querying .pid.update command files and passing them to processPIDCommandFile.
# Limits the number of processed command files per one rule run. By default, at most *MaxSuccess
# command files are processed.
#
# Required rulebases: eudat, catchError
#
# Configuration: edit the *Coll INPUT param... | /rules/EUDATUpdateParentPids.r | permissive | NicolasLiampotis/B2SAFE-core | R | false | false | 2,081 | r | #
# Updates parent pids by querying .pid.update command files and passing them to processPIDCommandFile.
# Limits the number of processed command files per one rule run. By default, at most *MaxSuccess
# command files are processed.
#
# Required rulebases: eudat, catchError
#
# Configuration: edit the *Coll INPUT param... |
\name{class-bal.tab.subclass}
\alias{class-bal.tab.subclass}
\title{Using \code{bal.tab()} with Subclassified Data}
\description{
When using \code{bal.tab()} with subclassified data, i.e., data split into subclasses where balance may hold, the output will be different from the standard, non-subclassified case, and th... | /man/class-bal.tab.subclass.Rd | no_license | Zoe187419/cobalt | R | false | false | 2,779 | rd | \name{class-bal.tab.subclass}
\alias{class-bal.tab.subclass}
\title{Using \code{bal.tab()} with Subclassified Data}
\description{
When using \code{bal.tab()} with subclassified data, i.e., data split into subclasses where balance may hold, the output will be different from the standard, non-subclassified case, and th... |
library(tidyverse)
library(cowplot)
library(readxl)
library(janitor)
library(lubridate)
# read in general data ----------------------------------------------------
plate_layout <- read_excel("data-general/chlamee-acclimated-plate-layout.xlsx")
plate_key <- read_excel("data-general/chlamee-acclimated-plate-key.xls... | /R-scripts/30_synergy_cytation_comparison.R | permissive | JoeyBernhardt/ChlamEE-TPC | R | false | false | 2,282 | r | library(tidyverse)
library(cowplot)
library(readxl)
library(janitor)
library(lubridate)
# read in general data ----------------------------------------------------
plate_layout <- read_excel("data-general/chlamee-acclimated-plate-layout.xlsx")
plate_key <- read_excel("data-general/chlamee-acclimated-plate-key.xls... |
#
# maint-dev-ratio.R, 19 Apr 17
#
# Data from:
# An Investigation of the Factors Affecting the Lifecycle Costs of COTS-Based Systems
# Laurence Michael Dunn
#
# Example from:
# Empirical Software Engineering using R
# Derek M. Jones
source("ESEUR_config.r")
# What percentage of maint/dev ratio is greater than 1
per... | /ecosystems/maint-dev-ratio.R | no_license | alanponce/ESEUR-code-data | R | false | false | 2,340 | r | #
# maint-dev-ratio.R, 19 Apr 17
#
# Data from:
# An Investigation of the Factors Affecting the Lifecycle Costs of COTS-Based Systems
# Laurence Michael Dunn
#
# Example from:
# Empirical Software Engineering using R
# Derek M. Jones
source("ESEUR_config.r")
# What percentage of maint/dev ratio is greater than 1
per... |
#Load libraries
library(dplyr)
library(magrittr)
library(brms)
library(parallel)
library(MASS)
##Read in data
# Dataset
cold_DA <- read.csv("data/growth/processed/analysis/COLD_quangen_growth_DA.csv", stringsAsFactors = F)
str(cold_DA)
dim(cold_DA)
#Format date and treatment
cold_DA %<>% mutate(treatment = as.factor... | /Katana/brms_mod.15.cold.R | no_license | fontikar/ldeli_growth | R | false | false | 1,260 | r |
#Load libraries
library(dplyr)
library(magrittr)
library(brms)
library(parallel)
library(MASS)
##Read in data
# Dataset
cold_DA <- read.csv("data/growth/processed/analysis/COLD_quangen_growth_DA.csv", stringsAsFactors = F)
str(cold_DA)
dim(cold_DA)
#Format date and treatment
cold_DA %<>% mutate(treatment = as.factor... |
library(ggplot2)
library(latex2exp)
setwd(Sys.getenv("masters-thesis"))
source("Simulation/Heston.R")
source("Simulation/BlackScholes.R")
source("Simulation/Bursts.R")
source("Simulation/Jumps.R")
source("Estimation/pre-average.R")
source("Estimation/estimates.R")
source("Estimation/estimates_reloaded.R")
set.seed(100... | /Figures2/08_bias_of_mu2.R | no_license | SebastianGPedersen/masters-thesis | R | false | false | 2,855 | r | library(ggplot2)
library(latex2exp)
setwd(Sys.getenv("masters-thesis"))
source("Simulation/Heston.R")
source("Simulation/BlackScholes.R")
source("Simulation/Bursts.R")
source("Simulation/Jumps.R")
source("Estimation/pre-average.R")
source("Estimation/estimates.R")
source("Estimation/estimates_reloaded.R")
set.seed(100... |
#Of the four types of sources indicated by the \color{red}{\verb|type|}type (point, nonpoint, onroad, nonroad) variable, which of these four sources have seen decreases in emissions from 1999–2008 for Baltimore City? Which have seen increases in emissions from 1999–2008?
#Use the ggplot2 plotting system to make a plot... | /Exploratory-Data-Analysis/Project-2/Plot 3.R | no_license | Huiying-Tan/datasciencecoursera | R | false | false | 1,247 | r | #Of the four types of sources indicated by the \color{red}{\verb|type|}type (point, nonpoint, onroad, nonroad) variable, which of these four sources have seen decreases in emissions from 1999–2008 for Baltimore City? Which have seen increases in emissions from 1999–2008?
#Use the ggplot2 plotting system to make a plot... |
# Justin Singh-Mohudpur
# 8/20/2020
# Daily Exercise 12
library(tidyverse)
library(USAboundaries)
library(sf)
# Map theme edited from:
# https://timogrossenbacher.ch/2016/12/beautiful-thematic-maps-with-ggplot2-only/
# I quite like the default Ubuntu font, so I've used the showtext library to
# automatical... | /R/day-12.R | no_license | program--/geog176A-daily-exercises | R | false | false | 2,371 | r | # Justin Singh-Mohudpur
# 8/20/2020
# Daily Exercise 12
library(tidyverse)
library(USAboundaries)
library(sf)
# Map theme edited from:
# https://timogrossenbacher.ch/2016/12/beautiful-thematic-maps-with-ggplot2-only/
# I quite like the default Ubuntu font, so I've used the showtext library to
# automatical... |
# In this script we combine all phenotypes and put them in matrices to be analyzed with plink
try({setwd("/Users/davidhsu/Documents/ukbb")})
try({setwd("/Users/david/Desktop/ukbb/")})
try({setwd('/scratch/PI/euan/projects/ukbb/da_dh/')})
source("auxiliary_functions.R")
library(corrplot)
##############################... | /metadata_analysis/combine_phenotypes_for_plink.R | no_license | HongyuanWu/ukbb-1 | R | false | false | 9,726 | r | # In this script we combine all phenotypes and put them in matrices to be analyzed with plink
try({setwd("/Users/davidhsu/Documents/ukbb")})
try({setwd("/Users/david/Desktop/ukbb/")})
try({setwd('/scratch/PI/euan/projects/ukbb/da_dh/')})
source("auxiliary_functions.R")
library(corrplot)
##############################... |
# pryr: Tools for Computing on the Language.
# Useful tools to pry back the covers of R and understand the language at a deeper level.
install.packages("pryr")
library(pryr)
library(ggplot2)
library(sf)
list.files()
download.file("http://biogeo.ucdavis.edu/data/diva/adm/IRL_adm.zip",
destfile = "counti... | /sf/import.r | no_license | DragonflyStats/GISwithR_archive | R | false | false | 876 | r | # pryr: Tools for Computing on the Language.
# Useful tools to pry back the covers of R and understand the language at a deeper level.
install.packages("pryr")
library(pryr)
library(ggplot2)
library(sf)
list.files()
download.file("http://biogeo.ucdavis.edu/data/diva/adm/IRL_adm.zip",
destfile = "counti... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stf_help_view.R
\name{stf_help_view}
\alias{stf_help_view}
\title{Function stf_help_view}
\usage{
stf_help_view()
}
\value{
This function has only side effect, it doesn't return anything.
}
\description{
This function displays STF's help page... | /man/stf_help_view.Rd | permissive | jjesusfilho/stfstj | R | false | true | 418 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stf_help_view.R
\name{stf_help_view}
\alias{stf_help_view}
\title{Function stf_help_view}
\usage{
stf_help_view()
}
\value{
This function has only side effect, it doesn't return anything.
}
\description{
This function displays STF's help page... |
library(pcalg)
## source("/u/kalischm/research/packages/LINGAM/R/lingamFuns.R")
##--> showProc.time(), assertError(), relErrV(), ...
R.home(); sessionInfo() # helping package maintainers to debug ...
.libPaths()
packageDescription("pcalg")
packageDescription("Matrix")
cat("doExtras:", (doExtras <- pcalg:::doExtras()),... | /pcalg/tests/test_LINGAM.R | no_license | ingted/R-Examples | R | false | false | 6,127 | r | library(pcalg)
## source("/u/kalischm/research/packages/LINGAM/R/lingamFuns.R")
##--> showProc.time(), assertError(), relErrV(), ...
R.home(); sessionInfo() # helping package maintainers to debug ...
.libPaths()
packageDescription("pcalg")
packageDescription("Matrix")
cat("doExtras:", (doExtras <- pcalg:::doExtras()),... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/uibe.r
\name{postData}
\alias{postData}
\title{POST data from HTTP}
\usage{
postData(df, name = NULL, key = NULL)
}
\arguments{
\item{df}{data.frame}
\item{name}{character}
\item{key}{character}
}
\value{
list
}
\description{
POST d... | /man/postData.Rd | no_license | Leo-Hzau/ruibe | R | false | false | 470 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/uibe.r
\name{postData}
\alias{postData}
\title{POST data from HTTP}
\usage{
postData(df, name = NULL, key = NULL)
}
\arguments{
\item{df}{data.frame}
\item{name}{character}
\item{key}{character}
}
\value{
list
}
\description{
POST d... |
jsonSerializer <- function(val, req, res, errorHandler){
tryCatch({
json <- val
res$setHeader("Content-Type", "application/json")
res$body <- json
return(res$toResponse())
}, error=function(e){
errorHandler(req, res, e)
})
}
.globals$serializers[["json"]] <- jsonSerializer
| /R/serializer-json.R | permissive | mpmenne/plumber | R | false | false | 305 | r | jsonSerializer <- function(val, req, res, errorHandler){
tryCatch({
json <- val
res$setHeader("Content-Type", "application/json")
res$body <- json
return(res$toResponse())
}, error=function(e){
errorHandler(req, res, e)
})
}
.globals$serializers[["json"]] <- jsonSerializer
|
## 지도 시각화
# 단계 구분도(지역별 통계치)
install.packages("mapproj")
install.packages("ggiraphExtra")
library(ggiraphExtra)
# 패키지안에 있는 데이터셋 목록
data() #USArrests : 주별 강력 범죄율 정보
# 구조 확인
str(USArrests) #UrbanPop(도시 인구)
head(USArrests)
library(dplyr)
library(tibble)
# 행의 이름을 state 변수로 바꿔서 새로운 데이터 프레임을 만듦
crime ... | /demo_11(choroplethmap).R | no_license | hhayoung/R-lang | R | false | false | 1,038 | r | ## 지도 시각화
# 단계 구분도(지역별 통계치)
install.packages("mapproj")
install.packages("ggiraphExtra")
library(ggiraphExtra)
# 패키지안에 있는 데이터셋 목록
data() #USArrests : 주별 강력 범죄율 정보
# 구조 확인
str(USArrests) #UrbanPop(도시 인구)
head(USArrests)
library(dplyr)
library(tibble)
# 행의 이름을 state 변수로 바꿔서 새로운 데이터 프레임을 만듦
crime ... |
## Hong Meeker Plug in Method for tp CI, Page 172 Hong & Meeker ##
# First Get the Value of the Quantile for Fixed MLE estimated Parameters ##
#Weibull Function
my_pweibull <- function(x, location, scale, ...){
pweibull(x, 1/scale, exp(location), ...)
}
#Function to get time from p
quant <- function(loc1, loc2, s... | /constrained_MLE/tp_mle.R | no_license | emittman/BB_data_analysis | R | false | false | 2,942 | r | ## Hong Meeker Plug in Method for tp CI, Page 172 Hong & Meeker ##
# First Get the Value of the Quantile for Fixed MLE estimated Parameters ##
#Weibull Function
my_pweibull <- function(x, location, scale, ...){
pweibull(x, 1/scale, exp(location), ...)
}
#Function to get time from p
quant <- function(loc1, loc2, s... |
# Calculate TMB for a given db_file using Strelka and Mutect data
#
# C. Savonen for ALSF - CCDL
#
# 2019
#
# Option descriptions
#
# --db_file : Path to sqlite database file made from 01-setup_db.py
# --metadata : Relative file path to MAF file to be analyzed. Can be .gz compressed.
# --coding_regions : File path that... | /analyses/snv-callers/scripts/03-calculate_tmb.R | permissive | jaclyn-taroni/OpenPBTA-analysis | R | false | false | 13,622 | r | # Calculate TMB for a given db_file using Strelka and Mutect data
#
# C. Savonen for ALSF - CCDL
#
# 2019
#
# Option descriptions
#
# --db_file : Path to sqlite database file made from 01-setup_db.py
# --metadata : Relative file path to MAF file to be analyzed. Can be .gz compressed.
# --coding_regions : File path that... |
update.packages(ask=FALSE, repos='http://cran.cnr.berkeley.edu')
install.packages(c(
'rrdf',
'SPARQL',
'textir',
'lda',
'OAIHarvester',
'topicmodels',
'stringkernels'),
repos='http://cran.cnr.berkeley.edu'
)
library(ctv)
install.views('NaturalLanguageProcessing',
repos='http://cran.cnr.berkeley.edu'
... | /Desktop/Install-Scripts/NaturalLanguageProcessing/load-task-view.R | no_license | GunioRobot/Data-Journalism-Developer-Studio | R | false | false | 322 | r | update.packages(ask=FALSE, repos='http://cran.cnr.berkeley.edu')
install.packages(c(
'rrdf',
'SPARQL',
'textir',
'lda',
'OAIHarvester',
'topicmodels',
'stringkernels'),
repos='http://cran.cnr.berkeley.edu'
)
library(ctv)
install.views('NaturalLanguageProcessing',
repos='http://cran.cnr.berkeley.edu'
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/domain_insertion_functions.R
\name{read.DIP.Counts}
\alias{read.DIP.Counts}
\title{Read domain-insertion profiling count files into a dataframe}
\usage{
read.DIP.Counts(fnames, meta.file)
}
\arguments{
\item{fnames}{List of filenames for read... | /man/read.DIP.Counts.Rd | permissive | jnkoberstein/biosensor-sort-seq | R | false | true | 1,007 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/domain_insertion_functions.R
\name{read.DIP.Counts}
\alias{read.DIP.Counts}
\title{Read domain-insertion profiling count files into a dataframe}
\usage{
read.DIP.Counts(fnames, meta.file)
}
\arguments{
\item{fnames}{List of filenames for read... |
##Plots
library(tidyverse)
library(cowplot)
Bunn <- read_csv("Bunn.csv")
fish <- read_csv("fishCN.csv")
ter <- read_csv("terCN.csv")
lit <- read_csv("litCN.csv")
pel <- read_csv("pelagCN.csv")
#fish only, basic plot
ggplot(data = fish, aes(x = d13C_VPDB, y = d15N_air)) +
geom_point() +
theme_minimal() +
labs(x ... | /Isotopebiplot.R | no_license | freshbeka/BGplots | R | false | false | 5,611 | r | ##Plots
library(tidyverse)
library(cowplot)
Bunn <- read_csv("Bunn.csv")
fish <- read_csv("fishCN.csv")
ter <- read_csv("terCN.csv")
lit <- read_csv("litCN.csv")
pel <- read_csv("pelagCN.csv")
#fish only, basic plot
ggplot(data = fish, aes(x = d13C_VPDB, y = d15N_air)) +
geom_point() +
theme_minimal() +
labs(x ... |
/Retos/Reto 1/Código/Intersección.R | no_license | AngieTatianaP/Analisis_Numerico_AngieTatianaP | R | false | false | 1,636 | r | ||
require(Matrix)
n=10
m=6
Matrix_ini <- matrix(seq(n*m),nrow = n,ncol = m)
# funcio_a_aplicar <- get('*')
i=1
get_cross_function <- function(Matrix_ini, function_to_aplly="I",...){
function_to_aplly <- get(function_to_aplly)
for(i in 1:(floor(ncol(Matrix_ini)/2)+1) ){
if(i==1){
result <-NULL
pe... | /cross function.R | no_license | jpuigde/PruebasPackages | R | false | false | 798 | r | require(Matrix)
n=10
m=6
Matrix_ini <- matrix(seq(n*m),nrow = n,ncol = m)
# funcio_a_aplicar <- get('*')
i=1
get_cross_function <- function(Matrix_ini, function_to_aplly="I",...){
function_to_aplly <- get(function_to_aplly)
for(i in 1:(floor(ncol(Matrix_ini)/2)+1) ){
if(i==1){
result <-NULL
pe... |
make_soil_inorganic_n_pool <- function(n_conc,
bk_density) {
# obtain ring averaged soil bulk density (0 - 10 cm only)
bk_density <- subset(bk_density, Depth == "0-10cm")
# assign bulk density onto each ring and each depth
for (i in 1:6) {
n_conc[n_... | /modules/n_pools_and_fluxes/soil_inorganic_n_pool/make_soil_inorganic_n_pool.R | no_license | SoilTSSM/EucFACE_P_synthesis | R | false | false | 1,117 | r |
make_soil_inorganic_n_pool <- function(n_conc,
bk_density) {
# obtain ring averaged soil bulk density (0 - 10 cm only)
bk_density <- subset(bk_density, Depth == "0-10cm")
# assign bulk density onto each ring and each depth
for (i in 1:6) {
n_conc[n_... |
testlist <- list(pts = integer(0), ends = NULL, starts = NULL, sorted_ends = c(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, 0L, 0L, 0L, 0L, 0L, 0... | /IntervalSurgeon/inst/testfiles/rcpp_depth/AFL_rcpp_depth/rcpp_depth_valgrind_files/1609856742-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 713 | r | testlist <- list(pts = integer(0), ends = NULL, starts = NULL, sorted_ends = c(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, 0L, 0L, 0L, 0L, 0L, 0... |
---
title: "Data Wrangling"
author: "Kexin Fei"
date: "2/9/2018"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(dplyr)
library(knitr)
```
```{r}
setwd("~/Desktop/Data Challenge/Cyence/cyence_data_exercise_take_home")
df = read.csv("data_perm_take_home.csv")
dff = as.t... | /dplyr.R | no_license | kexinfei/DataWrangling | R | false | false | 3,318 | r | ---
title: "Data Wrangling"
author: "Kexin Fei"
date: "2/9/2018"
output: pdf_document
---
```{r setup, include=FALSE}
knitr::opts_chunk$set(echo = TRUE)
library(dplyr)
library(knitr)
```
```{r}
setwd("~/Desktop/Data Challenge/Cyence/cyence_data_exercise_take_home")
df = read.csv("data_perm_take_home.csv")
dff = as.t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lakeformation_operations.R
\name{lakeformation_list_permissions}
\alias{lakeformation_list_permissions}
\title{Returns a list of the principal permissions on the resource, filtered by
the permissions of the caller}
\usage{
lakeformation_list_... | /paws/man/lakeformation_list_permissions.Rd | permissive | jcheng5/paws | R | false | true | 2,589 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lakeformation_operations.R
\name{lakeformation_list_permissions}
\alias{lakeformation_list_permissions}
\title{Returns a list of the principal permissions on the resource, filtered by
the permissions of the caller}
\usage{
lakeformation_list_... |
# Step 0 - prep env -------------------------------------------------------
# Step 1 - make plot ------------------------------------------------------
weekly_price_to_share <-
coffee_clean %>%
group_by(relweek, shop_desc_clean) %>%
summarise(sales = sum(packs),
price = mean(price)) %>%
group... | /retail/project/r/files/504_vis_weekly_price_to_share.R | no_license | Busyclover/icl | R | false | false | 1,137 | r |
# Step 0 - prep env -------------------------------------------------------
# Step 1 - make plot ------------------------------------------------------
weekly_price_to_share <-
coffee_clean %>%
group_by(relweek, shop_desc_clean) %>%
summarise(sales = sum(packs),
price = mean(price)) %>%
group... |
library(RLLVMCompile)
f = function(n) {
ctr = 0L
for(i in 1:n)
for(j in 1:i) {
if(i == j)
printf("diagonal %d\n", i)
ctr = ctr + 1L
}
ctr
}
fc = compileFunction(f, Int32Type, Int32Type)
stopifnot(.llvm(fc, 10) == 55L)
cat("okay\n")
| /tests/nestedLoops2.R | no_license | duncantl/RLLVMCompile | R | false | false | 286 | r | library(RLLVMCompile)
f = function(n) {
ctr = 0L
for(i in 1:n)
for(j in 1:i) {
if(i == j)
printf("diagonal %d\n", i)
ctr = ctr + 1L
}
ctr
}
fc = compileFunction(f, Int32Type, Int32Type)
stopifnot(.llvm(fc, 10) == 55L)
cat("okay\n")
|
## Figure 1 ----
library(tidyverse)
library(survival)
library(broom)
library(ggfortify)
library(ggbeeswarm)
library(scico)
library(scales)
library(ggpubr)
library(cowplot)
source(file.path("functions_dataset_1" , "clean_data.R"))
# load data
total <- clean_data()
## Statistics ----
# Summarize Lifetime data by... | /Figure_1.R | permissive | jo-fuchs/Branch-Lifetime-PRG2 | R | false | false | 11,174 | r | ## Figure 1 ----
library(tidyverse)
library(survival)
library(broom)
library(ggfortify)
library(ggbeeswarm)
library(scico)
library(scales)
library(ggpubr)
library(cowplot)
source(file.path("functions_dataset_1" , "clean_data.R"))
# load data
total <- clean_data()
## Statistics ----
# Summarize Lifetime data by... |
## Assignment: Caching the Inverse of a Matrix
## Reference mentioned in the course forum
## https://github.com/lgreski/datasciencectacontent/blob/master/markdown/rprog-breakingDownMakeVector.md
## The function makeCacheMatrix is based on the function "makeVector" in the assignment instruction
## This function create... | /cachematrix.R | no_license | bearsly/ProgrammingAssignment2 | R | false | false | 1,171 | r | ## Assignment: Caching the Inverse of a Matrix
## Reference mentioned in the course forum
## https://github.com/lgreski/datasciencectacontent/blob/master/markdown/rprog-breakingDownMakeVector.md
## The function makeCacheMatrix is based on the function "makeVector" in the assignment instruction
## This function create... |
interestResultIntEx<- function(intObj, exObj, intExCol=c(),
mean.na.rm=TRUE, postExName="ex_junc" ){
if(length(intExCol)==1){
intObj<- intObj[which(rowData(intObj)[,intExCol]=="intron"), ]
exObj<- exObj[which(rowData(exObj)[,intExCol]=="exon"), ]
}
if(length(intExCol)==2){
intObj<- intObj[which(rowData(intOb... | /R/interestResultIntEx.R | no_license | gacatag/IntEREst | R | false | false | 2,728 | r | interestResultIntEx<- function(intObj, exObj, intExCol=c(),
mean.na.rm=TRUE, postExName="ex_junc" ){
if(length(intExCol)==1){
intObj<- intObj[which(rowData(intObj)[,intExCol]=="intron"), ]
exObj<- exObj[which(rowData(exObj)[,intExCol]=="exon"), ]
}
if(length(intExCol)==2){
intObj<- intObj[which(rowData(intOb... |
# functions used for the sisesat class but not exported (available to the user)
.mapa.peru <- function(xlim=c(-84,-70), ylim=c(-21, -3), labelsxy = TRUE, axis4L = FALSE, perfil = FALSE,
land.col="khaki1", sea.col="white", cex.Port = 0.65, add = FALSE, ...){
require(kali)
axis.Lon <- pas... | /R/sisesat-internal.R | no_license | imarpe/imarpe | R | false | false | 3,236 | r | # functions used for the sisesat class but not exported (available to the user)
.mapa.peru <- function(xlim=c(-84,-70), ylim=c(-21, -3), labelsxy = TRUE, axis4L = FALSE, perfil = FALSE,
land.col="khaki1", sea.col="white", cex.Port = 0.65, add = FALSE, ...){
require(kali)
axis.Lon <- pas... |
#Prepearing the datasets
BPRS <- read.csv("https://raw.githubusercontent.com/KimmoVehkalahti/MABS/master/Examples/data/BPRS.txt", sep =" ", header = T)
names(BPRS)
str(BPRS)
summary(BPRS)
dim(BPRS)
RATS <- read.table("https://raw.githubusercontent.com/KimmoVehkalahti/MABS/master/Examples/data/rats.txt", header = TRUE... | /meet_and_repeat.R | no_license | madmintt/IODS-project | R | false | false | 1,640 | r | #Prepearing the datasets
BPRS <- read.csv("https://raw.githubusercontent.com/KimmoVehkalahti/MABS/master/Examples/data/BPRS.txt", sep =" ", header = T)
names(BPRS)
str(BPRS)
summary(BPRS)
dim(BPRS)
RATS <- read.table("https://raw.githubusercontent.com/KimmoVehkalahti/MABS/master/Examples/data/rats.txt", header = TRUE... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/assertions.r
\name{has_attr}
\alias{\%has_attr\%}
\alias{\%has_name\%}
\alias{has_attr}
\alias{has_name}
\title{Has attribute or name?}
\usage{
has_attr(x, which)
x \%has_attr\% which
has_name(x, which)
x \%has_name\% which
}
\argu... | /man/has_attr.Rd | no_license | elsander/assertthat | R | false | false | 546 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/assertions.r
\name{has_attr}
\alias{\%has_attr\%}
\alias{\%has_name\%}
\alias{has_attr}
\alias{has_name}
\title{Has attribute or name?}
\usage{
has_attr(x, which)
x \%has_attr\% which
has_name(x, which)
x \%has_name\% which
}
\argu... |
# From https://gis.stackexchange.com/questions/140504/extracting-intersection-areas-in-r
library(sp)
library(raster)
library(rgdal)
library(rgeos)
library(maptools)
# Example data from raster package
p1 <- shapefile(system.file("external/lux.shp", package="raster"))
# Remove attribute data
p1 <- as(p1, 'SpatialPolygo... | /polygon_overlay_tests.R | no_license | jejoenje/sp_poly_overlap | R | false | false | 1,013 | r | # From https://gis.stackexchange.com/questions/140504/extracting-intersection-areas-in-r
library(sp)
library(raster)
library(rgdal)
library(rgeos)
library(maptools)
# Example data from raster package
p1 <- shapefile(system.file("external/lux.shp", package="raster"))
# Remove attribute data
p1 <- as(p1, 'SpatialPolygo... |
# date:2020-10-09
# author:suke
# task:ggplot基础学习,图形基础
#####
## 基础入门
# ggplot的包安装
install.packages(c("ggplot2","gcookbook"))
install.packages("xlsx")
install.packages("gdata") # xls文件需要的包
install.packages("foreign") # spss数据导入需要的包
# 包导入
library(ggplot2)
library(gcookbook)
library(xslx)
library(foreign)
ls("package:... | /201009-03.r | no_license | sukezuo/R_learning | R | false | false | 3,544 | r | # date:2020-10-09
# author:suke
# task:ggplot基础学习,图形基础
#####
## 基础入门
# ggplot的包安装
install.packages(c("ggplot2","gcookbook"))
install.packages("xlsx")
install.packages("gdata") # xls文件需要的包
install.packages("foreign") # spss数据导入需要的包
# 包导入
library(ggplot2)
library(gcookbook)
library(xslx)
library(foreign)
ls("package:... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.servicecatalog_operations.R
\name{delete_product}
\alias{delete_product}
\title{Deletes the specified product}
\usage{
delete_product(AcceptLanguage = NULL, Id)
}
\arguments{
\item{AcceptLanguage}{The language code.
\itemize{
\item \code... | /service/paws.servicecatalog/man/delete_product.Rd | permissive | CR-Mercado/paws | R | false | true | 711 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.servicecatalog_operations.R
\name{delete_product}
\alias{delete_product}
\title{Deletes the specified product}
\usage{
delete_product(AcceptLanguage = NULL, Id)
}
\arguments{
\item{AcceptLanguage}{The language code.
\itemize{
\item \code... |
# j = "Phylum"
Plot.CompareWithCK <- function(
ps = psdata,
result = result,
CK = "OE",
j = "Genus",
abun = 0.001){
map = sample_data(ps)
TF = c()
for (i in 1: nrow(result)) {
a <- result %>%
select(ends_with("level")) %>%
filter(row_number() == i) %>%
as.m... | /Plot.CompareWithCK.R | no_license | wyy-yiyang/Plot_ComparedWithCK | R | false | false | 4,157 | r |
# j = "Phylum"
Plot.CompareWithCK <- function(
ps = psdata,
result = result,
CK = "OE",
j = "Genus",
abun = 0.001){
map = sample_data(ps)
TF = c()
for (i in 1: nrow(result)) {
a <- result %>%
select(ends_with("level")) %>%
filter(row_number() == i) %>%
as.m... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sym_regression.R
\name{sym.predict.symbolic_nnet_cm}
\alias{sym.predict.symbolic_nnet_cm}
\title{Predict nnet_cm model}
\usage{
\method{sym.predict}{symbolic_nnet_cm}(model, new.sym.data, ...)
}
\arguments{
\item{model}{model}
\item{new.sym.... | /man/sym.predict.symbolic_nnet_cm.Rd | no_license | cran/RSDA | R | false | true | 1,115 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/sym_regression.R
\name{sym.predict.symbolic_nnet_cm}
\alias{sym.predict.symbolic_nnet_cm}
\title{Predict nnet_cm model}
\usage{
\method{sym.predict}{symbolic_nnet_cm}(model, new.sym.data, ...)
}
\arguments{
\item{model}{model}
\item{new.sym.... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/OutcomeModels.R
\name{plotKaplanMeier}
\alias{plotKaplanMeier}
\title{Plot the Kaplan-Meier curve}
\usage{
plotKaplanMeier(outcomeModel, censorMarks = FALSE,
confidenceIntervals = TRUE, includeZero = TRUE, dataCutoff = 0.99,
treat... | /man/plotKaplanMeier.Rd | permissive | tdbennett/CohortMethod | R | false | false | 1,438 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/OutcomeModels.R
\name{plotKaplanMeier}
\alias{plotKaplanMeier}
\title{Plot the Kaplan-Meier curve}
\usage{
plotKaplanMeier(outcomeModel, censorMarks = FALSE,
confidenceIntervals = TRUE, includeZero = TRUE, dataCutoff = 0.99,
treat... |
setwd('~/git/csci183/assignments/inclass_d3_assignment/')
bike_theft <- read.csv('bikes/bike_theft_rev.csv', header = TRUE)
library('stringr')
bike_theft$loc <- "OTHER"
bike_theft$loc[str_detect(bike_theft$LOCATION, "Swig")] <- "Swig"
bike_theft$loc[str_detect(bike_theft$LOCATION, "Dunne")] <- "Dunne"
bike_theft$loc[... | /assignments/inclass_d3_assignment/bikes/bikes.R | no_license | ryanrishi/csci183 | R | false | false | 3,153 | r | setwd('~/git/csci183/assignments/inclass_d3_assignment/')
bike_theft <- read.csv('bikes/bike_theft_rev.csv', header = TRUE)
library('stringr')
bike_theft$loc <- "OTHER"
bike_theft$loc[str_detect(bike_theft$LOCATION, "Swig")] <- "Swig"
bike_theft$loc[str_detect(bike_theft$LOCATION, "Dunne")] <- "Dunne"
bike_theft$loc[... |
`ensemble.raster` <- function(
xn=NULL, ext=NULL,
models.list=NULL,
input.weights=models.list$output.weights,
thresholds=models.list$thresholds,
RASTER.species.name="Species001", RASTER.stack.name=xn@title,
RASTER.format="raster", RASTER.datatype="INT2S", RASTER.NAflag=-32767,
RASTER.model... | /R/ensemble.raster.R | no_license | BRozhkov/BiodiversityR | R | false | false | 80,080 | r | `ensemble.raster` <- function(
xn=NULL, ext=NULL,
models.list=NULL,
input.weights=models.list$output.weights,
thresholds=models.list$thresholds,
RASTER.species.name="Species001", RASTER.stack.name=xn@title,
RASTER.format="raster", RASTER.datatype="INT2S", RASTER.NAflag=-32767,
RASTER.model... |
\name{orderedLasso}
\alias{orderedLasso}
\title{Fit an ordered lasso}
\usage{
orderedLasso(x, y, lambda, intercept = TRUE, b0 = NULL, beta_pos = NULL,
beta_neg = NULL, method = c("Solve.QP", "GG"), strongly.ordered = FALSE,
standardize = TRUE, trace = FALSE, niter = 500, iter.gg = 100,
epsilon = 1e-08)
}
\argumen... | /man/orderedLasso.Rd | no_license | cran/orderedLasso | R | false | false | 2,975 | rd | \name{orderedLasso}
\alias{orderedLasso}
\title{Fit an ordered lasso}
\usage{
orderedLasso(x, y, lambda, intercept = TRUE, b0 = NULL, beta_pos = NULL,
beta_neg = NULL, method = c("Solve.QP", "GG"), strongly.ordered = FALSE,
standardize = TRUE, trace = FALSE, niter = 500, iter.gg = 100,
epsilon = 1e-08)
}
\argumen... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.mediaconvert_operations.R
\name{list_presets}
\alias{list_presets}
\title{Retrieve a JSON array of up to twenty of your presets}
\usage{
list_presets(Category = NULL, ListBy = NULL, MaxResults = NULL,
NextToken = NULL, Order = NULL)
}
... | /service/paws.mediaconvert/man/list_presets.Rd | permissive | CR-Mercado/paws | R | false | true | 1,134 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/paws.mediaconvert_operations.R
\name{list_presets}
\alias{list_presets}
\title{Retrieve a JSON array of up to twenty of your presets}
\usage{
list_presets(Category = NULL, ListBy = NULL, MaxResults = NULL,
NextToken = NULL, Order = NULL)
}
... |
testlist <- list(m = NULL, repetitions = 164769688L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146), .Dim = c(3L, 1L )))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
str(result) | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615786718-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 253 | r | testlist <- list(m = NULL, repetitions = 164769688L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146), .Dim = c(3L, 1L )))
result <- do.call(CNull:::communities_individual_based_sampling_alpha,testlist)
str(result) |
#' Return standard deviation of residuals of the best models (1 for Mu, 1 for Sigma) applied on observed data
#'
#' @param PAC_obs dataframe containing the observed acute and chronic weighted parameters
#' @param form_mu Formula of the best model selected to predict muC_act
#' @param form_sigma Formula of t... | /R/sd_res_reg.R | no_license | cdv04/ACTR | R | false | false | 1,390 | r |
#' Return standard deviation of residuals of the best models (1 for Mu, 1 for Sigma) applied on observed data
#'
#' @param PAC_obs dataframe containing the observed acute and chronic weighted parameters
#' @param form_mu Formula of the best model selected to predict muC_act
#' @param form_sigma Formula of t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.