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
#This file contains the basic toy examples used to test and compare #the universal solver to the other solvers N <- 4 reward <- matrix(c(seq(1,3,length.out = N), seq(3.5,6,length.out = N)), byrow = TRUE, nrow = 2) gamma <- 0.9 #discount factor b_full<-c(1,0) #initial state: low Tmax <- 5 #horizon time...
/data/examples2states4actions.R
no_license
conservation-decisions/Universal-Adaptive-Management-Solver
R
false
false
964
r
#This file contains the basic toy examples used to test and compare #the universal solver to the other solvers N <- 4 reward <- matrix(c(seq(1,3,length.out = N), seq(3.5,6,length.out = N)), byrow = TRUE, nrow = 2) gamma <- 0.9 #discount factor b_full<-c(1,0) #initial state: low Tmax <- 5 #horizon time...
#' Use a spreadsheet to create files for use with the testthat package. #' #' @param ss dribble or filepath. #' @param sheet character (vector). The names of the sheets to be read. #' @param manipulator a function that manipulates the testdata once it has been read from the spreadsheet #' @param filename character (vec...
/R/create_testfile.R
permissive
wangdi2016/testsheets
R
false
false
1,167
r
#' Use a spreadsheet to create files for use with the testthat package. #' #' @param ss dribble or filepath. #' @param sheet character (vector). The names of the sheets to be read. #' @param manipulator a function that manipulates the testdata once it has been read from the spreadsheet #' @param filename character (vec...
#EDA Course Project 1 - Plot4 plot4 <- function(){ #Set the working directory setwd("~/Coursera/Data Science/EDA/EDA-CP-1") #Check if the file exists and download and unzip if necessary if(!file.exists("CP-Data.Zip")){ download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_...
/Plot4.R
no_license
cafkhami/EDA-CP-1
R
false
false
2,048
r
#EDA Course Project 1 - Plot4 plot4 <- function(){ #Set the working directory setwd("~/Coursera/Data Science/EDA/EDA-CP-1") #Check if the file exists and download and unzip if necessary if(!file.exists("CP-Data.Zip")){ download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_...
\alias{GtkTextTag} \alias{GtkTextAttributes} \alias{GtkTextAppearance} \alias{gtkTextTag} \alias{GtkWrapMode} \name{GtkTextTag} \title{GtkTextTag} \description{A tag that can be applied to text in a GtkTextBuffer} \section{Methods and Functions}{ \code{\link{gtkTextTagNew}(name = NULL)}\cr \code{\link{gtkTextTagGetPrio...
/RGtk2/man/GtkTextTag.Rd
no_license
hjy1210/RGtk2
R
false
false
14,434
rd
\alias{GtkTextTag} \alias{GtkTextAttributes} \alias{GtkTextAppearance} \alias{gtkTextTag} \alias{GtkWrapMode} \name{GtkTextTag} \title{GtkTextTag} \description{A tag that can be applied to text in a GtkTextBuffer} \section{Methods and Functions}{ \code{\link{gtkTextTagNew}(name = NULL)}\cr \code{\link{gtkTextTagGetPrio...
\name{CetaFGN} \alias{CetaFGN} \title{Covariance Matrix of Eta for Fractional Gaussian Noise} \description{ Covariance matrix of \eqn{\hat{\eta}}{eta^} for fractional Gaussian noise (fGn). } \usage{ CetaFGN(eta, m = 10000, delta = 1e-9) } \arguments{ \item{eta}{parameter vector \code{eta = c(H, *)}.} \item{m}{i...
/man/CetaFGN.Rd
no_license
cran/longmemo
R
false
false
1,062
rd
\name{CetaFGN} \alias{CetaFGN} \title{Covariance Matrix of Eta for Fractional Gaussian Noise} \description{ Covariance matrix of \eqn{\hat{\eta}}{eta^} for fractional Gaussian noise (fGn). } \usage{ CetaFGN(eta, m = 10000, delta = 1e-9) } \arguments{ \item{eta}{parameter vector \code{eta = c(H, *)}.} \item{m}{i...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stat_central_tendency.R \name{stat_central_tendency} \alias{stat_central_tendency} \title{Add Central Tendency Measures to a GGPLot} \usage{ stat_central_tendency( mapping = NULL, data = NULL, geom = c("line", "point"), position = "id...
/man/stat_central_tendency.Rd
no_license
earcanal/ggpubr
R
false
true
3,811
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/stat_central_tendency.R \name{stat_central_tendency} \alias{stat_central_tendency} \title{Add Central Tendency Measures to a GGPLot} \usage{ stat_central_tendency( mapping = NULL, data = NULL, geom = c("line", "point"), position = "id...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/phreeqc.R \docType{data} \name{ex3} \alias{ex3} \title{Example 3--Mixing} \source{ \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc} } \description{ This example demonstrates the capabilities of PHREEQC to perform a series of geoch...
/man/ex3.Rd
no_license
cran/phreeqc
R
false
true
1,843
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/phreeqc.R \docType{data} \name{ex3} \alias{ex3} \title{Example 3--Mixing} \source{ \url{http://wwwbrr.cr.usgs.gov/projects/GWC_coupled/phreeqc} } \description{ This example demonstrates the capabilities of PHREEQC to perform a series of geoch...
# patch over an issue with trailing separators on Windows file.exists <- function(...) { x=unlist(pairlist(...), use.names = FALSE) if (.Platform$OS == "windows") { x=sub("[/\\]$","", x) } base::file.exists(x) }
/R/utils.R
no_license
cran/nat
R
false
false
224
r
# patch over an issue with trailing separators on Windows file.exists <- function(...) { x=unlist(pairlist(...), use.names = FALSE) if (.Platform$OS == "windows") { x=sub("[/\\]$","", x) } base::file.exists(x) }
context("factorFormula") test_that("factorFormula", { Net <- HydeNetwork(~ wells + pe | wells + d.dimer | pregnant*pe + angio | pe + treat | d.dimer*angio + death | pe*treat, ...
/HydeNet/tests/testthat/test-factorFormula.R
no_license
ingted/R-Examples
R
false
false
526
r
context("factorFormula") test_that("factorFormula", { Net <- HydeNetwork(~ wells + pe | wells + d.dimer | pregnant*pe + angio | pe + treat | d.dimer*angio + death | pe*treat, ...
testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(NaN, 4.86330041649619e+284, 6.53867576132537e+286, NaN, NaN, 5.43230922486616e-312, 1.28822975391943e-231, -5.87276175837385e-21, 5.87789298400915e+170, 3.299203448677e+...
/meteor/inst/testfiles/E_Penman/libFuzzer_E_Penman/E_Penman_valgrind_files/1612738534-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
923
r
testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(NaN, 4.86330041649619e+284, 6.53867576132537e+286, NaN, NaN, 5.43230922486616e-312, 1.28822975391943e-231, -5.87276175837385e-21, 5.87789298400915e+170, 3.299203448677e+...
# run on mga-n4 # srun -w mga-n4 --pty bash -i # run using R (Rscript name-of-script.R) setwd("/mnt/polyomica/projects/mv_gwas/results/20200120/03_data_twostep_app/") path_input="chr/chr" path_output="./" library(data.table) chr=1 x=fread(paste0(path_input,chr,".raw"),data.table=F) y=x for(chr in c(2:20,22)){ x=fr...
/scripts_for_revision_R1/03_two_step_approach/01_joint_of_all_snps.R
no_license
Sodbo/Pain3_project_code
R
false
false
553
r
# run on mga-n4 # srun -w mga-n4 --pty bash -i # run using R (Rscript name-of-script.R) setwd("/mnt/polyomica/projects/mv_gwas/results/20200120/03_data_twostep_app/") path_input="chr/chr" path_output="./" library(data.table) chr=1 x=fread(paste0(path_input,chr,".raw"),data.table=F) y=x for(chr in c(2:20,22)){ x=fr...
library(glmnet) mydata = read.table("./TrainingSet/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.2,family="gaussian",standardize=TRUE) sink('./Model/EN/ReliefF/skin/skin_033.txt',append=TRUE) prin...
/Model/EN/ReliefF/skin/skin_033.R
no_license
leon1003/QSMART
R
false
false
345
r
library(glmnet) mydata = read.table("./TrainingSet/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.2,family="gaussian",standardize=TRUE) sink('./Model/EN/ReliefF/skin/skin_033.txt',append=TRUE) prin...
#test file testthat::context("basic tests") #the first test makes sure that the output of the fars_summarize_years() function is a dataframe test_that("table is df", expect_is(fars_summarize_years(c(2013:2015)),"data.frame"))
/tests/testthat/test_fars.R
no_license
barnabe/building_an_r_package
R
false
false
227
r
#test file testthat::context("basic tests") #the first test makes sure that the output of the fars_summarize_years() function is a dataframe test_that("table is df", expect_is(fars_summarize_years(c(2013:2015)),"data.frame"))
#' @title Cue to run a target when the last output reaches a certain age #' @export #' @family cues #' @description `tar_cue_age()` creates a cue object to #' rerun a target if the most recent output data becomes old enough. #' In other words, if the target produces any data #' (as opposed to tracking input files...
/R/tar_cue_age.R
permissive
fkohrt/tarchetypes
R
false
false
1,755
r
#' @title Cue to run a target when the last output reaches a certain age #' @export #' @family cues #' @description `tar_cue_age()` creates a cue object to #' rerun a target if the most recent output data becomes old enough. #' In other words, if the target produces any data #' (as opposed to tracking input files...
library(ggpubr) library(plotly) library(ggplot2) library(readr) library(dplyr) library(stringr) library(lubridate) library(gganimate) library(reshape2) refseq <- read_tsv(file='../data/refseq_analysis.tsv') refseq$date_of_release <- ymd(refseq$date_of_release) refseq <- arrange(refseq, date_of_release) #Calculate siz...
/scripts/render_refseq.R
no_license
Agihawi/refseq_catalogue_analysis
R
false
false
2,482
r
library(ggpubr) library(plotly) library(ggplot2) library(readr) library(dplyr) library(stringr) library(lubridate) library(gganimate) library(reshape2) refseq <- read_tsv(file='../data/refseq_analysis.tsv') refseq$date_of_release <- ymd(refseq$date_of_release) refseq <- arrange(refseq, date_of_release) #Calculate siz...
# Flyo-4 and Fura Red data analysis, uncaging with different stimulation power # Copyright © 2020 Borys Olifirov require(ggplot2) require(dplyr) require(magrittr) setwd('/home/astria/bio/note/projects/hek_transient/experiments/test_uncaging_fura/scripts') df.raw <- read.csv('results.csv') df <- subset(df.raw, sel...
/projects/master/0_2020_hek_transient/exp/2020/10_30_2020_test_uncaging_fura/scripts/uncaging_10_30_2020.R
no_license
wisstock/Labnote
R
false
false
1,614
r
# Flyo-4 and Fura Red data analysis, uncaging with different stimulation power # Copyright © 2020 Borys Olifirov require(ggplot2) require(dplyr) require(magrittr) setwd('/home/astria/bio/note/projects/hek_transient/experiments/test_uncaging_fura/scripts') df.raw <- read.csv('results.csv') df <- subset(df.raw, sel...
% Generated by roxygen2 (4.0.1): do not edit by hand \name{smooth.adaptive.spline} \alias{smooth.adaptive.spline} \title{Adaptive smoothing using splines} \usage{ smooth.adaptive.spline(x, y = NULL, pct = 0.1, niter = NULL) } \arguments{ \item{x}{An \code{xy.coords} object, \code{list()} with named numeric elements \co...
/man/smooth.adaptive.spline.Rd
no_license
wleepang/pangr
R
false
false
1,243
rd
% Generated by roxygen2 (4.0.1): do not edit by hand \name{smooth.adaptive.spline} \alias{smooth.adaptive.spline} \title{Adaptive smoothing using splines} \usage{ smooth.adaptive.spline(x, y = NULL, pct = 0.1, niter = NULL) } \arguments{ \item{x}{An \code{xy.coords} object, \code{list()} with named numeric elements \co...
ufit <- function(y,lmode=NULL,x=NULL,w=NULL,lc=TRUE, rc=TRUE, type=c("raw","stepfun","both")) { # # Function `ufit'. Calculates the isotonic unimodal fit to a data # sequence y, with mode at ``lmode''. If lmode==NULL, then it determines # the optimal (least squares) location for the mode, and the fit...
/Iso/R/ufit.R
no_license
ingted/R-Examples
R
false
false
1,811
r
ufit <- function(y,lmode=NULL,x=NULL,w=NULL,lc=TRUE, rc=TRUE, type=c("raw","stepfun","both")) { # # Function `ufit'. Calculates the isotonic unimodal fit to a data # sequence y, with mode at ``lmode''. If lmode==NULL, then it determines # the optimal (least squares) location for the mode, and the fit...
context("object_table") test_that("missing functions pass through to underlying env", { env <- new.env(parent = emptyenv()) env$a <- 10 ot <- object_table(parent_env = env) expect_equal(ls(envir = ot), "a") expect_true(exists("a", envir = ot)) expect_equal(ot$a, 10) expect_false(exists("b", envir = ot)...
/tests/testthat/test-object_table.R
no_license
isabella232/objectable
R
false
false
1,782
r
context("object_table") test_that("missing functions pass through to underlying env", { env <- new.env(parent = emptyenv()) env$a <- 10 ot <- object_table(parent_env = env) expect_equal(ls(envir = ot), "a") expect_true(exists("a", envir = ot)) expect_equal(ot$a, 10) expect_false(exists("b", envir = ot)...
myfile <- "/Users/jamessweeney2/Desktop/Coursera/household_power_consumption.txt" con <- read.table(myfile, sep = ";", header = TRUE) a <- as.character(con$Date) c <- as.Date(a, "%d/%m/%Y") c <- con$Date days <- con[con$Date == "1/2/2007" | con$Date == "2/2/2007",] dt <- paste(days$Date, days$Time) dtf <- dmy_hms(dt) n...
/Desktop/Coursera/plot3.R
no_license
jpsweeney/ExData_Plotting1
R
false
false
934
r
myfile <- "/Users/jamessweeney2/Desktop/Coursera/household_power_consumption.txt" con <- read.table(myfile, sep = ";", header = TRUE) a <- as.character(con$Date) c <- as.Date(a, "%d/%m/%Y") c <- con$Date days <- con[con$Date == "1/2/2007" | con$Date == "2/2/2007",] dt <- paste(days$Date, days$Time) dtf <- dmy_hms(dt) n...
#5 # Update the data frame prediction_data <- explanatory_data %>% mutate( has_churned = predict(mdl_churn_vs_relationship, explanatory_data, type = "response"), # Add the most likely churn outcome most_likely_outcome = round(has_churned) ) # See the result prediction_data # From previous s...
/Introduction to regression in R/Simple logistic regression/5.R
no_license
SaiSharanyaY/DataCamp-Data-Scientist-with-R-Track.
R
false
false
767
r
#5 # Update the data frame prediction_data <- explanatory_data %>% mutate( has_churned = predict(mdl_churn_vs_relationship, explanatory_data, type = "response"), # Add the most likely churn outcome most_likely_outcome = round(has_churned) ) # See the result prediction_data # From previous s...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_html_response_headers.R \name{get_html_response_url} \alias{get_html_response_url} \title{Query the response header of a webpage} \usage{ get_html_response_url(urls) } \arguments{ \item{urls}{A character vector of URLs to iterate over} } ...
/man/get_html_response_url.Rd
no_license
bweiher/whisper
R
false
true
462
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_html_response_headers.R \name{get_html_response_url} \alias{get_html_response_url} \title{Query the response header of a webpage} \usage{ get_html_response_url(urls) } \arguments{ \item{urls}{A character vector of URLs to iterate over} } ...
#'Compute the South Pacific Ocean Dipole (SPOD) index #' #'The South Pacific Ocean Dipole (SPOD) index is related to the El #'Nino-Southern Oscillation (ENSO) and the Inderdecadal Pacific Oscillation #'(IPO). The SPOD index is computed as the difference of weighted-averaged SST #'anomalies over 20ºS-48ºS, 165ºE-190ºE...
/R/SPOD.R
no_license
cran/s2dv
R
false
false
11,253
r
#'Compute the South Pacific Ocean Dipole (SPOD) index #' #'The South Pacific Ocean Dipole (SPOD) index is related to the El #'Nino-Southern Oscillation (ENSO) and the Inderdecadal Pacific Oscillation #'(IPO). The SPOD index is computed as the difference of weighted-averaged SST #'anomalies over 20ºS-48ºS, 165ºE-190ºE...
dag.sim2 <- function (dag, b = rep(0, nrow(dag$arc)), bxy = 0, n, distr = rep(0, length(dag$x)), mu = rep(0, length(dag$x)), stdev = rep(0, length(dag$x)), nu = NA, lambda = NA, ...
/R/dag.sim2.R
no_license
cran/dagR
R
false
false
11,751
r
dag.sim2 <- function (dag, b = rep(0, nrow(dag$arc)), bxy = 0, n, distr = rep(0, length(dag$x)), mu = rep(0, length(dag$x)), stdev = rep(0, length(dag$x)), nu = NA, lambda = NA, ...
is_harvestr_frame <- function(env){ par <- parent.env(env) if(!exists(".packageName", envir=par, inherits=FALSE)) return(FALSE) par$.packageName == "harvestr" } is_top_harvestr_call <- function(n=0){ frames <- head(sys.frames(), -1-n) sum(sapply(frames, is_harvestr_frame))==1 } #' @importFrom fore...
/R/option.R
no_license
cran/harvestr
R
false
false
1,887
r
is_harvestr_frame <- function(env){ par <- parent.env(env) if(!exists(".packageName", envir=par, inherits=FALSE)) return(FALSE) par$.packageName == "harvestr" } is_top_harvestr_call <- function(n=0){ frames <- head(sys.frames(), -1-n) sum(sapply(frames, is_harvestr_frame))==1 } #' @importFrom fore...
install.packages("rio") library(rio) library(tidyverse) install.packages("rio") library(rio) rda_2_CSV=c("airports", "airlines", "planes", "airlines", "flights","weather") for (i in rda_2_CSV) { path_rda <- paste("C:/Users/yoyo/Documents/SQL/NYCflights/",i,".rda",sep="") filerename <- import(path...
/rda to csv.R
no_license
LuyiTang/Projet-NYCflights
R
false
false
1,193
r
install.packages("rio") library(rio) library(tidyverse) install.packages("rio") library(rio) rda_2_CSV=c("airports", "airlines", "planes", "airlines", "flights","weather") for (i in rda_2_CSV) { path_rda <- paste("C:/Users/yoyo/Documents/SQL/NYCflights/",i,".rda",sep="") filerename <- import(path...
library( RandomFields ) library( TMB ) library( INLA ) library(sf) #library(TMBdebug) logit<-function(x) log(x/(1-x)) # Compile setwd("C:/Users/paul.conn/git/BOSSrussia/") TmbFile = "C:/Users/paul.conn/git/BOSSrussia/BOSSrussia/src/OkhotskTMB" #dyn.unload( dynlib(TmbFile) ) #unload file if previously loaded to ge...
/BOSSrussia/inst/run_Okhotsk_boot_Apr2021.R
no_license
pconn/BOSSrussia
R
false
false
8,327
r
library( RandomFields ) library( TMB ) library( INLA ) library(sf) #library(TMBdebug) logit<-function(x) log(x/(1-x)) # Compile setwd("C:/Users/paul.conn/git/BOSSrussia/") TmbFile = "C:/Users/paul.conn/git/BOSSrussia/BOSSrussia/src/OkhotskTMB" #dyn.unload( dynlib(TmbFile) ) #unload file if previously loaded to ge...
################################################## ################################################## ## ## Notes.R ## ################################################## ################################################## # Report of the investor's notes owned Notes <- function(){ r <- GET("https://api.pr...
/Notes.R
no_license
johnakwei/ProspeR
R
false
false
632
r
################################################## ################################################## ## ## Notes.R ## ################################################## ################################################## # Report of the investor's notes owned Notes <- function(){ r <- GET("https://api.pr...
#'@author christian bitter #'@name stops #'@title KVB - Lift #'@description Returns the Stop Information from the KVB Open Data Portal #'@return an sf object of the provided data (EPSG 4326). #'@param as_spatial should the data be returned as an sf object (default F) #'@examples #'stop_df <- stop() #'@export stop <- fu...
/R/stop.R
no_license
christianbitter/rOCologneKVB
R
false
false
805
r
#'@author christian bitter #'@name stops #'@title KVB - Lift #'@description Returns the Stop Information from the KVB Open Data Portal #'@return an sf object of the provided data (EPSG 4326). #'@param as_spatial should the data be returned as an sf object (default F) #'@examples #'stop_df <- stop() #'@export stop <- fu...
#Use the Box-Muller method and Marsaglia-Bray method to do the following :(a) Generate a sample of 100, 500 and 10000 values from N(0,1). Hence find the sample mean and variance.(b) Draw histogram in all cases. print("Box-Muller") z<-c() j<-1 y<-c() while (j<=100) { u<-runif(2,0,1) v<-2*u-1 if (v[1]**2+v[2]...
/BoxMuller Marsaglia Standard Normal.R
no_license
melodramaqueen/Monte-Carlo-Simulation
R
false
false
856
r
#Use the Box-Muller method and Marsaglia-Bray method to do the following :(a) Generate a sample of 100, 500 and 10000 values from N(0,1). Hence find the sample mean and variance.(b) Draw histogram in all cases. print("Box-Muller") z<-c() j<-1 y<-c() while (j<=100) { u<-runif(2,0,1) v<-2*u-1 if (v[1]**2+v[2]...
\name{RRepast-package} \alias{RRepast-package} \alias{RRepast} \docType{package} \title{ \packageTitle{RRepast} } \description{ \packageDescription{RRepast} } \details{ To configure repast models for being called from R programms, the RRepast broker class must be added to \strong{scenario.xml} file. Just add to the ...
/RRepast/man/RRepast-package.Rd
no_license
blackaceatzworg/RRepast
R
false
false
1,576
rd
\name{RRepast-package} \alias{RRepast-package} \alias{RRepast} \docType{package} \title{ \packageTitle{RRepast} } \description{ \packageDescription{RRepast} } \details{ To configure repast models for being called from R programms, the RRepast broker class must be added to \strong{scenario.xml} file. Just add to the ...
TimeStamp_ch <- function (ch0, ch1, ch2){ ch0 <- data.frame(TimeStamp=ch0[,1], V1_ch0=ch0[,2], V2_ch0=ch0[,3]) ch1 <- data.frame(V1_ch1=ch1[,2], V2_ch1=ch1[,3]) ch2 <- data.frame(V1_ch2=ch2[,2], V2_ch2=ch2[,3]) ch_ALL <- cbind(ch0, ch1, ch2) ch_temp <- data.frame(TimeStamp=ch_ALL[1:...
/Pieces/TimeStamp_ch.R
no_license
Yansera/DATA_SERA_IST
R
false
false
884
r
TimeStamp_ch <- function (ch0, ch1, ch2){ ch0 <- data.frame(TimeStamp=ch0[,1], V1_ch0=ch0[,2], V2_ch0=ch0[,3]) ch1 <- data.frame(V1_ch1=ch1[,2], V2_ch1=ch1[,3]) ch2 <- data.frame(V1_ch2=ch2[,2], V2_ch2=ch2[,3]) ch_ALL <- cbind(ch0, ch1, ch2) ch_temp <- data.frame(TimeStamp=ch_ALL[1:...
#' Reproduce Figure 1.5 #' #' Reproduces Figure 1.5 from the book. If you specify any options, your results may look different. #' #' @param lwd,xlim,ylim,xlab,ylab As in `plot()` #' @param ... Further arguments to `plot()` #' #' @examples #' Fig1.5() #' @export Fig1.5 <- function(lwd=3, xlim=...
/R/ridge-gcv.R
no_license
pbreheny/hdrm
R
false
false
802
r
#' Reproduce Figure 1.5 #' #' Reproduces Figure 1.5 from the book. If you specify any options, your results may look different. #' #' @param lwd,xlim,ylim,xlab,ylab As in `plot()` #' @param ... Further arguments to `plot()` #' #' @examples #' Fig1.5() #' @export Fig1.5 <- function(lwd=3, xlim=...
cat("Hi friend, I am the representative from Earth and wish to share with you our stories and learn about yours. Our great great great....great ancestor has been around for about six million years even though civilization is about 6000 years old, and industrialization started around 1800s. We had went through a long an...
/hello_aliens.R
no_license
BettyXie1006/36-350
R
false
false
1,141
r
cat("Hi friend, I am the representative from Earth and wish to share with you our stories and learn about yours. Our great great great....great ancestor has been around for about six million years even though civilization is about 6000 years old, and industrialization started around 1800s. We had went through a long an...
#' @title Variable importance estimation using causal inference (targeted learning) #' #' @description \code{varimpact} returns variable importance statistics ordered #' by statistical significance using a combination of data-adaptive target #' parameter #' #' @details #' The function performs the following functio...
/R/varimpact.R
no_license
booblu/varimpact
R
false
false
14,347
r
#' @title Variable importance estimation using causal inference (targeted learning) #' #' @description \code{varimpact} returns variable importance statistics ordered #' by statistical significance using a combination of data-adaptive target #' parameter #' #' @details #' The function performs the following functio...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/start_arealDB.R \name{start_arealDB} \alias{start_arealDB} \alias{setPath} \title{Set the root path} \usage{ start_arealDB(root = NULL, gazetteer = NULL, top = NULL, ontology = NULL) setPath(root = NULL) } \arguments{ \item{root}...
/man/start_arealDB.Rd
no_license
cran/arealDB
R
false
true
1,935
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/start_arealDB.R \name{start_arealDB} \alias{start_arealDB} \alias{setPath} \title{Set the root path} \usage{ start_arealDB(root = NULL, gazetteer = NULL, top = NULL, ontology = NULL) setPath(root = NULL) } \arguments{ \item{root}...
#' @title rcrossref #' @description R Client for Various CrossRef APIs. #' @section Crossref APIs: #' rcrossref interacts with the main Crossref metadata search API at #' https://github.com/CrossRef/rest-api-doc, #' the old metadata search API at http://search.labs.crossref.org/, their #' DOI Content Negotiation servic...
/R/rcrossref-package.R
permissive
ropensci/rcrossref
R
false
false
5,377
r
#' @title rcrossref #' @description R Client for Various CrossRef APIs. #' @section Crossref APIs: #' rcrossref interacts with the main Crossref metadata search API at #' https://github.com/CrossRef/rest-api-doc, #' the old metadata search API at http://search.labs.crossref.org/, their #' DOI Content Negotiation servic...
source('candidates2.R') merge_labels <- function(dataset, labels, threshold = 0) { labels <- as.character(labels) best_hits <- compute_best_hits(dataset, labels) orphans <- find_orphans(best_hits, threshold) merge_record <- data.frame() while (length(orphans) > 0) { print(orphans) orphan <- orphans[...
/merge_labels.R
no_license
yexilein/biccn_src
R
false
false
3,196
r
source('candidates2.R') merge_labels <- function(dataset, labels, threshold = 0) { labels <- as.character(labels) best_hits <- compute_best_hits(dataset, labels) orphans <- find_orphans(best_hits, threshold) merge_record <- data.frame() while (length(orphans) > 0) { print(orphans) orphan <- orphans[...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/coo-shapedescriptors.R \name{coo_boundingbox} \alias{coo_boundingbox} \title{Calculates coordinates of the bounding box} \usage{ coo_boundingbox(coo) } \arguments{ \item{coo}{\code{matrix} of \code{(x; y)} coordinates or any \link{Coo} object...
/man/coo_boundingbox.Rd
no_license
mdelrio1/Momocs
R
false
true
2,398
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/coo-shapedescriptors.R \name{coo_boundingbox} \alias{coo_boundingbox} \title{Calculates coordinates of the bounding box} \usage{ coo_boundingbox(coo) } \arguments{ \item{coo}{\code{matrix} of \code{(x; y)} coordinates or any \link{Coo} object...
#make into function #add in ordering logic #pass in sim_start_date, sim_end_date #sim Blotter if (verbose) print ("Running Sim") shares <- matrix(nrow=length(sim_date_index),ncol=length(stx.symbols)) #for ( s in stx.symbols) { for (SimDate_i in 1:(length(sim_date_index))) { SimDate <- sim_date_index[SimDate_i] equ...
/blotter_sim.R
no_license
haleultimate/sim1
R
false
false
2,255
r
#make into function #add in ordering logic #pass in sim_start_date, sim_end_date #sim Blotter if (verbose) print ("Running Sim") shares <- matrix(nrow=length(sim_date_index),ncol=length(stx.symbols)) #for ( s in stx.symbols) { for (SimDate_i in 1:(length(sim_date_index))) { SimDate <- sim_date_index[SimDate_i] equ...
# This script: # 1) combines Derek's processed data into a long-form data frame for analysis; # 2) filters the data based on species, year, and number of data points per tree; # 3) explores visually and by model testing how much variation there is among trees within plots, plots within clusters, and among clusters. ...
/scripts/analysis-climate-sensitivity/hierarchical-sensitivity-analysis-exploration.R
no_license
youngdjn/sierra-dendro
R
false
false
34,370
r
# This script: # 1) combines Derek's processed data into a long-form data frame for analysis; # 2) filters the data based on species, year, and number of data points per tree; # 3) explores visually and by model testing how much variation there is among trees within plots, plots within clusters, and among clusters. ...
#download and unzip the data in the same directory where you usually work with library(dplyr) #read train data X_train <-read.table("./UCI HAR Dataset/train/X_train.txt") Y_train <-read.table("./UCI HAR Dataset/train/Y_train.txt") sub_train <- read.table("./UCI HAR Dataset/train/subject_train.txt") #read...
/run_analysis.R
no_license
AndreG86600/Getting_and_cleaning_data_Week4_assignment
R
false
false
1,795
r
#download and unzip the data in the same directory where you usually work with library(dplyr) #read train data X_train <-read.table("./UCI HAR Dataset/train/X_train.txt") Y_train <-read.table("./UCI HAR Dataset/train/Y_train.txt") sub_train <- read.table("./UCI HAR Dataset/train/subject_train.txt") #read...
#' Collapses an MRP matrix with duplicate taxa #' #' @description #' #' Collapses an MRP matrix with duplicate taxa until all taxa are unique. #' #' @param MRPMatrix An MRP matrix in the format imported by \code{Claddis::read_nexus_matrix}. #' #' @details #' #' Duplicate taxon names are problematic for downstream analy...
/R/CollapseDuplicateTaxonMRP.R
no_license
graemetlloyd/metatree
R
false
false
5,212
r
#' Collapses an MRP matrix with duplicate taxa #' #' @description #' #' Collapses an MRP matrix with duplicate taxa until all taxa are unique. #' #' @param MRPMatrix An MRP matrix in the format imported by \code{Claddis::read_nexus_matrix}. #' #' @details #' #' Duplicate taxon names are problematic for downstream analy...
#'#' Create an ECSA bookdown template for a species of interest. #' #' #' #' @param stock_name A common species name as defined by ??? (eg. atlantic-menhaden, smooth-dogfish) #' @param output_dir The output directory for the compiled bookdown HTML document and supporting files. Default "docs" folder in current working...
/R/create_template.R
permissive
aberrante/ECSA
R
false
false
5,042
r
#'#' Create an ECSA bookdown template for a species of interest. #' #' #' #' @param stock_name A common species name as defined by ??? (eg. atlantic-menhaden, smooth-dogfish) #' @param output_dir The output directory for the compiled bookdown HTML document and supporting files. Default "docs" folder in current working...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/alternatives_rgeos.R \name{gUnaryUnion} \alias{gUnaryUnion} \title{limited replacement for rgeos::gUnaryUnion using sf functionality} \usage{ gUnaryUnion(spgeom, id = NULL) } \description{ Suggest to use sf::aggregate(..., dissolve=TRUE) and/...
/R/rptha/man/gUnaryUnion.Rd
permissive
GeoscienceAustralia/ptha
R
false
true
367
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/alternatives_rgeos.R \name{gUnaryUnion} \alias{gUnaryUnion} \title{limited replacement for rgeos::gUnaryUnion using sf functionality} \usage{ gUnaryUnion(spgeom, id = NULL) } \description{ Suggest to use sf::aggregate(..., dissolve=TRUE) and/...
#Library files for courses provided by: Highland Statistics Ltd. #To cite these functions, use: #Mixed effects models and extensions in ecology with R. (2009). #Zuur, AF, Ieno, EN, Walker, N, Saveliev, AA, and Smith, GM. Springer. #Copyright Highland Statistics LTD. ############################################...
/HighstatLibV9.R
no_license
eliecerecology/INLA_mussels
R
false
false
16,927
r
#Library files for courses provided by: Highland Statistics Ltd. #To cite these functions, use: #Mixed effects models and extensions in ecology with R. (2009). #Zuur, AF, Ieno, EN, Walker, N, Saveliev, AA, and Smith, GM. Springer. #Copyright Highland Statistics LTD. ############################################...
context("tidyverse") test_that("reprex() suppresses tidyverse startup message by default", { skip_if_not_installed("tidyverse", minimum_version = "1.1.1.9000") ret <- reprex(input = "library(tidyverse)\n", show = FALSE, advertise = FALSE) expect_false(any(grepl("#>", ret))) }) test_that("reprex() has control ov...
/tests/testthat/test-tidyverse.R
no_license
iamkbpark/reprex
R
false
false
730
r
context("tidyverse") test_that("reprex() suppresses tidyverse startup message by default", { skip_if_not_installed("tidyverse", minimum_version = "1.1.1.9000") ret <- reprex(input = "library(tidyverse)\n", show = FALSE, advertise = FALSE) expect_false(any(grepl("#>", ret))) }) test_that("reprex() has control ov...
# # # This file contains code that generate bifurcation diagrams for all models. # # It generates 2D planes with contours for the upper branch (see Flo's # manuscript, Fig 2.) and cross-sections chose for certain thresholds. # # Some prerequisite before anything else # Set proxy if needed # Load libraries lib...
/figures/bifurcation_diagrams/v1/figure_bifurcation_diagrams.R
no_license
alexgenin/ifcam_output
R
false
false
14,554
r
# # # This file contains code that generate bifurcation diagrams for all models. # # It generates 2D planes with contours for the upper branch (see Flo's # manuscript, Fig 2.) and cross-sections chose for certain thresholds. # # Some prerequisite before anything else # Set proxy if needed # Load libraries lib...
##Author Brady S. Hardiman 11/12/2013 ##Read in fuzzed FIA coordinates supplied by Andy Finley (MSU), extract palsar backscatter values, fit curves, save figures and extracted values (with coordinates) ################################ ## Load Required Packages ################################ require(rgdal) require(r...
/modules/data.remote/scripts/old/ChEAS_FIA_03102014.R
permissive
rgknox/pecan
R
false
false
41,244
r
##Author Brady S. Hardiman 11/12/2013 ##Read in fuzzed FIA coordinates supplied by Andy Finley (MSU), extract palsar backscatter values, fit curves, save figures and extracted values (with coordinates) ################################ ## Load Required Packages ################################ require(rgdal) require(r...
# Plot probabilities of association of SNPs library(parallel) require(echoseq) require(locus) require(ROCR) # rm(list= ls()) RNGkind("L'Ecuyer-CMRG") seed <- 167 set.seed(seed); n <- 300; # Nunmber of observations p <- 500; p0 <- 5; # Number of SNPs; Number of active SNPs d <- 1; d0 <- 1 # Number of traits; Number...
/R/Proba_plots.R
no_license
WilliamVanRooij/MasterProject
R
false
false
6,507
r
# Plot probabilities of association of SNPs library(parallel) require(echoseq) require(locus) require(ROCR) # rm(list= ls()) RNGkind("L'Ecuyer-CMRG") seed <- 167 set.seed(seed); n <- 300; # Nunmber of observations p <- 500; p0 <- 5; # Number of SNPs; Number of active SNPs d <- 1; d0 <- 1 # Number of traits; Number...
#' NWEA Norms data 2015 (status) #' #' MODIFIED data from the RIT Scale Norms Study 2015: Gives the RIT score threshold for each percentile value from 1 to 99 #' #' @source NWEA, Northwest Evaluation Association, #' \url{https://legacysupport.nwea.org/support/article/norms-study-resources} #' @format Data frame with c...
/R/norms_status_2015.R
no_license
thelayc/laycca
R
false
false
942
r
#' NWEA Norms data 2015 (status) #' #' MODIFIED data from the RIT Scale Norms Study 2015: Gives the RIT score threshold for each percentile value from 1 to 99 #' #' @source NWEA, Northwest Evaluation Association, #' \url{https://legacysupport.nwea.org/support/article/norms-study-resources} #' @format Data frame with c...
#!/usr/bin/r -t # # Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois # # This file is part of Rcpp11. # # Rcpp11 is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License,...
/inst/unitTests/runit.Module.R
no_license
abelxie/Rcpp11
R
false
false
2,534
r
#!/usr/bin/r -t # # Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois # # This file is part of Rcpp11. # # Rcpp11 is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 2 of the License,...
# load data unzip(zipfile="exdata_data_NEI_data.zip") NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") # understanding data dim(NEI) head(NEI) str(NEI) dim(SCC) head(SCC) str(SCC) # Q3 library(ggplot2) EmissionByYearType_sub1 <- aggregate(Emissions~year+type,sub1,...
/plot3.R
no_license
JINGY1/Exploratory_Data_Analysis_Course_Proj2
R
false
false
595
r
# load data unzip(zipfile="exdata_data_NEI_data.zip") NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") # understanding data dim(NEI) head(NEI) str(NEI) dim(SCC) head(SCC) str(SCC) # Q3 library(ggplot2) EmissionByYearType_sub1 <- aggregate(Emissions~year+type,sub1,...
#Define integer variables a<-6 b<-28 #Define a vector numerical_vector1 <- c(4,18,28) numerical_vector2 <- c(2,4,6) #Demonstrating arithmetic operations on numerical values sum<-a+b subtraction<-b-a multiplication<-a*b division<-b/a modulus<-b%%a sum subtraction multiplication division modulus #Demonstrating arithmeti...
/ArithmeticOperations.R
no_license
kondapallishashi/R
R
false
false
629
r
#Define integer variables a<-6 b<-28 #Define a vector numerical_vector1 <- c(4,18,28) numerical_vector2 <- c(2,4,6) #Demonstrating arithmetic operations on numerical values sum<-a+b subtraction<-b-a multiplication<-a*b division<-b/a modulus<-b%%a sum subtraction multiplication division modulus #Demonstrating arithmeti...
library(nLTT) ### Name: exampleTrees ### Title: example trees to test the functionality of the package ### Aliases: exampleTrees ### Keywords: datasets ### ** Examples data(exampleTrees); obs <- exampleTrees[[1]]; nltt_plot(obs);
/data/genthat_extracted_code/nLTT/examples/exampleTrees.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
240
r
library(nLTT) ### Name: exampleTrees ### Title: example trees to test the functionality of the package ### Aliases: exampleTrees ### Keywords: datasets ### ** Examples data(exampleTrees); obs <- exampleTrees[[1]]; nltt_plot(obs);
.onAttach <- function(...) { if (!interactive() || stats::runif(1) > 0.1) return() tips <- c( "Need help? Try the Choroplethr Google Group: https://groups.google.com/forum/#!forum/choroplethr.", "Find out what's changed in Choroplethr: https://github.com/arilamstein/choroplethr/blob/master/NEWS.", "U...
/R/startup_messages.R
no_license
Emaasit/choroplethr
R
false
false
855
r
.onAttach <- function(...) { if (!interactive() || stats::runif(1) > 0.1) return() tips <- c( "Need help? Try the Choroplethr Google Group: https://groups.google.com/forum/#!forum/choroplethr.", "Find out what's changed in Choroplethr: https://github.com/arilamstein/choroplethr/blob/master/NEWS.", "U...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ClassGPR.R \docType{methods} \name{traceShift} \alias{traceShift} \title{Shift vertically the traces by an amount of depth units.} \usage{ \S4method{traceShift}{GPR}(x, ts, method = c("spline", "linear", "nearest", "pchip", "cubic", "none")...
/man/traceShift.Rd
permissive
minasel/RGPR
R
false
true
972
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ClassGPR.R \docType{methods} \name{traceShift} \alias{traceShift} \title{Shift vertically the traces by an amount of depth units.} \usage{ \S4method{traceShift}{GPR}(x, ts, method = c("spline", "linear", "nearest", "pchip", "cubic", "none")...
library(dashBootstrapComponents) library(dashHtmlComponents) toast_icon_dismiss <- htmlDiv( list( dbcButton( "Open toast", id = "simple-toast-toggle", color = "primary", n_clicks = 0, className = "mb-3", ), dbcToast( list(htmlP("This is the content of the toast", class...
/docs/components_page/components/toast/icon_dismiss.R
permissive
goranstojkoski/dash-bootstrap-components
R
false
false
629
r
library(dashBootstrapComponents) library(dashHtmlComponents) toast_icon_dismiss <- htmlDiv( list( dbcButton( "Open toast", id = "simple-toast-toggle", color = "primary", n_clicks = 0, className = "mb-3", ), dbcToast( list(htmlP("This is the content of the toast", class...
comp_labels <- c("vigorous", "moderate", "light", "sedentary", "sleep") test_that("Model unchanged from cached model.", { expect_equal_to_reference(epicoda::comp_model(type = "linear", outcome = "BMI", covariates = c("agegroup", "sex"), data = simdata, comp_labels = comp_la...
/tests/testthat/test-comp-model.R
no_license
TheTS/epicoda
R
false
false
1,006
r
comp_labels <- c("vigorous", "moderate", "light", "sedentary", "sleep") test_that("Model unchanged from cached model.", { expect_equal_to_reference(epicoda::comp_model(type = "linear", outcome = "BMI", covariates = c("agegroup", "sex"), data = simdata, comp_labels = comp_la...
# Set working directory setwd("/Volumes/LaCie SSD/Documents/Completed projects/McKee CD et al [2016] Inf Gen Evol/Version4 files") # Load packages library(ape) library(vegan) library(paco) library(beeswarm) ################################# ### CORE COPHYLOGENY ANALYSIS ### ################################# ### Can ...
/bat_bart_cophylo.R
no_license
clifmckee/phylogeo-bats-bartonella
R
false
false
10,738
r
# Set working directory setwd("/Volumes/LaCie SSD/Documents/Completed projects/McKee CD et al [2016] Inf Gen Evol/Version4 files") # Load packages library(ape) library(vegan) library(paco) library(beeswarm) ################################# ### CORE COPHYLOGENY ANALYSIS ### ################################# ### Can ...
# CCLE script #load StringR package library("stringr", lib.loc="~/Library/R/3.1/library") # match definitive gene names with GENBANK genbank <- read.csv ( file = 'SOURCE_DEFINITIVE_GENBANK_TRIM.csv') #now need to keep only transcripts that are used by CCLE ccletranscripts <- read.csv ( file = 'SOURCE_Correct_CCLE_Tra...
/older scripts/DEFINITIVEkinaseList(ccle)3.R
no_license
adamfletcherUK/Kimo_Development
R
false
false
36,262
r
# CCLE script #load StringR package library("stringr", lib.loc="~/Library/R/3.1/library") # match definitive gene names with GENBANK genbank <- read.csv ( file = 'SOURCE_DEFINITIVE_GENBANK_TRIM.csv') #now need to keep only transcripts that are used by CCLE ccletranscripts <- read.csv ( file = 'SOURCE_Correct_CCLE_Tra...
\name{load_c} \alias{load_c} \title{Load C code.} \usage{ load_c(pkg = NULL) } \arguments{ \item{pkg}{package description, can be path or package name. See \code{\link{as.package}} for more information} } \description{ Load C code. } \keyword{programming}
/man/load_c.Rd
no_license
andrie/devtools
R
false
false
266
rd
\name{load_c} \alias{load_c} \title{Load C code.} \usage{ load_c(pkg = NULL) } \arguments{ \item{pkg}{package description, can be path or package name. See \code{\link{as.package}} for more information} } \description{ Load C code. } \keyword{programming}
library(rpart) # library for decision trees library(caret) # library to split train and test + preprocess library(e1071) # library to tune the model # import the data ds = read.csv("~/M1 MLDM/Data Mining/Project/DataMiningM1/data.csv") # normalization of the data scaling = preProcess(ds[,-1], method=c("center...
/decision_tree.R
no_license
LetenoThibaud/DataMiningM1
R
false
false
2,010
r
library(rpart) # library for decision trees library(caret) # library to split train and test + preprocess library(e1071) # library to tune the model # import the data ds = read.csv("~/M1 MLDM/Data Mining/Project/DataMiningM1/data.csv") # normalization of the data scaling = preProcess(ds[,-1], method=c("center...
# Simple Linear Regression # Regression line plot plot_regression_line<-function(X,Y,b){ y_pred = b[1]+b[2]*X library(ggplot2) ggplot()+ geom_point(aes(x=X, y=Y), colour='red')+ geom_line(aes(x=X, y=y_pred), colour='green')+ xlab('x')+ylab('y') } # Prediction Function predictValue<-func...
/linearregression.R
no_license
SarthakSahoo/Linear-Regression
R
false
false
1,051
r
# Simple Linear Regression # Regression line plot plot_regression_line<-function(X,Y,b){ y_pred = b[1]+b[2]*X library(ggplot2) ggplot()+ geom_point(aes(x=X, y=Y), colour='red')+ geom_line(aes(x=X, y=y_pred), colour='green')+ xlab('x')+ylab('y') } # Prediction Function predictValue<-func...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/metacoder-formatting.R \name{validate_MicrobiomeR_format} \alias{validate_MicrobiomeR_format} \title{Validate MicrobiomeR Format} \usage{ validate_MicrobiomeR_format(obj, validated = FALSE, valid_formats, force_format = FALSE, min_or_max = ...
/man/validate_MicrobiomeR_format.Rd
permissive
sekingsley/MicrobiomeR
R
false
true
1,710
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/metacoder-formatting.R \name{validate_MicrobiomeR_format} \alias{validate_MicrobiomeR_format} \title{Validate MicrobiomeR Format} \usage{ validate_MicrobiomeR_format(obj, validated = FALSE, valid_formats, force_format = FALSE, min_or_max = ...
## Plot 1 if (!file.exists("01_RawData")) {dir.create("01_RawData")} fileURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileURL, destfile = "./01_RawData/household_power_consumption.zip") dateDownloaded <- date() list.files("./01_RawData") unzip("./0...
/plot1.R
no_license
hoanlong/ExData_Plotting1
R
false
false
820
r
## Plot 1 if (!file.exists("01_RawData")) {dir.create("01_RawData")} fileURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(fileURL, destfile = "./01_RawData/household_power_consumption.zip") dateDownloaded <- date() list.files("./01_RawData") unzip("./0...
simulateDealerHand <- function(dealerCards, deck) { if(dealerStrategy(dealerCards) == "Stay") { return(list(computeHandValue(dealerCards), length(dealerCards))) #first element in list is total value of dealer's hand and the second element is the number of cards dealt to dealer } else { return(simulateDeal...
/R/simulator_functions.R
no_license
josephfrancia/HousingOrStockMarketCalculator
R
false
false
380
r
simulateDealerHand <- function(dealerCards, deck) { if(dealerStrategy(dealerCards) == "Stay") { return(list(computeHandValue(dealerCards), length(dealerCards))) #first element in list is total value of dealer's hand and the second element is the number of cards dealt to dealer } else { return(simulateDeal...
setwd("~/Documents/Kaggle/kaggle_bnp") IS_RF <- FALSE IS_GLMNET <- FALSE N_FOLD <- 10 source('./code/data_processing.R') CREATE_SUB <- TRUE VISUALIZE <- FALSE rf_val_pred <- read_csv('rf_val_pred_v2.csv') rf_val_pred <- rf_val_pred$x rf_test_pred <- read_csv('rf_test_pred_v2.csv') rf_test_pred <- rf_test_pred$x et_v...
/model_xgb.R
no_license
dsoreo/kaggle-bnp
R
false
false
4,151
r
setwd("~/Documents/Kaggle/kaggle_bnp") IS_RF <- FALSE IS_GLMNET <- FALSE N_FOLD <- 10 source('./code/data_processing.R') CREATE_SUB <- TRUE VISUALIZE <- FALSE rf_val_pred <- read_csv('rf_val_pred_v2.csv') rf_val_pred <- rf_val_pred$x rf_test_pred <- read_csv('rf_test_pred_v2.csv') rf_test_pred <- rf_test_pred$x et_v...
#'Testing pathway risk association #' #'This functions computes p-values frm score tests of genetic pathway risk association in 5 different models #' #'@param data a \code{data.frame} of \code{N} rows and set up as the output from \code{\link{sim_SCR_data}} with columns:\itemize{ #'\item{\code{XR}:}{ time to recurrence...
/kernscr/R/compute_all_tests.R
no_license
ingted/R-Examples
R
false
false
13,512
r
#'Testing pathway risk association #' #'This functions computes p-values frm score tests of genetic pathway risk association in 5 different models #' #'@param data a \code{data.frame} of \code{N} rows and set up as the output from \code{\link{sim_SCR_data}} with columns:\itemize{ #'\item{\code{XR}:}{ time to recurrence...
# This file was generated by Rcpp::compileAttributes # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #' Check whether there are any non-finite values in a matrix #' #' The C++ functions will not work with NA values, and the calculation of the #' summary profile will take a long time to run before crashing. #' ...
/R/RcppExports.R
no_license
xflicsu/NetRep
R
false
false
13,508
r
# This file was generated by Rcpp::compileAttributes # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #' Check whether there are any non-finite values in a matrix #' #' The C++ functions will not work with NA values, and the calculation of the #' summary profile will take a long time to run before crashing. #' ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getTerminalNodes.R \name{getTerminalNodes} \alias{getTerminalNodes} \title{Returns all leafs of a tree} \usage{ getTerminalNodes(tree) } \arguments{ \item{tree}{A semtree object.} } \description{ Returns all leafs (=terminal nodes...
/man/getTerminalNodes.Rd
no_license
cran/semtree
R
false
true
563
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getTerminalNodes.R \name{getTerminalNodes} \alias{getTerminalNodes} \title{Returns all leafs of a tree} \usage{ getTerminalNodes(tree) } \arguments{ \item{tree}{A semtree object.} } \description{ Returns all leafs (=terminal nodes...
% Generated by roxygen2 (4.0.1): do not edit by hand \docType{data} \name{HELPmiss} \alias{HELPmiss} \title{Health Evaluation and Linkage to Primary Care} \format{Data frame with 470 observations on the following variables. \itemize{ \item{\code{age}} {subject age at baseline (in years)} \item{\code{anysub}}...
/man/HELPmiss.Rd
no_license
TotallyBullshit/mosaic
R
false
false
4,503
rd
% Generated by roxygen2 (4.0.1): do not edit by hand \docType{data} \name{HELPmiss} \alias{HELPmiss} \title{Health Evaluation and Linkage to Primary Care} \format{Data frame with 470 observations on the following variables. \itemize{ \item{\code{age}} {subject age at baseline (in years)} \item{\code{anysub}}...
## ----setup, include=FALSE------------------------------------------------ knitr::opts_chunk$set(echo = TRUE) ## ------------------------------------------------------------------------ library(shiny) library(rphylotastic) library(datelife) ## ------------------------------------------------------------------------ ...
/demo_build.R
no_license
jwiggi18/Education
R
false
false
2,684
r
## ----setup, include=FALSE------------------------------------------------ knitr::opts_chunk$set(echo = TRUE) ## ------------------------------------------------------------------------ library(shiny) library(rphylotastic) library(datelife) ## ------------------------------------------------------------------------ ...
# Open packages library(plyr) library(lubridate) library(data.table) library(geosphere) # Read in anglingXwater aud <- read.csv("./analysis/anglingXwater_usa.csv", header = TRUE, colClasses = c("character", ...
/code/waterbodydistances.R
no_license
woodsp/angling
R
false
false
2,980
r
# Open packages library(plyr) library(lubridate) library(data.table) library(geosphere) # Read in anglingXwater aud <- read.csv("./analysis/anglingXwater_usa.csv", header = TRUE, colClasses = c("character", ...
library(shiny) library(datasets) aquinplor <- mtcars aquinplor$am <- factor(aquinplor$am, labels = c("Auto", "Man")) shinyServer(function(input, output) { fibbelous <- reactive({ paste("mpg ~", input$variable) }) fibbelousPoint <- reactive({ paste("mpg ~", "as.intege...
/folder1/server.R
no_license
shams17/ASS-6
R
false
false
1,010
r
library(shiny) library(datasets) aquinplor <- mtcars aquinplor$am <- factor(aquinplor$am, labels = c("Auto", "Man")) shinyServer(function(input, output) { fibbelous <- reactive({ paste("mpg ~", input$variable) }) fibbelousPoint <- reactive({ paste("mpg ~", "as.intege...
library(censusapi); library(tidyverse) Divisions <- lapply(c("35620", "31080", "16980", "19100", "37980", "47900", "33100", "14460", "41860", "19820", "42660"), function(d){ getCensus(name="acs5", vintage = 2015, ...
/data-raw/divisions.R
no_license
mwillumz/brfss
R
false
false
1,045
r
library(censusapi); library(tidyverse) Divisions <- lapply(c("35620", "31080", "16980", "19100", "37980", "47900", "33100", "14460", "41860", "19820", "42660"), function(d){ getCensus(name="acs5", vintage = 2015, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/xprocess.R \name{external_process} \alias{external_process} \title{External process via a process generator} \usage{ external_process(process_generator, error_on_status = TRUE, ...) } \arguments{ \item{process_generator}{Function that returns...
/man/external_process.Rd
permissive
jimsforks/async
R
false
true
1,740
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/xprocess.R \name{external_process} \alias{external_process} \title{External process via a process generator} \usage{ external_process(process_generator, error_on_status = TRUE, ...) } \arguments{ \item{process_generator}{Function that returns...
rm(list=ls()) library(cvTools);library(MASS);library(dplyr);library(tseries); library(plm); library(nlme); library(lme4); library(lattice); library(car); library(lmerTest); library(optimx) load("dataFS/Main/DaTS.RData") # load("Rcodes/DecemberNew/KEN11d_stepNice.RData") #ooooooooooooooooooooooooooooooooooooooooooooooo...
/Rcodes/crossvalidation/second.R
no_license
MonikaNovackova/FoodSystemGitH
R
false
false
2,030
r
rm(list=ls()) library(cvTools);library(MASS);library(dplyr);library(tseries); library(plm); library(nlme); library(lme4); library(lattice); library(car); library(lmerTest); library(optimx) load("dataFS/Main/DaTS.RData") # load("Rcodes/DecemberNew/KEN11d_stepNice.RData") #ooooooooooooooooooooooooooooooooooooooooooooooo...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rasterDistance.R \name{rasterDistance} \alias{rasterDistance} \title{Raster Distance} \usage{ rasterDistance(x, y, scale = FALSE) } \arguments{ \item{x}{A terra SpatRast or sf class object} \item{y}{Value(s) in x to to calculate distance to}...
/man/rasterDistance.Rd
no_license
cran/spatialEco
R
false
true
2,265
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rasterDistance.R \name{rasterDistance} \alias{rasterDistance} \title{Raster Distance} \usage{ rasterDistance(x, y, scale = FALSE) } \arguments{ \item{x}{A terra SpatRast or sf class object} \item{y}{Value(s) in x to to calculate distance to}...
library(plotly) #reading the heap map data from file HeatMap <- read.csv("FluHeatMap_USA.csv", header=T) # input file : 'FluHeatMap_USA.csv' p <- plot_geo(HeatMap, locationmode = 'USA-states') %>% add_trace( z = ~HeatMap$LEVEL, locations = ~HeatMap$STATE, color = ~HeatMap$LEVEL, colors = 'Reds' ) %>% colo...
/DATA INTENSIVE COMPUTING/Exploratory Data Analysis using R/part2/5.r
no_license
Sriramwall/MASTER_CS_PROJECTS
R
false
false
588
r
library(plotly) #reading the heap map data from file HeatMap <- read.csv("FluHeatMap_USA.csv", header=T) # input file : 'FluHeatMap_USA.csv' p <- plot_geo(HeatMap, locationmode = 'USA-states') %>% add_trace( z = ~HeatMap$LEVEL, locations = ~HeatMap$STATE, color = ~HeatMap$LEVEL, colors = 'Reds' ) %>% colo...
# $Id: mvnorm.R 332 2016-10-27 09:17:12Z thothorn $ rmvnorm <- function(n, mean = rep(0, nrow(sigma)), sigma = diag(length(mean)), method=c("eigen", "svd", "chol"), pre0.9_9994 = FALSE) { if (!isSymmetric(sigma, tol = sqrt(.Machine$double.eps), check.attributes = FALSE)) { ...
/R/mvnorm.R
no_license
wang-wenjie/mvtnorm_prec
R
false
false
2,707
r
# $Id: mvnorm.R 332 2016-10-27 09:17:12Z thothorn $ rmvnorm <- function(n, mean = rep(0, nrow(sigma)), sigma = diag(length(mean)), method=c("eigen", "svd", "chol"), pre0.9_9994 = FALSE) { if (!isSymmetric(sigma, tol = sqrt(.Machine$double.eps), check.attributes = FALSE)) { ...
## ----echo = FALSE, warning = FALSE-------------------------------------------- library(rhandsontable) library(knitr) opts_knit$set(warning = FALSE, error = FALSE, message = FALSE, cache = FALSE, fig.width=7, fig.height=3) ## ----------------------------------------------------------------------...
/inst/doc/intro_rhandsontable.R
permissive
cran/rhandsontable
R
false
false
16,602
r
## ----echo = FALSE, warning = FALSE-------------------------------------------- library(rhandsontable) library(knitr) opts_knit$set(warning = FALSE, error = FALSE, message = FALSE, cache = FALSE, fig.width=7, fig.height=3) ## ----------------------------------------------------------------------...
library(readxl) library(dplyr) # get data for boundaries and variance components from dropbox source("data_preparation/excel_to_text.R") file<-"C:/Users/CJM/Dropbox/WATERS_tools/tables_for_waters_tool/Structured tables for shinyapp and R.xlsx" # Variance Components df_varcomp <- excel_to_text(xlfile=file,sheet...
/data_preparation/tables_from_dropbox.R
permissive
NIVA-Denmark/ekostat
R
false
false
812
r
library(readxl) library(dplyr) # get data for boundaries and variance components from dropbox source("data_preparation/excel_to_text.R") file<-"C:/Users/CJM/Dropbox/WATERS_tools/tables_for_waters_tool/Structured tables for shinyapp and R.xlsx" # Variance Components df_varcomp <- excel_to_text(xlfile=file,sheet...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.45229970586139e+295, 1.22810536108214e+146, 4.12396251261199e-221, 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))) result <- do.call(CNull:::communities_individual_...
/CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615829395-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
361
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.45229970586139e+295, 1.22810536108214e+146, 4.12396251261199e-221, 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))) result <- do.call(CNull:::communities_individual_...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/indexBox.R \name{indexBox} \alias{indexBox} \title{Get indices of adjacent entries in array} \usage{ indexBox(upp, lwr, dim) } \arguments{ \item{upp}{A vector of non-negative integers, giving the distance in the positive direction from the ce...
/man/indexBox.Rd
no_license
rje42/rje
R
false
true
1,410
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/indexBox.R \name{indexBox} \alias{indexBox} \title{Get indices of adjacent entries in array} \usage{ indexBox(upp, lwr, dim) } \arguments{ \item{upp}{A vector of non-negative integers, giving the distance in the positive direction from the ce...
# # testthat.R # loads the package and the testhat framework # library(testthat) library(gmtools2) test_check("gmtools2")
/tests/testthat.R
no_license
gm209/gmtools2
R
false
false
124
r
# # testthat.R # loads the package and the testhat framework # library(testthat) library(gmtools2) test_check("gmtools2")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{selectItem} \alias{selectItem} \title{Select Next Item} \usage{ selectItem(catObj) } \arguments{ \item{catObj}{An object of class \code{Cat}} } \value{ The function \code{selectItem} returns a list with two elements: \co...
/man/selectItem.Rd
no_license
domlockett/catSurv
R
false
true
5,124
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{selectItem} \alias{selectItem} \title{Select Next Item} \usage{ selectItem(catObj) } \arguments{ \item{catObj}{An object of class \code{Cat}} } \value{ The function \code{selectItem} returns a list with two elements: \co...
makeCacheMatrix <- function(X = matrix()) { #This function creates a special "matrix" object that can cache its inverse M <- NULL set <- function(Y) { X <<- Y M <<- NULL } get <- function() X setinverse <- function(inverse) M <<- inverse getinverse <- function() M list(set = set, get = get, ...
/cachematrix.R
no_license
andre07/ProgrammingAssignment2
R
false
false
676
r
makeCacheMatrix <- function(X = matrix()) { #This function creates a special "matrix" object that can cache its inverse M <- NULL set <- function(Y) { X <<- Y M <<- NULL } get <- function() X setinverse <- function(inverse) M <<- inverse getinverse <- function() M list(set = set, get = get, ...
#' Compute detection probability for distance sampling with movement model #' #' @param ds named list of distance sampling data: #' $data: matrix with observations for each row with (transect ID, x, y, t) columns #' $transect: matrix with transects for each row with (transect ID, length) #' $aux: vect...
/R/penc.R
permissive
r-glennie/moveds
R
false
false
2,899
r
#' Compute detection probability for distance sampling with movement model #' #' @param ds named list of distance sampling data: #' $data: matrix with observations for each row with (transect ID, x, y, t) columns #' $transect: matrix with transects for each row with (transect ID, length) #' $aux: vect...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CFAR.r \name{est_cfar} \alias{est_cfar} \title{Estimation of a CFAR Process} \usage{ est_cfar(f, p = 3, df_b = 10, grid = 1000) } \arguments{ \item{f}{the functional time series.} \item{p}{the CFAR order.} \item{df_b}{the degrees of freedom...
/man/est_cfar.Rd
no_license
cran/NTS
R
false
true
1,068
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/CFAR.r \name{est_cfar} \alias{est_cfar} \title{Estimation of a CFAR Process} \usage{ est_cfar(f, p = 3, df_b = 10, grid = 1000) } \arguments{ \item{f}{the functional time series.} \item{p}{the CFAR order.} \item{df_b}{the degrees of freedom...
library(testthat) library(recipes) skip_if_not_installed("modeldata") data(biomass, package = "modeldata") # ------------------------------------------------------------------------------ test_that("correct basis functions", { skip_if_not_installed("splines2") biomass_tr <- biomass[biomass$dataset == "Training...
/tests/testthat/test-spline_b.R
no_license
cran/recipes
R
false
false
6,389
r
library(testthat) library(recipes) skip_if_not_installed("modeldata") data(biomass, package = "modeldata") # ------------------------------------------------------------------------------ test_that("correct basis functions", { skip_if_not_installed("splines2") biomass_tr <- biomass[biomass$dataset == "Training...
integral <- function(x, y){ maxTrape <- function(tam){ if(tam <= 2){ return (1) } else{ if((tam %% 2) == 0){ paso = (tam/2) } else{ paso = ((tam+1)/2) } return(1 + maxTrape(paso)) } } pasoPivote <- function(cantiParticiones, tamDatos){ whil...
/Proyecto/Richardson entrega 26 octubre/Richardson/R/richardson2.R
no_license
barajas-d/Analisis-Numerico
R
false
false
1,635
r
integral <- function(x, y){ maxTrape <- function(tam){ if(tam <= 2){ return (1) } else{ if((tam %% 2) == 0){ paso = (tam/2) } else{ paso = ((tam+1)/2) } return(1 + maxTrape(paso)) } } pasoPivote <- function(cantiParticiones, tamDatos){ whil...
# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be use...
/R/dayOfWeek.R
no_license
cran/fCalendar
R
false
false
2,061
r
# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be use...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/expect_lint.R \name{expect_lint} \alias{expect_lint} \title{Lint expectation} \usage{ expect_lint(content, checks, ..., file = NULL) } \arguments{ \item{content}{the file content to be linted} \item{checks}{a list of named vectors of...
/man/expect_lint.Rd
no_license
soc504-s2015-princeton/lintr
R
false
false
899
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/expect_lint.R \name{expect_lint} \alias{expect_lint} \title{Lint expectation} \usage{ expect_lint(content, checks, ..., file = NULL) } \arguments{ \item{content}{the file content to be linted} \item{checks}{a list of named vectors of...
library(datasets) pdf(file = "myplot.pdf") with(faithful, plot(eruptions, waiting)) title(main = "Old Faithful Geyser data") dev.off() #dev.copy #dev.copy2pdf library(datasets) with(faithful, plot(eruptions, waiting)) dev.copy(png, file = "geyserplot.png") dev.off() dev.cur() #See that the screen is still open dev.of...
/exdatacourse/week_1_notes/saving_to_file.R
no_license
rrgayhart/datasciencecoursera
R
false
false
324
r
library(datasets) pdf(file = "myplot.pdf") with(faithful, plot(eruptions, waiting)) title(main = "Old Faithful Geyser data") dev.off() #dev.copy #dev.copy2pdf library(datasets) with(faithful, plot(eruptions, waiting)) dev.copy(png, file = "geyserplot.png") dev.off() dev.cur() #See that the screen is still open dev.of...
library(data.cleaning.HU) context("cleanZip") test_that("hosszok_egyeznek",{ expect_equal(length(cleanZip(character(0))), 0) expect_equal(length(cleanZip("2011 Budakal\u00E1sz, Kinizsi utca 33.")), 1) expect_equal(length(cleanZip(c("2011 Budakal\u00E1sz, Kinizsi utca 33.", ...
/tests/testthat/test_cleanZip.R
no_license
atajti/data.cleaning.HU
R
false
false
1,012
r
library(data.cleaning.HU) context("cleanZip") test_that("hosszok_egyeznek",{ expect_equal(length(cleanZip(character(0))), 0) expect_equal(length(cleanZip("2011 Budakal\u00E1sz, Kinizsi utca 33.")), 1) expect_equal(length(cleanZip(c("2011 Budakal\u00E1sz, Kinizsi utca 33.", ...
library(shiny) xlsx.writeMultipleData <- function (file, ...){ temp_file <- tempfile(fileext = ".xlsx") require(xlsx, quietly = TRUE) objects <- list(...) fargs <- as.list(match.call(expand.dots = TRUE)) objnames <- as.character(fargs)[-c(1, 2)] nobjects <- length(objects) for (i in...
/excel_download/app.R
permissive
ClinicoPath/shinyPivot
R
false
false
1,012
r
library(shiny) xlsx.writeMultipleData <- function (file, ...){ temp_file <- tempfile(fileext = ".xlsx") require(xlsx, quietly = TRUE) objects <- list(...) fargs <- as.list(match.call(expand.dots = TRUE)) objnames <- as.character(fargs)[-c(1, 2)] nobjects <- length(objects) for (i in...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AccessFilter.r \name{AccessFilter} \alias{AccessFilter} \title{AccessFilter Class} \description{ AccessFilter Class AccessFilter Class } \section{Public fields}{ \if{html}{\out{<div class="r6-fields">}} \describe{ \item{\code{id}}{} \item{\...
/man/AccessFilter.Rd
permissive
grepinsight/lookr
R
false
true
2,832
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AccessFilter.r \name{AccessFilter} \alias{AccessFilter} \title{AccessFilter Class} \description{ AccessFilter Class AccessFilter Class } \section{Public fields}{ \if{html}{\out{<div class="r6-fields">}} \describe{ \item{\code{id}}{} \item{\...
context("Utility functions") ## Checking for object types---------------------- ------------------------ test_that("Type check reveals wrong admixr type", { x <- data.frame() class(x) <- "random" expect_error(check_type(x, "admixr_result")) }) test_that("Type check accepts the correct admixr type", { ...
/tests/testthat/test-utils.R
permissive
jpgourdine/admixr
R
false
false
4,919
r
context("Utility functions") ## Checking for object types---------------------- ------------------------ test_that("Type check reveals wrong admixr type", { x <- data.frame() class(x) <- "random" expect_error(check_type(x, "admixr_result")) }) test_that("Type check accepts the correct admixr type", { ...
con <- file("household_power_consumption.txt", "r") data <- data.frame(Data = character(), Time = character(), Global_active_power = numeric(), Global_reactive_power = numeric(), Voltage = numeric(), Global_intensity = numeric(), ...
/Exploratory Data Analysis/Assignment 1/plot4.R
no_license
PaurakhTC/datasciencecoursera-1
R
false
false
1,860
r
con <- file("household_power_consumption.txt", "r") data <- data.frame(Data = character(), Time = character(), Global_active_power = numeric(), Global_reactive_power = numeric(), Voltage = numeric(), Global_intensity = numeric(), ...