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
makeVector <- function(x = numeric()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setmean <- function(mean) m <<- mean getmean <- function() m list(set = set, get = get, setmean = setmean,...
/cachematrix.R
no_license
tahirussa/ProgrammingAssignment2
R
false
false
608
r
makeVector <- function(x = numeric()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setmean <- function(mean) m <<- mean getmean <- function() m list(set = set, get = get, setmean = setmean,...
## load libraries library(ggplot2) library(pitchRx) library(dplyr) library(stringr) library(graphics) library(RColorBrewer) # load Quantitative and Qualitative Scoring Functions Functions # Quant scored in terms of Out (-1) and Hit (1) get_quant_score <- function(des) { score <- ( as.integer(str_detect(des...
/03-GenerateImages.R
no_license
fire-ants/mlb-analytics-ant
R
false
false
6,102
r
## load libraries library(ggplot2) library(pitchRx) library(dplyr) library(stringr) library(graphics) library(RColorBrewer) # load Quantitative and Qualitative Scoring Functions Functions # Quant scored in terms of Out (-1) and Hit (1) get_quant_score <- function(des) { score <- ( as.integer(str_detect(des...
#' Tests for what a parsed CSP allows #' #' @name csp_allows NULL #' @param csp a `csp` object created with [fetch_csp()] or [parse_csp()] #' @param URL source or destination URL #' @param nonce a [cryptographic nonce](https://html.spec.whatwg.org/multipage/urls-and-fetching.html#attr-nonce) #' @rdname csp_allows #' @...
/R/allows.R
permissive
hrbrmstr/cspy
R
false
false
4,091
r
#' Tests for what a parsed CSP allows #' #' @name csp_allows NULL #' @param csp a `csp` object created with [fetch_csp()] or [parse_csp()] #' @param URL source or destination URL #' @param nonce a [cryptographic nonce](https://html.spec.whatwg.org/multipage/urls-and-fetching.html#attr-nonce) #' @rdname csp_allows #' @...
rm(list = ls()) library(tidyverse) library(lubridate) set.seed(1) power <- read.csv("household_power_consumption.txt", sep=';', header=TRUE, stringsAsFactors = FALSE, na.strings=c('?')) power$DT <- paste(power$Date, power$Time, sep=" ") power$DateTime <- as.POSIXlt(power$DT, format='%d/%m/%Y %H:%M:%S') power$Da...
/plot2.R
no_license
jml3598/ExData_Plotting1
R
false
false
640
r
rm(list = ls()) library(tidyverse) library(lubridate) set.seed(1) power <- read.csv("household_power_consumption.txt", sep=';', header=TRUE, stringsAsFactors = FALSE, na.strings=c('?')) power$DT <- paste(power$Date, power$Time, sep=" ") power$DateTime <- as.POSIXlt(power$DT, format='%d/%m/%Y %H:%M:%S') power$Da...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/def.R \name{model_lin} \alias{model_lin} \title{Linear regression} \usage{ model_lin(y, a = NULL, nonneg = FALSE, fix_bias = FALSE) } \arguments{ \item{y}{n-by-1 numeric vector of response values} \item{a}{n-by-1 vector of sample weights} \...
/man/model_lin.Rd
permissive
Chancen-King/gelnet
R
false
true
746
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/def.R \name{model_lin} \alias{model_lin} \title{Linear regression} \usage{ model_lin(y, a = NULL, nonneg = FALSE, fix_bias = FALSE) } \arguments{ \item{y}{n-by-1 numeric vector of response values} \item{a}{n-by-1 vector of sample weights} \...
## Put comments here that give an overall description of what your ## functions do # makeCacheMatrix creates a list containing a function to # Set the value of the matrix # Get the value of the matrix # Set the value of inverse of the matrix # Get the value of inverse of the matrix makeCacheMatrix <- functio...
/cachematrix.R
no_license
camarabatista/datasciencecoursera
R
false
false
1,002
r
## Put comments here that give an overall description of what your ## functions do # makeCacheMatrix creates a list containing a function to # Set the value of the matrix # Get the value of the matrix # Set the value of inverse of the matrix # Get the value of inverse of the matrix makeCacheMatrix <- functio...
# load libraries library(dplyr) # election results years mn_election_results_years=c( "2014", "2010", "2008", "2006", "2004", "2002", "2000" ) # function for getting the percentage of the two-party vote for each 2014 race get2014PercentagesByBoundry <- function(data){ data <- summar...
/map_scripts.R
no_license
TonyAngelo/MN_Politics
R
false
false
4,480
r
# load libraries library(dplyr) # election results years mn_election_results_years=c( "2014", "2010", "2008", "2006", "2004", "2002", "2000" ) # function for getting the percentage of the two-party vote for each 2014 race get2014PercentagesByBoundry <- function(data){ data <- summar...
library(shiny) # Define UI for application that shows traffic fatalities by time of day shinyUI( fluidPage( # Application title titlePanel("Alcohol related traffic fatalities by time of day"), # Sidebar with a slider input and a text box sidebarLayout( sidebarPanel( # Slider input for specify...
/uiStart.R
no_license
mrangara/AlcoholTrafficFatalities
R
false
false
879
r
library(shiny) # Define UI for application that shows traffic fatalities by time of day shinyUI( fluidPage( # Application title titlePanel("Alcohol related traffic fatalities by time of day"), # Sidebar with a slider input and a text box sidebarLayout( sidebarPanel( # Slider input for specify...
#! /usr/bin/env Rscript #SBATCH -p shared #SBATCH --mem 2g #SBATCH -t 0-06:00 #SBATCH -c 10 #SBATCH -o out1.txt # standard output #SBATCH -e err1.txt # standard error library(parallel) boot_onestep <- function(i) { didx <- mtcars[sample(1:nrow(mtcars), replace = TRUE, nrow(mtcars)), ] xidx <- cbind(1, didx$wt...
/boot1/bootstrap1.batch
no_license
Olivia1289/rodyssey
R
false
false
658
batch
#! /usr/bin/env Rscript #SBATCH -p shared #SBATCH --mem 2g #SBATCH -t 0-06:00 #SBATCH -c 10 #SBATCH -o out1.txt # standard output #SBATCH -e err1.txt # standard error library(parallel) boot_onestep <- function(i) { didx <- mtcars[sample(1:nrow(mtcars), replace = TRUE, nrow(mtcars)), ] xidx <- cbind(1, didx$wt...
library (phytools) getwd () tree <- AnolisTree <- force.ultrametric (read.tree ("https://jonsmitchell.com/data/anolis.tre")) plot (tree, type = "fan") tree #'There are 82 tips, and when I print tree it tells me there are branch lengths and that it is rooted.' data <- read.csv ("https://jonsmitchell.com/data/svl.csv", ...
/Task_08/Task08.r
no_license
cmm0072/Tasks
R
false
false
3,587
r
library (phytools) getwd () tree <- AnolisTree <- force.ultrametric (read.tree ("https://jonsmitchell.com/data/anolis.tre")) plot (tree, type = "fan") tree #'There are 82 tips, and when I print tree it tells me there are branch lengths and that it is rooted.' data <- read.csv ("https://jonsmitchell.com/data/svl.csv", ...
bondchange <- function(){ my.draw <- function(panel) { faceval<-as.numeric(panel$facevalue) dur= as.numeric(panel$dur) conv <- as.numeric(panel$conv) yldchange <- as.numeric(panel$yldchange)/10000 # effrate = discrate/(100*freq) # e...
/R/bondchange.R
no_license
cran/GUIDE
R
false
false
2,073
r
bondchange <- function(){ my.draw <- function(panel) { faceval<-as.numeric(panel$facevalue) dur= as.numeric(panel$dur) conv <- as.numeric(panel$conv) yldchange <- as.numeric(panel$yldchange)/10000 # effrate = discrate/(100*freq) # e...
\name{nbGLM} \alias{nbGLM} \title{Identify Differential Expression Modules Based on the Generalized Linear Model} \description{ The algorithm identify differential expression modules using Generalized Linear Model (GLM) for differential expression analysis in RNA-Seq data, and in the model two indicator variable...
/man/nbGLM.Rd
no_license
cran/SeqMADE
R
false
false
2,143
rd
\name{nbGLM} \alias{nbGLM} \title{Identify Differential Expression Modules Based on the Generalized Linear Model} \description{ The algorithm identify differential expression modules using Generalized Linear Model (GLM) for differential expression analysis in RNA-Seq data, and in the model two indicator variable...
# Copyright (C) 2013 Guenter Klambauer and Thomas Unterthiner # <klambauer@bioinf.jku.at> #' @title Normalization of RNA-Seq count data. #' #' @description Normalizes RNA-seq count data using previously published #' approaches. Each samples' read counts are corrected by a normalizing #' factor. The options are "RL...
/R/normalization.R
no_license
Deepstatsanalysis/dexus
R
false
false
1,903
r
# Copyright (C) 2013 Guenter Klambauer and Thomas Unterthiner # <klambauer@bioinf.jku.at> #' @title Normalization of RNA-Seq count data. #' #' @description Normalizes RNA-seq count data using previously published #' approaches. Each samples' read counts are corrected by a normalizing #' factor. The options are "RL...
#' @title Make mixture model from predictive samples #' #' @description #' The function takes a data.frame with predictive samples generated from #' different models as well as weights corresponding to these models as input. #' It then returns predictive samples from a mixture model #' generated by stacking the origi...
/R/make_mixture_from_samples.R
permissive
FelipeJColon/stackr
R
false
false
4,481
r
#' @title Make mixture model from predictive samples #' #' @description #' The function takes a data.frame with predictive samples generated from #' different models as well as weights corresponding to these models as input. #' It then returns predictive samples from a mixture model #' generated by stacking the origi...
library(PooledMeanGroup) ### Name: optimPMG ### Title: optimPMG ### Aliases: optimPMG ### ** Examples # first import DataExp, i=1...9, T1=T2=...T9=35 data(DataExp) DataExp[1:5,] # then prepare lags and diffs using LagPanel and DiffPanel y10=data.frame(y10=DataExp[,1], row.names=row.names(DataExp)) cpi=data.frame(cp...
/data/genthat_extracted_code/PooledMeanGroup/examples/optimPMG.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
2,151
r
library(PooledMeanGroup) ### Name: optimPMG ### Title: optimPMG ### Aliases: optimPMG ### ** Examples # first import DataExp, i=1...9, T1=T2=...T9=35 data(DataExp) DataExp[1:5,] # then prepare lags and diffs using LagPanel and DiffPanel y10=data.frame(y10=DataExp[,1], row.names=row.names(DataExp)) cpi=data.frame(cp...
\name{simple1} \alias{simple1} \docType{data} \title{ Collected Data by a Simple Casual Sampling without Volume } \description{ Table format for input in the 'indvol' function, with mens="plot". } \usage{data("simple1")} \format{ A data frame with 120 observations on the following 5 variables. \describe{ \item{...
/man/simple1.Rd
no_license
Danielsouzabio/florestal
R
false
false
746
rd
\name{simple1} \alias{simple1} \docType{data} \title{ Collected Data by a Simple Casual Sampling without Volume } \description{ Table format for input in the 'indvol' function, with mens="plot". } \usage{data("simple1")} \format{ A data frame with 120 observations on the following 5 variables. \describe{ \item{...
#直方圖長條間無間距 #使用電信業客戶流失資料 library(C50) data(churn) attach(churnTrain) par(mfrow=c(2,2)) #圖片區配置2*2 的圖,共4個圖 #設定分組組數breaks hist(total_day_minutes, xlab=" 白天通話分鐘數", main="breaks =11", ylab="門號數", col="red" ) #參數breaks預設為11 hist(total_day_minutes, xlab=" 白天通話分鐘數", main="breaks =2", ylab="門號數", col="red", breaks=2 ) #參數breaks設...
/work/Unit3/Histogram0721.R
no_license
yuju13488/Data_Mining
R
false
false
1,137
r
#直方圖長條間無間距 #使用電信業客戶流失資料 library(C50) data(churn) attach(churnTrain) par(mfrow=c(2,2)) #圖片區配置2*2 的圖,共4個圖 #設定分組組數breaks hist(total_day_minutes, xlab=" 白天通話分鐘數", main="breaks =11", ylab="門號數", col="red" ) #參數breaks預設為11 hist(total_day_minutes, xlab=" 白天通話分鐘數", main="breaks =2", ylab="門號數", col="red", breaks=2 ) #參數breaks設...
library(readxl) library(ggplot2) library(dplyr) library(nlme) library(car) library(lme4) library(emmeans) byss_s <- read_excel('Data/Mytred_Byss_Salinity_2021.xlsx', sheet = 'list1') str(byss_s) byss_ss <- select(byss_s, -Comment) byss_ss$Force <- as.numeric(byss_ss$Force) str(byss_ss) byss_ss <- na.omit(byss_ss) st...
/MYTRED/R_calc_Mytred_2020/Byss_salinity2.R
no_license
polydora/Articles_in_progress
R
false
false
6,891
r
library(readxl) library(ggplot2) library(dplyr) library(nlme) library(car) library(lme4) library(emmeans) byss_s <- read_excel('Data/Mytred_Byss_Salinity_2021.xlsx', sheet = 'list1') str(byss_s) byss_ss <- select(byss_s, -Comment) byss_ss$Force <- as.numeric(byss_ss$Force) str(byss_ss) byss_ss <- na.omit(byss_ss) st...
mini <- read.table("mini.txt", header = T) mini$black <- as.factor(mini$black) mini$married <- as.factor(mini$married) weight <- rep(1, 20) mtreat <- rep(1:0, each = 10) minstrument <- rep(1:0, each = 10) mtree <- causalTree(income~., data = mini, weights = mtreat, method = "anova", parms = 1, cp = 0, minbucket = 1, c...
/tests/test.compute.tree.stats.R
no_license
alejandroschuler/causal_effect_estimation
R
false
false
923
r
mini <- read.table("mini.txt", header = T) mini$black <- as.factor(mini$black) mini$married <- as.factor(mini$married) weight <- rep(1, 20) mtreat <- rep(1:0, each = 10) minstrument <- rep(1:0, each = 10) mtree <- causalTree(income~., data = mini, weights = mtreat, method = "anova", parms = 1, cp = 0, minbucket = 1, c...
#' Load a GSDF field from a netCDF file or URL #' #' Loads a specified hyperslab (range of lat, lon, height and time) #' from a NetCDF file (or an openDAP server). #' New version with GSDF.time dates #' #' This works only for some netCDF files (netCDF is a very flexible file #' format and it's necessary to make assu...
/GSDF/R/GSDF.ncdf.R
permissive
oldweather/GSDF
R
false
false
27,770
r
#' Load a GSDF field from a netCDF file or URL #' #' Loads a specified hyperslab (range of lat, lon, height and time) #' from a NetCDF file (or an openDAP server). #' New version with GSDF.time dates #' #' This works only for some netCDF files (netCDF is a very flexible file #' format and it's necessary to make assu...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in Rtmp9wH6ZH/file2ef7479aeb79 \name{Exponential} \alias{Exponential} \alias{dexp_nimble} \alias{pexp_nimble} \alias{qexp_nimble} \alias{rexp_nimble} \title{The Exponential Distribution} \usage{ dexp_nimble(x, rate = 1/scale, scale = 1, lo...
/packages/nimble/man/Exponential.Rd
no_license
clarkfitzg/nimble
R
false
false
2,035
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in Rtmp9wH6ZH/file2ef7479aeb79 \name{Exponential} \alias{Exponential} \alias{dexp_nimble} \alias{pexp_nimble} \alias{qexp_nimble} \alias{rexp_nimble} \title{The Exponential Distribution} \usage{ dexp_nimble(x, rate = 1/scale, scale = 1, lo...
#' @export print.rdf <- function(x, ...) { mrm <- paste0("MRM: ", x$meta$name, "\n") desc <- paste0("Description: ", x$meta$description, "\n") n_trace <- paste0("Number of traces: ", x$meta$number_of_runs, "\n") obj <- paste0(paste0(" - ", names(x$runs[[1]]$objects)), collapse = "\n") cat(mrm, desc, n_t...
/R/rdf.R
permissive
BoulderCodeHub/RWDataPlyr
R
false
false
825
r
#' @export print.rdf <- function(x, ...) { mrm <- paste0("MRM: ", x$meta$name, "\n") desc <- paste0("Description: ", x$meta$description, "\n") n_trace <- paste0("Number of traces: ", x$meta$number_of_runs, "\n") obj <- paste0(paste0(" - ", names(x$runs[[1]]$objects)), collapse = "\n") cat(mrm, desc, n_t...
#' annotateSVinPoN.R #' author: Gavin Ha #' Fred Hutchinson Cancer Research Center #' contact: <gha@fredhutch.org> #' date: July 15, 2019 #' description: Annotate SV events that overlap the Panel of Normals with SV frequencies observed in matched normal samples and black list regions. Filter SVs from input bedpe fil...
/code/filterPoNSVs.R
no_license
scristia/SV_10X_analysis
R
false
false
6,448
r
#' annotateSVinPoN.R #' author: Gavin Ha #' Fred Hutchinson Cancer Research Center #' contact: <gha@fredhutch.org> #' date: July 15, 2019 #' description: Annotate SV events that overlap the Panel of Normals with SV frequencies observed in matched normal samples and black list regions. Filter SVs from input bedpe fil...
#Project : Cellular automaton - crystallization 2 #Author : Dago Quevedo #Date : Aug 2017 library(parallel) library(sna) unlink("P2_C*.png") unlink("P2_C*.gif") args = commandArgs(trailingOnly = TRUE) if (length(args) > 0) { dim = as.numeric(args[1]) seeds = as.numeric(args[2]) num = di...
/P2/P2_C.r
no_license
dagoquevedo/parallelr
R
false
false
2,595
r
#Project : Cellular automaton - crystallization 2 #Author : Dago Quevedo #Date : Aug 2017 library(parallel) library(sna) unlink("P2_C*.png") unlink("P2_C*.gif") args = commandArgs(trailingOnly = TRUE) if (length(args) > 0) { dim = as.numeric(args[1]) seeds = as.numeric(args[2]) num = di...
VCOV.calc <- function(object){ P<-length(object$Beta) L<-length(object$gl) N<-nrow(object$sdata) hess<-99 if(prod(object$gl>0)==1){ try1<-try(solve(-object$Hessian),silent=TRUE) if(!is.character(try1) & prod(is.finite(try1))==1){ vcov.bg<-try1[1:P,1:P] hess<-0 }else{ try2<-try(qr.s...
/R/VCOV.calc.R
no_license
cran/ICGOR
R
false
false
1,176
r
VCOV.calc <- function(object){ P<-length(object$Beta) L<-length(object$gl) N<-nrow(object$sdata) hess<-99 if(prod(object$gl>0)==1){ try1<-try(solve(-object$Hessian),silent=TRUE) if(!is.character(try1) & prod(is.finite(try1))==1){ vcov.bg<-try1[1:P,1:P] hess<-0 }else{ try2<-try(qr.s...
glimpse(studentData.clean) averagemark.per.year.by.course <- studentData.clean %>% filter(CAMPUSPOSTCODE == 'W1B 2HW') %>% group_by(NEWCOURSETITLE, YEAR) %>% summarise(average_mark = mean(AVERAGEMODULEMARK)) %>% arrange(YEAR) #Make plot averagemark.per.year.by.course.plot <- ggplot(averagemark.per.year.by...
/Analysis/13_averagemark_per_year_per_course_regent_campus.R
no_license
evisat/rdata-6COSC006W
R
false
false
1,069
r
glimpse(studentData.clean) averagemark.per.year.by.course <- studentData.clean %>% filter(CAMPUSPOSTCODE == 'W1B 2HW') %>% group_by(NEWCOURSETITLE, YEAR) %>% summarise(average_mark = mean(AVERAGEMODULEMARK)) %>% arrange(YEAR) #Make plot averagemark.per.year.by.course.plot <- ggplot(averagemark.per.year.by...
.onAttach <- function(libname, pkgname) { packageStartupMessage("The Singularity Package is now available") } .onLoad <- function(libname, pkgname) { op <- options() # TODO: Load the default options from the default config op.singularity <- list( singularity.path = '' ) toset <- !(names(op.singulari...
/R/zzz.R
no_license
kmchugh/com.icatalyst.singularity.r
R
false
false
416
r
.onAttach <- function(libname, pkgname) { packageStartupMessage("The Singularity Package is now available") } .onLoad <- function(libname, pkgname) { op <- options() # TODO: Load the default options from the default config op.singularity <- list( singularity.path = '' ) toset <- !(names(op.singulari...
ggplot(data = diamonds) + geom_bar(mapping = aes(x=cut)) ggplot(data=diamonds) + stat_count(mapping = aes(x = cut)) demo_table = tribble( ~cut, ~freq, 'Fair', 1610, 'Good', 4906, 'Very Good', 12082, 'Premium', 13791, 'Ideal', 21551 ) cut = c('Fair...
/LearnGGPLOT2.R
no_license
niyi28/DataoldTotest
R
false
false
668
r
ggplot(data = diamonds) + geom_bar(mapping = aes(x=cut)) ggplot(data=diamonds) + stat_count(mapping = aes(x = cut)) demo_table = tribble( ~cut, ~freq, 'Fair', 1610, 'Good', 4906, 'Very Good', 12082, 'Premium', 13791, 'Ideal', 21551 ) cut = c('Fair...
# Name: MariaFastqc.R # Auth: umar.niazi@kcl.ac.uk # Date: 19/5/2020 # Desc: fastqc for some files library(downloader) url = 'https://raw.githubusercontent.com/uhkniazi/CFastqQuality/experimental/CFastqQuality.R' download(url, 'CFastqQuality.R') # load the required packages source('CFastqQuality.R') # delete the file...
/MariaFastqc.R
permissive
uhkniazi/Scratch
R
false
false
4,333
r
# Name: MariaFastqc.R # Auth: umar.niazi@kcl.ac.uk # Date: 19/5/2020 # Desc: fastqc for some files library(downloader) url = 'https://raw.githubusercontent.com/uhkniazi/CFastqQuality/experimental/CFastqQuality.R' download(url, 'CFastqQuality.R') # load the required packages source('CFastqQuality.R') # delete the file...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/selection.R \name{cv_wz_bal} \alias{cv_wz_bal} \title{Cross validation for l2_entropy regularized synthetic controls Take bootstrap samples over the controls and evaluate balance Modified version of Wang & Zubizaretta (2018)} \usage{ cv_wz_ba...
/man/cv_wz_bal.Rd
no_license
ebenmichael/ents
R
false
true
1,440
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/selection.R \name{cv_wz_bal} \alias{cv_wz_bal} \title{Cross validation for l2_entropy regularized synthetic controls Take bootstrap samples over the controls and evaluate balance Modified version of Wang & Zubizaretta (2018)} \usage{ cv_wz_ba...
##' Calculation of posterior model probability for each gene in multivariate analysis using BMAseq approach ##' ##' Calculation of posterior model probability for each gene in multivariate analysis on RNA-seq count data using BMAseq approach ##' @title BMAseq.multi.postprob ##' @param dat.expr.counts RNA-seq count data...
/R/BMAseq.multi.postprob.Laplace.R
no_license
LingsongMeng/BMAseq
R
false
false
3,953
r
##' Calculation of posterior model probability for each gene in multivariate analysis using BMAseq approach ##' ##' Calculation of posterior model probability for each gene in multivariate analysis on RNA-seq count data using BMAseq approach ##' @title BMAseq.multi.postprob ##' @param dat.expr.counts RNA-seq count data...
library(tidyverse) wwc_outcomes <- read_csv( "https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-07-09/wwc_outcomes.csv" ) squads <- read_csv( "https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-07-09/squads.csv" ) codes <- read_csv( "https://ra...
/2019-07-09_womens-world-cup-results/01-get-data.R
permissive
jmcastagnetto/tidytuesday-kludges
R
false
false
622
r
library(tidyverse) wwc_outcomes <- read_csv( "https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-07-09/wwc_outcomes.csv" ) squads <- read_csv( "https://raw.githubusercontent.com/rfordatascience/tidytuesday/master/data/2019/2019-07-09/squads.csv" ) codes <- read_csv( "https://ra...
\name{getdiff.massvector} \alias{getdiff.massvector} \title{ Massdifferences} \description{ Computes mass differences in the object. } \usage{\method{getdiff}{massvector}(object,range=c(0,100),...)} \arguments{ \item{...}{} \item{object}{ massvector} \item{range}{} } \details{ Removes one of the masses contri...
/man/getdiff.massvector.Rd
no_license
cran/mscalib
R
false
false
712
rd
\name{getdiff.massvector} \alias{getdiff.massvector} \title{ Massdifferences} \description{ Computes mass differences in the object. } \usage{\method{getdiff}{massvector}(object,range=c(0,100),...)} \arguments{ \item{...}{} \item{object}{ massvector} \item{range}{} } \details{ Removes one of the masses contri...
year <- 2006:2011 ##p <- numeric(length(year)) pp <- matrix(NA,nrow=length(year),ncol=17) pct.corr <- function(X){sum(diag(prop.table(table(X[,1],X[,2]))))} for (j in 1:length(year)) { nfl.par <- setDefaultPar(year[j]) nfl <- formatData() Y <- matrix(nfl$y,ncol=2,byrow=TRUE) P <- matrix(NA,nrow=nrow(Y...
/model-dev/check-yearly-pred.R
no_license
sportModel/nfl
R
false
false
1,056
r
year <- 2006:2011 ##p <- numeric(length(year)) pp <- matrix(NA,nrow=length(year),ncol=17) pct.corr <- function(X){sum(diag(prop.table(table(X[,1],X[,2]))))} for (j in 1:length(year)) { nfl.par <- setDefaultPar(year[j]) nfl <- formatData() Y <- matrix(nfl$y,ncol=2,byrow=TRUE) P <- matrix(NA,nrow=nrow(Y...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TwoStageDesign.R, R/OneStageDesign.R \docType{methods} \name{c2} \alias{c2} \alias{c2,TwoStageDesign,numeric-method} \alias{c2,OneStageDesign,numeric-method} \title{Query critical values of a design} \usage{ c2(d, x1, ...) \S4method{c2}{TwoS...
/man/critical-values.Rd
permissive
mjg211/adoptr
R
false
true
1,195
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/TwoStageDesign.R, R/OneStageDesign.R \docType{methods} \name{c2} \alias{c2} \alias{c2,TwoStageDesign,numeric-method} \alias{c2,OneStageDesign,numeric-method} \title{Query critical values of a design} \usage{ c2(d, x1, ...) \S4method{c2}{TwoS...
#' @title Matrix X #' #' @description Function to obtain a matrix containing trait-weighted species composition. #' For more details, see \code{\link{syncsa}}. #' #' @encoding UTF-8 #' @importFrom vegan vegdist #' @importFrom FD gowdis #' @param comm Community data, with species as columns and sampling units as #' rows...
/R/matrix.x.R
no_license
nicolaycunha/SYNCSA
R
false
false
4,573
r
#' @title Matrix X #' #' @description Function to obtain a matrix containing trait-weighted species composition. #' For more details, see \code{\link{syncsa}}. #' #' @encoding UTF-8 #' @importFrom vegan vegdist #' @importFrom FD gowdis #' @param comm Community data, with species as columns and sampling units as #' rows...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classroom_objects.R \name{gc_list_student_submissions_response} \alias{gc_list_student_submissions_response} \title{ListStudentSubmissionsResponse Object} \usage{ gc_list_student_submissions_response( studentSubmissions = NULL, nextPageTo...
/man/gc_list_student_submissions_response.Rd
no_license
curso-r/googleclassroom
R
false
true
698
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classroom_objects.R \name{gc_list_student_submissions_response} \alias{gc_list_student_submissions_response} \title{ListStudentSubmissionsResponse Object} \usage{ gc_list_student_submissions_response( studentSubmissions = NULL, nextPageTo...
testlist <- list(type = 54741L, z = 2.28752394024497e-321) result <- do.call(esreg::G1_fun,testlist) str(result)
/esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609893415-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
112
r
testlist <- list(type = 54741L, z = 2.28752394024497e-321) result <- do.call(esreg::G1_fun,testlist) str(result)
## File Name: SRM_PARTABLE_DYAD.R ## File Version: 0.16 SRM_PARTABLE_DYAD <- function(PARLIST = NULL, as.a.data.frame=TRUE, ngroups = 1L) { ## here for-loop for groups? ## call SRM_PARTABLE_FLAT to add default elements LIST <- SRM_PARTABLE_F...
/R/SRM_PARTABLE_DYAD.R
no_license
alexanderrobitzsch/srm
R
false
false
1,783
r
## File Name: SRM_PARTABLE_DYAD.R ## File Version: 0.16 SRM_PARTABLE_DYAD <- function(PARLIST = NULL, as.a.data.frame=TRUE, ngroups = 1L) { ## here for-loop for groups? ## call SRM_PARTABLE_FLAT to add default elements LIST <- SRM_PARTABLE_F...
######################## c("CPX-1027", "CPX-1032", "CPX-104", "CPX-1063", "CPX-1064", "CPX-1066", "CPX-114", "CPX-1147", "CPX-1159", "CPX-1163", "CPX-1164", "CPX-117", "CPX-1194", "CPX-1195", "CPX-1196", "CPX-1199", "CPX-1201", "CPX-1202", "CPX-1203", "CPX-1204", "CPX-1207", "CPX-1209", "CPX-1212", "CPX-1216", "CPX-12...
/prot_comp_extra_results.R
no_license
rajinder4489/protein_complexes
R
false
false
3,115
r
######################## c("CPX-1027", "CPX-1032", "CPX-104", "CPX-1063", "CPX-1064", "CPX-1066", "CPX-114", "CPX-1147", "CPX-1159", "CPX-1163", "CPX-1164", "CPX-117", "CPX-1194", "CPX-1195", "CPX-1196", "CPX-1199", "CPX-1201", "CPX-1202", "CPX-1203", "CPX-1204", "CPX-1207", "CPX-1209", "CPX-1212", "CPX-1216", "CPX-12...
source("Estado.R") Caminho <- function(desc=NULL, pai=NULL, cidades=NULL, heuristicas=NULL){ e <- environment() assign("desc", desc, envir = e) assign("pai", pai, envir = e) assign("cidades", cidades, envir = e) assign("heuristicas", heuristicas, envir = e) assign("g", 0, envir = e) assign("h", Inf, envi...
/Cidades.R
no_license
joaopedrosgs/basicAI_Search
R
false
false
1,593
r
source("Estado.R") Caminho <- function(desc=NULL, pai=NULL, cidades=NULL, heuristicas=NULL){ e <- environment() assign("desc", desc, envir = e) assign("pai", pai, envir = e) assign("cidades", cidades, envir = e) assign("heuristicas", heuristicas, envir = e) assign("g", 0, envir = e) assign("h", Inf, envi...
if("glmnet" %in% rownames(installed.packages()) == FALSE) {install.packages("glmnet")} if("pls" %in% rownames(installed.packages()) == FALSE) {install.packages("pls")} if("randomForest" %in% rownames(installed.packages()) == FALSE) {install.packages("randomForest")} if("ncdf4" %in% rownames(installed.packages()) == FA...
/ClimIndRec1.0.r
no_license
SimMiche/ClimIndRec
R
false
false
34,462
r
if("glmnet" %in% rownames(installed.packages()) == FALSE) {install.packages("glmnet")} if("pls" %in% rownames(installed.packages()) == FALSE) {install.packages("pls")} if("randomForest" %in% rownames(installed.packages()) == FALSE) {install.packages("randomForest")} if("ncdf4" %in% rownames(installed.packages()) == FA...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rfsrc_cache_datasets.R \name{rfsrc_cache_datasets} \alias{rfsrc_cache_datasets} \title{Recreate the cached data sets for the ggRandomForests package} \usage{ rfsrc_cache_datasets(set = NA, save = TRUE, pth, ...) } \arguments{ \item{set}{Defau...
/Methodology/Survival Model Research/ggRandomForests/ggRandomForests-master/man/rfsrc_cache_datasets.Rd
no_license
ryerex/Research_and_Methods
R
false
true
2,804
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rfsrc_cache_datasets.R \name{rfsrc_cache_datasets} \alias{rfsrc_cache_datasets} \title{Recreate the cached data sets for the ggRandomForests package} \usage{ rfsrc_cache_datasets(set = NA, save = TRUE, pth, ...) } \arguments{ \item{set}{Defau...
# COVID-19 Canada Open Data Working Group Official Dataset Download and Compatibility Script # # Author: Jean-Paul R. Soucy # # Download official COVID-19 datasets and convert them to a compatible format. # This will allow these datasets to be used as drop-in replacements # for portions of COVID-19 Canada Open Data Wo...
/scripts/update_official_data.R
permissive
ccodwg/Covid19Canada
R
false
false
1,642
r
# COVID-19 Canada Open Data Working Group Official Dataset Download and Compatibility Script # # Author: Jean-Paul R. Soucy # # Download official COVID-19 datasets and convert them to a compatible format. # This will allow these datasets to be used as drop-in replacements # for portions of COVID-19 Canada Open Data Wo...
library(tidyverse) demsup <- read_csv("https://github.com/fsolt/DCPOtools/raw/master/inst/extdata/all_data_demsupport.csv") dcpo_data <- demsup %>% DCPOtools::with_min_yrs(3) %>% group_by(country, year, item) %>% mutate(samp_prop = n/sum(n)) %>% ungroup() dgirt_demsup_kfold <- purrr::map_df(1:10, ...
/R/dgirt_kfold_xvt.R
no_license
fsolt/dcpo_article
R
false
false
4,302
r
library(tidyverse) demsup <- read_csv("https://github.com/fsolt/DCPOtools/raw/master/inst/extdata/all_data_demsupport.csv") dcpo_data <- demsup %>% DCPOtools::with_min_yrs(3) %>% group_by(country, year, item) %>% mutate(samp_prop = n/sum(n)) %>% ungroup() dgirt_demsup_kfold <- purrr::map_df(1:10, ...
#Set our working directory. #This helps avoid confusion if our working directory is #not our site because of other projects we were #working on at the time. setwd("/Users/Kanchanah/Documents/Site/personal_site") #render your sweet site. rmarkdown::render_site()
/build_site.R
no_license
Kanchanah/personal_site
R
false
false
269
r
#Set our working directory. #This helps avoid confusion if our working directory is #not our site because of other projects we were #working on at the time. setwd("/Users/Kanchanah/Documents/Site/personal_site") #render your sweet site. rmarkdown::render_site()
power<-read.csv("household_power_consumption.txt",sep = ';', na.strings='?') #subset to get the two days 2007-02-01 and 2007-02-02 pow.sub<-power[power$Date %in% c("1/2/2007","2/2/2007"),] # convert the date and time strings to a datetime datetime<-do.call(paste, c(pow.sub[c("Date", "Time")])) datetime<-strpti...
/plot4.R
no_license
flippuppet/ExData_Plotting1
R
false
false
1,260
r
power<-read.csv("household_power_consumption.txt",sep = ';', na.strings='?') #subset to get the two days 2007-02-01 and 2007-02-02 pow.sub<-power[power$Date %in% c("1/2/2007","2/2/2007"),] # convert the date and time strings to a datetime datetime<-do.call(paste, c(pow.sub[c("Date", "Time")])) datetime<-strpti...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/markedPP_funcs.R \name{plot_markedpp} \alias{plot_markedpp} \title{Plot single pair of event series with cumulative counts.} \usage{ plot_markedpp(x, W, c = 1, lbl = c("Mark 1", "Mark 2"), title = "", xlab = "Time") } \arguments{ \item{x}{D...
/man/plot_markedpp.Rd
no_license
UCIDataLab/assocr
R
false
true
856
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/markedPP_funcs.R \name{plot_markedpp} \alias{plot_markedpp} \title{Plot single pair of event series with cumulative counts.} \usage{ plot_markedpp(x, W, c = 1, lbl = c("Mark 1", "Mark 2"), title = "", xlab = "Time") } \arguments{ \item{x}{D...
#Ce script contient toutes les fonctions créées et utilisées au sein du projet rm(list=ls()) #Erreur quadratique moyenne EQM<-function(serie, prediction){ return(sum((serie - prediction)^2)/length(serie)) } #Construction de la matrice A et calcul des valeurs propres pour un modèle du package vars stability...
/Script/functions.R
no_license
JulesCorbel/PFE_Time_Series
R
false
false
3,702
r
#Ce script contient toutes les fonctions créées et utilisées au sein du projet rm(list=ls()) #Erreur quadratique moyenne EQM<-function(serie, prediction){ return(sum((serie - prediction)^2)/length(serie)) } #Construction de la matrice A et calcul des valeurs propres pour un modèle du package vars stability...
library(solvebio) ### Name: DatasetExport.all ### Title: DatasetExport.all ### Aliases: DatasetExport.all ### ** Examples ## Not run: ##D DatasetExport.all() ## End(Not run)
/data/genthat_extracted_code/solvebio/examples/DatasetExport.all.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
183
r
library(solvebio) ### Name: DatasetExport.all ### Title: DatasetExport.all ### Aliases: DatasetExport.all ### ** Examples ## Not run: ##D DatasetExport.all() ## End(Not run)
library(sqldf) consumption <- read.csv.sql('household_power_consumption.txt', sql="select * from file where Date == '1/2/2007' or Date == '2/2/2007'", header=TRUE,stringsAsFactors = FALSE,sep=';') Date <- as.Date(consumption$Date, "%e/%m/%Y") DateTime <- as.P...
/My_Plot/plot3.R
no_license
Eva70732/ExplData-Analysis_Project1
R
false
false
989
r
library(sqldf) consumption <- read.csv.sql('household_power_consumption.txt', sql="select * from file where Date == '1/2/2007' or Date == '2/2/2007'", header=TRUE,stringsAsFactors = FALSE,sep=';') Date <- as.Date(consumption$Date, "%e/%m/%Y") DateTime <- as.P...
## ## Elliott, Rothenberg and Stock-Test ## ur.ers <- function(y, type=c("DF-GLS", "P-test"), model=c("constant", "trend"), lag.max=4){ type <- match.arg(type) model <- match.arg(model) lag.max <- as.integer(lag.max) if(lag.max < 0){ warning("\nlag.max bust be greater or equal to one and integer; se...
/R/ur-ers.R
no_license
cran/urca
R
false
false
4,269
r
## ## Elliott, Rothenberg and Stock-Test ## ur.ers <- function(y, type=c("DF-GLS", "P-test"), model=c("constant", "trend"), lag.max=4){ type <- match.arg(type) model <- match.arg(model) lag.max <- as.integer(lag.max) if(lag.max < 0){ warning("\nlag.max bust be greater or equal to one and integer; se...
\encoding{UTF-8} \name{renomme.variable} \alias{renomme.variable} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Renomme une colonne d'un tableau de données } \description{ Renomme une colonne (variable) d'un tableau de données } \usage{ renomme.variable(df, old, new) } %- maybe also 'usage' fo...
/man/renomme.variable.Rd
no_license
joelgombin/rgrs
R
false
false
835
rd
\encoding{UTF-8} \name{renomme.variable} \alias{renomme.variable} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Renomme une colonne d'un tableau de données } \description{ Renomme une colonne (variable) d'un tableau de données } \usage{ renomme.variable(df, old, new) } %- maybe also 'usage' fo...
# install tidyverse package for working with data # version 1.3.1 #install.packages("tidyverse") # install pdftools package for scraping PDF # version 2.3.1 #install.packages("pdftools") # load tidyverse library library(tidyverse) # load pdftools library library(pdftools) # extract pdf text using pdf_text function ...
/script/prep/cnlbr_prep.R
no_license
hodgettsp/nlmlb
R
false
false
6,418
r
# install tidyverse package for working with data # version 1.3.1 #install.packages("tidyverse") # install pdftools package for scraping PDF # version 2.3.1 #install.packages("pdftools") # load tidyverse library library(tidyverse) # load pdftools library library(pdftools) # extract pdf text using pdf_text function ...
test_that("get_movie() returns a list", { test_movie <- get_movie("frozen") expect_is(test_movie, "list") }) test_that("Movie not found results in error", { test_movie <- get_movie("fdkjfhsdkvo") expect_identical(test_movie, "Movie not found. Please try again...") }) test_that("Empty movie name passed", { test_m...
/tests/testthat/test_get_movie.r
no_license
sho-87/Romdb
R
false
false
471
r
test_that("get_movie() returns a list", { test_movie <- get_movie("frozen") expect_is(test_movie, "list") }) test_that("Movie not found results in error", { test_movie <- get_movie("fdkjfhsdkvo") expect_identical(test_movie, "Movie not found. Please try again...") }) test_that("Empty movie name passed", { test_m...
library(RWeka) library(R.utils) library(data.table) #' create an Ngram tokenizer, that uses \code{RWeka::NGramTokenizer} to split a #' text in ngrams #' @param ng, an integer, indicates length of the ngrams, i.e., for ng = 2, the #' text will be splitted in bigrams, for ng = 3, in trigrams, etc. #' @return a function ...
/model/ngrams.R
no_license
abdullahalbyati/text-prediction-R
R
false
false
5,577
r
library(RWeka) library(R.utils) library(data.table) #' create an Ngram tokenizer, that uses \code{RWeka::NGramTokenizer} to split a #' text in ngrams #' @param ng, an integer, indicates length of the ngrams, i.e., for ng = 2, the #' text will be splitted in bigrams, for ng = 3, in trigrams, etc. #' @return a function ...
# KfirstNearestNeighbor.R # Class Example for K-Nearest Neighbor # # Author: PatriciaHoffman ############################################################################### rm(list=ls()) #install.packages("class") library(class) library(e1071) #setwd("C:/Users/PatriciaHoffman/workspaceR/TestDataSets") STrai...
/week5_knn_NaiveB/kNN/KfirstNearestNeighbor.r
no_license
saurabhmadaan/ML_UCSC
R
false
false
1,404
r
# KfirstNearestNeighbor.R # Class Example for K-Nearest Neighbor # # Author: PatriciaHoffman ############################################################################### rm(list=ls()) #install.packages("class") library(class) library(e1071) #setwd("C:/Users/PatriciaHoffman/workspaceR/TestDataSets") STrai...
library(eivtools) ### Name: get_bugs_wishart_scalemat ### Title: Compute a BUGS-compliant scale matrix for a Wishart prior ### distribution for precision matrix that is consistent with target ### variances. ### Aliases: get_bugs_wishart_scalemat ### Keywords: models ### ** Examples ## No test: tmp <- get_bugs_...
/data/genthat_extracted_code/eivtools/examples/get_bugs_wishart_scalemat.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
673
r
library(eivtools) ### Name: get_bugs_wishart_scalemat ### Title: Compute a BUGS-compliant scale matrix for a Wishart prior ### distribution for precision matrix that is consistent with target ### variances. ### Aliases: get_bugs_wishart_scalemat ### Keywords: models ### ** Examples ## No test: tmp <- get_bugs_...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/log-tools.R \name{filename_log} \alias{filename_log} \title{Write filenames to log files} \usage{ filename_log(fl, fp) } \arguments{ \item{fl}{file name, character} \item{fp}{filepath to log file, character} } \description{ Record a filename...
/man/filename_log.Rd
permissive
rheiland/restez
R
false
true
2,441
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/log-tools.R \name{filename_log} \alias{filename_log} \title{Write filenames to log files} \usage{ filename_log(fl, fp) } \arguments{ \item{fl}{file name, character} \item{fp}{filepath to log file, character} } \description{ Record a filename...
# R Test Script # The purpose of this script is to learn how to work in R count <- 0 primes <- c(1, 3, 5, 7, 11) Names <- c("Bob", "Ted", "Carol", "Alice") Truth <- c(TRUE, TRUE) organism <- c("Human", "Chimpanzee", "Yeast") chromosomes <- c(23, 24, 16) multicellular <- c(TRUE, TRUE, FALSE) OrganismTable <- data.fra...
/Basics.R
no_license
cnewton1428/BioinformaticsR
R
false
false
659
r
# R Test Script # The purpose of this script is to learn how to work in R count <- 0 primes <- c(1, 3, 5, 7, 11) Names <- c("Bob", "Ted", "Carol", "Alice") Truth <- c(TRUE, TRUE) organism <- c("Human", "Chimpanzee", "Yeast") chromosomes <- c(23, 24, 16) multicellular <- c(TRUE, TRUE, FALSE) OrganismTable <- data.fra...
library(ggiraph) library(ggplot2) library(maps) us <- map_data("state") gg <- ggplot() gg <- gg + geom_map_interactive(data=us, map=us, aes(long, lat, map_id=region, data_id=region, tooltip = region), color="white", fill = "gray90") gg <- gg + coord_map() + theme_void() shiny...
/inst/shiny/maps/server.R
no_license
vbisrikkanth/ggiraph
R
false
false
889
r
library(ggiraph) library(ggplot2) library(maps) us <- map_data("state") gg <- ggplot() gg <- gg + geom_map_interactive(data=us, map=us, aes(long, lat, map_id=region, data_id=region, tooltip = region), color="white", fill = "gray90") gg <- gg + coord_map() + theme_void() shiny...
#rnorm( ,150, 2) install.packages("ggplot2") install.packages("gcookbook") library(gcookbook) library(ggplot2) cabbage_exp str(cabbage_exp) ggplot(mpg, aes(displ, hwy, colour = class)) + geom_point() #graph <- rnorm(100, 150, 2) #df <- data.frame(graph) #ggplot(df, aes()) + geom_point() plot(graph, dnorm(graph, 150...
/4th Lab/misc.R
no_license
JanamBagdai/DSRlabPrograms
R
false
false
955
r
#rnorm( ,150, 2) install.packages("ggplot2") install.packages("gcookbook") library(gcookbook) library(ggplot2) cabbage_exp str(cabbage_exp) ggplot(mpg, aes(displ, hwy, colour = class)) + geom_point() #graph <- rnorm(100, 150, 2) #df <- data.frame(graph) #ggplot(df, aes()) + geom_point() plot(graph, dnorm(graph, 150...
\name{sort} \alias{sort} \alias{SORT} \alias{SORT,associations-method} \alias{sort,associations-method} \alias{head} \alias{head,associations-method} \alias{tail} \alias{tail,associations-method} \title{Sorting Associations} \description{ Provides the method \code{sort} to sort elements in class \code{\linkS4class{...
/man/sort.Rd
no_license
varshadyavaiah/arules
R
false
false
2,501
rd
\name{sort} \alias{sort} \alias{SORT} \alias{SORT,associations-method} \alias{sort,associations-method} \alias{head} \alias{head,associations-method} \alias{tail} \alias{tail,associations-method} \title{Sorting Associations} \description{ Provides the method \code{sort} to sort elements in class \code{\linkS4class{...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/observations.R \name{prepare_data} \alias{prepare_data} \alias{prepare_data.empirical} \alias{prepare_data.gaussian} \alias{prepare_data.causal} \alias{prepare_data.copula} \alias{prepare_data.ctree} \title{Generate data used for predictions}...
/man/prepare_data.Rd
permissive
igbucur/shapr
R
false
true
2,137
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/observations.R \name{prepare_data} \alias{prepare_data} \alias{prepare_data.empirical} \alias{prepare_data.gaussian} \alias{prepare_data.causal} \alias{prepare_data.copula} \alias{prepare_data.ctree} \title{Generate data used for predictions}...
## Put comments here that give an overall description of what your ## functions do ## This function create metrix makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(inverse) m <<- inverse getinv...
/cachematrix.R
no_license
Shengjie93/ProgrammingAssignment2
R
false
false
744
r
## Put comments here that give an overall description of what your ## functions do ## This function create metrix makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(inverse) m <<- inverse getinv...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/venn.R \name{get_matrix} \alias{get_matrix} \title{Title get_matrix:return a 0/1 matrix dataframe.} \usage{ get_matrix(data_venn, getlogic = FALSE) } \arguments{ \item{data_venn}{dataframe.input the genelist dataframe} \item{getlogic}{TRUE o...
/man/get_matrix.Rd
permissive
chaimol/enrichR
R
false
true
1,115
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/venn.R \name{get_matrix} \alias{get_matrix} \title{Title get_matrix:return a 0/1 matrix dataframe.} \usage{ get_matrix(data_venn, getlogic = FALSE) } \arguments{ \item{data_venn}{dataframe.input the genelist dataframe} \item{getlogic}{TRUE o...
#' Example #' #' @examples #' 1 _ NULL
/tests/testthat/escaping/fail-parsing-3-in.R
permissive
r-lib/styler
R
false
false
39
r
#' Example #' #' @examples #' 1 _ NULL
require(caret) flds <- createFolds(y, k = 10, list = TRUE, returnTrain = FALSE) names(flds)[1] <- "train"
/test.R
no_license
abkw/ML-Lab01
R
false
false
107
r
require(caret) flds <- createFolds(y, k = 10, list = TRUE, returnTrain = FALSE) names(flds)[1] <- "train"
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{btESBL_ecoli_globalst131_tree} \alias{btESBL_ecoli_globalst131_tree} \title{Data: E. coli ST131 global phylogeny} \format{ A "phylo" object ("ape" package) } \usage{ btESBL_ecoli_globalst131_tree } \description{ Mi...
/man/btESBL_ecoli_globalst131_tree.Rd
permissive
joelewis101/blantyreESBL
R
false
true
650
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{btESBL_ecoli_globalst131_tree} \alias{btESBL_ecoli_globalst131_tree} \title{Data: E. coli ST131 global phylogeny} \format{ A "phylo" object ("ape" package) } \usage{ btESBL_ecoli_globalst131_tree } \description{ Mi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/launch_multi.R \name{launch_multi} \alias{launch_multi} \title{Function is to launch the GUI of the package, based on Shiny.} \usage{ launch_multi() } \description{ `launch_multi()` If used on Rstudio the function will launch an interface to ...
/man/launch_multi.Rd
no_license
Pintademijote/multipack
R
false
true
408
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/launch_multi.R \name{launch_multi} \alias{launch_multi} \title{Function is to launch the GUI of the package, based on Shiny.} \usage{ launch_multi() } \description{ `launch_multi()` If used on Rstudio the function will launch an interface to ...
options(warn=-1) library(RLumShiny) shinyUI(fluidPage(theme="newstyle.css", title = "shinyCircos", windowTitle = "interactive creation of Circos plots", tags$head(tags$script(HTML('Shiny.addCustomMessageHandler("jsCode",function(message) {eval(message.value);});'))), titlePanel(HTML('<p>...
/ui.R
no_license
YTLogos/shinyCircos
R
false
false
227,487
r
options(warn=-1) library(RLumShiny) shinyUI(fluidPage(theme="newstyle.css", title = "shinyCircos", windowTitle = "interactive creation of Circos plots", tags$head(tags$script(HTML('Shiny.addCustomMessageHandler("jsCode",function(message) {eval(message.value);});'))), titlePanel(HTML('<p>...
# emg data processing main code for one subject file subj_strg <- readline(prompt = "Type subject number: ") library(foreach) library(doParallel) library(matrixStats) # for summary statistics in matrices library(tcltk) # for choosing multiple files print("Choose all reference/calibration activities") flist <- tk_choo...
/emg.main.R
permissive
ornwipa/exoskeleton
R
false
false
4,175
r
# emg data processing main code for one subject file subj_strg <- readline(prompt = "Type subject number: ") library(foreach) library(doParallel) library(matrixStats) # for summary statistics in matrices library(tcltk) # for choosing multiple files print("Choose all reference/calibration activities") flist <- tk_choo...
# Statistical analysis on protein SRM abundance data. # In this analysis, I will assume protein abundances are independent of each other. # View summary statistics of peptide abundances (not including 0 values where NA) summary(data.melted.plus.pepsum$Area[data.melted.plus.pepsum$Area>0]) # Calculate protein abundan...
/analyses/SRM/Stats1.R
no_license
RobertsLab/Paper-DNR-Geoduck-Proteomics
R
false
false
22,785
r
# Statistical analysis on protein SRM abundance data. # In this analysis, I will assume protein abundances are independent of each other. # View summary statistics of peptide abundances (not including 0 values where NA) summary(data.melted.plus.pepsum$Area[data.melted.plus.pepsum$Area>0]) # Calculate protein abundan...
7914ab3860348ac5c166a4a9949e508a ctrl.e#1.a#3.E#124.A#48.c#.w#9.s#42.asp.qdimacs 9099 26782
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1+A1/Database/Amendola-Ricca-Truszczynski/selection-hard/ctrl.e#1.a#3.E#124.A#48.c#.w#9.s#42.asp/ctrl.e#1.a#3.E#124.A#48.c#.w#9.s#42.asp.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
91
r
7914ab3860348ac5c166a4a9949e508a ctrl.e#1.a#3.E#124.A#48.c#.w#9.s#42.asp.qdimacs 9099 26782
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/extractSaveData.R \name{getSavedata_Fileinfo} \alias{getSavedata_Fileinfo} \title{Read Variable Names, Formats, and Widths from data generated by the SAVEDATA Command} \usage{ getSavedata_Fileinfo(outfile) } \arguments{ \item{outfile}{require...
/man/getSavedata_Fileinfo.Rd
no_license
dougtommet/MplusAutomation
R
false
true
1,965
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/extractSaveData.R \name{getSavedata_Fileinfo} \alias{getSavedata_Fileinfo} \title{Read Variable Names, Formats, and Widths from data generated by the SAVEDATA Command} \usage{ getSavedata_Fileinfo(outfile) } \arguments{ \item{outfile}{require...
suppressPackageStartupMessages(library(dplyr)) suppressPackageStartupMessages(library(singscore)) singscorePipeline <- function( df, sig_feature_list, num_permutations, permute = TRUE ) { # Rank the features per sample rank_df <- getRankData(df = df) # Get the scores simple_score_df <- applySimpleScore( ...
/3.resistance-signature/utils/singscore_utils.R
permissive
broadinstitute/profiling-resistance-mechanisms
R
false
false
2,321
r
suppressPackageStartupMessages(library(dplyr)) suppressPackageStartupMessages(library(singscore)) singscorePipeline <- function( df, sig_feature_list, num_permutations, permute = TRUE ) { # Rank the features per sample rank_df <- getRankData(df = df) # Get the scores simple_score_df <- applySimpleScore( ...
#' Scaling Numeric Data to a Specific Range #' #' `step_range` creates a *specification* of a recipe #' step that will normalize numeric data to be within a pre-defined #' range of values. #' #' @inheritParams step_center #' @param min A single numeric value for the smallest value in the #' range. #' @param max A si...
/R/range.R
permissive
JaeDukSeo/recipes
R
false
false
4,003
r
#' Scaling Numeric Data to a Specific Range #' #' `step_range` creates a *specification* of a recipe #' step that will normalize numeric data to be within a pre-defined #' range of values. #' #' @inheritParams step_center #' @param min A single numeric value for the smallest value in the #' range. #' @param max A si...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/broom.R \name{tidy} \alias{tidy} \title{Turn a model object into a tidy tibble} \usage{ tidy(x, ...) } \arguments{ \item{x}{An object to be converted into a tidy \code{\link[tibble:tibble]{tibble::tibble()}}.} \item{...}{Additional arguments...
/man/tidy.Rd
no_license
sjewo/broom
R
false
true
497
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/broom.R \name{tidy} \alias{tidy} \title{Turn a model object into a tidy tibble} \usage{ tidy(x, ...) } \arguments{ \item{x}{An object to be converted into a tidy \code{\link[tibble:tibble]{tibble::tibble()}}.} \item{...}{Additional arguments...
##Across the United States, how have emissions from coal ##combustion-related sources changed from 1999–2008? library(ggplot2) library(RColorBrewer) ##Goal: PM 2.5 Coal Emission vs Year graph based on Type ##Load the data NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Sourcelassification_Code.rds") ##Subset...
/plot4.R
no_license
Yash-Dahale/PM-2.5-Emmision-Data
R
false
false
1,265
r
##Across the United States, how have emissions from coal ##combustion-related sources changed from 1999–2008? library(ggplot2) library(RColorBrewer) ##Goal: PM 2.5 Coal Emission vs Year graph based on Type ##Load the data NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Sourcelassification_Code.rds") ##Subset...
library(shiny) library(ggplot2) shinyUI(fluidPage( titlePanel(title = "Yelp Review Count density to Stars given"), sidebarLayout( sidebarPanel( sliderInput("slide", "Select the value on the slider", min = 1, max = 5, value = 1, step = 0.5), numericInput("xmin", "Select the Mini...
/InteractivePlots/YelpPlots/UI.R
no_license
ghostiek/PlotArchives
R
false
false
553
r
library(shiny) library(ggplot2) shinyUI(fluidPage( titlePanel(title = "Yelp Review Count density to Stars given"), sidebarLayout( sidebarPanel( sliderInput("slide", "Select the value on the slider", min = 1, max = 5, value = 1, step = 0.5), numericInput("xmin", "Select the Mini...
getElem.LexisSource<-function(x) list(content = x$content[[x$position]])
/R/getElem.LexisSource.R
no_license
sjkiss/tm.lexis.canada
R
false
false
73
r
getElem.LexisSource<-function(x) list(content = x$content[[x$position]])
library(caret) library(rattle) library(rpart) library(rpart.plot) library(randomForest) data(iris) table(iris$Species) inTrain<-createDataPartition(y=iris$Species,p=0.7,list=F) training<-iris[inTrain,] testing<-iris[-inTrain,] dim(training) dim(testing) #********************************************************** #pr...
/Iris.R
no_license
lotesky/Coursera
R
false
false
2,344
r
library(caret) library(rattle) library(rpart) library(rpart.plot) library(randomForest) data(iris) table(iris$Species) inTrain<-createDataPartition(y=iris$Species,p=0.7,list=F) training<-iris[inTrain,] testing<-iris[-inTrain,] dim(training) dim(testing) #********************************************************** #pr...
### XBox Chat data ### Data comes from Marcus Collins' scope script from .ss structured stream called ChatSessionUnified in Cosmos # These library permit use of heteroskedastic robust standard errors library(lmtest) library(sandwich) # These are useful for working with strings below library(tidyverse) library(stringr...
/R code/SMCChat_V4.1_DOW_FE_falsification
no_license
MikeWise2718/TorontoEffect
R
false
false
26,364
### XBox Chat data ### Data comes from Marcus Collins' scope script from .ss structured stream called ChatSessionUnified in Cosmos # These library permit use of heteroskedastic robust standard errors library(lmtest) library(sandwich) # These are useful for working with strings below library(tidyverse) library(stringr...
run_analysis<-function(){ #1 Merges the training and the test sets to create one data set. #2 Extracts only the measurements on the mean and standard deviation for each measurement. #3 Uses descriptive activity names to name the activities in the data set #4 Appropriately labels the data set with descriptive...
/run_analysis.R
no_license
forrestcheung/getting_and_cleaning_data
R
false
false
4,525
r
run_analysis<-function(){ #1 Merges the training and the test sets to create one data set. #2 Extracts only the measurements on the mean and standard deviation for each measurement. #3 Uses descriptive activity names to name the activities in the data set #4 Appropriately labels the data set with descriptive...
#!/bin/Rscript #A<-sample(0:100000000,10,replace=FALSE,prob=NULL) #B<-sample(1:100000000,10,replace=FALSE,prob=NULL) #i=1 #while(i<=10){ #f<-stringi::stri_join(as.character(A[i]),"/",as.character(B[i])) #given f="a/b" # parse F to get a and b separately #find out if we reduce fractions. assuming not we continue a<-...
/normalization/fractionwords.R
no_license
georgercarder/Kaggle-Text-Normalization-Challenge--English-version-finalsubmission
R
false
false
971
r
#!/bin/Rscript #A<-sample(0:100000000,10,replace=FALSE,prob=NULL) #B<-sample(1:100000000,10,replace=FALSE,prob=NULL) #i=1 #while(i<=10){ #f<-stringi::stri_join(as.character(A[i]),"/",as.character(B[i])) #given f="a/b" # parse F to get a and b separately #find out if we reduce fractions. assuming not we continue a<-...
# selfToPar = function(parNames){ #check if variable names exist # parNome = c() parValues = c() for(pn in parNames){ eval(parse( text=sprintf("parValues=c(parValues,self$%s)", pn) )) l = eval(parse( text=sprintf("length(self$%s)", pn) )) ...
/nick/toolbox/ddModel/parSelfParFunk.r
no_license
gasduster99/theses
R
false
false
1,629
r
# selfToPar = function(parNames){ #check if variable names exist # parNome = c() parValues = c() for(pn in parNames){ eval(parse( text=sprintf("parValues=c(parValues,self$%s)", pn) )) l = eval(parse( text=sprintf("length(self$%s)", pn) )) ...
############################################################################## # title : Nonsystemic_disease_maps.R; # purpose : Map nonsystemic disease data from PRISM; # producer : prepared by A. Sparks; # last update : in Los Baños, PHL, Nov. 2014; # inputs : Aggregated PRISM data; # outp...
/National Map Scripts/Nonsystemic_disease_maps.R
no_license
prabinrs/PRISM-Crop-Health-Data-Filter-and-Visualize
R
false
false
10,109
r
############################################################################## # title : Nonsystemic_disease_maps.R; # purpose : Map nonsystemic disease data from PRISM; # producer : prepared by A. Sparks; # last update : in Los Baños, PHL, Nov. 2014; # inputs : Aggregated PRISM data; # outp...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/write_apt.R \name{write_apt} \alias{write_apt} \title{Write a list of apt packages} \usage{ write_apt(path = ".", apt_input = NULL) } \arguments{ \item{path}{Path to project} \item{apt_input}{A list of Debian packages that should be installe...
/man/write_apt.Rd
permissive
ajstewartlang/holepunch
R
false
true
711
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/write_apt.R \name{write_apt} \alias{write_apt} \title{Write a list of apt packages} \usage{ write_apt(path = ".", apt_input = NULL) } \arguments{ \item{path}{Path to project} \item{apt_input}{A list of Debian packages that should be installe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MutationTime.R \name{getSubclonalArchitecture} \alias{getSubclonalArchitecture} \title{Get sample subclonal architecture from VCF metadata} \usage{ getSubclonalArchitecture(vcf) } \arguments{ \item{VCF}{object to query} } \value{ A data.frame...
/man/getSubclonalArchitecture.Rd
no_license
PerHapsH/MutationTimeR
R
false
true
501
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MutationTime.R \name{getSubclonalArchitecture} \alias{getSubclonalArchitecture} \title{Get sample subclonal architecture from VCF metadata} \usage{ getSubclonalArchitecture(vcf) } \arguments{ \item{VCF}{object to query} } \value{ A data.frame...
#' The application server-side #' #' @param input,output,session Internal parameters for {shiny}. #' DO NOT REMOVE. #' @import shiny #' @import shinydashboard #' @importFrom dplyr %>% #' @importFrom purrr lift_dl app_server <- function(input, output, session) { params <- lift_dl(reactiveValues)(params) # Model...
/R/app_server.R
permissive
aarong1/723_mh_covid_surge_modelling
R
false
false
1,228
r
#' The application server-side #' #' @param input,output,session Internal parameters for {shiny}. #' DO NOT REMOVE. #' @import shiny #' @import shinydashboard #' @importFrom dplyr %>% #' @importFrom purrr lift_dl app_server <- function(input, output, session) { params <- lift_dl(reactiveValues)(params) # Model...
#CREATE ADULT CLEAN ANALYSIS READY DATA---------------------------------------- # This script will clean the raw benthic REA data using method E that comes directly from the new data base application. # The data has gone with the benthic QA/QC, but hasn't gone through data managment's QC steps. rm(list=ls()) #LOAD LI...
/NCRMP/REA_CoralDemography/Draft Summaries from Mission App/AS-NCRMP 2018/ASRAMP2018_Coral Demography_CalcWD_BSR_.R
no_license
benthic-crep/Benthic-Scripts
R
false
false
23,033
r
#CREATE ADULT CLEAN ANALYSIS READY DATA---------------------------------------- # This script will clean the raw benthic REA data using method E that comes directly from the new data base application. # The data has gone with the benthic QA/QC, but hasn't gone through data managment's QC steps. rm(list=ls()) #LOAD LI...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{fun.maxna} \alias{fun.maxna} \title{Calculate statistics with maximum amount of NA values specified} \usage{ fun.maxna(x, fun, maxna) } \description{ A wrapper statistics functions that returns NA when there are more than ma...
/man/fun.maxna.Rd
no_license
laurimyllyvirta/lauR
R
false
true
407
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{fun.maxna} \alias{fun.maxna} \title{Calculate statistics with maximum amount of NA values specified} \usage{ fun.maxna(x, fun, maxna) } \description{ A wrapper statistics functions that returns NA when there are more than ma...
library(readr) library(wavelets) library(data.table) library(signal) setwd("C:/Users/mario/Desktop/Emotrix/cleanData") files <- list.files(path="C:/Users/mario/Desktop/Emotrix/cleanData", pattern="csv$", full.names=FALSE, recursive=FALSE) df <- data.frame(matrix(, nrow=0, ncol=17)) colnames(df)<- c("Image/Audio","T...
/R/RelaxState-Scripts/BindData.R
permissive
emotrix/Emotrix
R
false
false
2,460
r
library(readr) library(wavelets) library(data.table) library(signal) setwd("C:/Users/mario/Desktop/Emotrix/cleanData") files <- list.files(path="C:/Users/mario/Desktop/Emotrix/cleanData", pattern="csv$", full.names=FALSE, recursive=FALSE) df <- data.frame(matrix(, nrow=0, ncol=17)) colnames(df)<- c("Image/Audio","T...
#' Solr base URL. #' #' @author Barret Schloerke \email{schloerke@@gmail.com} #' @keywords internal solr_base_url <- function() { "http://localhost:8983" } #' Check to see if solr is running. #' A check to see if solr is running called and memoised at the start of \code{helpr()} #' #' @author Barret Schloerke \emai...
/R/solr.r
no_license
cran/helpr
R
false
false
6,040
r
#' Solr base URL. #' #' @author Barret Schloerke \email{schloerke@@gmail.com} #' @keywords internal solr_base_url <- function() { "http://localhost:8983" } #' Check to see if solr is running. #' A check to see if solr is running called and memoised at the start of \code{helpr()} #' #' @author Barret Schloerke \emai...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/polynomial-dissimilarity.R \name{dist_polynomial_dissimilarity} \alias{dist_polynomial_dissimilarity} \title{Polynomial Dissimilarity Distance} \usage{ dist_polynomial_dissimilarity(graph_1, graph_2, k = 5, alpha = 1) } \arguments{ \item{grap...
/man/dist_polynomial_dissimilarity.Rd
permissive
Fagan-Lab/disgraph
R
false
true
672
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/polynomial-dissimilarity.R \name{dist_polynomial_dissimilarity} \alias{dist_polynomial_dissimilarity} \title{Polynomial Dissimilarity Distance} \usage{ dist_polynomial_dissimilarity(graph_1, graph_2, k = 5, alpha = 1) } \arguments{ \item{grap...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/deprec-all.R \name{prop_ci} \alias{prop_ci} \title{Confidence intervals for binary target variable by values of a discrete predictor} \usage{ prop_ci( dt, target_name, var_name, min_n = 1, show_all = TRUE, order_n = NULL, conf_l...
/man/prop_ci.Rd
permissive
jedwards24/edwards
R
false
true
2,763
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/deprec-all.R \name{prop_ci} \alias{prop_ci} \title{Confidence intervals for binary target variable by values of a discrete predictor} \usage{ prop_ci( dt, target_name, var_name, min_n = 1, show_all = TRUE, order_n = NULL, conf_l...
#!/usr/bin/env Rscript ######################################################################################## ## LeeLab ## ## 2018-08-18 ## ## ...
/Integrat.r
no_license
DMU-lilab/Targeted-Sequencing-Pipeline
R
false
false
7,324
r
#!/usr/bin/env Rscript ######################################################################################## ## LeeLab ## ## 2018-08-18 ## ## ...
\name{makedistlist} \alias{makedistlist} \title{Make list of distance matrices for calculating GP correlation matrices.} \usage{ makedistlist(design) } \arguments{ \item{design}{An \code{n x p} matrix of input settings} } \value{ A list of \code{p} matrices, each of dimension \code{n x n} that contain the outer subtra...
/man/makedistlist.Rd
no_license
cran/cmce
R
false
false
762
rd
\name{makedistlist} \alias{makedistlist} \title{Make list of distance matrices for calculating GP correlation matrices.} \usage{ makedistlist(design) } \arguments{ \item{design}{An \code{n x p} matrix of input settings} } \value{ A list of \code{p} matrices, each of dimension \code{n x n} that contain the outer subtra...
# PROBLEM 1 permIndepChisqTest<-function(tab, B = 2000) { D.obs = chisq.test(tab)$stat #get the Pearson test statistic from the table D.perm = rep(0, B) #intialize vector of zeros for storing test statistics of B permutations of the table perm = r2dtable(B,margin.table(tab,1),margin.table(tab,2)) #create B permut...
/hw2-Huang-Ruoxin-new.R
no_license
rxhuang/R-projects
R
false
false
1,697
r
# PROBLEM 1 permIndepChisqTest<-function(tab, B = 2000) { D.obs = chisq.test(tab)$stat #get the Pearson test statistic from the table D.perm = rep(0, B) #intialize vector of zeros for storing test statistics of B permutations of the table perm = r2dtable(B,margin.table(tab,1),margin.table(tab,2)) #create B permut...
#Please, first set up a right working directory! Thanks. # a file to get data f <- "household_power_consumption.txt" # use a sql select to get correct dates library(sqldf) selector <- "SELECT * from file WHERE Date = '1/2/2007' OR Date = '2/2/2007'" #read the table the selector powerData <- read.csv.sq...
/plot2.R
no_license
snorrik/ExData_Plotting1
R
false
false
857
r
#Please, first set up a right working directory! Thanks. # a file to get data f <- "household_power_consumption.txt" # use a sql select to get correct dates library(sqldf) selector <- "SELECT * from file WHERE Date = '1/2/2007' OR Date = '2/2/2007'" #read the table the selector powerData <- read.csv.sq...