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 |
|---|---|---|---|---|---|---|---|---|---|
plot.SimCi <-
function (x, xlim, xlab, ylim, ...) {
comparison <- rep(x$comp.names, each=length(x$resp))
endpoint <- rep(x$resp, times=length(x$comp.names))
estimate <- lower.raw <- upper.raw <- lower <- upper <- NULL
for (i in 1:length(x$comp.names)) {
estimate <- c(estimate, x$estimate[i, ])
lower <... | /R/plot.SimCi.R | no_license | cran/SimComp | R | false | false | 2,192 | r | plot.SimCi <-
function (x, xlim, xlab, ylim, ...) {
comparison <- rep(x$comp.names, each=length(x$resp))
endpoint <- rep(x$resp, times=length(x$comp.names))
estimate <- lower.raw <- upper.raw <- lower <- upper <- NULL
for (i in 1:length(x$comp.names)) {
estimate <- c(estimate, x$estimate[i, ])
lower <... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gssm.R
\name{gssm}
\alias{gssm}
\title{gssm: Calculate mean soil moisture during the growing season.}
\usage{
gssm(sm, gs)
}
\arguments{
\item{sm}{a vector of soil moisture values (e.g. calculated by
\code{soil_moisture}).}
\item{gs}{a vecto... | /man/gssm.Rd | no_license | everydayduffy/climvars | R | false | true | 958 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gssm.R
\name{gssm}
\alias{gssm}
\title{gssm: Calculate mean soil moisture during the growing season.}
\usage{
gssm(sm, gs)
}
\arguments{
\item{sm}{a vector of soil moisture values (e.g. calculated by
\code{soil_moisture}).}
\item{gs}{a vecto... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/replace_symbol.R
\name{replace_symbol}
\alias{replace_symbol}
\title{Replace Symbols With Word Equivalents}
\usage{
replace_symbol(
text.var,
dollar = TRUE,
percent = TRUE,
pound = TRUE,
at = TRUE,
and = TRUE,
with = TRUE
)
}
\a... | /man/replace_symbol.Rd | no_license | cran/qdap | R | false | true | 1,394 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/replace_symbol.R
\name{replace_symbol}
\alias{replace_symbol}
\title{Replace Symbols With Word Equivalents}
\usage{
replace_symbol(
text.var,
dollar = TRUE,
percent = TRUE,
pound = TRUE,
at = TRUE,
and = TRUE,
with = TRUE
)
}
\a... |
write <- function(rsmith, files, quiet = FALSE) {
if (!quiet) message("Writing output")
old <- setwd(rsmith$metadata$.base)
on.exit(setwd(old), add = TRUE)
dest <- rsmith$metadata$.dest
if (!file.exists(dest)) {
dir.create(dest)
}
setwd(dest)
for (file in files) {
file_dir <- dirname(file$met... | /R/write.R | permissive | RanaivosonHerimanitra/rsmith | R | false | false | 968 | r | write <- function(rsmith, files, quiet = FALSE) {
if (!quiet) message("Writing output")
old <- setwd(rsmith$metadata$.base)
on.exit(setwd(old), add = TRUE)
dest <- rsmith$metadata$.dest
if (!file.exists(dest)) {
dir.create(dest)
}
setwd(dest)
for (file in files) {
file_dir <- dirname(file$met... |
library(EGRET)
### Name: plotConcTime
### Title: Plot of Observed Concentration versus Time
### Aliases: plotConcTime
### Keywords: graphics statistics water-quality
### ** Examples
eList <- Choptank_eList
# Water year:
plotConcTime(eList)
# Graphs consisting of Jun-Aug
eList <- setPA(eList, paStart=6,paLong=3)
plo... | /data/genthat_extracted_code/EGRET/examples/plotConcTime.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 500 | r | library(EGRET)
### Name: plotConcTime
### Title: Plot of Observed Concentration versus Time
### Aliases: plotConcTime
### Keywords: graphics statistics water-quality
### ** Examples
eList <- Choptank_eList
# Water year:
plotConcTime(eList)
# Graphs consisting of Jun-Aug
eList <- setPA(eList, paStart=6,paLong=3)
plo... |
/Raw/R tools/[Method] Regression/단순선형회귀분석.R | no_license | hana-dool/R | R | false | false | 4,663 | r | ||
## File Name: mgsem_coef2partable.R
## File Version: 0.01
mgsem_coef2partable <- function(coef, partable)
{
dfr <- partable
dfr$est <- coef[ dfr$index ]
return(dfr)
}
| /R/mgsem_coef2partable.R | no_license | alexanderrobitzsch/sirt | R | false | false | 180 | r | ## File Name: mgsem_coef2partable.R
## File Version: 0.01
mgsem_coef2partable <- function(coef, partable)
{
dfr <- partable
dfr$est <- coef[ dfr$index ]
return(dfr)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/teos10-wrappers.R
\name{gsw_specvol_sso_0}
\alias{gsw_specvol_sso_0}
\title{gsw_specvol_sso_0}
\usage{
gsw_specvol_sso_0(p)
}
\arguments{
\item{p}{sea pressure \verb{[ dbar ]}}
}
\description{
This function calculates specific volume at the S... | /man/gsw_specvol_sso_0.Rd | permissive | paleolimbot/teos10 | R | false | true | 717 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/teos10-wrappers.R
\name{gsw_specvol_sso_0}
\alias{gsw_specvol_sso_0}
\title{gsw_specvol_sso_0}
\usage{
gsw_specvol_sso_0(p)
}
\arguments{
\item{p}{sea pressure \verb{[ dbar ]}}
}
\description{
This function calculates specific volume at the S... |
#' @title
#' Estimates smoking probabilities and smoking status using MLM method.
#'
#' @description
#' Estimates smoking probabilities and smoking status using MLM method.
#'
#' @param dataset
#' A data matrix of normalised methylation values in beta scale, with rows labelling the CpG probe ids and columns labelling t... | /R/MLM.R | no_license | spurthy111/EpiSmokEr | R | false | false | 7,360 | r | #' @title
#' Estimates smoking probabilities and smoking status using MLM method.
#'
#' @description
#' Estimates smoking probabilities and smoking status using MLM method.
#'
#' @param dataset
#' A data matrix of normalised methylation values in beta scale, with rows labelling the CpG probe ids and columns labelling t... |
#' Product space representation of a relation
#'
#' This utility function takes the input matrix of a relation between two or more variables and yields its product space representation.
#' @param tt A (0,1) or boolean matrix, where the variables are set side by side, as in a truth table. Each variable has a number of ... | /R/productSpace.R | no_license | RAPLER/dst-1 | R | false | false | 4,769 | r | #' Product space representation of a relation
#'
#' This utility function takes the input matrix of a relation between two or more variables and yields its product space representation.
#' @param tt A (0,1) or boolean matrix, where the variables are set side by side, as in a truth table. Each variable has a number of ... |
#' Search for businesses
#'
#' Use the Yelp business search API to find businesses close to a give location.
#' @param term A string denoting the search term.
#' @param location A string describing the location. If this is not provided,
#' then \code{latitude} and \code{longitude} are compulsory.
#' @param latitude A n... | /R/business-search.R | no_license | ProQuestionAsker/yelp | R | false | false | 5,631 | r | #' Search for businesses
#'
#' Use the Yelp business search API to find businesses close to a give location.
#' @param term A string denoting the search term.
#' @param location A string describing the location. If this is not provided,
#' then \code{latitude} and \code{longitude} are compulsory.
#' @param latitude A n... |
#' adaptive buffered grey rolling model
#' @export
#' @examples
#' r<-roll(y)
#' @param y data sequence
#' @param ntest test data of outsample
#' @param model unit grey model used in each data piece
#' @param buff the buffer operator function adjusting data piece
#' @param rollterm forecasting terms by extroplation
#' ... | /R/roll.R | no_license | exoplanetX/greyforecasting | R | false | false | 3,565 | r | #' adaptive buffered grey rolling model
#' @export
#' @examples
#' r<-roll(y)
#' @param y data sequence
#' @param ntest test data of outsample
#' @param model unit grey model used in each data piece
#' @param buff the buffer operator function adjusting data piece
#' @param rollterm forecasting terms by extroplation
#' ... |
#' @title Make The Models
#' @description Temporary description.
#' @param model_table desc
#' @param indicators_comparison Tibble, Temporary description.
#' @param indicators_comparison_of_change desc
#' @param indicators_change_in_comparison desc
#' @return a `tibble`
make_model_vulnerability <- function(model_tabl... | /R/archive/make-models-archived.R | permissive | tiernanmartin/NeighborhoodChangeTypology | R | false | false | 17,437 | r |
#' @title Make The Models
#' @description Temporary description.
#' @param model_table desc
#' @param indicators_comparison Tibble, Temporary description.
#' @param indicators_comparison_of_change desc
#' @param indicators_change_in_comparison desc
#' @return a `tibble`
make_model_vulnerability <- function(model_tabl... |
#set working directory
setwd("C:/Users/course009.FSKTM/Documents/Lab-7")
library(data.table)
## Getting full dataset
DT<-fread("./household_power_consumption.txt", na.strings="?")
DT$Date <- as.Date(DT$Date, format="%d/%m/%Y")
## Subsetting the data
DT.filter <- subset(DT, subset=(Date >= "2007-02-01" & ... | /Lab-7/Plot2.R | no_license | limzedong/Lab-7 | R | false | false | 697 | r | #set working directory
setwd("C:/Users/course009.FSKTM/Documents/Lab-7")
library(data.table)
## Getting full dataset
DT<-fread("./household_power_consumption.txt", na.strings="?")
DT$Date <- as.Date(DT$Date, format="%d/%m/%Y")
## Subsetting the data
DT.filter <- subset(DT, subset=(Date >= "2007-02-01" & ... |
#!/usr/bin/env Rscript
# Load packages
library(getopt)
library(Seurat)
library(future)
library(cowplot)
library(clustree)
library(gridExtra)
library(grid)
library(pheatmap)
library(RColorBrewer)
library(tidyverse)
library(scHelper)
spec = matrix(c(
'runtype', 'l', 2, "character",
'cores' , 'c', 2, "integer"
), ... | /NF-downstream_analysis/bin/seurat/5_cell_cycle.R | no_license | alexthiery/10x_neural_plate_border | R | false | false | 5,711 | r | #!/usr/bin/env Rscript
# Load packages
library(getopt)
library(Seurat)
library(future)
library(cowplot)
library(clustree)
library(gridExtra)
library(grid)
library(pheatmap)
library(RColorBrewer)
library(tidyverse)
library(scHelper)
spec = matrix(c(
'runtype', 'l', 2, "character",
'cores' , 'c', 2, "integer"
), ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary_measures.R
\name{bin_mode}
\alias{bin_mode}
\title{Binomial Mode}
\usage{
bin_mode(trials, prob)
}
\arguments{
\item{trials}{Number of trials (real)}
\item{prob}{Probability of successs (real)}
}
\value{
Returns the mode
}
\descripti... | /binomial/man/bin_mode.Rd | no_license | stat133-sp19/hw-stat133-TheGoldenKyle | R | false | true | 404 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary_measures.R
\name{bin_mode}
\alias{bin_mode}
\title{Binomial Mode}
\usage{
bin_mode(trials, prob)
}
\arguments{
\item{trials}{Number of trials (real)}
\item{prob}{Probability of successs (real)}
}
\value{
Returns the mode
}
\descripti... |
#set the working directory
setwd("C:/JasmineAung/Exercise/Projects/R/New folder")
#Read a CSV data file
cars <- read.csv("Cars.csv")
#Peek at the data
head(cars)
#Create a frequency table
table(cars$Transmission)
#Get the minimum value
min(cars$Fuel.Economy)
#Get the maximum value
max(cars$Fuel.Economy)
#Get t... | /R/DescriptiveStatistics.R | no_license | thazin31086/Projects | R | false | false | 636 | r | #set the working directory
setwd("C:/JasmineAung/Exercise/Projects/R/New folder")
#Read a CSV data file
cars <- read.csv("Cars.csv")
#Peek at the data
head(cars)
#Create a frequency table
table(cars$Transmission)
#Get the minimum value
min(cars$Fuel.Economy)
#Get the maximum value
max(cars$Fuel.Economy)
#Get t... |
### read into the data set
data<-read.table("household_power_consumption.txt",header=T,sep=";",na.strings = "?",as.is=c("Date","Time"))
### subset the data with selected dates
data<-data[data$Date %in% c("1/2/2007","2/2/2007"),]
### convert date and time into date and posixlt data
data$Date<-as.Date(data$Date,"%d/%m/%Y... | /plot2.R | no_license | emoanger90/ExData_Plotting1 | R | false | false | 589 | r | ### read into the data set
data<-read.table("household_power_consumption.txt",header=T,sep=";",na.strings = "?",as.is=c("Date","Time"))
### subset the data with selected dates
data<-data[data$Date %in% c("1/2/2007","2/2/2007"),]
### convert date and time into date and posixlt data
data$Date<-as.Date(data$Date,"%d/%m/%Y... |
\name{em2}
\alias{em2}
\title{ Compute Eye Fixation Measures }
\description{
Generate fixation measures relevant for sentence processing research.
}
\format{
The format is:
chr "em"
}
\usage{
em2(rid, fixationdur, trialinfo, measures='standard', assimilateSaccades=FALSE,
fixationstart=NA, fixationend=NA, regr... | /man/em2.Rd | no_license | jwdink/em2 | R | false | false | 7,293 | rd | \name{em2}
\alias{em2}
\title{ Compute Eye Fixation Measures }
\description{
Generate fixation measures relevant for sentence processing research.
}
\format{
The format is:
chr "em"
}
\usage{
em2(rid, fixationdur, trialinfo, measures='standard', assimilateSaccades=FALSE,
fixationstart=NA, fixationend=NA, regr... |
## This code has two functions in order to cache the inverse of a matrix.
## Example of use:
## 1. Create a matrix call m1:
## m1 <- matrix(c(1,1,0,1),2,2) ##Example 2x2 matrix invertible
## 2. Create a object using the makeCacheMatrix function using m1 as argument:
## m1_cache <- makeCacheMatrix(m1)
## 3. Use cacheSo... | /cachematrix.R | no_license | datejada/ProgrammingAssignment2 | R | false | false | 2,219 | r | ## This code has two functions in order to cache the inverse of a matrix.
## Example of use:
## 1. Create a matrix call m1:
## m1 <- matrix(c(1,1,0,1),2,2) ##Example 2x2 matrix invertible
## 2. Create a object using the makeCacheMatrix function using m1 as argument:
## m1_cache <- makeCacheMatrix(m1)
## 3. Use cacheSo... |
###############
### Load
###############
library (RColorBrewer)
#load ('~/Dropbox/BED_files_miRSNPS/databases/navyData.RData')
load ('~/Dropbox/BED_files_miRSNPS/databases/navyResultsData.RData')
load ('~/Dropbox/BED_files_miRSNPS/TCGA/datasets/BRCA_gxp_samps_mirids.RData')
source ('~/Dropbox/BED_files_miRSNPS/TCGA/scr... | /scriptPlots.R | no_license | rodrigocout/miRSNPs | R | false | false | 1,577 | r | ###############
### Load
###############
library (RColorBrewer)
#load ('~/Dropbox/BED_files_miRSNPS/databases/navyData.RData')
load ('~/Dropbox/BED_files_miRSNPS/databases/navyResultsData.RData')
load ('~/Dropbox/BED_files_miRSNPS/TCGA/datasets/BRCA_gxp_samps_mirids.RData')
source ('~/Dropbox/BED_files_miRSNPS/TCGA/scr... |
\name{summary.binomRRci}
\alias{summary.binomRRci}
\title{ Detailed print out for binomRRci }
\description{
Produces a more detailed print out of objects of class "binomRRci", including summary statistics,
the used contrast matrix and the confidence intervals.
}
\usage{
\method{summary}{binomRRci}(object, ...... | /man/summary.binomRRci.Rd | no_license | cran/MCPAN | R | false | false | 795 | rd | \name{summary.binomRRci}
\alias{summary.binomRRci}
\title{ Detailed print out for binomRRci }
\description{
Produces a more detailed print out of objects of class "binomRRci", including summary statistics,
the used contrast matrix and the confidence intervals.
}
\usage{
\method{summary}{binomRRci}(object, ...... |
NEI <- readRDS("summarySCC_PM25.rds")
df_Baltimore<- NEI[NEI$fips=='24510',]
library(ggplot2)
result<- ggplot(data = df_Baltimore, mapping = aes(x = factor(year), y = Emissions, group =type))
png(file = "plot3.png", width = 480, height = 480)
print(result+geom_bar(stat = "identity", aes(fill = type),
... | /plot3.R | no_license | ThuyMo/Project2_Exploratory_Data_Analysis | R | false | false | 539 | r | NEI <- readRDS("summarySCC_PM25.rds")
df_Baltimore<- NEI[NEI$fips=='24510',]
library(ggplot2)
result<- ggplot(data = df_Baltimore, mapping = aes(x = factor(year), y = Emissions, group =type))
png(file = "plot3.png", width = 480, height = 480)
print(result+geom_bar(stat = "identity", aes(fill = type),
... |
library(e1071)
library(caret)
library(Metrics)
library(C50)
library(randomForest)
train3<-read.csv('TrainData3.csv', header = FALSE)
test3<-read.csv('TestData3.csv',header=FALSE)
head(train3)
X3<-train3[,1:9182]
Y3<-train3[,9183]
trainX3<-X3[1:80,]
trainY3<-Y3[1:80]
testX3<-X3[81:100,]
test... | /Classification/Dataset3.R | no_license | DeviantOps/Language-R | R | false | false | 1,752 | r |
library(e1071)
library(caret)
library(Metrics)
library(C50)
library(randomForest)
train3<-read.csv('TrainData3.csv', header = FALSE)
test3<-read.csv('TestData3.csv',header=FALSE)
head(train3)
X3<-train3[,1:9182]
Y3<-train3[,9183]
trainX3<-X3[1:80,]
trainY3<-Y3[1:80]
testX3<-X3[81:100,]
test... |
#Requiring all necessary lib packages
list.of.packages <- c('caret', 'coefplot','DBI', 'dbplyr', 'doParallel', 'foreach',
'ggthemes', 'glmnet', 'jsonlite', 'leaflet', 'odbc',
'recipes', 'rmarkdown', 'rprojroot', 'RSQLite', 'rvest',
'tidyverse', 'three... | /Install Necessary Lib Packages_LWH.R | no_license | isoneo/odsceast | R | false | false | 1,330 | r | #Requiring all necessary lib packages
list.of.packages <- c('caret', 'coefplot','DBI', 'dbplyr', 'doParallel', 'foreach',
'ggthemes', 'glmnet', 'jsonlite', 'leaflet', 'odbc',
'recipes', 'rmarkdown', 'rprojroot', 'RSQLite', 'rvest',
'tidyverse', 'three... |
#R function to create color image scale
#Source: https://www.r-bloggers.com/new-version-of-image-scale-function/
image.scale <- function(z, zlim, col = heat.colors(12),
breaks, horiz=TRUE, ylim=NULL, xlim=NULL, ...){
if(!missing(breaks)){
if(length(breaks) != (length(col)+1)){stop("must h... | /rcode/image_scale.r | no_license | kristokv/chyp_arctic | R | false | false | 1,398 | r | #R function to create color image scale
#Source: https://www.r-bloggers.com/new-version-of-image-scale-function/
image.scale <- function(z, zlim, col = heat.colors(12),
breaks, horiz=TRUE, ylim=NULL, xlim=NULL, ...){
if(!missing(breaks)){
if(length(breaks) != (length(col)+1)){stop("must h... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/yml_bookdown.R
\name{gitbook_config}
\alias{gitbook_config}
\title{Configure \code{bookdown::gitbook()} output}
\usage{
gitbook_config(
toc_collapse = yml_blank(),
toc_scroll_highlight = yml_blank(),
toc_before = yml_blank(),
toc_afte... | /man/gitbook_config.Rd | permissive | r-lib/ymlthis | R | false | true | 3,480 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/yml_bookdown.R
\name{gitbook_config}
\alias{gitbook_config}
\title{Configure \code{bookdown::gitbook()} output}
\usage{
gitbook_config(
toc_collapse = yml_blank(),
toc_scroll_highlight = yml_blank(),
toc_before = yml_blank(),
toc_afte... |
# ARDL/ECM Tutorial Week 9
library(readxl)
library(dplyr)
library(ggplot2)
library(roll)
library(car)
library(xts)
library(dyn)
raw_data <- read_excel("../data/Shiller16.xlsx")
# Because ND & NE have very notiecable trends we can
# take logs to make these more linear or take a ratio in PO (payout ratio)
full_data <-... | /R/restricted_ardl_w9_tutorial.r | no_license | nashp/econometrics | R | false | false | 2,015 | r | # ARDL/ECM Tutorial Week 9
library(readxl)
library(dplyr)
library(ggplot2)
library(roll)
library(car)
library(xts)
library(dyn)
raw_data <- read_excel("../data/Shiller16.xlsx")
# Because ND & NE have very notiecable trends we can
# take logs to make these more linear or take a ratio in PO (payout ratio)
full_data <-... |
test_that("multiplication works", {
## WHAT FAILS
##mesh_plot(worldll)
## crop otherwise out of bounds from PROJ
rr <- raster::crop(worldll, raster::extent(-179, 179, -89, 89))
mesh_plot(rr, crs = "+proj=laea +datum=WGS84")
#mesh_plot(rr, crs = "+proj=moll +datum=WGS84")
prj <- "+proj=lcc +datum=WGS84 +lo... | /tests/testthat/test-mesh_plot.R | no_license | cran/quadmesh | R | false | false | 445 | r | test_that("multiplication works", {
## WHAT FAILS
##mesh_plot(worldll)
## crop otherwise out of bounds from PROJ
rr <- raster::crop(worldll, raster::extent(-179, 179, -89, 89))
mesh_plot(rr, crs = "+proj=laea +datum=WGS84")
#mesh_plot(rr, crs = "+proj=moll +datum=WGS84")
prj <- "+proj=lcc +datum=WGS84 +lo... |
#Required Packages
library(downloader)
#Download and extract data
data_url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
download(data_url, dest = "data.zip", mode = "wb")
unzip("data.zip", exdir = "C:/Users/Aaron/OneDrive/Research Projects/R/Exploratory Data Analysis")
NEI <- readRDS(... | /Plot_1.R | no_license | agusdon/R-Exploratory-Data-Analysis-Project-2 | R | false | false | 720 | r | #Required Packages
library(downloader)
#Download and extract data
data_url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
download(data_url, dest = "data.zip", mode = "wb")
unzip("data.zip", exdir = "C:/Users/Aaron/OneDrive/Research Projects/R/Exploratory Data Analysis")
NEI <- readRDS(... |
plotQuantity <- function(start=1900, end=2100, file="FAOGlobalCaptureDataset2013.csv", chart="Line") {
library(rCharts)
library(dplyr)
myData <- read.csv(file)
aggr1 <- aggregate(myData$QUANTITY, by=list(YR_ITEM=myData$YR_ITEM), FUN=sum)
aggr12 <- transform(aggr1, YR_ITEM = as.character(YR_ITEM), Qu... | /R/FAOGlobalCaptureDataset2013.R | no_license | pink-sh/FAOLibrary | R | false | false | 4,060 | r | plotQuantity <- function(start=1900, end=2100, file="FAOGlobalCaptureDataset2013.csv", chart="Line") {
library(rCharts)
library(dplyr)
myData <- read.csv(file)
aggr1 <- aggregate(myData$QUANTITY, by=list(YR_ITEM=myData$YR_ITEM), FUN=sum)
aggr12 <- transform(aggr1, YR_ITEM = as.character(YR_ITEM), Qu... |
library(mixedCCA)
setwd("~/Desktop/Dropbox/Sparse CCA/simulation/v1/covid")
X = read.csv('X_covid.csv', header = FALSE)
Y = read.csv('Y_covid.csv', header = FALSE)
e_sig = estimateR_mixed(X, Y, type1 = "continuous", type2 = "trunc")
Rhat = e_sig[[5]]
write.csv(e_sig[[5]],"Rhat.csv")
mixedCCAresult1 <- mixedCCA(X, Y, ... | /covid/mixedcca.R | no_license | rachelwho/Sparse-CCA | R | false | false | 1,022 | r | library(mixedCCA)
setwd("~/Desktop/Dropbox/Sparse CCA/simulation/v1/covid")
X = read.csv('X_covid.csv', header = FALSE)
Y = read.csv('Y_covid.csv', header = FALSE)
e_sig = estimateR_mixed(X, Y, type1 = "continuous", type2 = "trunc")
Rhat = e_sig[[5]]
write.csv(e_sig[[5]],"Rhat.csv")
mixedCCAresult1 <- mixedCCA(X, Y, ... |
## Load in command args:
args <- commandArgs(TRUE)
args <- as.list(args)
args[[2]] <- as.numeric(args[[2]])
print(args)
rm(list=ls(all=TRUE))
setwd("~/repos/bmr/R/")
args <- list("tetrapods_gs", 10000, "impute_r1")
## Load tree and data into R
require(ape)
require(aRbor)
require(devtools)
require(mvnfast)
#load_all("~... | /R/runBetaBayou_tetrapods_gs_2predQuad_impute.R | permissive | uyedaj/bmr | R | false | false | 12,316 | r | ## Load in command args:
args <- commandArgs(TRUE)
args <- as.list(args)
args[[2]] <- as.numeric(args[[2]])
print(args)
rm(list=ls(all=TRUE))
setwd("~/repos/bmr/R/")
args <- list("tetrapods_gs", 10000, "impute_r1")
## Load tree and data into R
require(ape)
require(aRbor)
require(devtools)
require(mvnfast)
#load_all("~... |
#get_Drerio_gene_names.R
#upload a table with ensemble ids you want names for
dataToName = read.table('~/gitreps/vangl2_gene_expression/deseq/ethanol_results.tsv')
#set the column name to ensembl_gene_id
dataToName$ensembl_gene_id = rownames(dat)
#This is the function that runs biomaRt
merge_gene_names = function(d... | /figure_plotting/get_Drerio_gene_names.R | no_license | grovesdixon/Drerio_early_ethanol_RNAseq | R | false | false | 976 | r | #get_Drerio_gene_names.R
#upload a table with ensemble ids you want names for
dataToName = read.table('~/gitreps/vangl2_gene_expression/deseq/ethanol_results.tsv')
#set the column name to ensembl_gene_id
dataToName$ensembl_gene_id = rownames(dat)
#This is the function that runs biomaRt
merge_gene_names = function(d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tune_models.R
\name{tune_models}
\alias{tune_models}
\title{Tune multiple machine learning models using cross validation to optimize
performance}
\usage{
tune_models(
d,
outcome,
models,
metric,
positive_class,
n_folds = 5,
tune... | /man/tune_models.Rd | permissive | g3rley/healthcareai-r | R | false | true | 4,855 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tune_models.R
\name{tune_models}
\alias{tune_models}
\title{Tune multiple machine learning models using cross validation to optimize
performance}
\usage{
tune_models(
d,
outcome,
models,
metric,
positive_class,
n_folds = 5,
tune... |
##############################################################################################################################
##################### Script that make tha DATA proper for all JAGS IPD AD models ###########################
###########################################################################... | /DataForIPDADNMR.R | no_license | sunfeng98/NMAPredictionsRiskModel | R | false | false | 4,567 | r | ##############################################################################################################################
##################### Script that make tha DATA proper for all JAGS IPD AD models ###########################
###########################################################################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods.R
\name{cor_print}
\alias{cor_print}
\title{Print method for \link{cmicroRNA} and \link{cTF} objects}
\usage{
cor_print(ob, ...)
}
\arguments{
\item{ob}{A \link{cmicroRNA} or \link{cTF} object such as this returned by
calling \link{cm... | /man/cor_print.Rd | no_license | mmulvahill/cRegulome | R | false | true | 998 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/methods.R
\name{cor_print}
\alias{cor_print}
\title{Print method for \link{cmicroRNA} and \link{cTF} objects}
\usage{
cor_print(ob, ...)
}
\arguments{
\item{ob}{A \link{cmicroRNA} or \link{cTF} object such as this returned by
calling \link{cm... |
#########################
### Hive + RJDBC ###
### HDP 2.6.5 Sandbox ###
#### October 5,2020 ####
#########################
#Loading required libraries
library("DBI")
library("rJava")
library("RJDBC")
#init of the classpath (tested with HD 2.6.5 Sandbox)
cp = c("/usr/hdp/2.6.5.0-292/hadoop/hadoop-common.jar",
... | /HiveHDP_JDBC.R | no_license | fernandabruno/HDP2.6.5_Hive_R | R | false | false | 963 | r | #########################
### Hive + RJDBC ###
### HDP 2.6.5 Sandbox ###
#### October 5,2020 ####
#########################
#Loading required libraries
library("DBI")
library("rJava")
library("RJDBC")
#init of the classpath (tested with HD 2.6.5 Sandbox)
cp = c("/usr/hdp/2.6.5.0-292/hadoop/hadoop-common.jar",
... |
## This script gathers Serie A match results for 19 teams from 2000 to 2019.
# Intending to use this historical data as a basis for ELO ratings
library(rvest)
library(tidyverse)
library(stringr)
teams <- c("juventus","atalanta","sampdoria","empoli-fc",
"udinese-calcio","ac-milan","acf-fiorentina",
... | /Old Files/Scraping/Scraper_SerieA_hist_results.R | no_license | rsolter/Serie-A-Predictions | R | false | false | 6,361 | r | ## This script gathers Serie A match results for 19 teams from 2000 to 2019.
# Intending to use this historical data as a basis for ELO ratings
library(rvest)
library(tidyverse)
library(stringr)
teams <- c("juventus","atalanta","sampdoria","empoli-fc",
"udinese-calcio","ac-milan","acf-fiorentina",
... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
j <- NULL
set <- function(y){
x <<- y
j <<- NULL
}
get <- function()x
setInverse <- function(inverse) j <... | /cachematrix.R | no_license | anushajains/ProgrammingAssignment2 | R | false | false | 684 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
j <- NULL
set <- function(y){
x <<- y
j <<- NULL
}
get <- function()x
setInverse <- function(inverse) j <... |
\name{element_blank}
\alias{element_blank}
\title{Theme element: blank.
This theme element draws nothing, and assigns no space}
\usage{
element_blank()
}
\description{
Theme element: blank. This theme element draws nothing,
and assigns no space
}
| /man/element_blank.Rd | no_license | ThierryO/ggplot2 | R | false | false | 254 | rd | \name{element_blank}
\alias{element_blank}
\title{Theme element: blank.
This theme element draws nothing, and assigns no space}
\usage{
element_blank()
}
\description{
Theme element: blank. This theme element draws nothing,
and assigns no space
}
|
#' ---
#' title: Unrolling Genetic Group Functions
#' date: 2020-01-09
#' ---
#'
#' Specify parameters for testing
setwd("/Volumes/data_projekte/projekte/ketose/work/rh")
opt<- list()
opt$missingParentsFile <- "statGenGroup_4gg.txt"
opt$numberOfYears <- 5
opt$minGroupSize <- 250
opt$diffYear<- 3
opt$shiftYear <- 2
opt... | /scratch/define_GG_unroll_protocol.R | no_license | pvrqualitasag/qgengroup | R | false | false | 6,010 | r | #' ---
#' title: Unrolling Genetic Group Functions
#' date: 2020-01-09
#' ---
#'
#' Specify parameters for testing
setwd("/Volumes/data_projekte/projekte/ketose/work/rh")
opt<- list()
opt$missingParentsFile <- "statGenGroup_4gg.txt"
opt$numberOfYears <- 5
opt$minGroupSize <- 250
opt$diffYear<- 3
opt$shiftYear <- 2
opt... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GIC.R
\name{GIC.compCL}
\alias{GIC.compCL}
\title{Compute information crieteria for the \code{compCL} model.}
\usage{
GIC.compCL(y, Z, Zc = NULL, intercept = FALSE, lam = NULL, ...)
}
\arguments{
\item{y}{a response vector with length n.}
\i... | /fuzzedpackages/Compack/man/GIC.compCL.Rd | no_license | akhikolla/testpackages | R | false | true | 3,891 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GIC.R
\name{GIC.compCL}
\alias{GIC.compCL}
\title{Compute information crieteria for the \code{compCL} model.}
\usage{
GIC.compCL(y, Z, Zc = NULL, intercept = FALSE, lam = NULL, ...)
}
\arguments{
\item{y}{a response vector with length n.}
\i... |
library(relations)
### Name: impute
### Title: Impute relations
### Aliases: relation_impute
### Keywords: math
### ** Examples
## create a relation with a missing object
R <- ranking(1:2, 1:3)
print(R)
R <- as.relation(R)
## find all suitable completions within L
ens <- relation_impute(R, method = "any/L", n = "a... | /data/genthat_extracted_code/relations/examples/impute.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 756 | r | library(relations)
### Name: impute
### Title: Impute relations
### Aliases: relation_impute
### Keywords: math
### ** Examples
## create a relation with a missing object
R <- ranking(1:2, 1:3)
print(R)
R <- as.relation(R)
## find all suitable completions within L
ens <- relation_impute(R, method = "any/L", n = "a... |
rm(list=ls(all=T)) #clear workspace
v='MRB1_EstimateChla20110303.r' #version = rscript file name
#Get the MRB1 data
load(file='M:/Net MyDocuments/EPA/Data/RData/MRB1_20110208.rda')
load(file='//AA.AD.EPA.GOV/ORD/NAR/USERS/EC2/wmilstea/Net MyDocuments/EPA/Data/RData/MRB1_20110208.rda')
#Get the Inout Model results
loa... | /r/MRB1_EstimateChla20110309.r | no_license | willbmisled/MRB1 | R | false | false | 31,371 | r | rm(list=ls(all=T)) #clear workspace
v='MRB1_EstimateChla20110303.r' #version = rscript file name
#Get the MRB1 data
load(file='M:/Net MyDocuments/EPA/Data/RData/MRB1_20110208.rda')
load(file='//AA.AD.EPA.GOV/ORD/NAR/USERS/EC2/wmilstea/Net MyDocuments/EPA/Data/RData/MRB1_20110208.rda')
#Get the Inout Model results
loa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Neoantimon.R
\docType{data}
\name{sample_result_SNV_CLASS1_ALL}
\alias{sample_result_SNV_CLASS1_ALL}
\title{Analyzed Result for SNV CLASS1}
\usage{
data(sample_result_SNV_CLASS1_ALL)
}
\description{
Analyzed Result for SNV CLASS1
}
\keyword{r... | /man/sample_result_SNV_CLASS1_ALL.Rd | no_license | hase62/Neoantimon | R | false | true | 327 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Neoantimon.R
\docType{data}
\name{sample_result_SNV_CLASS1_ALL}
\alias{sample_result_SNV_CLASS1_ALL}
\title{Analyzed Result for SNV CLASS1}
\usage{
data(sample_result_SNV_CLASS1_ALL)
}
\description{
Analyzed Result for SNV CLASS1
}
\keyword{r... |
#' Get the NameID codes from Tropicos for taxonomic names.
#'
#' @export
#' @param sciname (character) One or more scientific name's as a vector or list.
#' @param ask logical; should get_tpsid be run in interactive mode?
#' If TRUE and more than one ID is found for the species, the user is asked for
#' input. If FALSE... | /R/get_tpsid.R | permissive | pkgspell/taxize | R | false | false | 9,457 | r | #' Get the NameID codes from Tropicos for taxonomic names.
#'
#' @export
#' @param sciname (character) One or more scientific name's as a vector or list.
#' @param ask logical; should get_tpsid be run in interactive mode?
#' If TRUE and more than one ID is found for the species, the user is asked for
#' input. If FALSE... |
# subject 14
setwd("~/simpsonlab/PACMAN/Riley_pacman")
source("Pacman_functions.R")
library(animation)
cona.dir <-"~/simpsonlab/PACMAN/Complete CONA/PACMAN"
# Unit c2, subject 14
unit.c2 <- read.csv("pacman_unitc2_30s.csv", head = T)
unit.c2 <- as.xts(unit.c2[,-1], order.by = as.POSIXct(unit.c2[,1], tz = "GMT"))
unit... | /subject_14_events.R | no_license | eriley1/Riley_pacman | R | false | false | 3,620 | r | # subject 14
setwd("~/simpsonlab/PACMAN/Riley_pacman")
source("Pacman_functions.R")
library(animation)
cona.dir <-"~/simpsonlab/PACMAN/Complete CONA/PACMAN"
# Unit c2, subject 14
unit.c2 <- read.csv("pacman_unitc2_30s.csv", head = T)
unit.c2 <- as.xts(unit.c2[,-1], order.by = as.POSIXct(unit.c2[,1], tz = "GMT"))
unit... |
# create 3000 random indices from 1:4000
# basically, we are swapping randomly between the partition to generate a sample set
# that is randomly distributed... we can see the probability of our original observation
# compared to what would happen if we did the above a bunch of times
index <- sample(4000, 3000, replace=... | /R/2-20.R | no_license | mitchellchris/stats-notes | R | false | false | 638 | r | # create 3000 random indices from 1:4000
# basically, we are swapping randomly between the partition to generate a sample set
# that is randomly distributed... we can see the probability of our original observation
# compared to what would happen if we did the above a bunch of times
index <- sample(4000, 3000, replace=... |
#Para archivos con obs asimiladas
#Estructura
#-------------------------------------------------------------
# Código de observación (ver abajo)
# Longitud (0-360)
# Latitud
# Elevación (en hPa o msnm para radar y conv en superficie)
# Observación (K, m/s, %, dbz, m/s)
# Error
# "Sub.id"
# Distancia entre la media del... | /read_files.R | no_license | paocorrales/Validacion_RRA | R | false | false | 3,774 | r | #Para archivos con obs asimiladas
#Estructura
#-------------------------------------------------------------
# Código de observación (ver abajo)
# Longitud (0-360)
# Latitud
# Elevación (en hPa o msnm para radar y conv en superficie)
# Observación (K, m/s, %, dbz, m/s)
# Error
# "Sub.id"
# Distancia entre la media del... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{get_SOA_data}
\alias{get_SOA_data}
\title{Get SOA energy consumption data}
\usage{
get_SOA_data(level, year = max(get_SOA_years()), sector = c("domestic",
"nondomestic"), fuel = c("electricity", "gas"), id, dir)
}
\arguments{
\item{level}{either "LSOA" or "MS... | /man/get_SOA_data.Rd | no_license | jkeirstead/decctools | R | false | false | 1,096 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{get_SOA_data}
\alias{get_SOA_data}
\title{Get SOA energy consumption data}
\usage{
get_SOA_data(level, year = max(get_SOA_years()), sector = c("domestic",
"nondomestic"), fuel = c("electricity", "gas"), id, dir)
}
\arguments{
\item{level}{either "LSOA" or "MS... |
#--------------------3강-----------------------#
## barplot(height, width = 1, space = NULL)
# 데이터 생성
op <- par(no.readonly=TRUE) # 원래의 그래프 파라미터를 모두 저장?
bar.width <-rep(1:3,4)
par(mfow = c(2,2))
op <- par(no.readonly =TRUE)
set.seed(1)
bar.x <- round(runif(12)*50)
set.seed(2)
bar.y <- matrix(bar.x,ncol=3,byrow=T)
barpl... | /R/plot_example.R | no_license | smeil123/EDA_class | R | false | false | 21,095 | r | #--------------------3강-----------------------#
## barplot(height, width = 1, space = NULL)
# 데이터 생성
op <- par(no.readonly=TRUE) # 원래의 그래프 파라미터를 모두 저장?
bar.width <-rep(1:3,4)
par(mfow = c(2,2))
op <- par(no.readonly =TRUE)
set.seed(1)
bar.x <- round(runif(12)*50)
set.seed(2)
bar.y <- matrix(bar.x,ncol=3,byrow=T)
barpl... |
#' Get attributes
#'
#' Function to get attributes (used in get_all_attrs)
#'
#' @param xml XML character string
#'
get_attrs <- function(xml) {
if (!is.null(xml)) {
attrs <- data.frame(matrix(xml, nrow = 1, byrow = TRUE))
colnames(attrs) <- names(xml)
return(attrs)
} else {
r... | /R/wdiAPI.R | no_license | reinholdsson/wdiAPI | R | false | false | 2,989 | r | #' Get attributes
#'
#' Function to get attributes (used in get_all_attrs)
#'
#' @param xml XML character string
#'
get_attrs <- function(xml) {
if (!is.null(xml)) {
attrs <- data.frame(matrix(xml, nrow = 1, byrow = TRUE))
colnames(attrs) <- names(xml)
return(attrs)
} else {
r... |
data=read.csv("/Users/fushuyue/Desktop/clOrderWholeDay.txt",header=T,sep=',')
ncol=length(data[1,])-1
data=data[,2:(ncol+1)]
n=length(data[,1])
# price change from 1 to n-1
pchange=data$trade.price[-1]-data$trade.price[-n]
pchange=pchange[-1]
direction=data$buy.sell
direction[direction==0]=-1
nd=length(direction)
for(... | /Data-Processing/takeLagBookValue.r | no_license | wishmastery/Practicum | R | false | false | 4,085 | r | data=read.csv("/Users/fushuyue/Desktop/clOrderWholeDay.txt",header=T,sep=',')
ncol=length(data[1,])-1
data=data[,2:(ncol+1)]
n=length(data[,1])
# price change from 1 to n-1
pchange=data$trade.price[-1]-data$trade.price[-n]
pchange=pchange[-1]
direction=data$buy.sell
direction[direction==0]=-1
nd=length(direction)
for(... |
# ****************************************************************************
#
# Projekt: bfsMaps.r
#
# Zweck: Convenience-wrapper for plotting CH maps
#
# Autor: Andri Signorell
# Version: 2.0.0
#
# Datum: 2023-04-30 rewritten for package sf
# 2020-12-20 undergone some garbage collect... | /R/bfsMaps.R | no_license | AndriSignorell/bfsMaps | R | false | false | 12,119 | r |
# ****************************************************************************
#
# Projekt: bfsMaps.r
#
# Zweck: Convenience-wrapper for plotting CH maps
#
# Autor: Andri Signorell
# Version: 2.0.0
#
# Datum: 2023-04-30 rewritten for package sf
# 2020-12-20 undergone some garbage collect... |
\name{lastPIX}
\alias{lastPIX}
\alias{editPIX}
\title{Last Pix
}
\description{
RSEIS Button: Restore Last WPX file from
memory. Function is used internally in swig.
}
\usage{
lastPIX(nh, g)
editPIX(nh, g)
}
\arguments{
\item{nh}{GH list from RSEIS
}
\item{g}{parameters from swig
}
}
\value{
New WPX list at... | /man/lastPIX.Rd | no_license | cran/Rquake | R | false | false | 402 | rd | \name{lastPIX}
\alias{lastPIX}
\alias{editPIX}
\title{Last Pix
}
\description{
RSEIS Button: Restore Last WPX file from
memory. Function is used internally in swig.
}
\usage{
lastPIX(nh, g)
editPIX(nh, g)
}
\arguments{
\item{nh}{GH list from RSEIS
}
\item{g}{parameters from swig
}
}
\value{
New WPX list at... |
# File: nonLinear_master.R
# Author: Tyler Pike
# Date: 7/30/2019
# Note(s): Master script to set common experiment enviroment and control what scripts are run
#reset space
rm(list = ls())
#set working directory
setwd('~/Research/CanMachinesBeatTheAverage/')
#load in libraries
library(policyPlot) # charting (FRB ... | /Scripts/nonLinear_master.R | permissive | Allisterh/Replication_CanMachinesBeatTheAverage | R | false | false | 5,088 | r | # File: nonLinear_master.R
# Author: Tyler Pike
# Date: 7/30/2019
# Note(s): Master script to set common experiment enviroment and control what scripts are run
#reset space
rm(list = ls())
#set working directory
setwd('~/Research/CanMachinesBeatTheAverage/')
#load in libraries
library(policyPlot) # charting (FRB ... |
url <- 'https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip'
filename <- 'dataset.zip'
f <- file.path(getwd(), filename)
if (!file.exists(filename)) {
download.file(url, filename)
}
if (!file.exists('summarySCC_PM25.rds') && !file.exists('Source_Classification_Code.rds')) {
unzip(filename)
}
libr... | /plot4.R | no_license | grnomichal/ExData_Plotting2 | R | false | false | 958 | r | url <- 'https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip'
filename <- 'dataset.zip'
f <- file.path(getwd(), filename)
if (!file.exists(filename)) {
download.file(url, filename)
}
if (!file.exists('summarySCC_PM25.rds') && !file.exists('Source_Classification_Code.rds')) {
unzip(filename)
}
libr... |
# Building a Prod-Ready, Robust Shiny Application.
#
# README: each step of the dev files is optional, and you don't have to
# fill every dev scripts before getting started.
# 01_start.R should be filled at start.
# 02_dev.R should be used to keep track of your development during the project.
# 03_deploy.R should b... | /dev/02_dev.R | permissive | Gedevan-Aleksizde/lotteRy | R | false | false | 1,811 | r | # Building a Prod-Ready, Robust Shiny Application.
#
# README: each step of the dev files is optional, and you don't have to
# fill every dev scripts before getting started.
# 01_start.R should be filled at start.
# 02_dev.R should be used to keep track of your development during the project.
# 03_deploy.R should b... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/subset_run_helpers.R
\name{get_test_loglik}
\alias{get_test_loglik}
\title{Get test loglikelihood (all)}
\usage{
get_test_loglik(subsetted_dataset_item, abund_probabilities)
}
\arguments{
\item{subsetted_dataset_item}{list with - at least - e... | /man/get_test_loglik.Rd | permissive | diazrenata/cvlt | R | false | true | 892 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/subset_run_helpers.R
\name{get_test_loglik}
\alias{get_test_loglik}
\title{Get test loglikelihood (all)}
\usage{
get_test_loglik(subsetted_dataset_item, abund_probabilities)
}
\arguments{
\item{subsetted_dataset_item}{list with - at least - e... |
#' Function for calculating number of values that are not NA in a vector
#'
#' @param xx The array of numbers and possible NA values
#' @return An integer with the number of values that are not NA
#' @export
#' @examples som_nona(x)
sum_nona<-function(xx){
sum(!is.na(xx))
}
#' @title Calculate recession times for a... | /R/calculate_recessiontimes.R | no_license | LMXB/NVEHYDROTOOLS | R | false | false | 6,524 | r |
#' Function for calculating number of values that are not NA in a vector
#'
#' @param xx The array of numbers and possible NA values
#' @return An integer with the number of values that are not NA
#' @export
#' @examples som_nona(x)
sum_nona<-function(xx){
sum(!is.na(xx))
}
#' @title Calculate recession times for a... |
##############################################################################################################################
# Title: Plot-Corr.R
# Type: Secondary Module for DCR Shiny App
# Description: Time Series plot (for non-depth dependent data)
# Written by: Nick Zinck, Spring 2017
############... | /modules/plots/plot_corr_wq.R | permissive | dancrocker/DCR-WAVE | R | false | false | 16,460 | r | ##############################################################################################################################
# Title: Plot-Corr.R
# Type: Secondary Module for DCR Shiny App
# Description: Time Series plot (for non-depth dependent data)
# Written by: Nick Zinck, Spring 2017
############... |
library(shiny)
## change this to TRUE to switch to no name version, change ui.R and server.R
private = TRUE
subjectNames <- read.csv("name_of_subjects.csv", header = FALSE, sep = ",")
nameList <- as.character(subjectNames$V1)
## this will be updated each time the script is updated
version = "(Development Version 17)... | /ui.R | no_license | steve9000gi/ActivityMap | R | false | false | 14,415 | r | library(shiny)
## change this to TRUE to switch to no name version, change ui.R and server.R
private = TRUE
subjectNames <- read.csv("name_of_subjects.csv", header = FALSE, sep = ",")
nameList <- as.character(subjectNames$V1)
## this will be updated each time the script is updated
version = "(Development Version 17)... |
library(lubridate)
source(file="./data/DataBase.R")
OlsztynSWDHotspotPOIData <- setRefClass(
Class="OlsztynSWDHotspotPOIData",
fields=list(
categories="character",
allColnames="character",
propertiesColnames="character",
r="numeric"
),
methods = list(
initialize = function() {
name <<... | /data/points-in-hotspot/OlsztynSWDHotspotPOIData.R | no_license | kontrabanda/mgr-2 | R | false | false | 1,523 | r | library(lubridate)
source(file="./data/DataBase.R")
OlsztynSWDHotspotPOIData <- setRefClass(
Class="OlsztynSWDHotspotPOIData",
fields=list(
categories="character",
allColnames="character",
propertiesColnames="character",
r="numeric"
),
methods = list(
initialize = function() {
name <<... |
library(yaml)
library(tidyverse)
library(janitor)
library(yorkr)
library(yaml)
library(base)
## This Rscript files automates the data gathering
## Process for my final project by downaloading
## cleaning and storing the data I use from the web
# Storing all the T20 files as a list in the
# raw-data files
files ... | /gather_code.R | no_license | hak7980/Cricket-Analytics | R | false | false | 2,126 | r | library(yaml)
library(tidyverse)
library(janitor)
library(yorkr)
library(yaml)
library(base)
## This Rscript files automates the data gathering
## Process for my final project by downaloading
## cleaning and storing the data I use from the web
# Storing all the T20 files as a list in the
# raw-data files
files ... |
## Function checkForValidPPEDataset
##
## Check for a valid PPE dataset.
##
## Allele datasets \emph{must} be checked and preprocessed by
## \code{\link{preprocessData}} prior to invocation of any of the
## PolyPatEx data analysis functions. This is achieved either by
## loading the allele data from a CSV fi... | /PolyPatEx/R/checkForValidPPEDataset.R | no_license | ingted/R-Examples | R | false | false | 2,535 | r |
## Function checkForValidPPEDataset
##
## Check for a valid PPE dataset.
##
## Allele datasets \emph{must} be checked and preprocessed by
## \code{\link{preprocessData}} prior to invocation of any of the
## PolyPatEx data analysis functions. This is achieved either by
## loading the allele data from a CSV fi... |
## Example shiny app to create a plot from sortable inputs
library(shiny)
library(htmlwidgets)
library(sortable)
library(magrittr)
colnames_to_tags <- function(df){
lapply(
colnames(df),
function(co) {
tag(
"p",
list(
class = class(df... | /sortable_inputs_demo.R | no_license | CarlosVecina/Algorithm_Visualizer_R | R | false | false | 4,247 | r | ## Example shiny app to create a plot from sortable inputs
library(shiny)
library(htmlwidgets)
library(sortable)
library(magrittr)
colnames_to_tags <- function(df){
lapply(
colnames(df),
function(co) {
tag(
"p",
list(
class = class(df... |
#---------------------------------------------------------------------------#
# Function1: unique_entry #
# GROUP AND FIND MOST USED ENTRIES FOR IMPUTATION AND CLEANING OF #
# THE DATASET #
# Functi... | /Imputation_cleaning/function_impute_zip_ems_facility.R | no_license | georgeannie/VHS-practicum-code | R | false | false | 6,362 | r | #---------------------------------------------------------------------------#
# Function1: unique_entry #
# GROUP AND FIND MOST USED ENTRIES FOR IMPUTATION AND CLEANING OF #
# THE DATASET #
# Functi... |
library(ggvis)
library(rgdal)
library(rgeos)
library(magrittr)
library(dplyr)
library(RColorBrewer)
library(data.table)
library(maptools)
# Basic plot of Maine -----------------------------------------------------
maine <- readOGR("data/maine.geojson", "OGRGeoJSON")
map <- ggplot2::fortify(maine, region="name")
map... | /R/ggvis-maps.R | no_license | umarfarooq360/USTaxAnalysis | R | false | false | 6,857 | r | library(ggvis)
library(rgdal)
library(rgeos)
library(magrittr)
library(dplyr)
library(RColorBrewer)
library(data.table)
library(maptools)
# Basic plot of Maine -----------------------------------------------------
maine <- readOGR("data/maine.geojson", "OGRGeoJSON")
map <- ggplot2::fortify(maine, region="name")
map... |
#' Update bib File
#'
#' Updates the report directory .bib file with a global/master .bib file.
#'
#' @param report Path to the report project.
#' @param bib.loc Optional path to a .bib resource.
#' @return Updates bib from master/global .bib file.
#' @export
#' @importFrom tools file_ext
update_bib <-
function(repor... | /R/update_bib.R | no_license | 2ndFloorStuff/reports | R | false | false | 1,068 | r | #' Update bib File
#'
#' Updates the report directory .bib file with a global/master .bib file.
#'
#' @param report Path to the report project.
#' @param bib.loc Optional path to a .bib resource.
#' @return Updates bib from master/global .bib file.
#' @export
#' @importFrom tools file_ext
update_bib <-
function(repor... |
#' \code{datapackimporter} package
#'
#' Parsing and import functions for the ICPI Data Pack
#' https://github.com/jennybc/googlesheets/blob/master/R/googlesheets.R
#' @docType package
#' @name datapackimporter
#' @importFrom dplyr %>%
#' @importFrom plyr mapvalues
#' @importFrom tidyr separate
NULL
## quiets concerns... | /R/dataPackImporter.R | permissive | achafetz/data-pack-importer | R | false | false | 434 | r | #' \code{datapackimporter} package
#'
#' Parsing and import functions for the ICPI Data Pack
#' https://github.com/jennybc/googlesheets/blob/master/R/googlesheets.R
#' @docType package
#' @name datapackimporter
#' @importFrom dplyr %>%
#' @importFrom plyr mapvalues
#' @importFrom tidyr separate
NULL
## quiets concerns... |
library(ggplot2)
# grammer of graphics - book of it
data(diamonds, package = 'ggplot2')
ggplot(diamonds)
# blank canvas
# aesthetics
# x
# y
# color
# shape
# size
# x: carat
# y: price
ggplot(diamonds, aes(x=carat, y=price))
# haven't what to plot
ggplot(diamonds, aes(x=carat, y=price)) + geom_point()
ggplot(dia... | /src/ggplot2-ggplot.r | no_license | CarrieWu2018/git_lesson | R | false | false | 2,932 | r | library(ggplot2)
# grammer of graphics - book of it
data(diamonds, package = 'ggplot2')
ggplot(diamonds)
# blank canvas
# aesthetics
# x
# y
# color
# shape
# size
# x: carat
# y: price
ggplot(diamonds, aes(x=carat, y=price))
# haven't what to plot
ggplot(diamonds, aes(x=carat, y=price)) + geom_point()
ggplot(dia... |
testthat::context("Tasks for today")
# Setup workspace
rm(list = ls())
# Load packages
library(Racmacs)
library(AbLandscapes)
# Read in a map
map <- h3basemap2015
# Fetch titer data
titers_pre <- vaccine1997.titers.pre[12,]
titers_post <- vaccine1997.titers.post[12,]
# Fit a landscape
fit_pre <- ablandscape(tite... | /tests/testthat/test_tasks.R | no_license | GuangchuangYu/ablandscapes | R | false | false | 1,218 | r |
testthat::context("Tasks for today")
# Setup workspace
rm(list = ls())
# Load packages
library(Racmacs)
library(AbLandscapes)
# Read in a map
map <- h3basemap2015
# Fetch titer data
titers_pre <- vaccine1997.titers.pre[12,]
titers_post <- vaccine1997.titers.post[12,]
# Fit a landscape
fit_pre <- ablandscape(tite... |
#' Fill an area.
#'
#' The program fills an area. The program is similar to the polygon function
#' except the data is in lat, lon and the transform of the data specified in
#' geoplot is used. Also there are some additional parameters. The graph has to
#' be initialized by geoplot.
#'
#'
#' @param lat,lon Latitude ... | /R/geopolygon.R | no_license | Hafro/geo | R | false | false | 7,002 | r | #' Fill an area.
#'
#' The program fills an area. The program is similar to the polygon function
#' except the data is in lat, lon and the transform of the data specified in
#' geoplot is used. Also there are some additional parameters. The graph has to
#' be initialized by geoplot.
#'
#'
#' @param lat,lon Latitude ... |
library(devtools)
load_all()
| /.Rprofile | no_license | tlpinney/dplyr | R | false | false | 29 | rprofile | library(devtools)
load_all()
|
library(trena)
library(RUnit)
library(RPostgreSQL)
#----------------------------------------------------------------------------------------------------
printf <- function(...) print(noquote(sprintf(...)))
#----------------------------------------------------------------------------------------------------
runTests <- ... | /inst/unitTests/test_FootprintFinder.R | no_license | biowilliam/trena | R | false | false | 16,141 | r | library(trena)
library(RUnit)
library(RPostgreSQL)
#----------------------------------------------------------------------------------------------------
printf <- function(...) print(noquote(sprintf(...)))
#----------------------------------------------------------------------------------------------------
runTests <- ... |
#' Return all synonyms for a taxon name with a given id from NBN
#'
#' @export
#'
#' @param id the taxon identifier code
#' @param ... Further args passed on to \code{\link[httr]{GET}}
#' @return A data.frame
#' @examples \dontrun{
#' nbn_synonyms(id = 'NHMSYS0000502940')
#' nbn_synonyms(id = 'NHMSYS0001501147')
#' nbn... | /R/deps/taxize-master/R/nbn_synonyms.R | permissive | hmarx/Alpine-Sky-Islands | R | false | false | 490 | r | #' Return all synonyms for a taxon name with a given id from NBN
#'
#' @export
#'
#' @param id the taxon identifier code
#' @param ... Further args passed on to \code{\link[httr]{GET}}
#' @return A data.frame
#' @examples \dontrun{
#' nbn_synonyms(id = 'NHMSYS0000502940')
#' nbn_synonyms(id = 'NHMSYS0001501147')
#' nbn... |
####################################
### Curso R - UCE ###
### Clase 04 ###
####################################
# Manipulación de datos ---------------------------------------------------
# Prerrequisitos
packages <- c('tidyverse','readxl','car')
# install.packages(packages)
li... | /Unidad 1/Clases/C1-4/C1-4 Manipulación de datos.R | no_license | CristopherA98/Curso_R-UCE | R | false | false | 4,816 | r | ####################################
### Curso R - UCE ###
### Clase 04 ###
####################################
# Manipulación de datos ---------------------------------------------------
# Prerrequisitos
packages <- c('tidyverse','readxl','car')
# install.packages(packages)
li... |
################################################################################
# Task: clean and format climate and irrigation data for randomForest
#
# Dec 31 2020
#
# Update 1/13/2021: I switched from the annual data to the seasonal data and
# the code below reflects these changes.
###############################... | /02_scripts/14_RFvars_clean.R | no_license | scoons8/ibis_wetlands | R | false | false | 7,343 | r | ################################################################################
# Task: clean and format climate and irrigation data for randomForest
#
# Dec 31 2020
#
# Update 1/13/2021: I switched from the annual data to the seasonal data and
# the code below reflects these changes.
###############################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmerI_pro_henrys_2016.R
\docType{data}
\name{FarmerI_pro_henrys_2016}
\alias{FarmerI_pro_henrys_2016}
\title{FarmerI_pro_henrys_2016}
\format{
A data frame with 1316 rows and 58 variables:
\describe{
\item{\code{sample_id}}{character Field ... | /man/FarmerI_pro_henrys_2016.Rd | permissive | paulhegedus/OFPEDATA | R | false | true | 4,240 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FarmerI_pro_henrys_2016.R
\docType{data}
\name{FarmerI_pro_henrys_2016}
\alias{FarmerI_pro_henrys_2016}
\title{FarmerI_pro_henrys_2016}
\format{
A data frame with 1316 rows and 58 variables:
\describe{
\item{\code{sample_id}}{character Field ... |
# :help Nvim-R
# \rf - start r session
# \rq - close r session
# \l — send current line
# \ae - Send file
# \se — send current selection (and echo)
# install.packages("caTools")
# install.packages("ggplot2")
library(caTools)
library(ggplot2)
dataset = read.csv("Salary_Data.csv")
# SPLIT TRAIN SETS AND TEST SETS
spl... | /part_2/salary.R | no_license | pauloancheta/ML | R | false | false | 1,601 | r | # :help Nvim-R
# \rf - start r session
# \rq - close r session
# \l — send current line
# \ae - Send file
# \se — send current selection (and echo)
# install.packages("caTools")
# install.packages("ggplot2")
library(caTools)
library(ggplot2)
dataset = read.csv("Salary_Data.csv")
# SPLIT TRAIN SETS AND TEST SETS
spl... |
#' Calculate the allocation probability
#'
#' @param y scalar, ie, one element of data vector
#' @param w a scalar weight
#' @param mu a scalar class mean
#' @param kappa a scalar inverse variance
#' @export
calc_allocation_prob <- function(y, w, # w a scalar
mu, # mu a scalar
... | /R/update_K.R | permissive | fboehm/xu2015 | R | false | false | 8,228 | r | #' Calculate the allocation probability
#'
#' @param y scalar, ie, one element of data vector
#' @param w a scalar weight
#' @param mu a scalar class mean
#' @param kappa a scalar inverse variance
#' @export
calc_allocation_prob <- function(y, w, # w a scalar
mu, # mu a scalar
... |
# GAPIT - Genomic Association and Prediction Integrated Tool
# Designed by Zhiwu Zhang
# Written by Zhiwu Zhang, Alex Lipka and Feng Tian
# Last update: June 29, 2012
#Step 0: Set directory to load GAPIT source files (this step is omitted for using package)
#############################################################... | /run_gapit.R | no_license | swang8/R_scripts | R | false | false | 1,896 | r | # GAPIT - Genomic Association and Prediction Integrated Tool
# Designed by Zhiwu Zhang
# Written by Zhiwu Zhang, Alex Lipka and Feng Tian
# Last update: June 29, 2012
#Step 0: Set directory to load GAPIT source files (this step is omitted for using package)
#############################################################... |
library(ppitables)
### Name: ppiDOM2010
### Title: ppiDOM2010
### Aliases: ppiDOM2010
### Keywords: datasets
### ** Examples
# Access Dominican Republic PPI table
ppiDOM2010
# Given a specific PPI score (from 0 - 100), get the row of poverty
# probabilities from PPI table it corresponds to
ppiScore <- 50... | /data/genthat_extracted_code/ppitables/examples/ppiDOM2010.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 781 | r | library(ppitables)
### Name: ppiDOM2010
### Title: ppiDOM2010
### Aliases: ppiDOM2010
### Keywords: datasets
### ** Examples
# Access Dominican Republic PPI table
ppiDOM2010
# Given a specific PPI score (from 0 - 100), get the row of poverty
# probabilities from PPI table it corresponds to
ppiScore <- 50... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tweetbotornot.R
\name{tweetbotornot}
\alias{tweetbotornot}
\alias{botornot}
\alias{botornot_dbl}
\title{tweetbotornot}
\usage{
tweetbotornot(x, fast = FALSE)
botornot(x, fast = FALSE)
botornot_dbl(x, fast = TRUE)
}
\arguments{
\item{x}{Obje... | /man/tweetbotornot.Rd | permissive | lucahammer/tweetbotornot | R | false | true | 1,385 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tweetbotornot.R
\name{tweetbotornot}
\alias{tweetbotornot}
\alias{botornot}
\alias{botornot_dbl}
\title{tweetbotornot}
\usage{
tweetbotornot(x, fast = FALSE)
botornot(x, fast = FALSE)
botornot_dbl(x, fast = TRUE)
}
\arguments{
\item{x}{Obje... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/Learner.R
\name{makeLearner}
\alias{Learner}
\alias{makeLearner}
\title{Create learner object.}
\usage{
makeLearner(cl, id = cl, predict.type = "response",
predict.threshold = NULL, fix.factors.prediction = FALSE, ...,
par.vals = ... | /man/makeLearner.Rd | no_license | dickoa/mlr | R | false | false | 3,774 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/Learner.R
\name{makeLearner}
\alias{Learner}
\alias{makeLearner}
\title{Create learner object.}
\usage{
makeLearner(cl, id = cl, predict.type = "response",
predict.threshold = NULL, fix.factors.prediction = FALSE, ...,
par.vals = ... |
# This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common new_operation new_request send_request
NULL
#' Disables automatic scheduled rotation and cancels the rotation of a secret if one is currently in progress
#'
#' Disables automatic scheduled rotation and cancels the rotation of a... | /service/paws.secretsmanager/R/paws.secretsmanager_operations.R | permissive | CR-Mercado/paws | R | false | false | 90,717 | r | # This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common new_operation new_request send_request
NULL
#' Disables automatic scheduled rotation and cancels the rotation of a secret if one is currently in progress
#'
#' Disables automatic scheduled rotation and cancels the rotation of a... |
#!/usr/bin/env Rscript
# List of packages to load# {{{
x <- c('Repitools', 'ChIPpeakAnno', 'biomaRt', 'rtracklayer', 'org.Mm.eg.db')
lapply(x, suppressMessages(library), character.only=T)
source("~/source/Rscripts/granges-functions.R")# }}}
# Read in arguments -- replace with argsparse# {{{
if(TRUE){
args <- commandA... | /annotate-nurd-peaks.R | no_license | mxenoph/scripts | R | false | false | 8,626 | r | #!/usr/bin/env Rscript
# List of packages to load# {{{
x <- c('Repitools', 'ChIPpeakAnno', 'biomaRt', 'rtracklayer', 'org.Mm.eg.db')
lapply(x, suppressMessages(library), character.only=T)
source("~/source/Rscripts/granges-functions.R")# }}}
# Read in arguments -- replace with argsparse# {{{
if(TRUE){
args <- commandA... |
xfun::pkg_load2("knitr","rmarkdown")
# ref: https://github.com/yihui/knitr/blob/master/R/engine.R
knitr::knit_engines$set(html = function(options) {
knitr::engine_output(options,options$code, '')
})
source('source_embed.R')
after_body<-c("_includes/body_suffix.html")
rmarkdown::pandoc_include_args(after_body = afte... | /_template/b3m.R | no_license | BabyMouse/ddRMarkdown | R | false | false | 329 | r | xfun::pkg_load2("knitr","rmarkdown")
# ref: https://github.com/yihui/knitr/blob/master/R/engine.R
knitr::knit_engines$set(html = function(options) {
knitr::engine_output(options,options$code, '')
})
source('source_embed.R')
after_body<-c("_includes/body_suffix.html")
rmarkdown::pandoc_include_args(after_body = afte... |
#' Convert a subset to a chromosome
#'
#' Takes a vector of indices and converts it to a chromosome
#' @param sbst A vector of indices
#' @param k The desired length of the chromosome
#' @return Returns a binary string of length \code{k} corresponding to which features are present or absent in the model
#' @exam... | /R/sbst2chr.R | no_license | tjmassaro/ssga | R | false | false | 526 | r | #' Convert a subset to a chromosome
#'
#' Takes a vector of indices and converts it to a chromosome
#' @param sbst A vector of indices
#' @param k The desired length of the chromosome
#' @return Returns a binary string of length \code{k} corresponding to which features are present or absent in the model
#' @exam... |
#
# Functions for Portfolio Analysis
#
#
# gmv.weights.vec <- gmvPortfolio( mu.vec, Sigma.mat )
# tan.weights.vec <- tanPortfolio( mu.vec, Sigma.mat, risk.free.rate )
# eff.weights.vec <- effPortfolio( mu.vec, Sigma.mat, target.return )
# eff.weights.mat <- effFrontier(mu.vec, Sigma.mat, alpha.vec=seq(from=-1,to=2,by=... | /my.portfolio.r | no_license | hilsds/coursera-finance-computational-finance | R | false | false | 19,548 | r | #
# Functions for Portfolio Analysis
#
#
# gmv.weights.vec <- gmvPortfolio( mu.vec, Sigma.mat )
# tan.weights.vec <- tanPortfolio( mu.vec, Sigma.mat, risk.free.rate )
# eff.weights.vec <- effPortfolio( mu.vec, Sigma.mat, target.return )
# eff.weights.mat <- effFrontier(mu.vec, Sigma.mat, alpha.vec=seq(from=-1,to=2,by=... |
# R script
#
# author: Xavier Devroey
library(ggplot2)
library(dplyr)
source('dataclean.r')
# ------------------------------
# Functions definition
# ------------------------------
printCategoriesTable <- function(categories){
df <- categories %>%
filter(!is.na(Category) & Category != '') %>%
arrange(ca... | /results/Rscripts/makecategorisationtable.r | permissive | STAMP-project/EvoCrash-JCrashPack-application | R | false | false | 2,066 | r | # R script
#
# author: Xavier Devroey
library(ggplot2)
library(dplyr)
source('dataclean.r')
# ------------------------------
# Functions definition
# ------------------------------
printCategoriesTable <- function(categories){
df <- categories %>%
filter(!is.na(Category) & Category != '') %>%
arrange(ca... |
####################################################################
############## All common functions are placed here ##############
####################################################################
############### Calculate Elasticity ##############################
calculate_elasticity <- function(regressed_... | /CommonFunctions.R | no_license | AbhineshMishra/MarketMixModel | R | false | false | 1,710 | r | ####################################################################
############## All common functions are placed here ##############
####################################################################
############### Calculate Elasticity ##############################
calculate_elasticity <- function(regressed_... |
library(httr)
library(bit64)
library(twitteR)
library(RCurl)
library(RJSONIO)
library(stringr)
library(tm)
library(DescTools)
library(sqldf)
library(wordcloud)
setwd("/Users/Dropbox/Columbia University/Big Data Project")
#Twitter API key and secret
api_key <- "*************************"
api_secret <- "*******... | /Sourcecode/word_cloud.R | no_license | PWuJuveOKC/Magic_movie_predictors | R | false | false | 4,300 | r | library(httr)
library(bit64)
library(twitteR)
library(RCurl)
library(RJSONIO)
library(stringr)
library(tm)
library(DescTools)
library(sqldf)
library(wordcloud)
setwd("/Users/Dropbox/Columbia University/Big Data Project")
#Twitter API key and secret
api_key <- "*************************"
api_secret <- "*******... |
## File Name: summary.tam.linking.R
## File Version: 0.12
summary.tam.linking <- function( object, file=NULL, ...)
{
tam_osink( file=file)
cat("------------------------------------------------------------\n")
#- package and R session
tam_print_package_rsession(pack="TAM")
cat( paste0("Linking o... | /R/summary.tam.linking.R | no_license | markdly/TAM | R | false | false | 1,396 | r | ## File Name: summary.tam.linking.R
## File Version: 0.12
summary.tam.linking <- function( object, file=NULL, ...)
{
tam_osink( file=file)
cat("------------------------------------------------------------\n")
#- package and R session
tam_print_package_rsession(pack="TAM")
cat( paste0("Linking o... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/index.freqDW.R
\name{index.freqDW}
\alias{index.freqDW}
\title{Dry-wet probability}
\usage{
index.freqDW(ts, threshold = 1)
}
\arguments{
\item{ts}{A vector containing the data}
\item{threshold}{A float number defining the threshold consider... | /man/index.freqDW.Rd | no_license | Predictia/R_VALUE | R | false | true | 608 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/index.freqDW.R
\name{index.freqDW}
\alias{index.freqDW}
\title{Dry-wet probability}
\usage{
index.freqDW(ts, threshold = 1)
}
\arguments{
\item{ts}{A vector containing the data}
\item{threshold}{A float number defining the threshold consider... |
# 111-HHBase.R
# Builds the base data.table for households
rm(list=ls())
starttime <- proc.time()
cat("\n\n================ Poverty Indices =====================================\n")
library(yaml)
Settings <- yaml.load_file("Settings.yaml")
#library(foreign)
library(data.table)
library(stringr)
X1 <- data.table(Yea... | /R/Archive/August 2020/Poverty Indices.R | no_license | IPRCIRI/IRHEIS | R | false | false | 10,507 | r | # 111-HHBase.R
# Builds the base data.table for households
rm(list=ls())
starttime <- proc.time()
cat("\n\n================ Poverty Indices =====================================\n")
library(yaml)
Settings <- yaml.load_file("Settings.yaml")
#library(foreign)
library(data.table)
library(stringr)
X1 <- data.table(Yea... |
library(testthat)
library(prodlim)
library(data.table)
context("Prodlim")
test_that("Competing risks: asking for case for event that does not exist in data",{
##
set.seed(10)
d <- SimSurv(10)
setDT(d)
d[,event:=factor(event,levels=c(0,1),labels=c("0","2"))]
f <- prodlim(Hist(time,event)~X1,data... | /tests/testthat/test-prodlim.R | no_license | tagteam/prodlim | R | false | false | 15,191 | r | library(testthat)
library(prodlim)
library(data.table)
context("Prodlim")
test_that("Competing risks: asking for case for event that does not exist in data",{
##
set.seed(10)
d <- SimSurv(10)
setDT(d)
d[,event:=factor(event,levels=c(0,1),labels=c("0","2"))]
f <- prodlim(Hist(time,event)~X1,data... |
# Exercise 1: practice with basic R syntax
# Create a variable `hometown` that stores the city in which you were born
hometown <- "Hong Kong"
# Assign your name to the variable `my_name`
my_name <- "Val"
# Assign your height (in inches) to a variable `my_height`
my_height <- 66
# Create a variable `puppies` equal t... | /exercise-1/exercise.R | permissive | valeriechann/ch5-r-intro | R | false | false | 858 | r | # Exercise 1: practice with basic R syntax
# Create a variable `hometown` that stores the city in which you were born
hometown <- "Hong Kong"
# Assign your name to the variable `my_name`
my_name <- "Val"
# Assign your height (in inches) to a variable `my_height`
my_height <- 66
# Create a variable `puppies` equal t... |
install.packages("read.dbc", repos="https://cran.r-project.org") | /.src/r-requirements.r | no_license | LucasMMota/tcc-data-extractor | R | false | false | 64 | r | install.packages("read.dbc", repos="https://cran.r-project.org") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.