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 |
|---|---|---|---|---|---|---|---|---|---|
#' Are column data less than a specified value?
#'
#' The `col_vals_lt()` validation function, the `expect_col_vals_lt()`
#' expectation function, and the `test_col_vals_lt()` test function all check
#' whether column values in a table are *less than* a specified `value` (the
#' exact comparison used in this function i... | /R/col_vals_lt.R | permissive | JayKimBravekjh/pointblank | R | false | false | 10,211 | r | #' Are column data less than a specified value?
#'
#' The `col_vals_lt()` validation function, the `expect_col_vals_lt()`
#' expectation function, and the `test_col_vals_lt()` test function all check
#' whether column values in a table are *less than* a specified `value` (the
#' exact comparison used in this function i... |
#!/usr/bin/Rscript
args = commandArgs(trailingOnly=TRUE)
input_loc <- args[1]
out_loc <- args[2]
input_name <- args[3]
cnv_input <- paste(input_loc,input_name,".addNeutral.cnv.txt",sep="")
snv_input <- paste(input_loc,input_name,".maf.txt",sep="")
out <- paste(out_loc,input_name,".R.txt",sep="")
library(ABSOLUTE)
RunAb... | /simulation/script/ABSOLUTE_command.r | permissive | njalloul90/All-FIT | R | false | false | 718 | r | #!/usr/bin/Rscript
args = commandArgs(trailingOnly=TRUE)
input_loc <- args[1]
out_loc <- args[2]
input_name <- args[3]
cnv_input <- paste(input_loc,input_name,".addNeutral.cnv.txt",sep="")
snv_input <- paste(input_loc,input_name,".maf.txt",sep="")
out <- paste(out_loc,input_name,".R.txt",sep="")
library(ABSOLUTE)
RunAb... |
getwd()
setwd("/Users/rameshmitawa/Documents/R Programs")
rm(list = ls())
data <- read.csv("CSV_FILE.csv")
data
is.data.frame(data)
nrow(data)
ncol(data)
library("rio")
x <- import('1049_Notifications_By_Member_CSV.csv', format = 'tsv')
export(x, "file1.csv")
| /Read CSV.R | permissive | rsmitawa/R-Practice | R | false | false | 262 | r | getwd()
setwd("/Users/rameshmitawa/Documents/R Programs")
rm(list = ls())
data <- read.csv("CSV_FILE.csv")
data
is.data.frame(data)
nrow(data)
ncol(data)
library("rio")
x <- import('1049_Notifications_By_Member_CSV.csv', format = 'tsv')
export(x, "file1.csv")
|
library(ggplot2)
library(ggpmisc)
library(RColorBrewer)
source("~/mm/summarySEwithin.R")
source("~/mm/normDataWithin.R")
source("~/mm/summarySE.R")
d1 <- read.csv("tummaddeler.csv")
d2 <- reshape2::melt(d1, id = c("Sure", "pH", "Doz", "Dezenfeksiyon"))
d3 <- summarySEwithin(d2, measurevar = "value",
... | /klorlama-kloraminleme.R | no_license | egemenaydin/mm | R | false | false | 1,585 | r | library(ggplot2)
library(ggpmisc)
library(RColorBrewer)
source("~/mm/summarySEwithin.R")
source("~/mm/normDataWithin.R")
source("~/mm/summarySE.R")
d1 <- read.csv("tummaddeler.csv")
d2 <- reshape2::melt(d1, id = c("Sure", "pH", "Doz", "Dezenfeksiyon"))
d3 <- summarySEwithin(d2, measurevar = "value",
... |
library(data.table)
#' @noRd
mergeTable <- function(flatBiotic, table, columns, keys, prune=F){
if (any(columns %in% names(table))){
if (is.null(flatBiotic)){
return(table[,unique(c(keys, columns[columns %in% names(table)])), with=F])
}
else{
return(merge(table[,unlist(unique(c(keys, colum... | /dataAcess/makeBioticDataSet/tabularize.R | no_license | Sea2Data/FDAtools | R | false | false | 9,872 | r | library(data.table)
#' @noRd
mergeTable <- function(flatBiotic, table, columns, keys, prune=F){
if (any(columns %in% names(table))){
if (is.null(flatBiotic)){
return(table[,unique(c(keys, columns[columns %in% names(table)])), with=F])
}
else{
return(merge(table[,unlist(unique(c(keys, colum... |
# install.packages("ggfortify")
# install.poackages("ggplot2")
library(ggplot2)
library(ggfortify)
## Subset to one observation per week on Mondays at 8:00pm for 2007, 2008 and 2009
house070809weekly <- filter(
SUB_METERING_2006_2010, Weekday == 2 & Hour == 20 & Minute == 1
)
## Create TS object with SubMeter3
## S... | /timeSeriesAnalysis.R | no_license | mvill025/Visualize-And-Analyze-Energy-Data | R | false | false | 1,521 | r | # install.packages("ggfortify")
# install.poackages("ggplot2")
library(ggplot2)
library(ggfortify)
## Subset to one observation per week on Mondays at 8:00pm for 2007, 2008 and 2009
house070809weekly <- filter(
SUB_METERING_2006_2010, Weekday == 2 & Hour == 20 & Minute == 1
)
## Create TS object with SubMeter3
## S... |
#
# This file is for plot 2 for Expolitory Data Analysis Project 1
#
###############################################################################
# Step 1 Set the file locations and read the file
# Note: This file assumes the data file exists in the "explore_p_1" subdirectory
# under the working directory
###... | /plot2.R | no_license | MGoodman10/ExData_Plotting1 | R | false | false | 1,507 | r | #
# This file is for plot 2 for Expolitory Data Analysis Project 1
#
###############################################################################
# Step 1 Set the file locations and read the file
# Note: This file assumes the data file exists in the "explore_p_1" subdirectory
# under the working directory
###... |
#' Functional Principal Component Analysis
#'
#' FPCA for dense or sparse functional data.
#'
#' @param Ly A list of \emph{n} vectors containing the observed values for each individual. Missing values specified by \code{NA}s are supported for dense case (\code{dataType='dense'}).
#' @param Lt A list of \emph{n} vect... | /R/FPCA.R | no_license | HBGDki/tPACE | R | false | false | 14,386 | r | #' Functional Principal Component Analysis
#'
#' FPCA for dense or sparse functional data.
#'
#' @param Ly A list of \emph{n} vectors containing the observed values for each individual. Missing values specified by \code{NA}s are supported for dense case (\code{dataType='dense'}).
#' @param Lt A list of \emph{n} vect... |
\name{plot.cv.compLasso}
\alias{plot.cv.compLasso}
\title{
Plot the component lasso cross-validation curve returned by cv.compLasso.
}
\description{
This function plots the cross-validation curve versus the lambda values, along with the upper/lower corresponding standard deviation curves.
}
\usage{
\method{plot}{cv.com... | /man/plot.cv.compLasso.Rd | no_license | cran/compLasso | R | false | false | 1,219 | rd | \name{plot.cv.compLasso}
\alias{plot.cv.compLasso}
\title{
Plot the component lasso cross-validation curve returned by cv.compLasso.
}
\description{
This function plots the cross-validation curve versus the lambda values, along with the upper/lower corresponding standard deviation curves.
}
\usage{
\method{plot}{cv.com... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Electivity.R
\name{Electivity}
\alias{Electivity}
\title{Calculates a variety of electivity indices and foraging ratios}
\usage{
Electivity(
Diet,
Available,
Indices = c("ForageRatio", "Ivlev", "Strauss", "JacobsQ", "JacobsD", ... | /man/Electivity.Rd | no_license | cran/dietr | R | false | true | 6,711 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Electivity.R
\name{Electivity}
\alias{Electivity}
\title{Calculates a variety of electivity indices and foraging ratios}
\usage{
Electivity(
Diet,
Available,
Indices = c("ForageRatio", "Ivlev", "Strauss", "JacobsQ", "JacobsD", ... |
#Notes about what we want. For Injuries by geography --- rate of injury? Can we find partiipation rates by sport?
#All over time, if possible
#bar chart of total injuries --
#line graph with injuries by quarter by sport.
#line graph with injuries by gender and sport -- specifically, baseball, basketball, soccer, ... | /.Rproj.user/97AC6EA5/sources/per/t/FF8D200D-contents | no_license | ChrisCioffi/Sports_injuries_examination | R | false | false | 58,838 |
#Notes about what we want. For Injuries by geography --- rate of injury? Can we find partiipation rates by sport?
#All over time, if possible
#bar chart of total injuries --
#line graph with injuries by quarter by sport.
#line graph with injuries by gender and sport -- specifically, baseball, basketball, soccer, ... | |
setwd("~/Development/wanderdata-scripts/fitbit")
require(ggplot2)
require(bbplot)
require(skimr)
require(parsedate)
require(reshape2)
require(lubridate)
data_dir <- 'data/'
plots_dir <- 'plots/'
args = commandArgs(trailingOnly=TRUE)
# args <- c('2019-06-16', '2019-06-28')
if (length(args)==0) {
stop("At least one... | /fitbit/plot.R | no_license | Jagadt/wanderdata-scripts | R | false | false | 10,895 | r | setwd("~/Development/wanderdata-scripts/fitbit")
require(ggplot2)
require(bbplot)
require(skimr)
require(parsedate)
require(reshape2)
require(lubridate)
data_dir <- 'data/'
plots_dir <- 'plots/'
args = commandArgs(trailingOnly=TRUE)
# args <- c('2019-06-16', '2019-06-28')
if (length(args)==0) {
stop("At least one... |
write.csv(data.frame(x=1:10),file="batch_test.csv",row.names = FALSE)
| /tests/testthat/script_to_test_run_batch.R | no_license | shug0131/cctu | R | false | false | 70 | r | write.csv(data.frame(x=1:10),file="batch_test.csv",row.names = FALSE)
|
/Summarization_ v1.R | no_license | amart90-UI/Scripts | R | false | false | 13,086 | r | ||
#Copyright © 2016 RTE Réseau de transport d’électricité
context("Function readInputThermal")
sapply(studyPathS, function(studyPath){
opts <- setSimulationPath(studyPath)
if(!isH5Opts(opts)){
test_that("Thermal availabilities importation works", {
input <- readInputThermal(cluster... | /tests/testthat/test-readInputClusters.R | no_license | cran/antaresRead | R | false | false | 1,367 | r | #Copyright © 2016 RTE Réseau de transport d’électricité
context("Function readInputThermal")
sapply(studyPathS, function(studyPath){
opts <- setSimulationPath(studyPath)
if(!isH5Opts(opts)){
test_that("Thermal availabilities importation works", {
input <- readInputThermal(cluster... |
# Political strongholds and organized violence in Kenya
# Francisco Villamil
# November 2014
# -----------------------------------------------------------
# ANALYSIS: NEGATIVE BINOMIAL MODELS & PREDICTED EFFECTS
# (R code file no. 1)
# NOTE (!): ASSIGN WORKING DIRECTORY TO THE REPLICATION FOLDER
library(MASS)
setwd(... | /analysis.R | no_license | franvillamil/ov-kenya | R | false | false | 3,479 | r | # Political strongholds and organized violence in Kenya
# Francisco Villamil
# November 2014
# -----------------------------------------------------------
# ANALYSIS: NEGATIVE BINOMIAL MODELS & PREDICTED EFFECTS
# (R code file no. 1)
# NOTE (!): ASSIGN WORKING DIRECTORY TO THE REPLICATION FOLDER
library(MASS)
setwd(... |
# Loading Packages -----------
library(RODBC)
library(xts)
library(tseries)
# Read Market Return -------------
mkt.all.data <- read.table("D:/Stk Data/Index/TRD_Index.txt",header=TRUE)
head(mkt.all.data)
ret.mkt <- mkt.all.data[mkt.all.data$Indexcd == 902, c("Trddt","Retindex")]
ret.mkt.xts <- xts(ret.mkt$Retindex,... | /src/dg/financial/courseware/CAPM source.R | no_license | xenron/sandbox-da-r | R | false | false | 642 | r | # Loading Packages -----------
library(RODBC)
library(xts)
library(tseries)
# Read Market Return -------------
mkt.all.data <- read.table("D:/Stk Data/Index/TRD_Index.txt",header=TRUE)
head(mkt.all.data)
ret.mkt <- mkt.all.data[mkt.all.data$Indexcd == 902, c("Trddt","Retindex")]
ret.mkt.xts <- xts(ret.mkt$Retindex,... |
data = read.csv("./subway_data.csv")
data$weather_sunny = 0
data$weather_sunny[data$weather=="sunny"] = 1
hmm <- depmix(data$people ~ 1 + data$weather_sunny, family = poisson(), nstates = 2, data=data,respstart=c(10,10,10,10))
hmmfit <- fit(hmm, verbose = TRUE)
post_probs <- posterior(hmmfit)
layout(1:2)
plot(da... | /Chapter10/10__5__subwaymodel.R | permissive | PacktPublishing/R-Statistics-Cookbook | R | false | false | 978 | r | data = read.csv("./subway_data.csv")
data$weather_sunny = 0
data$weather_sunny[data$weather=="sunny"] = 1
hmm <- depmix(data$people ~ 1 + data$weather_sunny, family = poisson(), nstates = 2, data=data,respstart=c(10,10,10,10))
hmmfit <- fit(hmm, verbose = TRUE)
post_probs <- posterior(hmmfit)
layout(1:2)
plot(da... |
# AUTO GENERATED FILE - DO NOT EDIT
htmlTextarea <- function(children=NULL, id=NULL, n_clicks=NULL, n_clicks_timestamp=NULL, key=NULL, role=NULL, autoComplete=NULL, autoFocus=NULL, cols=NULL, disabled=NULL, form=NULL, inputMode=NULL, maxLength=NULL, minLength=NULL, name=NULL, placeholder=NULL, readOnly=NULL, required=... | /R/htmlTextarea.R | permissive | noisycomputation/dash-html-components | R | false | false | 2,029 | r | # AUTO GENERATED FILE - DO NOT EDIT
htmlTextarea <- function(children=NULL, id=NULL, n_clicks=NULL, n_clicks_timestamp=NULL, key=NULL, role=NULL, autoComplete=NULL, autoFocus=NULL, cols=NULL, disabled=NULL, form=NULL, inputMode=NULL, maxLength=NULL, minLength=NULL, name=NULL, placeholder=NULL, readOnly=NULL, required=... |
# author_@Aditya_Sharma
require(seqinr)
require(psych)
require(ggplot2)
require(MASS)
require(car)
require(neuralnet)
require(grid)
require(e1071)
############################################
#loading the data set
trainingdata <- read.csv("training_data.csv")
summary(trainingdata)
rowtotal <- nrow(training... | /hivfinal.r | no_license | shinchan121/-Predict-HIV-Progression-_Pucho-Round | R | false | false | 12,717 | r | # author_@Aditya_Sharma
require(seqinr)
require(psych)
require(ggplot2)
require(MASS)
require(car)
require(neuralnet)
require(grid)
require(e1071)
############################################
#loading the data set
trainingdata <- read.csv("training_data.csv")
summary(trainingdata)
rowtotal <- nrow(training... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/extractSaveData.R
\name{l_getSavedata_Fileinfo}
\alias{l_getSavedata_Fileinfo}
\title{local function that does the work of getSaveData_Fileinfo}
\usage{
l_getSavedata_Fileinfo(outfile, outfiletext)
}
\arguments{
\item{outfile... | /man/l_getSavedata_Fileinfo.Rd | no_license | clbustos/MplusAutomation | R | false | false | 1,596 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/extractSaveData.R
\name{l_getSavedata_Fileinfo}
\alias{l_getSavedata_Fileinfo}
\title{local function that does the work of getSaveData_Fileinfo}
\usage{
l_getSavedata_Fileinfo(outfile, outfiletext)
}
\arguments{
\item{outfile... |
##change-point simulation for wang2021 paper
library(mvtnorm)
library(fMultivar)
library(MASS)
library(sde)
library(rrcov)
library(xtable)
library(sn)
library(doParallel)
library(doRNG)
#results dirrectory
dirr<- "WBSIP"
setwd(dirr)
#simulation parameters
#N
Ns<-c(100,200)
#simulation size... | /WANG2021/CP_SIM_CODES_SS.R | no_license | 12ramsake/MVT-WBS-RankCUSUM | R | false | false | 9,123 | r |
##change-point simulation for wang2021 paper
library(mvtnorm)
library(fMultivar)
library(MASS)
library(sde)
library(rrcov)
library(xtable)
library(sn)
library(doParallel)
library(doRNG)
#results dirrectory
dirr<- "WBSIP"
setwd(dirr)
#simulation parameters
#N
Ns<-c(100,200)
#simulation size... |
virtualArrayMergeRecurse <-
function (dfs, by, ...)
{
if (length(dfs) == 2) {
merge(dfs[[1]], dfs[[2]], all = FALSE, sort = FALSE, ...)
}
else {
merge(dfs[[1]], Recall(dfs[-1]), all = FALSE, sort = FALSE,
...)
}
}
| /R/virtualArrayMergeRecurse.R | no_license | scfurl/virtualArray | R | false | false | 259 | r | virtualArrayMergeRecurse <-
function (dfs, by, ...)
{
if (length(dfs) == 2) {
merge(dfs[[1]], dfs[[2]], all = FALSE, sort = FALSE, ...)
}
else {
merge(dfs[[1]], Recall(dfs[-1]), all = FALSE, sort = FALSE,
...)
}
}
|
###################################################### -*- mode: r -*- #####
## Scenario setup for Iterated Race (iRace).
############################################################################
## File that contains the description of the parameters.
parameterFile = "./parameters.txt"
## Directory where the prog... | /irace2/scenario.txt | permissive | jaeraxdoto/mhlib | R | false | false | 1,988 | txt | ###################################################### -*- mode: r -*- #####
## Scenario setup for Iterated Race (iRace).
############################################################################
## File that contains the description of the parameters.
parameterFile = "./parameters.txt"
## Directory where the prog... |
#' @rdname getUserMedia
#' @export
#'
#' @title
#' Extract recent media published by a user.
#'
#' @description
#' \code{getUserMedia} retrieves public media from a given user and, optionally,
#' downloads recent pictures to a specified folder.
#'
#' IMPORTANT: After June 1st, 2016 only applications that have passed p... | /instaR/R/getUserMedia.R | no_license | darokun/instaR | R | false | false | 3,902 | r | #' @rdname getUserMedia
#' @export
#'
#' @title
#' Extract recent media published by a user.
#'
#' @description
#' \code{getUserMedia} retrieves public media from a given user and, optionally,
#' downloads recent pictures to a specified folder.
#'
#' IMPORTANT: After June 1st, 2016 only applications that have passed p... |
## load library
## for data loading
library(data.table)
## for chaining
library(dplyr)
## load the data
dat <- fread("household_power_consumption.txt")
dat_tbl <- tbl_df(dat)
## transform Date as character to date format, same for time
dat_tbl <- mutate(dat_tbl,AsDate=as.Date(Date,format = "%d/%m/%Y")... | /Plot2.R | no_license | MS3186/ExData_Plotting1 | R | false | false | 946 | r | ## load library
## for data loading
library(data.table)
## for chaining
library(dplyr)
## load the data
dat <- fread("household_power_consumption.txt")
dat_tbl <- tbl_df(dat)
## transform Date as character to date format, same for time
dat_tbl <- mutate(dat_tbl,AsDate=as.Date(Date,format = "%d/%m/%Y")... |
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 1.75738820099344e+159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_row... | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613118544-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 343 | r | testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 1.75738820099344e+159, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_row... |
library(tidyverse)
library(caret)
library(doSNOW)
setwd("~/Downloads")
#Read in and combine the data
Titanic.test <- read.csv("test.csv",stringsAsFactors = FALSE)
Titanic.train <- read.csv("train.csv",stringsAsFactors = FALSE)
View(Titanic.test)
View(Titanic.train)
full <- bind_rows(Titanic.train,Titanic.test)
View... | /Titanic.R | no_license | ntushao/Titanic | R | false | false | 2,726 | r | library(tidyverse)
library(caret)
library(doSNOW)
setwd("~/Downloads")
#Read in and combine the data
Titanic.test <- read.csv("test.csv",stringsAsFactors = FALSE)
Titanic.train <- read.csv("train.csv",stringsAsFactors = FALSE)
View(Titanic.test)
View(Titanic.train)
full <- bind_rows(Titanic.train,Titanic.test)
View... |
DIFlasso <-
function (Y, X, l.lambda = 20, trace = FALSE)
{
vardiffs <- abs(apply(X,2,var)-1)
if(sum(vardiffs)>1e-6)
stop("X has to be standardized")
if(sum(!apply(Y,2,unique) %in% c(0,1))>0)
stop("Y may only contain 0 or 1")
if(!is.data.frame(X))
stop("X has to be a data.frame... | /DIFlasso/R/DIFlasso.R | no_license | ingted/R-Examples | R | false | false | 6,250 | r | DIFlasso <-
function (Y, X, l.lambda = 20, trace = FALSE)
{
vardiffs <- abs(apply(X,2,var)-1)
if(sum(vardiffs)>1e-6)
stop("X has to be standardized")
if(sum(!apply(Y,2,unique) %in% c(0,1))>0)
stop("Y may only contain 0 or 1")
if(!is.data.frame(X))
stop("X has to be a data.frame... |
rankhospital <- function(state, outcome, num = "best") {
## Read outcome data
full_data <- read.csv("outcome-of-care-measures.csv",colClasses = "character")
full_data[,c(11,17,23)] <- sapply(full_data[,c(11,17,23)] , as.numeric)
clear_data <- na.omit(full_data)
outcomes <- c("heart attack","heart ... | /R-Programming-Assignment-3/rankhospital.r | no_license | xiiicyw/R-programming | R | false | false | 1,371 | r | rankhospital <- function(state, outcome, num = "best") {
## Read outcome data
full_data <- read.csv("outcome-of-care-measures.csv",colClasses = "character")
full_data[,c(11,17,23)] <- sapply(full_data[,c(11,17,23)] , as.numeric)
clear_data <- na.omit(full_data)
outcomes <- c("heart attack","heart ... |
#[export]
var2tests <- function(x, y = NULL, ina, alternative = "unequal", logged = FALSE) {
if ( is.null(y) ) {
s1 <- Rfast::colVars( x[ ina == 1, ] )
s2 <- Rfast::colVars( x[ ina == 2, ] )
n1 <- sum( ina == 1 )
n2 <- length(ina) - n1
} else {
s1 <- Rfast::colVars( x )
s2 <... | /fuzzedpackages/Rfast/R/var2tests.R | no_license | akhikolla/testpackages | R | false | false | 993 | r | #[export]
var2tests <- function(x, y = NULL, ina, alternative = "unequal", logged = FALSE) {
if ( is.null(y) ) {
s1 <- Rfast::colVars( x[ ina == 1, ] )
s2 <- Rfast::colVars( x[ ina == 2, ] )
n1 <- sum( ina == 1 )
n2 <- length(ina) - n1
} else {
s1 <- Rfast::colVars( x )
s2 <... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale.R
\name{sca}
\alias{sca}
\title{Linear transformation of the IRT scale}
\usage{
sca(
old.ip,
new.ip,
old.items,
new.items,
old.qu = NULL,
new.qu = NULL,
method = "MS",
bec = FALSE
)
}
\arguments{
\item{old.ip}{A set of p... | /man/sca.Rd | no_license | cran/irtoys | R | false | true | 2,902 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scale.R
\name{sca}
\alias{sca}
\title{Linear transformation of the IRT scale}
\usage{
sca(
old.ip,
new.ip,
old.items,
new.items,
old.qu = NULL,
new.qu = NULL,
method = "MS",
bec = FALSE
)
}
\arguments{
\item{old.ip}{A set of p... |
#' A function to compute partial F statistics
#'
#' This is an internal function used in FSelect. It can only be used for two
#' groups. The partial F statistic is the additional contribution to the model
#' from adding one more trait.
#'
#'
#' @param m.lda An object of class 'lda'
#' @param GROUP A factor vector ... | /R/partialF.R | no_license | scarpino/multiDimBio | R | false | false | 1,592 | r | #' A function to compute partial F statistics
#'
#' This is an internal function used in FSelect. It can only be used for two
#' groups. The partial F statistic is the additional contribution to the model
#' from adding one more trait.
#'
#'
#' @param m.lda An object of class 'lda'
#' @param GROUP A factor vector ... |
# Libraries ###############################################################################
library(combinat)
library(purrr)
library(ngramrr)
library(ngram)
library(gtools)
library(data.table)
library (magrittr)
library(sqldf)
library(dplyr)
library(plyr)
library(caret)
library(scales)
library(tidyr)
li... | /0_general/data_and_library.R | permissive | Ahai-L/DATA7901_Capstone_Project_1- | R | false | false | 45,022 | r |
# Libraries ###############################################################################
library(combinat)
library(purrr)
library(ngramrr)
library(ngram)
library(gtools)
library(data.table)
library (magrittr)
library(sqldf)
library(dplyr)
library(plyr)
library(caret)
library(scales)
library(tidyr)
li... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getVRPFeatureSet.R
\name{getVRPFeatureSet}
\alias{getVRPFeatureSet}
\title{Feature: Statistics of distances between obligatory/optional customers and
depots.}
\usage{
getVRPFeatureSet(x, include.costs = FALSE)
}
\arguments{
\item{x}{[\code{Ne... | /man/getVRPFeatureSet.Rd | no_license | cdx08222028/salesperson | R | false | true | 670 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getVRPFeatureSet.R
\name{getVRPFeatureSet}
\alias{getVRPFeatureSet}
\title{Feature: Statistics of distances between obligatory/optional customers and
depots.}
\usage{
getVRPFeatureSet(x, include.costs = FALSE)
}
\arguments{
\item{x}{[\code{Ne... |
# This is for processing GHTorrent Rails example data
#Set the working directory
setwd("~/github/local/VOSS-Sequencing-Toolkit/msr_procedural_structure/")
#Load the TraMineR and cluster libraries
library(TraMineR)
library(TraMineRextras)
library(PST)
library(cluster)
library(stringr)
library(VLMC)
# Direct output to ... | /msr_procedural_structure/pst_mining_.R | no_license | aronlindberg/VOSS-Sequencing-Toolkit | R | false | false | 2,455 | r | # This is for processing GHTorrent Rails example data
#Set the working directory
setwd("~/github/local/VOSS-Sequencing-Toolkit/msr_procedural_structure/")
#Load the TraMineR and cluster libraries
library(TraMineR)
library(TraMineRextras)
library(PST)
library(cluster)
library(stringr)
library(VLMC)
# Direct output to ... |
\name{univariate_table}
\alias{univariate_table}
\title{Create a custom descriptive table for a dataset}
\description{
Produces a formatted table of univariate summary statistics with options allowing for stratification by one or more variables, computing of custom summary/association statistics, custom string template... | /man/univariate_table.Rd | permissive | zajichek/cheese | R | false | false | 4,232 | rd | \name{univariate_table}
\alias{univariate_table}
\title{Create a custom descriptive table for a dataset}
\description{
Produces a formatted table of univariate summary statistics with options allowing for stratification by one or more variables, computing of custom summary/association statistics, custom string template... |
library(mlrCPO)
### Name: makeCPO
### Title: Create a Custom CPO Constructor
### Aliases: makeCPO makeCPOExtendedTrafo makeCPORetrafoless
### makeCPOTargetOp makeCPOExtendedTargetOp
### ** Examples
# an example constant feature remover CPO
constFeatRem = makeCPO("constFeatRem",
dataformat = "df.features",
cpo.t... | /data/genthat_extracted_code/mlrCPO/examples/makeCPO.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 896 | r | library(mlrCPO)
### Name: makeCPO
### Title: Create a Custom CPO Constructor
### Aliases: makeCPO makeCPOExtendedTrafo makeCPORetrafoless
### makeCPOTargetOp makeCPOExtendedTargetOp
### ** Examples
# an example constant feature remover CPO
constFeatRem = makeCPO("constFeatRem",
dataformat = "df.features",
cpo.t... |
#### load climate and fire data ----
# Go here for CA_fire.RDS data: https://github.com/dinhkristine/Climate-Fire/tree/master/data/fires
CA_fire <- read_rds("data/fires/CA_fire.RDS")
# Go here for CA_temp.RDS data: https://github.com/dinhkristine/Climate-Fire/tree/master/data/temp
CA_temp <- read_rds("data/temp/CA_t... | /release-R-files/data-flat-files.R | no_license | dinhkristine/Climate-Fire | R | false | false | 1,371 | r | #### load climate and fire data ----
# Go here for CA_fire.RDS data: https://github.com/dinhkristine/Climate-Fire/tree/master/data/fires
CA_fire <- read_rds("data/fires/CA_fire.RDS")
# Go here for CA_temp.RDS data: https://github.com/dinhkristine/Climate-Fire/tree/master/data/temp
CA_temp <- read_rds("data/temp/CA_t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fun.R
\name{bd}
\alias{bd}
\title{Show demos}
\usage{
bd(template = NA, to = ".")
}
\arguments{
\item{template}{NA or character, templates to show}
\item{to}{character. The destination directory for the bookdown project}
}
\valu... | /man/bd.Rd | no_license | cran/bookdownplus | R | false | true | 394 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fun.R
\name{bd}
\alias{bd}
\title{Show demos}
\usage{
bd(template = NA, to = ".")
}
\arguments{
\item{template}{NA or character, templates to show}
\item{to}{character. The destination directory for the bookdown project}
}
\valu... |
# 3-Construct\unzip-files.R
# Goals of this script are:
# - To loop through the downloaded files, unzipping them in to .xml on the fly
###################
# 1. Housekeeping #
###################
# Change in to the directory where downloaded data is stored (at the end of step 2)
data_raw_directory <- paste(data_dir... | /3-Unpack/unzip-files.R | no_license | shaunmcgirr/shaun-mcgirr-dissertation | R | false | false | 3,157 | r | # 3-Construct\unzip-files.R
# Goals of this script are:
# - To loop through the downloaded files, unzipping them in to .xml on the fly
###################
# 1. Housekeeping #
###################
# Change in to the directory where downloaded data is stored (at the end of step 2)
data_raw_directory <- paste(data_dir... |
# -----------------------------------------------------------------------------------
# Building a Shiny app for visualisation of neurological outcomes in SCI
#
# July 8, 2020
# L. Bourguignon
# -----------------------------------------------------------------------------------
# Set working directory ----
# Load pac... | /code/app_neuro_2.R | permissive | jutzca/Neurosurveillance | R | false | false | 176,627 | r | # -----------------------------------------------------------------------------------
# Building a Shiny app for visualisation of neurological outcomes in SCI
#
# July 8, 2020
# L. Bourguignon
# -----------------------------------------------------------------------------------
# Set working directory ----
# Load pac... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/ReliefF/skin.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.15,family="gaussian",standardize=FALSE)
sink('./skin_030.txt',append=TRUE)
print(... | /Model/EN/ReliefF/skin/skin_030.R | no_license | esbgkannan/QSMART | R | false | false | 343 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/ReliefF/skin.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.15,family="gaussian",standardize=FALSE)
sink('./skin_030.txt',append=TRUE)
print(... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/AvgRank/ovary.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.05,family="gaussian",standardize=FALSE)
sink('./ovary_024.txt',append=TRUE)
prin... | /Model/EN/AvgRank/ovary/ovary_024.R | no_license | esbgkannan/QSMART | R | false | false | 345 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/AvgRank/ovary.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.05,family="gaussian",standardize=FALSE)
sink('./ovary_024.txt',append=TRUE)
prin... |
shinyUI(navbarPage(theme = shinytheme("cerulean"),
"Simplified Plant Dispatch",
tabPanel("Price simulations",
sidebarPanel(
helpText("Generate the hourly power curve for use
with dispa... | /ui.R | no_license | saluteyang/symphonyPlantDispatch | R | false | false | 1,230 | r |
shinyUI(navbarPage(theme = shinytheme("cerulean"),
"Simplified Plant Dispatch",
tabPanel("Price simulations",
sidebarPanel(
helpText("Generate the hourly power curve for use
with dispa... |
# Linear models
library(readr)
library(dplyr)
person <- read_csv(
file = 'data/census_pums/sample.csv',
col_types = cols_only(
AGEP = 'i', # Age
WAGP = 'd', # Wages or salary income past 12 months
SCHL = 'i', # Educational attainment
SEX = 'f', # Sex
OCCP = 'f', # Occupation recode based... | /worksheet-6.R | no_license | zach10028/handouts | R | false | false | 1,613 | r | # Linear models
library(readr)
library(dplyr)
person <- read_csv(
file = 'data/census_pums/sample.csv',
col_types = cols_only(
AGEP = 'i', # Age
WAGP = 'd', # Wages or salary income past 12 months
SCHL = 'i', # Educational attainment
SEX = 'f', # Sex
OCCP = 'f', # Occupation recode based... |
#' National Eutrophication Survey Data
#'
#' A dataset containing hydrologic and water quality data for approximately 800
#' lakes in the continental United States.
#'
#' \tabular{ccc}{
#' variable name \tab description \tab units \cr
#' pdf \tab pdf identifier (474 - 477) \tab integer \cr
#' pagenum... | /R/nesRdata-package.R | no_license | jsta/nesRdata | R | false | false | 3,495 | r | #' National Eutrophication Survey Data
#'
#' A dataset containing hydrologic and water quality data for approximately 800
#' lakes in the continental United States.
#'
#' \tabular{ccc}{
#' variable name \tab description \tab units \cr
#' pdf \tab pdf identifier (474 - 477) \tab integer \cr
#' pagenum... |
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
simulateTrials <- function(allpaths, turnTimes, alpha, model, turnMethod) {
.Call(`_baseModels_simulateTrials`, allpaths, turnTimes, alpha, model, turnMethod)
}
getPathLikelihood <- functi... | /Sources/lib/Base Models/baseModels/R/RcppExports.R | no_license | mattapattu/Rats-Credit | R | false | false | 2,553 | r | # Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
simulateTrials <- function(allpaths, turnTimes, alpha, model, turnMethod) {
.Call(`_baseModels_simulateTrials`, allpaths, turnTimes, alpha, model, turnMethod)
}
getPathLikelihood <- functi... |
### Script para paralelização no servidor Ubuntu (Ale)
# Pacotes para paralelizacao
require(plyr)
require(doMC)
# Script com codigo de simula.neutra.trade
source("simula.neutra.trade_LEVE_dp0_sem_banco_sem_papi_rapido.R")
# Dados do hipercubo
load("dados_arredond_hipercubo_25jul16.RData")
simula.parallel <- function(... | /paralelizacao/simulacoes_25jul16/simula_parallel_servidor_25jul16_161-200.R | no_license | luisanovara/simula-neutra-step | R | false | false | 1,425 | r | ### Script para paralelização no servidor Ubuntu (Ale)
# Pacotes para paralelizacao
require(plyr)
require(doMC)
# Script com codigo de simula.neutra.trade
source("simula.neutra.trade_LEVE_dp0_sem_banco_sem_papi_rapido.R")
# Dados do hipercubo
load("dados_arredond_hipercubo_25jul16.RData")
simula.parallel <- function(... |
# MISM6202 - Upload to Github ExCr
# R Assignment - Exercise
# Working with Probabilities and Distributions
## 84% of U.S Adults use Facebook.
## Consider a sample size of 100 American adults.
# What is the P that 70 American adults are Facebook users?
dbinom(70, 100, 0.84)
# What is the P that no more than 70 Ame... | /ExCr-MISM6202.R | no_license | heykarnold2010/R-ExCr | R | false | false | 967 | r | # MISM6202 - Upload to Github ExCr
# R Assignment - Exercise
# Working with Probabilities and Distributions
## 84% of U.S Adults use Facebook.
## Consider a sample size of 100 American adults.
# What is the P that 70 American adults are Facebook users?
dbinom(70, 100, 0.84)
# What is the P that no more than 70 Ame... |
## Wiki UFC Fight Results Scraper.
## This will scrape the results of every UFC fight from Wikipedia.
## Outputs are data_frame object "boutsdf", and vector "fighterlinksvect".
## Install packages and do some prep work ----
# Read in required packages & files.
library(rvest)
library(dplyr)
library(magrittr)
library(st... | /mma_scrape/0-wiki_ufcbouts.R | no_license | JamesSkane/MMA-Data-Scrape | R | false | false | 13,551 | r | ## Wiki UFC Fight Results Scraper.
## This will scrape the results of every UFC fight from Wikipedia.
## Outputs are data_frame object "boutsdf", and vector "fighterlinksvect".
## Install packages and do some prep work ----
# Read in required packages & files.
library(rvest)
library(dplyr)
library(magrittr)
library(st... |
rm(list=ls())
options(stringsAsFactors = F)
set.seed(1)
#!/usr/bin/env Rscript
# create at 2019.05.30
# author zhangyiming
load <- function() {
library(Seurat)
library(Mfuzz)
library(openxlsx)
library(ggplot2)
library(clusterProfiler)
library(DOSE)
library(GO.db)
library(KEGG.db)
... | /bak/5_stage_gene_module/B_cells_SCC.R | no_license | Chenmengpin/inferCC | R | false | false | 10,256 | r | rm(list=ls())
options(stringsAsFactors = F)
set.seed(1)
#!/usr/bin/env Rscript
# create at 2019.05.30
# author zhangyiming
load <- function() {
library(Seurat)
library(Mfuzz)
library(openxlsx)
library(ggplot2)
library(clusterProfiler)
library(DOSE)
library(GO.db)
library(KEGG.db)
... |
#' Maximum Variance Unfolding / Semidefinite Embedding
#'
#' The method of Maximum Variance Unfolding(MVU), also known as Semidefinite Embedding(SDE) is, as its names suggest,
#' to exploit semidefinite programming in performing nonlinear dimensionality reduction by \emph{unfolding}
#' neighborhood graph constructed in... | /R/nonlinear_MVU.R | no_license | rcannood/Rdimtools | R | false | false | 5,367 | r | #' Maximum Variance Unfolding / Semidefinite Embedding
#'
#' The method of Maximum Variance Unfolding(MVU), also known as Semidefinite Embedding(SDE) is, as its names suggest,
#' to exploit semidefinite programming in performing nonlinear dimensionality reduction by \emph{unfolding}
#' neighborhood graph constructed in... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GETINFO.R
\docType{data}
\name{FRED_APIkey}
\alias{FRED_APIkey}
\title{GETINFO from FRED}
\format{
An object of class \code{character} of length 1.
}
\usage{
GETINFO(FRED_APIkey,search_text,realtime_start,realtime_end,limit)
}
\value{
}
\des... | /man/FRED_APIkey.Rd | permissive | JT944/Uclapack3 | R | false | true | 678 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GETINFO.R
\docType{data}
\name{FRED_APIkey}
\alias{FRED_APIkey}
\title{GETINFO from FRED}
\format{
An object of class \code{character} of length 1.
}
\usage{
GETINFO(FRED_APIkey,search_text,realtime_start,realtime_end,limit)
}
\value{
}
\des... |
# This script will extract the time-series from the ROI sets defined in 01_resolution
###
# Setup
###
library(Rsge)
library(tools)
tmpdf <- read.csv("subinfo/04_all_df.csv")
njobs <- nrow(tmpdf) # number of jobs = number of subjects
nthreads <- 1
nforks <- 100
rbase <- "/home2/data/Projects/CWAS/share/age+gende... | /age+gender/analysis/03_robustness/B-ROIs_21-extract.R | no_license | vishalmeeni/cwas-paper | R | false | false | 1,994 | r | # This script will extract the time-series from the ROI sets defined in 01_resolution
###
# Setup
###
library(Rsge)
library(tools)
tmpdf <- read.csv("subinfo/04_all_df.csv")
njobs <- nrow(tmpdf) # number of jobs = number of subjects
nthreads <- 1
nforks <- 100
rbase <- "/home2/data/Projects/CWAS/share/age+gende... |
library(ptycho)
### Name: PosteriorStatistics
### Title: Extract Posterior Statistics
### Aliases: PosteriorStatistics meanTau varTau meanIndicators
### meanVarIndicators meanGrpIndicators
### ** Examples
data(ptychoIn)
data(ptychoOut)
# Compare averages of sampled group indicator variables to truth.
cbind(ptycho... | /data/genthat_extracted_code/ptycho/examples/PosteriorStatistics.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 752 | r | library(ptycho)
### Name: PosteriorStatistics
### Title: Extract Posterior Statistics
### Aliases: PosteriorStatistics meanTau varTau meanIndicators
### meanVarIndicators meanGrpIndicators
### ** Examples
data(ptychoIn)
data(ptychoOut)
# Compare averages of sampled group indicator variables to truth.
cbind(ptycho... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tfm.R, R/um.R
\name{fit.tfm}
\alias{fit.tfm}
\alias{fit}
\alias{fit.um}
\title{Estimation of the ARIMA model}
\usage{
\method{fit}{tfm}(
mdl,
y = NULL,
method = c("exact", "cond"),
optim.method = "BFGS",
show.iter = FALSE,
fit.noi... | /tfarima/man/fit.Rd | no_license | akhikolla/TestedPackages-NoIssues | R | false | true | 1,455 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tfm.R, R/um.R
\name{fit.tfm}
\alias{fit.tfm}
\alias{fit}
\alias{fit.um}
\title{Estimation of the ARIMA model}
\usage{
\method{fit}{tfm}(
mdl,
y = NULL,
method = c("exact", "cond"),
optim.method = "BFGS",
show.iter = FALSE,
fit.noi... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/Interplot.R
\name{interplot}
\alias{interplot}
\title{Plot Conditional Coefficients of a Variable in an Interaction Term}
\usage{
interplot(m, var1, var2, plot = TRUE, point = FALSE, sims = 5000,
xmin = NA, xmax = NA)
}
\ar... | /man/interplot.Rd | no_license | arturochian/interplot | R | false | false | 3,909 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/Interplot.R
\name{interplot}
\alias{interplot}
\title{Plot Conditional Coefficients of a Variable in an Interaction Term}
\usage{
interplot(m, var1, var2, plot = TRUE, point = FALSE, sims = 5000,
xmin = NA, xmax = NA)
}
\ar... |
## This first line will likely take a few seconds. Be patient!
library(dplyr)
require(ggplot2)
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
NEI$year <- factor(NEI$year, levels = c('1999', '2002', '2005', '2008'))
NEI.Onroad.Baltimore <- filter(NEI, fips== 24510, type == 'ON-RO... | /Plot5.R | no_license | sannananjaiah/EDA-Project-2 | R | false | false | 837 | r | ## This first line will likely take a few seconds. Be patient!
library(dplyr)
require(ggplot2)
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
NEI$year <- factor(NEI$year, levels = c('1999', '2002', '2005', '2008'))
NEI.Onroad.Baltimore <- filter(NEI, fips== 24510, type == 'ON-RO... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/crossval_rf.R
\name{crossval_rf}
\alias{crossval_rf}
\title{Cross Validate Random Forests to get Categorical Accuracy}
\usage{
crossval_rf(y, x, breaks, cat = NULL, split, n, ntree)
}
\arguments{
\item{y}{response a vector}
\item{x}{... | /man/crossval_rf.Rd | no_license | BKreakie/LakeTrophicModelling | R | false | false | 1,248 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/crossval_rf.R
\name{crossval_rf}
\alias{crossval_rf}
\title{Cross Validate Random Forests to get Categorical Accuracy}
\usage{
crossval_rf(y, x, breaks, cat = NULL, split, n, ntree)
}
\arguments{
\item{y}{response a vector}
\item{x}{... |
library(testthat)
# most common expectations:
# equality: expect_equal() and expect_identical()
# regexp: expect_match()
# catch-all: expect_true() and expect_false()
# console output: expect_output()
# messages: expect_message()
# warning: expect_warning()
# errors: expe... | /tests/testthat/test-10-themingTests.R | no_license | hyunyulhenry/pivottabler | R | false | false | 18,679 | r | library(testthat)
# most common expectations:
# equality: expect_equal() and expect_identical()
# regexp: expect_match()
# catch-all: expect_true() and expect_false()
# console output: expect_output()
# messages: expect_message()
# warning: expect_warning()
# errors: expe... |
# Direct Marketting Data Set
data <- read.csv("C:\\Users\\mainak\\Desktop\\DADAI\\Data-Science\\Data Science With R\\Linear Regression\\DirectMarketing.csv")
library(dplyr)
library(ggplot2)
#Purpose of this model is to determine good customer based on AMountSpent dependent variable.
##################################... | /Linear Regression/Linear Regression.R | no_license | mainak-paul/Data-Science | R | false | false | 6,060 | r | # Direct Marketting Data Set
data <- read.csv("C:\\Users\\mainak\\Desktop\\DADAI\\Data-Science\\Data Science With R\\Linear Regression\\DirectMarketing.csv")
library(dplyr)
library(ggplot2)
#Purpose of this model is to determine good customer based on AMountSpent dependent variable.
##################################... |
#titanic
#on Home
setwd("/home/chase/Dropbox/R Code/ML")
#on Laptop
setwd("/home/chasedehan/Dropbox/R Code/ML")
#on Work
setwd("C:/Users/cdehan/Dropbox/R Code/ML")
library(dplyr)
library(rpart) #recursive partitioning and regression trees
######################################################################
##... | /titanic.r | no_license | sireeshapulipati/ML_Learning | R | false | false | 19,855 | r | #titanic
#on Home
setwd("/home/chase/Dropbox/R Code/ML")
#on Laptop
setwd("/home/chasedehan/Dropbox/R Code/ML")
#on Work
setwd("C:/Users/cdehan/Dropbox/R Code/ML")
library(dplyr)
library(rpart) #recursive partitioning and regression trees
######################################################################
##... |
#TickerSector has tickers and sector information for all stocks
#masterdata has timer series data for all stocks
#Function to calculate price ratios of 2 stocks
l.pr <- function(D){
x.prices<- D[,1]
y.prices<- D[,2]
xyratio <- x.prices/y.prices
xyratio.mean <- mean(xyratio)
xyratio.sd<- sd(xyrati... | /PairsTraiding - price ratios.R | no_license | govindgnair23/CQA-Challenge | R | false | false | 10,003 | r | #TickerSector has tickers and sector information for all stocks
#masterdata has timer series data for all stocks
#Function to calculate price ratios of 2 stocks
l.pr <- function(D){
x.prices<- D[,1]
y.prices<- D[,2]
xyratio <- x.prices/y.prices
xyratio.mean <- mean(xyratio)
xyratio.sd<- sd(xyrati... |
\name{deriv.polynomial}
\alias{deriv.polynomial}
\title{Differentiate a Polynomial}
\description{
Calculates the derivative of a univariate polynomial.
}
\usage{
\method{deriv}{polynomial}(expr, \dots)
}
\arguments{
\item{expr}{an object of class \code{"polynomial"}.}
\item{\dots}{further arguments to be passed t... | /man/deriv.polynomial.Rd | no_license | cran/polynom | R | false | false | 694 | rd | \name{deriv.polynomial}
\alias{deriv.polynomial}
\title{Differentiate a Polynomial}
\description{
Calculates the derivative of a univariate polynomial.
}
\usage{
\method{deriv}{polynomial}(expr, \dots)
}
\arguments{
\item{expr}{an object of class \code{"polynomial"}.}
\item{\dots}{further arguments to be passed t... |
library("caret")
library(corrplot)
library(C50)
library(dummies)
library(gmodels)
library(Metrics)
library(neuralnet)
library(plyr)
library(rpart)
library(tree)
library(e1071)
library(rpart.plot)
library(fastDummies)
################################## Load Files #############################################
x <-
read... | /0-Implementation/R Files/NN/League - ELO/Serie A/09-10.R | no_license | Chanter08/Thesis | R | false | false | 7,079 | r | library("caret")
library(corrplot)
library(C50)
library(dummies)
library(gmodels)
library(Metrics)
library(neuralnet)
library(plyr)
library(rpart)
library(tree)
library(e1071)
library(rpart.plot)
library(fastDummies)
################################## Load Files #############################################
x <-
read... |
### Pathway analysis with Spls : bootstrapping is useless, so spls has no code for bootstrapping
library(predictiveModeling)
library(synapseClient)
synapseLogin("in.sock.jang@sagebase.org","tjsDUD@")
source("/home/ijang/COMPBIO/trunk/users/jang/R5/mySplsModel.R")
source("/home/ijang/COMPBIO/trunk/users/jang/pathway_ana... | /predictiveModel_ccle/Spls/pathwaySpls_woBootstrap.R | no_license | insockjang/DrugResponse | R | false | false | 5,195 | r | ### Pathway analysis with Spls : bootstrapping is useless, so spls has no code for bootstrapping
library(predictiveModeling)
library(synapseClient)
synapseLogin("in.sock.jang@sagebase.org","tjsDUD@")
source("/home/ijang/COMPBIO/trunk/users/jang/R5/mySplsModel.R")
source("/home/ijang/COMPBIO/trunk/users/jang/pathway_ana... |
## For use in R IDE
PoTRA.combN <- function(mydata, genelist, Num.sample.normal, Num.sample.case, Pathway.database, PR.quantile) {
require(BiocGenerics)
require(graph)
require(graphite)
require(igraph)
require(org.HS.eg.db)
Fishertest<-c()
TheNumOfHubGene.normal<-c()
TheNumOfHubGene.case<-c()
... | /PoTRA.R | no_license | DinuLabASU/PoTRA | R | false | false | 13,600 | r | ## For use in R IDE
PoTRA.combN <- function(mydata, genelist, Num.sample.normal, Num.sample.case, Pathway.database, PR.quantile) {
require(BiocGenerics)
require(graph)
require(graphite)
require(igraph)
require(org.HS.eg.db)
Fishertest<-c()
TheNumOfHubGene.normal<-c()
TheNumOfHubGene.case<-c()
... |
8150e5a20302762af5294f44742f5f2c query03_query60_1344n.qdimacs 3101 9755 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1+A1/Database/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/query03_query60_1344n/query03_query60_1344n.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 72 | r | 8150e5a20302762af5294f44742f5f2c query03_query60_1344n.qdimacs 3101 9755 |
# Convert adjacency matrix to ped format
adj2ped = function(adj, labs = NULL) {
sex = as.integer(attr(adj, 'sex'))
n = length(sex)
nseq = seq_len(n)
# Fix labels
if(is.null(labs))
labs = as.character(nseq)
else {
labs = as.character(labs)
origN = length(labs)
if(n > origN) {
exSeq = s... | /R/adj2ped.R | no_license | magnusdv/pedbuildr | R | false | false | 1,800 | r | # Convert adjacency matrix to ped format
adj2ped = function(adj, labs = NULL) {
sex = as.integer(attr(adj, 'sex'))
n = length(sex)
nseq = seq_len(n)
# Fix labels
if(is.null(labs))
labs = as.character(nseq)
else {
labs = as.character(labs)
origN = length(labs)
if(n > origN) {
exSeq = s... |
#Regression testing
?mtcars
head(mtcars)
data <- mtcars
# Define variable groups
x <- as.matrix(data[, -1])
y <- data[, 1]
# REGRESSION WITH SIMULTANEOUS ENTRY #######################
# Using variable groups
reg1 <- lm(y ~ x)
# Or specify variables individually
# Results
reg1 # Coefficie... | /Regression_testing.R | no_license | Zargham1214/R-programming-Modules | R | false | false | 368 | r | #Regression testing
?mtcars
head(mtcars)
data <- mtcars
# Define variable groups
x <- as.matrix(data[, -1])
y <- data[, 1]
# REGRESSION WITH SIMULTANEOUS ENTRY #######################
# Using variable groups
reg1 <- lm(y ~ x)
# Or specify variables individually
# Results
reg1 # Coefficie... |
rm(list = ls())
setwd("/Users/Runze/Documents/GitHub/RobustASE/Code/R")
q <- 0.9
nCores <- 2
# dataName <- "desikan"
dataName <- "CPAC200"
# dataName <- "Talairach"
isSVD <- 0
source("function_collection.R")
require(parallel)
tmpList <- ReadDataWeighted(dataName, DA = F, newGraph = T)
AList <- tmpList[[1]]
n <- tmp... | /Code/R/MainExpRealTest.R | no_license | TangRunze/RobustASE | R | false | false | 1,898 | r | rm(list = ls())
setwd("/Users/Runze/Documents/GitHub/RobustASE/Code/R")
q <- 0.9
nCores <- 2
# dataName <- "desikan"
dataName <- "CPAC200"
# dataName <- "Talairach"
isSVD <- 0
source("function_collection.R")
require(parallel)
tmpList <- ReadDataWeighted(dataName, DA = F, newGraph = T)
AList <- tmpList[[1]]
n <- tmp... |
shinyUI(
pageWithSidebar(
# Application Title
headerPanel("Basketball Wins Predictor"),
sidebarPanel(
numericInput('pointsFor', 'Total Points Scored', value = 0),
numericInput('pointsAgainst', 'Total Points Allowed', value = 0),
... | /ui.R | no_license | TylerCrain/developing_data_products | R | false | false | 1,003 | r | shinyUI(
pageWithSidebar(
# Application Title
headerPanel("Basketball Wins Predictor"),
sidebarPanel(
numericInput('pointsFor', 'Total Points Scored', value = 0),
numericInput('pointsAgainst', 'Total Points Allowed', value = 0),
... |
theme_registration <- function() {
register_theme_elements(
elementalist.polygon = element_polygon(
fill = "white", colour = "black", size = 0.5, linetype = 1,
inherit.blank = TRUE, linejoin = "round", lineend = "round"
),
elementalist.geom_polygon = element_polygon(),
elementalist.geom_li... | /R/theme_registration.R | permissive | gejielin/elementalist | R | false | false | 838 | r | theme_registration <- function() {
register_theme_elements(
elementalist.polygon = element_polygon(
fill = "white", colour = "black", size = 0.5, linetype = 1,
inherit.blank = TRUE, linejoin = "round", lineend = "round"
),
elementalist.geom_polygon = element_polygon(),
elementalist.geom_li... |
library(ssnapstats)
context("Check internal_calculate_d2ki72hrs_aggr_values")
# Create the KI computed variables
su_times <- tibble::tibble(
S1FirstStrokeUnitArrivalDateTime = c(as.POSIXct(
c("2017-01-01 01:00:00",
"2017-01-01 02:00:00",
"2017-01-01 03:00:00",
"2017-01-01 04:00:00",
"2017... | /tests/testthat/test-internal_calculate_d2ki72hrs_aggr_values.R | no_license | md0u80c9/SSNAPStats | R | false | false | 1,672 | r | library(ssnapstats)
context("Check internal_calculate_d2ki72hrs_aggr_values")
# Create the KI computed variables
su_times <- tibble::tibble(
S1FirstStrokeUnitArrivalDateTime = c(as.POSIXct(
c("2017-01-01 01:00:00",
"2017-01-01 02:00:00",
"2017-01-01 03:00:00",
"2017-01-01 04:00:00",
"2017... |
mapdeckGridDependency <- function() {
list(
htmltools::htmlDependency(
"grid",
"1.0.0",
system.file("htmlwidgets/lib/grid", package = "mapdeck"),
script = c("grid.js")
)
)
}
#' Add Grid
#'
#' The Grid Layer renders a grid heatmap based on an array of points.
#' It takes the constant size all each ce... | /R/map_layer_grid.R | no_license | ChrisMuir/mapdeck | R | false | false | 3,500 | r | mapdeckGridDependency <- function() {
list(
htmltools::htmlDependency(
"grid",
"1.0.0",
system.file("htmlwidgets/lib/grid", package = "mapdeck"),
script = c("grid.js")
)
)
}
#' Add Grid
#'
#' The Grid Layer renders a grid heatmap based on an array of points.
#' It takes the constant size all each ce... |
#' @include Transect.R
#' @importFrom methods validObject
#' @title Class "Line.Transect" extends Class "Transect"
#'
#' @description Class \code{"Line.Transect"} is an S4 class
#' detailing a set of transects from a point transect design.
#' @name Line.Transect-class
#' @title S4 Class "Line.Transect"
#' @slot line.l... | /R/Line.Transect.R | no_license | olexandr-konovalov/dssd | R | false | false | 6,558 | r | #' @include Transect.R
#' @importFrom methods validObject
#' @title Class "Line.Transect" extends Class "Transect"
#'
#' @description Class \code{"Line.Transect"} is an S4 class
#' detailing a set of transects from a point transect design.
#' @name Line.Transect-class
#' @title S4 Class "Line.Transect"
#' @slot line.l... |
#' Locate the position of patterns in a string.
#'
#' Vectorised over \code{string} and \code{pattern}. If the match is of length
#' 0, (e.g. from a special match like \code{$}) end will be one character less
#' than start.
#'
#' @inheritParams str_detect
#' @return For \code{str_locate}, an integer matrix. First colum... | /R/locate.r | no_license | hyiltiz/stringr | R | false | false | 2,967 | r | #' Locate the position of patterns in a string.
#'
#' Vectorised over \code{string} and \code{pattern}. If the match is of length
#' 0, (e.g. from a special match like \code{$}) end will be one character less
#' than start.
#'
#' @inheritParams str_detect
#' @return For \code{str_locate}, an integer matrix. First colum... |
#' TODO Functions that allow pulling data on artists
#' https://developer.spotify.com/documentation/web-api/reference-beta/#category-artists
#' Info on artist.
#' returns a list that contains the info on the artist
#' @param artistID spotify ID of the artist.
#' @export
getArtist <- function(artistID) {
url <- paste... | /R/artist.R | no_license | topiaskarjalainen/SpotR | R | false | false | 1,439 | r | #' TODO Functions that allow pulling data on artists
#' https://developer.spotify.com/documentation/web-api/reference-beta/#category-artists
#' Info on artist.
#' returns a list that contains the info on the artist
#' @param artistID spotify ID of the artist.
#' @export
getArtist <- function(artistID) {
url <- paste... |
#HIDDEN RATES MODEL OF BINARY TRAIT EVOLUTION
#written by Jeremy M. Beaulieu
corHMM <- function(phy, data, rate.cat, rate.mat=NULL, node.states=c("joint", "marginal", "scaled", "none"), optim.method=c("subplex"), p=NULL, root.p=NULL, ip=NULL, nstarts=10, n.cores=NULL, sann.its=5000, diagn=FALSE){
# Checks to make s... | /R/corHMM.R | no_license | acope3/corHMM | R | false | false | 29,941 | r | #HIDDEN RATES MODEL OF BINARY TRAIT EVOLUTION
#written by Jeremy M. Beaulieu
corHMM <- function(phy, data, rate.cat, rate.mat=NULL, node.states=c("joint", "marginal", "scaled", "none"), optim.method=c("subplex"), p=NULL, root.p=NULL, ip=NULL, nstarts=10, n.cores=NULL, sann.its=5000, diagn=FALSE){
# Checks to make s... |
library(elliptic)
### Name: myintegrate
### Title: Complex integration
### Aliases: myintegrate integrate.contour integrate.segments residue
### Keywords: math
### ** Examples
f1 <- function(z){sin(exp(z))}
f2 <- function(z,p){p/z}
myintegrate(f1,2,3) # that is, along the real axis
integrate.segments(f1,c(1,1i... | /data/genthat_extracted_code/elliptic/examples/myintegrate.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 3,741 | r | library(elliptic)
### Name: myintegrate
### Title: Complex integration
### Aliases: myintegrate integrate.contour integrate.segments residue
### Keywords: math
### ** Examples
f1 <- function(z){sin(exp(z))}
f2 <- function(z,p){p/z}
myintegrate(f1,2,3) # that is, along the real axis
integrate.segments(f1,c(1,1i... |
## here we go. some house cleaning first
library(dplyr)
setwd("~/learning/coursera-datascience/course3/project")
features = read.table("features.txt")
activity_labels = read.table("activity_labels.txt")
## now read test data
setwd("~/learning/coursera-datascience/course3/project/test")
subject_test = read.table("subje... | /run_analysis.R | no_license | jemsbhai/datasciencecourse3project | R | false | false | 2,740 | r | ## here we go. some house cleaning first
library(dplyr)
setwd("~/learning/coursera-datascience/course3/project")
features = read.table("features.txt")
activity_labels = read.table("activity_labels.txt")
## now read test data
setwd("~/learning/coursera-datascience/course3/project/test")
subject_test = read.table("subje... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grabMzxmlFunctions.R
\name{grabMzxmlBPC}
\alias{grabMzxmlBPC}
\title{Grab the BPC or TIC from a file}
\usage{
grabMzxmlBPC(xml_data, TIC = FALSE)
}
\arguments{
\item{xml_data}{An `xml2` nodeset, usually created by applying `read_xml` to
an mz... | /man/grabMzxmlBPC.Rd | permissive | R-Lionheart/RaMS | R | false | true | 693 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/grabMzxmlFunctions.R
\name{grabMzxmlBPC}
\alias{grabMzxmlBPC}
\title{Grab the BPC or TIC from a file}
\usage{
grabMzxmlBPC(xml_data, TIC = FALSE)
}
\arguments{
\item{xml_data}{An `xml2` nodeset, usually created by applying `read_xml` to
an mz... |
#' Extract class of variable
#'
#' Some packages append non-base classes to data frame columns, e.g.
#' if data is labeled with the `Hmisc` package the class of a string will
#' be `c("labelled", "character")` rather than `c("character")` only. This
#' simple function extracts the base R class.
#'
#' @param data data ... | /R/utils-tbl_summary.R | permissive | denis-or/gtsummary | R | false | false | 40,177 | r | #' Extract class of variable
#'
#' Some packages append non-base classes to data frame columns, e.g.
#' if data is labeled with the `Hmisc` package the class of a string will
#' be `c("labelled", "character")` rather than `c("character")` only. This
#' simple function extracts the base R class.
#'
#' @param data data ... |
\name{ch09data}
\docType{data}
\alias{ch09data}
\alias{m.fac9003}
\alias{m.cpice16.dp7503}
\alias{m.barra.9003}
\alias{m.5cln}
%\alias{m.bnd}
\alias{m.apca0103}
\title{ financial time series for Tsay (2005, chapter 9[text]) }
\description{
Financial time series used in examples in chapter 9.
}
\usage{
d... | /man/ch09data.Rd | no_license | RahmanMahmudurTokyo/FinTS | R | false | false | 3,605 | rd | \name{ch09data}
\docType{data}
\alias{ch09data}
\alias{m.fac9003}
\alias{m.cpice16.dp7503}
\alias{m.barra.9003}
\alias{m.5cln}
%\alias{m.bnd}
\alias{m.apca0103}
\title{ financial time series for Tsay (2005, chapter 9[text]) }
\description{
Financial time series used in examples in chapter 9.
}
\usage{
d... |
# Extract eigenvalues from an object that has them
`eigenvals` <-
function(x, ...)
{
UseMethod("eigenvals")
}
`eigenvals.default`<-
function(x, ...)
{
## svd and eigen return unspecified 'list', see if this could be
## either of them (like does cmdscale)
out <- NA
if (is.list(x)) {
... | /vegan/R/eigenvals.R | no_license | ingted/R-Examples | R | false | false | 3,236 | r | # Extract eigenvalues from an object that has them
`eigenvals` <-
function(x, ...)
{
UseMethod("eigenvals")
}
`eigenvals.default`<-
function(x, ...)
{
## svd and eigen return unspecified 'list', see if this could be
## either of them (like does cmdscale)
out <- NA
if (is.list(x)) {
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wta_odds.R
\name{wta_odds}
\alias{wta_odds}
\title{WTA Match Odds}
\format{A data frame with 21,291 rows and 43 variables}
\source{
\url{http://www.tennis-data.co.uk/alldata.php}
}
\description{
This dataset contains outcomes of matches on th... | /man/wta_odds.Rd | no_license | dashee87/deuce | R | false | true | 3,361 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wta_odds.R
\name{wta_odds}
\alias{wta_odds}
\title{WTA Match Odds}
\format{A data frame with 21,291 rows and 43 variables}
\source{
\url{http://www.tennis-data.co.uk/alldata.php}
}
\description{
This dataset contains outcomes of matches on th... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/civis_ml_workflows.R
\name{civis_ml_sparse_logistic}
\alias{civis_ml_sparse_logistic}
\title{CivisML Sparse Logistic}
\usage{
civis_ml_sparse_logistic(x, dependent_variable, primary_key = NULL,
excluded_columns = NULL, penalty = c("l2", "l1... | /man/civis_ml_sparse_logistic.Rd | no_license | ajchin/civis-r | R | false | true | 8,669 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/civis_ml_workflows.R
\name{civis_ml_sparse_logistic}
\alias{civis_ml_sparse_logistic}
\title{CivisML Sparse Logistic}
\usage{
civis_ml_sparse_logistic(x, dependent_variable, primary_key = NULL,
excluded_columns = NULL, penalty = c("l2", "l1... |
library(glmnet)
mydata = read.table("./TrainingSet/AvgRank/thyroid.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.3,family="gaussian",standardize=TRUE)
sink('./Model/EN/AvgRank/thyroid/thyroid_043.txt',append=T... | /Model/EN/AvgRank/thyroid/thyroid_043.R | no_license | leon1003/QSMART | R | false | false | 354 | r | library(glmnet)
mydata = read.table("./TrainingSet/AvgRank/thyroid.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.3,family="gaussian",standardize=TRUE)
sink('./Model/EN/AvgRank/thyroid/thyroid_043.txt',append=T... |
# rmd가 추출되지 않아 R파일로 송부합니다.
# 페이지번호를 나누어 추출하였기 때문에 이 코드로 뽑히는 변수와 실제 데이터는 다릅니다.
# 이 코드를 실행하는 데는 조금 시간이 걸릴 수 있습니다.
# for문의 페이지 번호는 임의로 주면 제대로 데이터가 뽑히지 않기 때문에
# 홈페이지의 실제 페이지번호를 확인하고 적정한 길이로 주었음을 밝힙니다.
library(XML) #패키지 설치
library(stringr) # 패키지 설치
library(rvest) # 패키지 설치
setwd("c:\\r_temp") #디렉토리 설정
getwd... | /hyundai/현대 질문 크롤링.R | no_license | parkkuri/-project- | R | false | false | 2,850 | r | # rmd가 추출되지 않아 R파일로 송부합니다.
# 페이지번호를 나누어 추출하였기 때문에 이 코드로 뽑히는 변수와 실제 데이터는 다릅니다.
# 이 코드를 실행하는 데는 조금 시간이 걸릴 수 있습니다.
# for문의 페이지 번호는 임의로 주면 제대로 데이터가 뽑히지 않기 때문에
# 홈페이지의 실제 페이지번호를 확인하고 적정한 길이로 주었음을 밝힙니다.
library(XML) #패키지 설치
library(stringr) # 패키지 설치
library(rvest) # 패키지 설치
setwd("c:\\r_temp") #디렉토리 설정
getwd... |
renv_watchdog_server_start <- function(client) {
# initialize logging
renv_log_init()
# create socket server
server <- renv_socket_server()
dlog("watchdog-server", "Listening on port %i.", server$port)
# communicate information back to client
dlog("watchdog-server", "Waiting for client...")
metadata... | /R/watchdog-server.R | permissive | rstudio/renv | R | false | false | 2,965 | r |
renv_watchdog_server_start <- function(client) {
# initialize logging
renv_log_init()
# create socket server
server <- renv_socket_server()
dlog("watchdog-server", "Listening on port %i.", server$port)
# communicate information back to client
dlog("watchdog-server", "Waiting for client...")
metadata... |
library('dplyr')
library('tidyr')
library('ggplot2')
salaries_SF <- read.csv("Salaries.csv")
str(salaries_SF)
ssf <- salaries_SF
dc <- c('Id', 'Notes', 'Agency')
#ssf <- subset(ssf, select = -c(1, 11, 12))
ssf <- ssf %>% select( -one_of(dc))
# Names & Job Title
ssf_names <- select(ssf, c(1:2))
ssf_names %>%
muta... | /DS_Sat_2020/Day6R.R | no_license | Demolis/Infopulse | R | false | false | 3,999 | r | library('dplyr')
library('tidyr')
library('ggplot2')
salaries_SF <- read.csv("Salaries.csv")
str(salaries_SF)
ssf <- salaries_SF
dc <- c('Id', 'Notes', 'Agency')
#ssf <- subset(ssf, select = -c(1, 11, 12))
ssf <- ssf %>% select( -one_of(dc))
# Names & Job Title
ssf_names <- select(ssf, c(1:2))
ssf_names %>%
muta... |
rm(list=ls()) #clears environment
cat("\014") #clears the console in RStudio
#Problem 1
#(a) Define an indicator variable IsB such that IsB=TRUE for B-cell patients
#and IsB=FALSE for T-cell patients.
#(b) Use two genes "39317_at" and "38018_g_at" to fit a classification tree for
#IsB. Print out the confusi... | /Module13/Conte_ModuleHW13.r | no_license | contej/Statistics_for_Bioinformatics | R | false | false | 15,341 | r | rm(list=ls()) #clears environment
cat("\014") #clears the console in RStudio
#Problem 1
#(a) Define an indicator variable IsB such that IsB=TRUE for B-cell patients
#and IsB=FALSE for T-cell patients.
#(b) Use two genes "39317_at" and "38018_g_at" to fit a classification tree for
#IsB. Print out the confusi... |
library(ggplot2)
x = get_count_by_month("Jaanika")
df = data.frame(month = factor(names(x), levels=names(x)),
count = as.numeric(x))
ggplot(df, aes(x=month, y=count, label=count)) +
geom_bar(stat="identity", fill="#53cfff") +
geom_text(col="white", vjust=1.25, size=3.5) +
theme_minimal() +
lab... | /figures/build_readme_figure.R | no_license | tanelp/nimi | R | false | false | 486 | r | library(ggplot2)
x = get_count_by_month("Jaanika")
df = data.frame(month = factor(names(x), levels=names(x)),
count = as.numeric(x))
ggplot(df, aes(x=month, y=count, label=count)) +
geom_bar(stat="identity", fill="#53cfff") +
geom_text(col="white", vjust=1.25, size=3.5) +
theme_minimal() +
lab... |
# set working directory (change this to fit your needs)
setwd('~/Source Code/GitHub/Exploratory-Data-Analysis')
# make sure the plots folder exists
if (!file.exists('plots')) {
dir.create('plots')
}
# load data
source('scripts/get_and_clean_data.R')
# open device
png(filename='plots/plot1.png',width=480,heig... | /plot1.R | no_license | olenaostasheva/ExData_Plotting1 | R | false | false | 502 | r | # set working directory (change this to fit your needs)
setwd('~/Source Code/GitHub/Exploratory-Data-Analysis')
# make sure the plots folder exists
if (!file.exists('plots')) {
dir.create('plots')
}
# load data
source('scripts/get_and_clean_data.R')
# open device
png(filename='plots/plot1.png',width=480,heig... |
#This file contains an unoptimized version of the continuous model.
#It suffers in performance from relying on R's built-in matrix
#operations, which are overkill for a 2x2. By inlining the matrix
#computations we achieve a speedup of ~600%, but perhaps at the cost
#of clarity: the original implementation is therefore... | /old_model.R | no_license | poneill/demos | R | false | false | 1,457 | r | #This file contains an unoptimized version of the continuous model.
#It suffers in performance from relying on R's built-in matrix
#operations, which are overkill for a 2x2. By inlining the matrix
#computations we achieve a speedup of ~600%, but perhaps at the cost
#of clarity: the original implementation is therefore... |
##############################################################################################################################
#
# Plot the cumulative probability density function (cdf) for a given number of degrees of freedom and noise distribution function
#
#
#' Plot CDF
#'
#' Plots the Cumulative Probability Densit... | /R/plotcdf.R | no_license | cran/gofMC | R | false | false | 1,669 | r | ##############################################################################################################################
#
# Plot the cumulative probability density function (cdf) for a given number of degrees of freedom and noise distribution function
#
#
#' Plot CDF
#'
#' Plots the Cumulative Probability Densit... |
#' @title Mark Straight Path Segments in GPS Track
#'
#' @description This function attempts to mark portions of a GPS track where a
#' ship is travelling in a straight line by comparing the recent average
#' heading with a longer term average heading. If these are different, then the
#' ship should be turning. N... | /code/PAMmisc/straightPath_yb.R | no_license | ybarkley/SpermWhales | R | false | false | 2,706 | r | #' @title Mark Straight Path Segments in GPS Track
#'
#' @description This function attempts to mark portions of a GPS track where a
#' ship is travelling in a straight line by comparing the recent average
#' heading with a longer term average heading. If these are different, then the
#' ship should be turning. N... |
## ----part1, include=F, warning=F, message=FALSE, cache=F----------------------
#load the R packages we need.
library("pander")
library("knitr")
library("rmarkdown")
library("data.table")
library("ggplot2")
library("stringr")
#x = fread("master_11212020.csv")
#x = fread("master_11252020.csv")
#x = fread("master_... | /report.R | no_license | kith-pradhan/CovidCancerReport | R | false | false | 20,137 | r | ## ----part1, include=F, warning=F, message=FALSE, cache=F----------------------
#load the R packages we need.
library("pander")
library("knitr")
library("rmarkdown")
library("data.table")
library("ggplot2")
library("stringr")
#x = fread("master_11212020.csv")
#x = fread("master_11252020.csv")
#x = fread("master_... |
library(testthat)
library(Rwaves)
test_check("Rwaves")
| /tests/testthat.R | no_license | mchiapello/Rwaves | R | false | false | 56 | r | library(testthat)
library(Rwaves)
test_check("Rwaves")
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.