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 |
|---|---|---|---|---|---|---|---|---|---|
# data file
f <- gzfile("household_power_consumption.txt.gz","rt");
nolines <- 100
greped<-c()
repeat {
lines=readLines(f,n=nolines)
idx <- grep("^[12]/2/2007", lines)
greped<-c(greped, lines[idx])
if(nolines!=length(lines)) {
break
}
}
close(f)
tc<-textConnection(greped,"rt")
df<-rea... | /plot-1.R | no_license | tofighi/ExData_Plotting1 | R | false | false | 774 | r | # data file
f <- gzfile("household_power_consumption.txt.gz","rt");
nolines <- 100
greped<-c()
repeat {
lines=readLines(f,n=nolines)
idx <- grep("^[12]/2/2007", lines)
greped<-c(greped, lines[idx])
if(nolines!=length(lines)) {
break
}
}
close(f)
tc<-textConnection(greped,"rt")
df<-rea... |
#Libraries-----------------------------------------------------------------------
source("global/load_packages.R", local = TRUE)
#Modules-----------------------------------------------------------------------
source("modules/module_dt.R")
#Functions---------------------------------------------------------------------
... | /shiny/shiny_wqdi/global.R | no_license | InterstateCommissionPotomacRiverBasin/wq_data_inventory | R | false | false | 3,363 | r | #Libraries-----------------------------------------------------------------------
source("global/load_packages.R", local = TRUE)
#Modules-----------------------------------------------------------------------
source("modules/module_dt.R")
#Functions---------------------------------------------------------------------
... |
#' Classify Something
#'
#' Classifies something.
#' Generic, with method \code{\link{classified.default}}
#' @param x object of dispatch
#' @param ... passed arguments
#' @export
#' @return see methods
#' @keywords internal
#' @family classified
#' @examples
#' example(classified.default)
classified <- function(x, ...... | /R/classified.R | no_license | bergsmat/yamlet | R | false | false | 21,822 | r | #' Classify Something
#'
#' Classifies something.
#' Generic, with method \code{\link{classified.default}}
#' @param x object of dispatch
#' @param ... passed arguments
#' @export
#' @return see methods
#' @keywords internal
#' @family classified
#' @examples
#' example(classified.default)
classified <- function(x, ...... |
library(glmnet)
mydata = read.table("./TrainingSet/RF/urinary_tract.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.65,family="gaussian",standardize=TRUE)
sink('./Model/EN/Classifier/urinary_tract/urinary_tract_... | /Model/EN/Classifier/urinary_tract/urinary_tract_071.R | no_license | leon1003/QSMART | R | false | false | 371 | r | library(glmnet)
mydata = read.table("./TrainingSet/RF/urinary_tract.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.65,family="gaussian",standardize=TRUE)
sink('./Model/EN/Classifier/urinary_tract/urinary_tract_... |
#input Harry Potter books
input <- if (packageVersion("devtools") < 1.6) {
install.packages("devtools")}
devtools::install_github("bradleyboehmke/harrypotter")
| /Team 1/inputHPBW.R | no_license | PHP2560-Statistical-Programming-R/text-mining-review-all-join-this-team | R | false | false | 162 | r | #input Harry Potter books
input <- if (packageVersion("devtools") < 1.6) {
install.packages("devtools")}
devtools::install_github("bradleyboehmke/harrypotter")
|
library(TMDb)
### Name: network
### Title: Get the name of a TV network by ID.
### Aliases: network
### Keywords: network
### ** Examples
## Not run:
##D ## An example of an authenticated request,
##D ## where api_key is fictitious.
##D ## You can obtain your own at https://www.themoviedb.org/documentation/api
##D... | /data/genthat_extracted_code/TMDb/examples/network.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 408 | r | library(TMDb)
### Name: network
### Title: Get the name of a TV network by ID.
### Aliases: network
### Keywords: network
### ** Examples
## Not run:
##D ## An example of an authenticated request,
##D ## where api_key is fictitious.
##D ## You can obtain your own at https://www.themoviedb.org/documentation/api
##D... |
## tests for two phase III trials ##
test_that("Higher treatment effect leads to higher utility", {
skip_on_cran()
expect_lte(utility2_normal(kappa = 0.1, n2 = 50, alpha = 0.025, beta = 0.1, w = 0.3,
Delta1 = 0.375, Delta2 = 0.625, in1 = 300, in2 = 600,
... | /tests/testthat/test-functions_multitrial_normal.R | permissive | Sterniii3/drugdevelopR | R | false | false | 9,247 | r | ## tests for two phase III trials ##
test_that("Higher treatment effect leads to higher utility", {
skip_on_cran()
expect_lte(utility2_normal(kappa = 0.1, n2 = 50, alpha = 0.025, beta = 0.1, w = 0.3,
Delta1 = 0.375, Delta2 = 0.625, in1 = 300, in2 = 600,
... |
##################################################################################################################"
# #
# Calculating gene pool-specific genomic relationship matrices ... | /scripts_DRYAD/4_CalculateGenePoolSpecificGRM.R | no_license | JulietteArchambeau/HeightPinpinClonapin | R | false | false | 8,354 | r | ##################################################################################################################"
# #
# Calculating gene pool-specific genomic relationship matrices ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/binomialfunctions.R
\name{bin_distribution}
\alias{bin_distribution}
\title{Binomial distribution}
\usage{
bin_distribution(trials, prob)
}
\arguments{
\item{trials}{number of trials}
\item{prob}{probability of successes}
}
\value{
a data fr... | /binomial/man/bin_distribution.Rd | no_license | stat133-sp19/hw-stat133-christinajin01 | R | false | true | 652 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/binomialfunctions.R
\name{bin_distribution}
\alias{bin_distribution}
\title{Binomial distribution}
\usage{
bin_distribution(trials, prob)
}
\arguments{
\item{trials}{number of trials}
\item{prob}{probability of successes}
}
\value{
a data fr... |
\name{OrderByLocus}
\alias{OrderByLocus}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{ A function to order the fragment size vector for a given locus }
\description{
Used by other functions to sort the fragment sizes
}
\usage{
OrderByLocus(DataBase, marker)
}
\arguments{
\item{Da... | /man/OrderByLocus.Rd | no_license | kkeenan02/MsatAllele | R | false | false | 810 | rd | \name{OrderByLocus}
\alias{OrderByLocus}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{ A function to order the fragment size vector for a given locus }
\description{
Used by other functions to sort the fragment sizes
}
\usage{
OrderByLocus(DataBase, marker)
}
\arguments{
\item{Da... |
myargument <- 3
setwd("/zhome/6e/9/133731/Desktop/Thesis/Thesis/Code")
wd <- getwd()
source(paste(wd,"/Coefficient_optimization/Multi_step_predictions/meta_optim_functions/meta_optim.r", sep = ""))
source(paste(wd,"/Coefficient_optimization/Multi_step_predictions/meta_optim_functions/evaluationPart_of_meta_optim.r", ... | /Code/Coefficient_optimization/neldermead_optimization/Multi_step_predictions/meta_optim_functions/Old/test_meta_optim.r | no_license | arijoh/DataDrivenForecastModels | R | false | false | 1,521 | r |
myargument <- 3
setwd("/zhome/6e/9/133731/Desktop/Thesis/Thesis/Code")
wd <- getwd()
source(paste(wd,"/Coefficient_optimization/Multi_step_predictions/meta_optim_functions/meta_optim.r", sep = ""))
source(paste(wd,"/Coefficient_optimization/Multi_step_predictions/meta_optim_functions/evaluationPart_of_meta_optim.r", ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lisrel.R
\name{lisrel_xy}
\alias{lisrel_xy}
\title{LISREL Structural Equations with Latent Variables (xy).}
\usage{
lisrel_xy(LY, LX, inv, GA, PH)
}
\arguments{
\item{LY}{\eqn{\boldsymbol{\Lambda}_{\mathbf{y}}}
\eqn{p \times m}
matrix of fact... | /man/lisrel_xy.Rd | permissive | jeksterslabds/jeksterslabRds | R | false | true | 2,869 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lisrel.R
\name{lisrel_xy}
\alias{lisrel_xy}
\title{LISREL Structural Equations with Latent Variables (xy).}
\usage{
lisrel_xy(LY, LX, inv, GA, PH)
}
\arguments{
\item{LY}{\eqn{\boldsymbol{\Lambda}_{\mathbf{y}}}
\eqn{p \times m}
matrix of fact... |
library(geoR)
# to get lat and lon from Google
library(ggmap)
library(rgdal)
library(tidyverse)
library(DT)
library(knitr)
library(sp)
library(rgeos)
library(ggplot2)
library(ggthemes)
library(outliers)
library(maptools)
getCurrentFileLocation <- function()
{
this_file <- commandArgs() %>%
tibble::enframe(na... | /data-prep.R | no_license | jbdatascience/kriging | R | false | false | 3,361 | r | library(geoR)
# to get lat and lon from Google
library(ggmap)
library(rgdal)
library(tidyverse)
library(DT)
library(knitr)
library(sp)
library(rgeos)
library(ggplot2)
library(ggthemes)
library(outliers)
library(maptools)
getCurrentFileLocation <- function()
{
this_file <- commandArgs() %>%
tibble::enframe(na... |
#Bootcamp modeling exercises
#Assignment 2 - Ioana Anghel
#Ricker Model
###(a)
tt <- 0
N0 <- 100
rr <- 1.05
pop.size = numeric(11)
KK = 300
ttmax = 10
NN <-matrix(NA, nrow=1, ncol=ttmax+1)
NN[1] <- N0
#sets value at first point in vector
RickerFun <- function(rr,N0,KK,ttMax,PLOTFLAG=0){
NN <- rep(NA,ttMax+1)
NN[... | /Assignment2/Assignment 2 Jamie.R | no_license | ioanaanghel/Ioana-RBootcamp | R | false | false | 4,234 | r | #Bootcamp modeling exercises
#Assignment 2 - Ioana Anghel
#Ricker Model
###(a)
tt <- 0
N0 <- 100
rr <- 1.05
pop.size = numeric(11)
KK = 300
ttmax = 10
NN <-matrix(NA, nrow=1, ncol=ttmax+1)
NN[1] <- N0
#sets value at first point in vector
RickerFun <- function(rr,N0,KK,ttMax,PLOTFLAG=0){
NN <- rep(NA,ttMax+1)
NN[... |
theta_estimation<-function( m, N, u, x, theta, L1, L2, L3=NULL, L4=NULL, L5=NULL ){
l3<-0
#For the first Likelihood
l3 <- l3 + u[,1]%*%(log(L1(x,theta[1])))
#For the second Likelihood
l3 <- l3 +u[,2]%*%(log(L2(x,theta[2])))
#If we have more than two Likelihoods we can use this algorithm
if (m>2)... | /R/theta_estimation.R | no_license | MrLehna/HMM | R | false | false | 513 | r | theta_estimation<-function( m, N, u, x, theta, L1, L2, L3=NULL, L4=NULL, L5=NULL ){
l3<-0
#For the first Likelihood
l3 <- l3 + u[,1]%*%(log(L1(x,theta[1])))
#For the second Likelihood
l3 <- l3 +u[,2]%*%(log(L2(x,theta[2])))
#If we have more than two Likelihoods we can use this algorithm
if (m>2)... |
require(stringr)
require(tidyr)
require(dplyr)
require(sqldf)
# read in the revised data frame from midterm part 1
taxdata <- read.csv("/home/havb/Dropbox/MSUI/Big Data for Cities - PPUA 5262 - 01/R/data/Tax Assessor/TAdata.csv", stringsAsFactors = FALSE)
# Calculate the Fire Risk for Residential Properties
# First,... | /Assignments/Final/Final_Record_Level_Syntax.R | no_license | bitsandbricks/Boston-Tax-Assesor-Dataset-2015 | R | false | false | 5,966 | r | require(stringr)
require(tidyr)
require(dplyr)
require(sqldf)
# read in the revised data frame from midterm part 1
taxdata <- read.csv("/home/havb/Dropbox/MSUI/Big Data for Cities - PPUA 5262 - 01/R/data/Tax Assessor/TAdata.csv", stringsAsFactors = FALSE)
# Calculate the Fire Risk for Residential Properties
# First,... |
rm(list=ls())
library(ggplot2)
library(ggmap)
statesMap = map_data("state")
str(statesMap)
table(statesMap$group)
ggplot(statesMap, aes(x=long, y=lat, group=group))+geom_polygon(fill="white", color="blue")+coord_map('mercator')
?mapproject
polling=read.csv("C:/users/zahid/downloads/PollingImputed.csv")
Train=subset(po... | /Visualization(US Presidential Election).R | no_license | zahidmak/dataAnalysis | R | false | false | 2,111 | r | rm(list=ls())
library(ggplot2)
library(ggmap)
statesMap = map_data("state")
str(statesMap)
table(statesMap$group)
ggplot(statesMap, aes(x=long, y=lat, group=group))+geom_polygon(fill="white", color="blue")+coord_map('mercator')
?mapproject
polling=read.csv("C:/users/zahid/downloads/PollingImputed.csv")
Train=subset(po... |
# Library ====
library(tidyverse)
# Lectura de datos ====
# En este caso no aplica porque voy a sacar los datos de las bases de R
# who <- read_csv("data/raw/who.csv")
?who
# Pivot_longer
who1 <- who %>% pivot_longer(new_sp_m014:newrel_f65, names_to = "aux", values_to = 'casos',
values_drop_na =... | /src/04-who.R | no_license | graf-anapaula/curso_econ | R | false | false | 919 | r | # Library ====
library(tidyverse)
# Lectura de datos ====
# En este caso no aplica porque voy a sacar los datos de las bases de R
# who <- read_csv("data/raw/who.csv")
?who
# Pivot_longer
who1 <- who %>% pivot_longer(new_sp_m014:newrel_f65, names_to = "aux", values_to = 'casos',
values_drop_na =... |
#21
x <- seq(60,140,length = 1000)
plot(x,dnorm(x,100,16),type="l",ylim = c(0,0.1),ylab ="Normal Density")
n=4
curve(dnorm(x,100,16/sqrt(n)),col="red", add=TRUE)
n=8
curve(dnorm(x,100,16/sqrt(n)),col="blue", add=TRUE)
#22
x <- seq(0,10,length = 1000)
plot(x,dchisq(x,df=2),type="l",ylim=c(0,0.5))
curve(dchis... | /Review.R | no_license | isaacattuah/MTH224-R | R | false | false | 645 | r | #21
x <- seq(60,140,length = 1000)
plot(x,dnorm(x,100,16),type="l",ylim = c(0,0.1),ylab ="Normal Density")
n=4
curve(dnorm(x,100,16/sqrt(n)),col="red", add=TRUE)
n=8
curve(dnorm(x,100,16/sqrt(n)),col="blue", add=TRUE)
#22
x <- seq(0,10,length = 1000)
plot(x,dchisq(x,df=2),type="l",ylim=c(0,0.5))
curve(dchis... |
#Clustering - Simple dataset - Marks in 2 subjects
A=c(1,1.5,3,5,3.5,4.5,3.5)
B=c(1,2,4,7,5,5,4.5)
marks=data.frame(A,B)
marks
(c1 <- kmeans(marks, 2)) #kmeans algorithm specifies no of clusters
cbind(marks, c1$cluster)
plot(marks, col = c1$cluster)
#cluster works only on numerical values
points(c1$centers, col = 1... | /cluster.r | no_license | Nihali/MA | R | false | false | 1,595 | r | #Clustering - Simple dataset - Marks in 2 subjects
A=c(1,1.5,3,5,3.5,4.5,3.5)
B=c(1,2,4,7,5,5,4.5)
marks=data.frame(A,B)
marks
(c1 <- kmeans(marks, 2)) #kmeans algorithm specifies no of clusters
cbind(marks, c1$cluster)
plot(marks, col = c1$cluster)
#cluster works only on numerical values
points(c1$centers, col = 1... |
\name{adjacency_matrix}
\alias{adjacency_matrix}
\alias{adjmat}
\title{Takes a Matrix and Generates an Adjacency Matrix}
\usage{
adjacency_matrix(matrix.obj)
adjmat(matrix.obj)
}
\arguments{
\item{matrix.obj}{A matrix object, preferably, of the
class "termco" generated from \code{\link[qdap]{termco}},
\code{... | /man/adjacency_matrix.Rd | no_license | abresler/qdap | R | false | false | 1,592 | rd | \name{adjacency_matrix}
\alias{adjacency_matrix}
\alias{adjmat}
\title{Takes a Matrix and Generates an Adjacency Matrix}
\usage{
adjacency_matrix(matrix.obj)
adjmat(matrix.obj)
}
\arguments{
\item{matrix.obj}{A matrix object, preferably, of the
class "termco" generated from \code{\link[qdap]{termco}},
\code{... |
divisor <- 5
# c2, weekday1234_lunch
cluster_numb = 3
credit_1_cash_0_set = 1
# start <- 6
# end <- 11
# start <- 10
# end <- 15
start <- 11
end <- 21
cluster_total<-read.csv(file=paste("/Users/alan/Desktop/data_reference/cluster_data_in.csv",sep=""),head=TRUE,sep=",")
####################################... | /regression_log.R | no_license | yaoxiang1/Machine-Learning-and-Data-Analytics-Research | R | false | false | 14,342 | r | divisor <- 5
# c2, weekday1234_lunch
cluster_numb = 3
credit_1_cash_0_set = 1
# start <- 6
# end <- 11
# start <- 10
# end <- 15
start <- 11
end <- 21
cluster_total<-read.csv(file=paste("/Users/alan/Desktop/data_reference/cluster_data_in.csv",sep=""),head=TRUE,sep=",")
####################################... |
library(biomaRt)
# make a
counts_design <- read.csv("../../Ensembl_species_counts_designfactors.csv",stringsAsFactors = FALSE)
design <- counts_design[counts_design$Ensembl == 'Empty',]
#design$type <- c("species","native_salinity","clade","group","condition")
drops <- c("X","Ensembl")
counts<-counts_design[!counts_... | /DE_scripts/getannotations.R | no_license | WhiteheadLab/RNAseq_17killifish | R | false | false | 1,033 | r | library(biomaRt)
# make a
counts_design <- read.csv("../../Ensembl_species_counts_designfactors.csv",stringsAsFactors = FALSE)
design <- counts_design[counts_design$Ensembl == 'Empty',]
#design$type <- c("species","native_salinity","clade","group","condition")
drops <- c("X","Ensembl")
counts<-counts_design[!counts_... |
#Name:Kelvin
#Function makeCacheMatrix will helps transform user input to a matrix format, before setting the value of the matrix,
#get the value of the matrix, set the inverse Matrix and get the inverse Matrix.
#The matrix object will than cache its own object.
makeCacheMatrix <- function(x = matrix()) {
... | /cachematrix.R | no_license | kelvinchee7/Peer-graded-Assignment-Programming-Assignment-2-Lexical-Scoping | R | false | false | 2,215 | r |
#Name:Kelvin
#Function makeCacheMatrix will helps transform user input to a matrix format, before setting the value of the matrix,
#get the value of the matrix, set the inverse Matrix and get the inverse Matrix.
#The matrix object will than cache its own object.
makeCacheMatrix <- function(x = matrix()) {
... |
# R01 GSH DO Mapping Code
# Updated September 2020
# Becca Gould
#LIVER GLUTATHIONE + NAD MAPPING - Allele Plots
#Creates Heat Maps that shows the individual CC founder allele contribution at a specific SNP from the Giga MUGA
#Created by Becca Gould with Sue McClatchy on 9/24/2020
#Based on Greg Keele's heat map c... | /Liver-GSH-NAD/RankZ/RankZ-sexgen/Allele plots/Allele Plots - RankZ SexGen.R | no_license | rebeccalgould/Rqtl2-Glutathione-Genetics | R | false | false | 6,990 | r | # R01 GSH DO Mapping Code
# Updated September 2020
# Becca Gould
#LIVER GLUTATHIONE + NAD MAPPING - Allele Plots
#Creates Heat Maps that shows the individual CC founder allele contribution at a specific SNP from the Giga MUGA
#Created by Becca Gould with Sue McClatchy on 9/24/2020
#Based on Greg Keele's heat map c... |
library(tidyverse)
library(stringr)
header_1 <- read_csv2("../HW_data/exp_betyg_ak6_kommun_2018_19.csv", skip =5, n_max = 1, col_names = FALSE) %>%
replace(is.na(.),"")
header_2 <- read_csv2("../HW_data/exp_betyg_ak6_kommun_2018_19.csv", skip =6, n_max = 1, col_names = FALSE) %>%
replace(is.na(.),"")
betyg_wrong... | /HW4/HW4.R | no_license | Sjoeborg/MT5013 | R | false | false | 4,661 | r | library(tidyverse)
library(stringr)
header_1 <- read_csv2("../HW_data/exp_betyg_ak6_kommun_2018_19.csv", skip =5, n_max = 1, col_names = FALSE) %>%
replace(is.na(.),"")
header_2 <- read_csv2("../HW_data/exp_betyg_ak6_kommun_2018_19.csv", skip =6, n_max = 1, col_names = FALSE) %>%
replace(is.na(.),"")
betyg_wrong... |
#'Plot of efficacy probability density
#' just a wrapper for \code{reshape2::dcast} from \code{reshape2}
#' @param ef efficacy dataframe from \code{efficacy.aggregate()}
#' @return List of wide formated dataframes of efficacy by mean,
#' geometric mean, median by clone for each experiment
#'
#' @examples
#' #... | /R/plot_ef_density.R | no_license | faustovrz/bugcount | R | false | false | 741 | r | #'Plot of efficacy probability density
#' just a wrapper for \code{reshape2::dcast} from \code{reshape2}
#' @param ef efficacy dataframe from \code{efficacy.aggregate()}
#' @return List of wide formated dataframes of efficacy by mean,
#' geometric mean, median by clone for each experiment
#'
#' @examples
#' #... |
################################################################################
## Coursera - Exploratory Data Analysis - Week 1 Assignment 1 ##
################################################################################
## Prerequisites
## 1. Ensure that file household_power_consumption.txt is a... | /plot4.R | no_license | y4nz1/ExData_Plotting1 | R | false | false | 5,346 | r | ################################################################################
## Coursera - Exploratory Data Analysis - Week 1 Assignment 1 ##
################################################################################
## Prerequisites
## 1. Ensure that file household_power_consumption.txt is a... |
#EXPERIMENT 1
setwd("")
economy_bandari <- read.csv("economy_bandari.csv")
economy_svm <- read.csv("economy_svm_none.csv")
economy_svm_UNDER <- read.csv("economy_svm_UNDER.csv")
economy_svm_OVER <- read.csv("economy_svm_OVER.csv")
economy_svm_SMOTE <- read.csv("economy_svm_SMOTE.csv")
economy_svm_IS <- read.csv("econ... | /R/HandleResultFiles.R | no_license | nunompmoniz/EPIA2016_JournalTrack | R | false | false | 9,108 | r | #EXPERIMENT 1
setwd("")
economy_bandari <- read.csv("economy_bandari.csv")
economy_svm <- read.csv("economy_svm_none.csv")
economy_svm_UNDER <- read.csv("economy_svm_UNDER.csv")
economy_svm_OVER <- read.csv("economy_svm_OVER.csv")
economy_svm_SMOTE <- read.csv("economy_svm_SMOTE.csv")
economy_svm_IS <- read.csv("econ... |
library(psplinesl1)
library(reshape2)
paperPath <- "../../paper/plots"
presentPath <- "../../presentation/plots"
posterPath <- "../../poster/plots"
path <- "/home/bsegal/Documents/Research/data_empatica"
# data prep -------------------------------------------------------------------
data <- read.csv(file.path(path, ... | /application/analyze_EDA_l1.R | no_license | maj-biostat/code-for-psplinesl1-paper | R | false | false | 4,832 | r | library(psplinesl1)
library(reshape2)
paperPath <- "../../paper/plots"
presentPath <- "../../presentation/plots"
posterPath <- "../../poster/plots"
path <- "/home/bsegal/Documents/Research/data_empatica"
# data prep -------------------------------------------------------------------
data <- read.csv(file.path(path, ... |
splinePlot <- function(eSetObject, df, reference, toPlot="all") {
if(!is(eSetObject, "ExpressionSet")) stop("eSetObject must be of class ExpressionSet")
if(!(("SampleName" %in% names(pData(eSetObject))) & ("Time" %in% names(pData(eSetObject))) & ("Treatment" %in% names(pData(eSetObject))))) stop("eSetObject has to i... | /R/splinePlot.R | no_license | ZytoHMGU/splineTimeR | R | false | false | 2,940 | r | splinePlot <- function(eSetObject, df, reference, toPlot="all") {
if(!is(eSetObject, "ExpressionSet")) stop("eSetObject must be of class ExpressionSet")
if(!(("SampleName" %in% names(pData(eSetObject))) & ("Time" %in% names(pData(eSetObject))) & ("Treatment" %in% names(pData(eSetObject))))) stop("eSetObject has to i... |
# generate some fake data
x <- 1:10
y <- 1 + 0.2*x + rnorm(10)
#print out x and y in a matrix (doesn't alter x or y)
cbind(x,y)
# default plot
plot(x,y)
# plot documentation gives some information about
# what can be customized
# we'll go through some of these but not all.
# it's important to learn to read the docum... | /labs/lab2.R | no_license | Xime82/btry6020_2021 | R | false | false | 5,027 | r | # generate some fake data
x <- 1:10
y <- 1 + 0.2*x + rnorm(10)
#print out x and y in a matrix (doesn't alter x or y)
cbind(x,y)
# default plot
plot(x,y)
# plot documentation gives some information about
# what can be customized
# we'll go through some of these but not all.
# it's important to learn to read the docum... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkInputs.R
\name{checkBatchConsistency}
\alias{checkBatchConsistency}
\alias{checkIfSCE}
\alias{checkRestrictions}
\title{Check batch inputs}
\usage{
checkBatchConsistency(batches, cells.in.columns = TRUE)
checkIfSCE(batches)
checkRestri... | /man/checkInputs.Rd | no_license | LTLA/batchelor | R | false | true | 2,132 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkInputs.R
\name{checkBatchConsistency}
\alias{checkBatchConsistency}
\alias{checkIfSCE}
\alias{checkRestrictions}
\title{Check batch inputs}
\usage{
checkBatchConsistency(batches, cells.in.columns = TRUE)
checkIfSCE(batches)
checkRestri... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/servicecatalog_operations.R
\name{servicecatalog_describe_portfolio}
\alias{servicecatalog_describe_portfolio}
\title{Gets information about the specified portfolio}
\usage{
servicecatalog_describe_portfolio(AcceptLanguage, Id)
}
\arguments{
... | /cran/paws.management/man/servicecatalog_describe_portfolio.Rd | permissive | sanchezvivi/paws | R | false | true | 770 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/servicecatalog_operations.R
\name{servicecatalog_describe_portfolio}
\alias{servicecatalog_describe_portfolio}
\title{Gets information about the specified portfolio}
\usage{
servicecatalog_describe_portfolio(AcceptLanguage, Id)
}
\arguments{
... |
##' @importFrom ape as.phylo
##' @export
ape::as.phylo
##' @method as.phylo tbl_df
##' @importFrom tibble as_tibble
##' @importFrom dplyr mutate_if
##' @export
as.phylo.tbl_df <- function(x, branch.length, label, ...) {
x <- as_tibble(x) %>% mutate_if(is.factor, as.character)
branch.length <- rlang::enquo(bra... | /R/method-as-phylo.R | no_license | xiangpin/treeio | R | false | false | 5,643 | r | ##' @importFrom ape as.phylo
##' @export
ape::as.phylo
##' @method as.phylo tbl_df
##' @importFrom tibble as_tibble
##' @importFrom dplyr mutate_if
##' @export
as.phylo.tbl_df <- function(x, branch.length, label, ...) {
x <- as_tibble(x) %>% mutate_if(is.factor, as.character)
branch.length <- rlang::enquo(bra... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calendar.R
\name{calendar-holidays-weekdays}
\alias{calendar-holidays-weekdays}
\alias{holidays}
\alias{holidays.default}
\alias{holidays.Calendar}
\alias{holidays.character}
\alias{weekdays.default}
\alias{weekdays.Calendar}
\alias... | /man/calendar-holidays-weekdays.Rd | no_license | cran/bizdays | R | false | true | 1,077 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calendar.R
\name{calendar-holidays-weekdays}
\alias{calendar-holidays-weekdays}
\alias{holidays}
\alias{holidays.default}
\alias{holidays.Calendar}
\alias{holidays.character}
\alias{weekdays.default}
\alias{weekdays.Calendar}
\alias... |
# some random examples
p2 <- ggplot()
p2 + geom_point(data = df,aes(x=cu,y=zn)) +
geom_line(data = df,aes(x=cu,y=zn))
p3 <- ggplot(data = df,aes(x=cu,y=zn))
p3 + geom_point() +
geom_line()
ggplot() + geom_point(data = df,aes(x=cu,y=zn)) +
facet_grid(vars(landuse), vars(texture),scales = "free")
ggplot(df)+... | /script/more_examples_plotting.R | no_license | GiulioGenova/RCourse | R | false | false | 904 | r | # some random examples
p2 <- ggplot()
p2 + geom_point(data = df,aes(x=cu,y=zn)) +
geom_line(data = df,aes(x=cu,y=zn))
p3 <- ggplot(data = df,aes(x=cu,y=zn))
p3 + geom_point() +
geom_line()
ggplot() + geom_point(data = df,aes(x=cu,y=zn)) +
facet_grid(vars(landuse), vars(texture),scales = "free")
ggplot(df)+... |
#' ABAP to occuR
#'
#' @description This function transforms a raw ABAP data frame (returned by \code{\link{getAbapData}})
#' into an list which can be used to fit single-species occupancy models using
#' the package \code{\href{https://github.com/r-glennie/occuR}{occuR}}. This package
#' can fit non-linear effects, in... | /R/abapToOccuR.R | permissive | AfricaBirdData/ABAP | R | false | false | 9,394 | r | #' ABAP to occuR
#'
#' @description This function transforms a raw ABAP data frame (returned by \code{\link{getAbapData}})
#' into an list which can be used to fit single-species occupancy models using
#' the package \code{\href{https://github.com/r-glennie/occuR}{occuR}}. This package
#' can fit non-linear effects, in... |
library(monocle)
library(xacHelper)
library(grid)
library(mcclust)
library(plyr)
#
# # load('./RData/na_sim_data_robustness_dpt_slicer_wishbone.RData')
#
####################################################################################################################################################################... | /Supplementary_scripts/revision_1/revision_1_accuracy_na_simulation_res.R | no_license | lxparadox/monocle2-rge-paper | R | false | false | 37,753 | r | library(monocle)
library(xacHelper)
library(grid)
library(mcclust)
library(plyr)
#
# # load('./RData/na_sim_data_robustness_dpt_slicer_wishbone.RData')
#
####################################################################################################################################################################... |
library(rcorpora)
### Name: corpora
### Title: Load a data set from the corpora package
### Aliases: corpora
### ** Examples
corpora()
corpora(category = "animals")
corpora("foods/pizzaToppings")
| /data/genthat_extracted_code/rcorpora/examples/corpora.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 203 | r | library(rcorpora)
### Name: corpora
### Title: Load a data set from the corpora package
### Aliases: corpora
### ** Examples
corpora()
corpora(category = "animals")
corpora("foods/pizzaToppings")
|
reduceDimentions<-function(cells, geneOfInterest, type="UMAP", colourby="cell_type", norm_type="batch_corrected"){
if (colourby=="Gene expression"){
colourby <- geneOfInterest
} else if (colourby=="Cell type" || colourby=="Cell-type based"){
colourby <- "cell_type"
} else if (colourby=="Batch") {
... | /plotDimRed.R | no_license | dalingard/sce | R | false | false | 866 | r | reduceDimentions<-function(cells, geneOfInterest, type="UMAP", colourby="cell_type", norm_type="batch_corrected"){
if (colourby=="Gene expression"){
colourby <- geneOfInterest
} else if (colourby=="Cell type" || colourby=="Cell-type based"){
colourby <- "cell_type"
} else if (colourby=="Batch") {
... |
##Program for 1st assignment - Plot 2
setwd("filepath/")
powerdata<-read.csv("filepath/household_power_consumption.txt",header = TRUE, sep = ";")
powerdata1<-powerdata[which(powerdata$Date == "1/2/2007"|powerdata$Date == "2/2/2007"),]
powerdata1$datetime<-strptime(paste(powerdata1$Date, powerdata1$Time),"%d/%... | /Plot2.R | no_license | TXu8/ExData_Plotting1 | R | false | false | 596 | r | ##Program for 1st assignment - Plot 2
setwd("filepath/")
powerdata<-read.csv("filepath/household_power_consumption.txt",header = TRUE, sep = ";")
powerdata1<-powerdata[which(powerdata$Date == "1/2/2007"|powerdata$Date == "2/2/2007"),]
powerdata1$datetime<-strptime(paste(powerdata1$Date, powerdata1$Time),"%d/%... |
Pick3<-function(nh, g)
{
kix = RSEIS::legitpix(g$sel, g$zloc, g$zenclick)
ypick = kix$ypick
ppick = kix$ppick
if(length(ppick)>0)
{
ipick = g$sel[ypick]
ipick = ipick[length(ipick)]
... | /R/Pick3.R | no_license | cran/Rquake | R | false | false | 3,133 | r | Pick3<-function(nh, g)
{
kix = RSEIS::legitpix(g$sel, g$zloc, g$zenclick)
ypick = kix$ypick
ppick = kix$ppick
if(length(ppick)>0)
{
ipick = g$sel[ypick]
ipick = ipick[length(ipick)]
... |
#####################################################
##
## Tidy Gapminder data
## Workshop Date: 2018-7-11
## Prepared by Jamie Bono (jamie@buffalo.edu)
##
####################################################
# Examine the data structures ====
# Using base functions ----
View(gapminder)
View(gapm... | /R/03_tidy.R | no_license | UB-BiomedicalInformatics/orientation | R | false | false | 1,019 | r | #####################################################
##
## Tidy Gapminder data
## Workshop Date: 2018-7-11
## Prepared by Jamie Bono (jamie@buffalo.edu)
##
####################################################
# Examine the data structures ====
# Using base functions ----
View(gapminder)
View(gapm... |
## These two functions are used to cache the inverse of a matrix
## rather than repeatedly performing costly computations
## makeCacheMatrix creates a list containing a function to
## 1. set the value of the matrix
## 2. get the value of the matrix
## 3. set the value of inverse of the matrix
## 4. get the value of in... | /cachematrix.R | no_license | a-martinez0681/ProgrammingAssignment2 | R | false | false | 1,562 | r | ## These two functions are used to cache the inverse of a matrix
## rather than repeatedly performing costly computations
## makeCacheMatrix creates a list containing a function to
## 1. set the value of the matrix
## 2. get the value of the matrix
## 3. set the value of inverse of the matrix
## 4. get the value of in... |
library("matrixStats")
rowProds_R <- function(x, FUN = prod, na.rm = FALSE, ...) {
apply(x, MARGIN = 1L, FUN = FUN, na.rm = na.rm)
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Subsetted tests
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
source("utils/validateIndicesFra... | /tests/rowProds_subset.R | no_license | const-ae/matrixStats | R | false | false | 1,000 | r | library("matrixStats")
rowProds_R <- function(x, FUN = prod, na.rm = FALSE, ...) {
apply(x, MARGIN = 1L, FUN = FUN, na.rm = na.rm)
}
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Subsetted tests
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
source("utils/validateIndicesFra... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting_functions.R
\name{plot_tree}
\alias{plot_tree}
\title{AAA}
\usage{
plot_tree(
data,
slingshot_curves,
gene,
rotate90 = F,
assay = "RNA",
edge.weights = F,
pal = c("grey90", "grey70", "blue3", "navy"),
minsize = 0.5,
... | /man/plot_tree.Rd | permissive | czarnewski/niceRplots | R | false | true | 383 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotting_functions.R
\name{plot_tree}
\alias{plot_tree}
\title{AAA}
\usage{
plot_tree(
data,
slingshot_curves,
gene,
rotate90 = F,
assay = "RNA",
edge.weights = F,
pal = c("grey90", "grey70", "blue3", "navy"),
minsize = 0.5,
... |
library(dplyr)
ss.bounds <- readRDS("ss.bounds.rds")
alpha <- 0.025
method <- 'fm'
scenario <- 25
param <- 1
anal_type <- "mice"
ss <- ss.bounds%>%
dplyr::filter(method == "fm", scenario.id == scenario)
do_val <- 0.05
x1 <- parallel::mclapply(X = 1:10000,
mc.cores = parallel::detectCor... | /sim_pgms/fm/do5/2xcontH0_sc25_do5_mice.R | no_license | yuliasidi/nibinom_apply | R | false | false | 3,318 | r | library(dplyr)
ss.bounds <- readRDS("ss.bounds.rds")
alpha <- 0.025
method <- 'fm'
scenario <- 25
param <- 1
anal_type <- "mice"
ss <- ss.bounds%>%
dplyr::filter(method == "fm", scenario.id == scenario)
do_val <- 0.05
x1 <- parallel::mclapply(X = 1:10000,
mc.cores = parallel::detectCor... |
library(ipred)
library(RecordLinkage)
library(ff)
# stopifnot(library(SOAR))
ri <- integer(10)
fi <- ff(vmode="integer", length = 10)
fb <- ff(vmode="byte", length = 10)
rb <- byte(length(fb))
fb <- ff(rb)
vmode(ri)
vmode(fi)
vmode(fb)
vmode(rb)
str(chunk(fd))
chunk(fd)
memory.limit()
library(RJDBC)
library(sq... | /rscripts/RecordLinkageStudy/CachingV2.R | no_license | yngcan/R-programming | R | false | false | 5,968 | r | library(ipred)
library(RecordLinkage)
library(ff)
# stopifnot(library(SOAR))
ri <- integer(10)
fi <- ff(vmode="integer", length = 10)
fb <- ff(vmode="byte", length = 10)
rb <- byte(length(fb))
fb <- ff(rb)
vmode(ri)
vmode(fi)
vmode(fb)
vmode(rb)
str(chunk(fd))
chunk(fd)
memory.limit()
library(RJDBC)
library(sq... |
rankall <- function(outcome,num='best'){
## Read outcome data
data <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
if (outcome == 'heart attack'){
x <- 'Hospital.30.Day.Death..Mortality..Rates.from.Heart.Attack'
} else if (outcome == 'heart failure') {
... | /R_programming/assign3-rankall.R | no_license | shepherdmeng/data_science_coursera | R | false | false | 3,145 | r | rankall <- function(outcome,num='best'){
## Read outcome data
data <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
if (outcome == 'heart attack'){
x <- 'Hospital.30.Day.Death..Mortality..Rates.from.Heart.Attack'
} else if (outcome == 'heart failure') {
... |
h5readDataset <- function (h5dataset, index = NULL, start = NULL, stride = NULL,
block = NULL, count = NULL, compoundAsDataFrame = TRUE, drop = FALSE, ...) {
try({
h5spaceFile <- H5Dget_space(h5dataset)
on.exit(H5Sclose(h5spaceFile))
})
h5spaceMem = NULL
if (!... | /R/h5read.R | no_license | hpages/rhdf5 | R | false | false | 4,820 | r | h5readDataset <- function (h5dataset, index = NULL, start = NULL, stride = NULL,
block = NULL, count = NULL, compoundAsDataFrame = TRUE, drop = FALSE, ...) {
try({
h5spaceFile <- H5Dget_space(h5dataset)
on.exit(H5Sclose(h5spaceFile))
})
h5spaceMem = NULL
if (!... |
# # 7章
# ## 7.2
# In[1]:
library(dplyr)
# In[2]:
library(tidyr)
# In[3]:
library(ggplot2)
# In[4]:
d.room <- data_frame(
kaiteki = c(6, 5, 6, 7, 2, 1, 1, 0, 7, 8, 8, 9, 8, 7, 6, 7),
size = c(rep("S", 8), rep("L", 8)),
student = c(rep(1, 4), rep(2, 4), rep(1, 4), rep(2, 4))
)
head(d.room)
# ... | /notebooks/Chap07.r | no_license | whatalnk/stat-intro-by-r-tkd | R | false | false | 8,032 | r |
# # 7章
# ## 7.2
# In[1]:
library(dplyr)
# In[2]:
library(tidyr)
# In[3]:
library(ggplot2)
# In[4]:
d.room <- data_frame(
kaiteki = c(6, 5, 6, 7, 2, 1, 1, 0, 7, 8, 8, 9, 8, 7, 6, 7),
size = c(rep("S", 8), rep("L", 8)),
student = c(rep(1, 4), rep(2, 4), rep(1, 4), rep(2, 4))
)
head(d.room)
# ... |
# CREATEBINNULL2.R
# Part of the FALCON (Framework of Adaptive ensembLes for the Comparison Of
# Nestedness) package: https://github.com/sjbeckett/FALCON
# Last updated: 11th July 2014
CREATEBINNULL2 <- function(MATRIX,numbernulls,measures,binNull,sortVar) { #FF
# Fixed - Fixed null model
#Creates null matrices that c... | /R/NULLS/CREATEBINNULL2.R | permissive | sjbeckett/FALCON | R | false | false | 2,248 | r | # CREATEBINNULL2.R
# Part of the FALCON (Framework of Adaptive ensembLes for the Comparison Of
# Nestedness) package: https://github.com/sjbeckett/FALCON
# Last updated: 11th July 2014
CREATEBINNULL2 <- function(MATRIX,numbernulls,measures,binNull,sortVar) { #FF
# Fixed - Fixed null model
#Creates null matrices that c... |
# this is a test
diabetes_data <- read.csv("Diabetes-md.csv",
na = "", stringsAsFactors=FALSE)
# what's the data type
class(diabetes_data)
# what's the structure
str(diabetes_data)
# what's the dimension
dim(diabetes_data)
#row(diabetes_data)
#install.packages("VIM")
library(VIM)
missing_val... | /test.R | no_license | rachel0614/practicals | R | false | false | 1,311 | r | # this is a test
diabetes_data <- read.csv("Diabetes-md.csv",
na = "", stringsAsFactors=FALSE)
# what's the data type
class(diabetes_data)
# what's the structure
str(diabetes_data)
# what's the dimension
dim(diabetes_data)
#row(diabetes_data)
#install.packages("VIM")
library(VIM)
missing_val... |
library(Sleuth2)
### Name: case0202
### Title: Anatomical Abnormalities Associated with Schizophrenia
### Aliases: case0202
### Keywords: datasets
### ** Examples
str(case0202)
with(case0202, stem(Unaffect-Affected, scale=2))
| /data/genthat_extracted_code/Sleuth2/examples/case0202.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 233 | r | library(Sleuth2)
### Name: case0202
### Title: Anatomical Abnormalities Associated with Schizophrenia
### Aliases: case0202
### Keywords: datasets
### ** Examples
str(case0202)
with(case0202, stem(Unaffect-Affected, scale=2))
|
## Download Data from source
if (!file.exists("./data/household_power_consumption.txt")) {
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl,destfile="./data/power_data.zip",method="curl")
# Unzip the file
unzip(zipfile="./data/power_data.zi... | /plot4.R | no_license | flash55/ExData_Plotting1 | R | false | false | 1,635 | r | ## Download Data from source
if (!file.exists("./data/household_power_consumption.txt")) {
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl,destfile="./data/power_data.zip",method="curl")
# Unzip the file
unzip(zipfile="./data/power_data.zi... |
return_keywords_and_thesaurus_as_data_frame <- function(all_subjects){
keywords_metadata <-NULL
thesaurus <-NULL
all_keywords <-NULL
all_keywords <-data.frame(keyword = character(), thesaurus = character(),stringsAsFactors=FALSE)
list_subjects <- strsplit(as.character(all_subjects), split = "\n")
... | /metadata_workflow_Postgres_Postgis/scripts/write_metadata_OGC_19115_from_Dublin_Core.R | no_license | juldebar/R_Metadata | R | false | false | 26,431 | r |
return_keywords_and_thesaurus_as_data_frame <- function(all_subjects){
keywords_metadata <-NULL
thesaurus <-NULL
all_keywords <-NULL
all_keywords <-data.frame(keyword = character(), thesaurus = character(),stringsAsFactors=FALSE)
list_subjects <- strsplit(as.character(all_subjects), split = "\n")
... |
library(rlang)
library(shiny)
library(data.table)
library(DT)
library(stringi)
require(reshape2)
library(ggcorrplot)
library(shinydashboardPlus)
library(shinyFiles)
library(rvest)
library(data.table)
rm(list=ls())
library(rvest)
library(data.table)
library(plotly)
#setwd("../.")
#update with latest data
source("./s... | /global.R | permissive | covid19dk/fastRestimation | R | false | false | 1,447 | r | library(rlang)
library(shiny)
library(data.table)
library(DT)
library(stringi)
require(reshape2)
library(ggcorrplot)
library(shinydashboardPlus)
library(shinyFiles)
library(rvest)
library(data.table)
rm(list=ls())
library(rvest)
library(data.table)
library(plotly)
#setwd("../.")
#update with latest data
source("./s... |
install.packages("vars")
library(vars)
install.packages("mFilter")
library(mFilter)
library(tseries)
install.packages("TSstudio")
library(TSstudio)
library(forecast)
library(tidyverse)
data <- read_csv('DummyData.csv')
head(data)
str(data)
GDP <- ts(data$`GDP Growth`, start = c(2000,1,1), frequency =... | /VAR.R | no_license | jaylum94/econometrics_deep_learning_comparison | R | false | false | 2,824 | r | install.packages("vars")
library(vars)
install.packages("mFilter")
library(mFilter)
library(tseries)
install.packages("TSstudio")
library(TSstudio)
library(forecast)
library(tidyverse)
data <- read_csv('DummyData.csv')
head(data)
str(data)
GDP <- ts(data$`GDP Growth`, start = c(2000,1,1), frequency =... |
def main(rule_args, callback, rei):
source_file = global_vars['*SourceFile'][1:-1]
dest_file = global_vars['*DestFile'][1:-1]
callback.msiDataObjCopy(source_file, dest_file, 'forceFlag=', 0)
callback.writeLine('stdout', 'File ' + source_file + ' copied to ' + dest_file)
INPUT *SourceFile="/tempZone/ho... | /python_rules/rulemsiDataObjCopy.r | no_license | irods/irods_rule_engine_plugin_python | R | false | false | 401 | r | def main(rule_args, callback, rei):
source_file = global_vars['*SourceFile'][1:-1]
dest_file = global_vars['*DestFile'][1:-1]
callback.msiDataObjCopy(source_file, dest_file, 'forceFlag=', 0)
callback.writeLine('stdout', 'File ' + source_file + ' copied to ' + dest_file)
INPUT *SourceFile="/tempZone/ho... |
library(data.table)
library(reshape2)
setwd('C:/Users/jmaburto/Documents/GitHub Backup 2/CoD-burden-on-LA')
#source('R/7_1Europe.R')
load('Data/Europe_Data.RData')
### group causes of death by 2010-2015 or +
CoD.data <- Deaths.data
unique(CoD.data$Year)
CoD.data$Period <- 2010
CoD.data$Period2 <- CoD.data$P... | /WB Outcomes/RCode/7_2Europe.R | no_license | jmaburto/CoD-burden-on-LA | R | false | false | 11,456 | r | library(data.table)
library(reshape2)
setwd('C:/Users/jmaburto/Documents/GitHub Backup 2/CoD-burden-on-LA')
#source('R/7_1Europe.R')
load('Data/Europe_Data.RData')
### group causes of death by 2010-2015 or +
CoD.data <- Deaths.data
unique(CoD.data$Year)
CoD.data$Period <- 2010
CoD.data$Period2 <- CoD.data$P... |
#--- acf and msd functions -------------------------------------------------
#' Autocorrelation of fBM Increments
#'
#' @param alpha Subdiffusion exponent.
#' @param dT Interobservation time.
#' @param N Number of increment observations.
#' @return An autocorrelation vector of length \eqn{N}.
#' @details
#' The fBM in... | /R/old/acf-functions.R | no_license | neery1218/SuperGauss | R | false | false | 5,312 | r | #--- acf and msd functions -------------------------------------------------
#' Autocorrelation of fBM Increments
#'
#' @param alpha Subdiffusion exponent.
#' @param dT Interobservation time.
#' @param N Number of increment observations.
#' @return An autocorrelation vector of length \eqn{N}.
#' @details
#' The fBM in... |
rm(list=ls())
## Set directory
setwd("~/")
if("XSub"%in%dir()){setwd("~/XSub/Data/")}
if("Dropbox2"%in%dir()){setwd("~/Dropbox2/Dropbox (Zhukov research team)/XSub/Data/")}
# setwd("F:/Dropbox (Zhukov research team)/XSub/Data/")
## Install & load packages (all at once)
list.of.packages <- c("gdata","countrycode","ma... | /Code/step2_eventcode/step2_eventcode_GED0.R | no_license | zhukovyuri/xSub_ReplicationCode | R | false | false | 11,352 | r | rm(list=ls())
## Set directory
setwd("~/")
if("XSub"%in%dir()){setwd("~/XSub/Data/")}
if("Dropbox2"%in%dir()){setwd("~/Dropbox2/Dropbox (Zhukov research team)/XSub/Data/")}
# setwd("F:/Dropbox (Zhukov research team)/XSub/Data/")
## Install & load packages (all at once)
list.of.packages <- c("gdata","countrycode","ma... |
setwd("C:\\Users\\Ivan.Liuyanfeng\\Desktop\\Data_Mining_Work_Space\\Titanic-Machine-Learning-from-Disaster\\R")
trainData <- read.csv('train.csv',header=T,stringsAsFactor=F)
testData <- read.csv('test.csv',header=T,stringsAsFactor=F)
head(trainData)
names(trainData)
plot(density(trainData$Age,na.rm=T))
plot(density(tra... | /R/model1.R | no_license | lucentcosmos/Titanic-Machine-Learning-from-Disaster | R | false | false | 6,263 | r | setwd("C:\\Users\\Ivan.Liuyanfeng\\Desktop\\Data_Mining_Work_Space\\Titanic-Machine-Learning-from-Disaster\\R")
trainData <- read.csv('train.csv',header=T,stringsAsFactor=F)
testData <- read.csv('test.csv',header=T,stringsAsFactor=F)
head(trainData)
names(trainData)
plot(density(trainData$Age,na.rm=T))
plot(density(tra... |
# A manipulate plot to diagnose what's going on
library(paradox)
library(manipulate)
library(doParallel)
registerDoParallel(cores = 2)
manipulate({
burnin <- round(t_end / 2)
out <- paradox_sim_reps(m = m, q = q, cpar = cpar, n = n, p = p, alpha
= alpha, beta = beta, num_pop = seq(1, maxn),
sigma = seq(0, ... | /demo/diagnostic-manipulate.r | no_license | jdyeakel/paradox | R | false | false | 2,430 | r | # A manipulate plot to diagnose what's going on
library(paradox)
library(manipulate)
library(doParallel)
registerDoParallel(cores = 2)
manipulate({
burnin <- round(t_end / 2)
out <- paradox_sim_reps(m = m, q = q, cpar = cpar, n = n, p = p, alpha
= alpha, beta = beta, num_pop = seq(1, maxn),
sigma = seq(0, ... |
library(iptmnetr)
### Name: get_ptm_enzymes_from_file
### Title: Get PTM Enzymes using a file
### Aliases: get_ptm_enzymes_from_file
### ** Examples
## Not run: enzymes = get_ptm_enzymes_from_file("kinases.txt")
| /data/genthat_extracted_code/iptmnetr/examples/get_ptm_enzymes_from_file.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 219 | r | library(iptmnetr)
### Name: get_ptm_enzymes_from_file
### Title: Get PTM Enzymes using a file
### Aliases: get_ptm_enzymes_from_file
### ** Examples
## Not run: enzymes = get_ptm_enzymes_from_file("kinases.txt")
|
Boutrp <-
function (x, cmat)
{
ngroup <- ncol(x$t)
f <- x$strata
ni <- unlist(lapply(split(f, f = f), length))
gnames <- names(x$t0)
names(ni) <- gnames
if (any(ni < 5)) {
warning("For sample sizes les than 5 this function hardly makes sense!")
}
chains <- x$t
out <- CCdrp(x = chains, cmat = cmat... | /R/Boutrp.R | no_license | shearer/simboot | R | false | false | 339 | r | Boutrp <-
function (x, cmat)
{
ngroup <- ncol(x$t)
f <- x$strata
ni <- unlist(lapply(split(f, f = f), length))
gnames <- names(x$t0)
names(ni) <- gnames
if (any(ni < 5)) {
warning("For sample sizes les than 5 this function hardly makes sense!")
}
chains <- x$t
out <- CCdrp(x = chains, cmat = cmat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dat_keech.R
\docType{data}
\name{dat_keech}
\alias{dat_keech}
\title{Studies on the impact of intranasal oxytocin on emotion recognition in neurodevelopmental disorders}
\format{
A data frame with 13 rows and 3 columns:
\describe{
\item{stu... | /man/dat_keech.Rd | permissive | sayanmitra/metameta | R | false | true | 1,356 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dat_keech.R
\docType{data}
\name{dat_keech}
\alias{dat_keech}
\title{Studies on the impact of intranasal oxytocin on emotion recognition in neurodevelopmental disorders}
\format{
A data frame with 13 rows and 3 columns:
\describe{
\item{stu... |
dat = read.table("mazhao_CACAO_Transposable_Element_Annotation_New.gff",sep="\t",header=T, fill=TRUE)
N = nrow(dat)
gff3 = data.frame(
seqid = dat$Scaffold,
source = rep("mazhao",N),
type = rep("transposable_element",N),
start = dat$Start_Position,
end = dat$End_Position,
score =rep(0.05,N),
strand =rep("?",N)... | /scripts/gff2gff3.R | no_license | ConradStack/BSgenome.Tcacao | R | false | false | 671 | r |
dat = read.table("mazhao_CACAO_Transposable_Element_Annotation_New.gff",sep="\t",header=T, fill=TRUE)
N = nrow(dat)
gff3 = data.frame(
seqid = dat$Scaffold,
source = rep("mazhao",N),
type = rep("transposable_element",N),
start = dat$Start_Position,
end = dat$End_Position,
score =rep(0.05,N),
strand =rep("?",N)... |
library("igraph")
library("ggplot2")
library("plyr")
links <- read.csv("./au_graph.txt", header=F, as.is=T, sep="\t")
# Simplify Graph
net <- graph_from_data_frame(d=links, directed=F)
# net <- simplify(net, remove.multiple = T, remove.loops = T)
net <- as.undirected(net, mode= "collapse")
largest_cliques(net)
# C... | /codes/7_cliques.r | no_license | sa-akhavani/bitcoin-transaction-analysis | R | false | false | 1,432 | r | library("igraph")
library("ggplot2")
library("plyr")
links <- read.csv("./au_graph.txt", header=F, as.is=T, sep="\t")
# Simplify Graph
net <- graph_from_data_frame(d=links, directed=F)
# net <- simplify(net, remove.multiple = T, remove.loops = T)
net <- as.undirected(net, mode= "collapse")
largest_cliques(net)
# C... |
# wrapper script to run model diagnostics on all HDDM analysis pipelines --------
########## still a working prototype!!
####################
## pipeline parameters to test
ics <- 0
# nsamples <- paste0("samp",c(1000, 2000, 5000, 10000, 20000, 40000, 80000))
nsamples <- "samp2000"
# tasks <- c("flanker", "recent_pro... | /Code/DDM/hddm_diagnostics_wrapper.R | no_license | UNCDEPENdLab/PD_Inhibition_DDM | R | false | false | 2,040 | r |
# wrapper script to run model diagnostics on all HDDM analysis pipelines --------
########## still a working prototype!!
####################
## pipeline parameters to test
ics <- 0
# nsamples <- paste0("samp",c(1000, 2000, 5000, 10000, 20000, 40000, 80000))
nsamples <- "samp2000"
# tasks <- c("flanker", "recent_pro... |
data <- read.table("household_power_consumption.txt", header=T, sep=";", dec=".")
data[, "Date"] <- as.Date(data[, "Date"],format = "%d/%m/%Y")
mydate1 <- factor("01/02/2007")
as.Date(mydate1, format = "%d/%m/%Y")
mydate2 <- factor("02/02/2007")
as.Date(mydate2, format = "%d/%m/%Y")
dates1 = which(data[, "Date"]==as.... | /plot1.R | no_license | Elizasg/ExData_Plotting1 | R | false | false | 1,066 | r | data <- read.table("household_power_consumption.txt", header=T, sep=";", dec=".")
data[, "Date"] <- as.Date(data[, "Date"],format = "%d/%m/%Y")
mydate1 <- factor("01/02/2007")
as.Date(mydate1, format = "%d/%m/%Y")
mydate2 <- factor("02/02/2007")
as.Date(mydate2, format = "%d/%m/%Y")
dates1 = which(data[, "Date"]==as.... |
#' @title differential binding analysis
#' @description use DBF to test differential peaks
#' @param counts output of \link{countTable}
#' @param ... parameters could be passed to \link[DESeq2]{DESeqDataSet}
#' @return an list of \link[GenomicRanges]{GRanges}
#' @import DESeq2
#' @import IRanges
#' @import BiocGenerics... | /R/DBFpeaks.R | no_license | jianhong/diffPeaks | R | false | false | 3,926 | r | #' @title differential binding analysis
#' @description use DBF to test differential peaks
#' @param counts output of \link{countTable}
#' @param ... parameters could be passed to \link[DESeq2]{DESeqDataSet}
#' @return an list of \link[GenomicRanges]{GRanges}
#' @import DESeq2
#' @import IRanges
#' @import BiocGenerics... |
library(metatest)
### Name: metatest
### Title: metatest fits and tests a metaregression model
### Aliases: metatest summary.metatest print.metatest
### Keywords: htest models regression
### ** Examples
data(metadata)
res <- metatest(y~x,yvar,data=metadata)
res
| /data/genthat_extracted_code/metatest/examples/metatest.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 269 | r | library(metatest)
### Name: metatest
### Title: metatest fits and tests a metaregression model
### Aliases: metatest summary.metatest print.metatest
### Keywords: htest models regression
### ** Examples
data(metadata)
res <- metatest(y~x,yvar,data=metadata)
res
|
#' Create normalizations of overlapping read counts.
#'
#' FPKM is short for "Fragments Per Kilobase of transcript per Million
#' fragments in library". When calculating RiboSeq data FPKM over ORFs,
#' use ORFs as `grl`.
#' When calculating RNASeq data FPKM, use full transcripts as
#' `grl`. It is equal to RPKM given t... | /R/riboseq_features.R | permissive | lukun06/ORFik | R | false | false | 26,067 | r | #' Create normalizations of overlapping read counts.
#'
#' FPKM is short for "Fragments Per Kilobase of transcript per Million
#' fragments in library". When calculating RiboSeq data FPKM over ORFs,
#' use ORFs as `grl`.
#' When calculating RNASeq data FPKM, use full transcripts as
#' `grl`. It is equal to RPKM given t... |
#! /usr/bin/env Rscript
# cluster_lineages.R
# This script takes input fitnesses and
# generates cluters for each source-ploidy lineage set.
#
# The script also calculates the cluster-wise weighted (e.g., Maha) mean and se.
# and outputs this as a second file
# ------------------------- #
# header ... | /scripts/cluster_lineages.R | no_license | phumph/pleiotropy | R | false | false | 11,374 | r | #! /usr/bin/env Rscript
# cluster_lineages.R
# This script takes input fitnesses and
# generates cluters for each source-ploidy lineage set.
#
# The script also calculates the cluster-wise weighted (e.g., Maha) mean and se.
# and outputs this as a second file
# ------------------------- #
# header ... |
library(data.table)
df <- fread("household_power_consumption.txt", sep=";")
dfa <- df[grep("[12]/2/2007",df$Date)]
a <- paste(dfa$Date,dfa$Time,sep=" ")
b <- strptime(a,"%d/%m/%Y %H:%M:%S")
t1 <- strptime("1/2/2007 00:00:00","%d/%m/%Y %H:%M:%S")
t2 <- strptime("2/2/2007 23:59:59","%d/%m/%Y %H:%M:%S")
d <- (t1<=b & b <=... | /plot4.R | no_license | bjwwm013/ExData_Plotting1 | R | false | false | 1,112 | r | library(data.table)
df <- fread("household_power_consumption.txt", sep=";")
dfa <- df[grep("[12]/2/2007",df$Date)]
a <- paste(dfa$Date,dfa$Time,sep=" ")
b <- strptime(a,"%d/%m/%Y %H:%M:%S")
t1 <- strptime("1/2/2007 00:00:00","%d/%m/%Y %H:%M:%S")
t2 <- strptime("2/2/2007 23:59:59","%d/%m/%Y %H:%M:%S")
d <- (t1<=b & b <=... |
#
# use readLines() to read in lists of file names
format.for.condor <- function(list.of.clone.files, list.of.count.files) {
formatted.vector <- NULL;
output.file.names <- NULL;
# strip extensions from file names, for output file names
for(i in 1:length(list.of.clone.files)) {
outpu... | /condor_tools/orig/format.normalize.condor.R | no_license | weshorton/tcr_sequencing_tools | R | false | false | 1,420 | r |
#
# use readLines() to read in lists of file names
format.for.condor <- function(list.of.clone.files, list.of.count.files) {
formatted.vector <- NULL;
output.file.names <- NULL;
# strip extensions from file names, for output file names
for(i in 1:length(list.of.clone.files)) {
outpu... |
#!/usr/bin/env Rscript
# pluta 11/7/19
# this script was written ad-hoc as analysis developed, a finalized version
# will be much more organized
#rm(list = ls())
#args = commandArgs(trailingOnly = TRUE)
#if( length(args) < 1)
#{
# stop('need to provide arguments: FILENAME, the reference snp of the credset')
#}
INF... | /annotation/addFunctionalAnnotation.R | no_license | nathanson-lab/TGCT_2021_NatureCommunications | R | false | false | 47,726 | r | #!/usr/bin/env Rscript
# pluta 11/7/19
# this script was written ad-hoc as analysis developed, a finalized version
# will be much more organized
#rm(list = ls())
#args = commandArgs(trailingOnly = TRUE)
#if( length(args) < 1)
#{
# stop('need to provide arguments: FILENAME, the reference snp of the credset')
#}
INF... |
## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
library(RJafroc)
## -----------------------------------------------------------------------------
UtilFigureOfMerit(datasetROI, FOM = "ROI")
fom <- UtilFigureOfMerit(datas... | /vignettes/Ch30Vig2RoiParadigmSt.R | no_license | pwep/RJafroc | R | false | false | 1,444 | r | ## ----setup, include = FALSE---------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
library(RJafroc)
## -----------------------------------------------------------------------------
UtilFigureOfMerit(datasetROI, FOM = "ROI")
fom <- UtilFigureOfMerit(datas... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_functions.R
\name{make_filename}
\alias{make_filename}
\title{make_filename}
\usage{
make_filename(year)
}
\arguments{
\item{year}{A valid year}
}
\value{
This function returns a name for the file with the given year.
}
\description{
Thi... | /man/make_filename.Rd | no_license | fardl/framirez | R | false | true | 493 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fars_functions.R
\name{make_filename}
\alias{make_filename}
\title{make_filename}
\usage{
make_filename(year)
}
\arguments{
\item{year}{A valid year}
}
\value{
This function returns a name for the file with the given year.
}
\description{
Thi... |
.onLoad <- function(libname, pkgname) {
op <- options()
op.devtools <- list(
dtt.default_tz = "UTC"
)
toset <- !(names(op.devtools) %in% names(op))
if (any(toset)) options(op.devtools[toset])
invisible()
}
| /R/zzz.R | permissive | poissonconsulting/dttr2 | R | false | false | 223 | r | .onLoad <- function(libname, pkgname) {
op <- options()
op.devtools <- list(
dtt.default_tz = "UTC"
)
toset <- !(names(op.devtools) %in% names(op))
if (any(toset)) options(op.devtools[toset])
invisible()
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/labels.R
\name{order.hclust}
\alias{order.hclust}
\title{Ordering of the Leaves in a hclust Dendrogram}
\usage{
order.hclust(x, ...)
}
\arguments{
\item{x}{ab hclust object a distance matrix.}
\item{...}{Ignored.}
}
\value{
A vector with len... | /man/order.hclust.Rd | no_license | JohnMCMa/dendextend | R | false | true | 789 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/labels.R
\name{order.hclust}
\alias{order.hclust}
\title{Ordering of the Leaves in a hclust Dendrogram}
\usage{
order.hclust(x, ...)
}
\arguments{
\item{x}{ab hclust object a distance matrix.}
\item{...}{Ignored.}
}
\value{
A vector with len... |
# Script to plot coverage values for each of the "18 Loci"
# Color palette, from https://www.r-bloggers.com/the-paul-tol-21-color-salute/
tol21rainbow <- c("#771155", "#AA4488", "#CC99BB", "#114477", "#4477AA", "#77AADD", "#117777", "#44AAAA", "#77CCCC", "#117744", "#44AA77", "#88CCAA", "#777711", "#AAAA44", "#DDD... | /Analysis_Scripts/Plotting/Plot_18Loci_Coverage.R | no_license | MorrellLAB/Deleterious_GP | R | false | false | 1,723 | r | # Script to plot coverage values for each of the "18 Loci"
# Color palette, from https://www.r-bloggers.com/the-paul-tol-21-color-salute/
tol21rainbow <- c("#771155", "#AA4488", "#CC99BB", "#114477", "#4477AA", "#77AADD", "#117777", "#44AAAA", "#77CCCC", "#117744", "#44AA77", "#88CCAA", "#777711", "#AAAA44", "#DDD... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/io.R
\name{read.data}
\alias{read.data}
\alias{read.data.default}
\alias{read.data.matrix}
\title{Read geochronology data}
\usage{
read.data(x, ...)
\method{read.data}{default}(x, method = "U-Pb", format = 1, ...)
\method{read.data}{matrix}... | /man/read.data.Rd | no_license | zimshady/IsoplotR | R | false | true | 2,147 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/io.R
\name{read.data}
\alias{read.data}
\alias{read.data.default}
\alias{read.data.matrix}
\title{Read geochronology data}
\usage{
read.data(x, ...)
\method{read.data}{default}(x, method = "U-Pb", format = 1, ...)
\method{read.data}{matrix}... |
#@#require rss/1.0
#@#require rss/dublincore
= module RSS::ImageItemModel
== Instance Methods
--- image_item
--- image_item=
#@todo
= class RSS::ImageItemModel::ImageItem < RSS::Element
include DublinCoreModel
== Instance Methods
--- about
--- about=
#@todo
--- date
--- date=
#@todo
--- image_height
--- image... | /target/rubydoc/refm/api/src/rss/image.rd | no_license | nacyot/omegat-rurima-ruby | R | false | false | 772 | rd | #@#require rss/1.0
#@#require rss/dublincore
= module RSS::ImageItemModel
== Instance Methods
--- image_item
--- image_item=
#@todo
= class RSS::ImageItemModel::ImageItem < RSS::Element
include DublinCoreModel
== Instance Methods
--- about
--- about=
#@todo
--- date
--- date=
#@todo
--- image_height
--- image... |
rm(list = ls(all = TRUE))
source("R/packages.R")
source("R/functions.R")
## process data
source("R/r1_process_data.R")
summary(comm_biom) # community above/belowground biomass
summary(root_trait) # root traits (length, surface area etc.) with associated shoot and root mass
summary(diameter... | /R/analysis.R | no_license | ShunHasegawa/DRIGRASS_stem_root | R | false | false | 1,233 | r | rm(list = ls(all = TRUE))
source("R/packages.R")
source("R/functions.R")
## process data
source("R/r1_process_data.R")
summary(comm_biom) # community above/belowground biomass
summary(root_trait) # root traits (length, surface area etc.) with associated shoot and root mass
summary(diameter... |
# Loading Packages
require('RPostgreSQL')
require('dplyr')
require('tidyr')
require('readr')
# PostgresSQL Driver and Connection
drv <- dbDriver('PostgreSQL')
con <- dbConnect(drv,dbname = 'sfhqxipq',
host = 'drona.db.elephantsql.com',
user = 'sfhqxipq', password = 'Bq8j2SGQXNAUQiZ... | /Database/Data Prep & Upload.R | no_license | cptidiot/FreshDirect-Dashboard | R | false | false | 8,843 | r | # Loading Packages
require('RPostgreSQL')
require('dplyr')
require('tidyr')
require('readr')
# PostgresSQL Driver and Connection
drv <- dbDriver('PostgreSQL')
con <- dbConnect(drv,dbname = 'sfhqxipq',
host = 'drona.db.elephantsql.com',
user = 'sfhqxipq', password = 'Bq8j2SGQXNAUQiZ... |
context("test-get-weight")
test_that("misc", {
f <- function(seq,
n_gram,
pos, time,
data_time,
alphabet_size = 100,
noise = 0,
order_bound = 3,
...) {
mod <- new_ppm_decay(alphabet_size = alphabet_s... | /tests/testthat/test-get-weight.R | permissive | Computational-Cognitive-Musicology-Lab/ppm | R | false | false | 5,309 | r | context("test-get-weight")
test_that("misc", {
f <- function(seq,
n_gram,
pos, time,
data_time,
alphabet_size = 100,
noise = 0,
order_bound = 3,
...) {
mod <- new_ppm_decay(alphabet_size = alphabet_s... |
# Read in Files:
# Adapted From:
# https://blog.exploratory.io/how-to-read-multiple-excel-or-csv-files-together-42af5d314a10
# Since all file share the same data structure, Combine the dataaset into one data frame for easy manipulation
datset <-list.files(pattern="*.csv")
ATPSeasons <- sapply(datset, read_csv... | /R-Code/P2-Comparasion.R | no_license | Sundes-Star/PID557 | R | false | false | 37,080 | r |
# Read in Files:
# Adapted From:
# https://blog.exploratory.io/how-to-read-multiple-excel-or-csv-files-together-42af5d314a10
# Since all file share the same data structure, Combine the dataaset into one data frame for easy manipulation
datset <-list.files(pattern="*.csv")
ATPSeasons <- sapply(datset, read_csv... |
#
# VANTDET:
# output_rulein.R
# N Green
#
# output table of key cost-effectiveness statistics
# for rule-in test
##TODO: DRY duplication in input arguments
dat <- list()
dat[['transcriptomic']] <- dectree(
data = data,
name.newtest = "transcriptomic",
costDistns = costs,
performance = list(performance$tra... | /scripts/output_rulein.R | no_license | n8thangreen/VANTDET | R | false | false | 2,071 | r | #
# VANTDET:
# output_rulein.R
# N Green
#
# output table of key cost-effectiveness statistics
# for rule-in test
##TODO: DRY duplication in input arguments
dat <- list()
dat[['transcriptomic']] <- dectree(
data = data,
name.newtest = "transcriptomic",
costDistns = costs,
performance = list(performance$tra... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interface.R
\name{cluster_add_tasks}
\alias{cluster_add_tasks}
\title{Add a Tasks to a Cluster}
\usage{
cluster_add_tasks(cl, x, f)
}
\arguments{
\item{cl}{a cluster object}
\item{x}{the data}
\item{f}{function to be applied to the data}
}
... | /man/cluster_add_tasks.Rd | no_license | KirosG/threadpool | R | false | true | 370 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interface.R
\name{cluster_add_tasks}
\alias{cluster_add_tasks}
\title{Add a Tasks to a Cluster}
\usage{
cluster_add_tasks(cl, x, f)
}
\arguments{
\item{cl}{a cluster object}
\item{x}{the data}
\item{f}{function to be applied to the data}
}
... |
fbGetBusinessUserAdAccounts <- function(business_users_id = NULL,
business_id = getOption("rfacebookstat.business_id"),
api_version = getOption("rfacebookstat.api_version"),
access_token = getOp... | /rfacebookstat/R/fbGetBusinessUserAdAccounts.R | no_license | selesnow/testspace | R | false | false | 2,204 | r | fbGetBusinessUserAdAccounts <- function(business_users_id = NULL,
business_id = getOption("rfacebookstat.business_id"),
api_version = getOption("rfacebookstat.api_version"),
access_token = getOp... |
#sink will write the output of the source file to a text file
#wihout split, sink will only output stuff to the next file -
##you won't get output in the console.
#Usinng split=TRUE means output is "split" between the console
##and the text file, so you get output in both
sink("test.txt",split=TRUE)
x<-c(1,2,3,4,5)... | /Week03/week3.R | no_license | telliott27/R-Tutorial | R | false | false | 364 | r | #sink will write the output of the source file to a text file
#wihout split, sink will only output stuff to the next file -
##you won't get output in the console.
#Usinng split=TRUE means output is "split" between the console
##and the text file, so you get output in both
sink("test.txt",split=TRUE)
x<-c(1,2,3,4,5)... |
#' @title Recreate Match Data
#'
#' @description A function that can auto generate and order by date all
#' the basic match information if it exists in redis.
#'
#' @details Redis Keys used;
#' \itemize{
#' \item{\strong{[HASH]} :: \code{csm:{comp_id}:{season}:{match_id}}}
#' }
#'
#' @param KEYS A list contain... | /R/classify_utils.R | no_license | O1sims/FootballStats | R | false | false | 4,332 | r | #' @title Recreate Match Data
#'
#' @description A function that can auto generate and order by date all
#' the basic match information if it exists in redis.
#'
#' @details Redis Keys used;
#' \itemize{
#' \item{\strong{[HASH]} :: \code{csm:{comp_id}:{season}:{match_id}}}
#' }
#'
#' @param KEYS A list contain... |
library(RJDBC)
drv <- JDBC("oracle.jdbc.OracleDriver", classPath = "C:/Users/Rafael/.DataGrip2017.2/config/jdbc-drivers/Oracle/12.1.0.2/ojdbc6-12.1.0.2.jar")
con <- dbConnect(drv, "jdbc:oracle:thin:@//localhost:1521/pdbrocampo", "rocampo", "rocampo")
d <- dbGetQuery(con, "Select SysDate From Dual")
consolidado <- dbGet... | /R/Database.R | no_license | rocampoa/EjemplosR | R | false | false | 688 | r | library(RJDBC)
drv <- JDBC("oracle.jdbc.OracleDriver", classPath = "C:/Users/Rafael/.DataGrip2017.2/config/jdbc-drivers/Oracle/12.1.0.2/ojdbc6-12.1.0.2.jar")
con <- dbConnect(drv, "jdbc:oracle:thin:@//localhost:1521/pdbrocampo", "rocampo", "rocampo")
d <- dbGetQuery(con, "Select SysDate From Dual")
consolidado <- dbGet... |
# Before running please set the UCI HAR Dataset folder as the working directory
# Please remember to have all your packages up-to-date
library(data.table)
# Part 0: Read all data
## 1: Complementary data
features <- fread("./features.txt", sep=" ")
activity_labels <- fread("./activity_labels.txt", sep=" ")
### Se... | /run_analysis.R | no_license | injemaster83/GettingAndCleaningData | R | false | false | 8,851 | r | # Before running please set the UCI HAR Dataset folder as the working directory
# Please remember to have all your packages up-to-date
library(data.table)
# Part 0: Read all data
## 1: Complementary data
features <- fread("./features.txt", sep=" ")
activity_labels <- fread("./activity_labels.txt", sep=" ")
### Se... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qdapDictionaries-package.R
\docType{data}
\name{positive.words}
\alias{positive.words}
\title{Positive Words}
\format{A vector with 2003 elements}
\usage{
data(positive.words)
}
\description{
A dataset containing a vector of positi... | /man/positive.words.Rd | no_license | cran/qdapDictionaries | R | false | true | 734 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/qdapDictionaries-package.R
\docType{data}
\name{positive.words}
\alias{positive.words}
\title{Positive Words}
\format{A vector with 2003 elements}
\usage{
data(positive.words)
}
\description{
A dataset containing a vector of positi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/computeAUC.R
\name{computeAUC}
\alias{computeAUC}
\title{Computes the AUC for a Drug Dose Viability Curve}
\usage{
computeAUC(
concentration,
viability,
Hill_fit,
conc_as_log = FALSE,
viability_as_pct = TRUE,
trunc = TRUE,
area.... | /man/computeAUC.Rd | no_license | Deepstatsanalysis/PharmacoGx | R | false | true | 2,658 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/computeAUC.R
\name{computeAUC}
\alias{computeAUC}
\title{Computes the AUC for a Drug Dose Viability Curve}
\usage{
computeAUC(
concentration,
viability,
Hill_fit,
conc_as_log = FALSE,
viability_as_pct = TRUE,
trunc = TRUE,
area.... |
# NIST constants non-SI
kNISTnonSIatomicUnitOf1stHyperpolarizability <- 3.206361449e-53
kNISTnonSIatomicUnitOf2ndHyperpolarizability <- 6.23538054e-65
kNISTnonSIatomicUnitOfAction <- 1.054571726e-34
kNISTnonSIatomicUnitOfCharge <- 1.602176565e-19
kNISTnonSIatomicUnitOfChargeDensity <- 1081202338000
kNISTnonSIatomicUni... | /R/NISTConstantsNonSI.R | no_license | cran/NISTunits | R | false | false | 1,867 | r | # NIST constants non-SI
kNISTnonSIatomicUnitOf1stHyperpolarizability <- 3.206361449e-53
kNISTnonSIatomicUnitOf2ndHyperpolarizability <- 6.23538054e-65
kNISTnonSIatomicUnitOfAction <- 1.054571726e-34
kNISTnonSIatomicUnitOfCharge <- 1.602176565e-19
kNISTnonSIatomicUnitOfChargeDensity <- 1081202338000
kNISTnonSIatomicUni... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.