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
library(ggplot2) library(data.table) library(dplyr) library(tidyverse) # Create file and download the zipfile if(!file.exists("./DataProject")){dir.create("./DataProject")} FileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(FileUrl, destfile = "....
/run_analysis.R
no_license
RosalieDud/Getting-and-Cleaning-Data-Course-Project
R
false
false
3,286
r
library(ggplot2) library(data.table) library(dplyr) library(tidyverse) # Create file and download the zipfile if(!file.exists("./DataProject")){dir.create("./DataProject")} FileUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(FileUrl, destfile = "....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regression_plot.R \name{is_mean_enclosed} \alias{is_mean_enclosed} \title{Check mean enclosure} \usage{ is_mean_enclosed(data, x, y, conf.level = 0.99) } \arguments{ \item{data}{data object} \item{x}{age variable in \code{data}} \item{y}{ex...
/BrCa_Age_Associated_TMA/Packages/ageassn/man/is_mean_enclosed.Rd
no_license
BCCRCMO/BrCa_AgeAssociations
R
false
true
873
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/regression_plot.R \name{is_mean_enclosed} \alias{is_mean_enclosed} \title{Check mean enclosure} \usage{ is_mean_enclosed(data, x, y, conf.level = 0.99) } \arguments{ \item{data}{data object} \item{x}{age variable in \code{data}} \item{y}{ex...
# change the size of the points p + geom_point(aes(population/10^6, total), size = 3) + geom_text(aes(population/10^6, total, label = abb)) # move text labels slightly to the right p + geom_point(aes(population/10^6, total), size = 3) + geom_text(aes(population/10^6, total, label = abb), nudge_x = 1) # simplify c...
/tinkering/Ag.r
no_license
Brandon780/scripts_
R
false
false
602
r
# change the size of the points p + geom_point(aes(population/10^6, total), size = 3) + geom_text(aes(population/10^6, total, label = abb)) # move text labels slightly to the right p + geom_point(aes(population/10^6, total), size = 3) + geom_text(aes(population/10^6, total, label = abb), nudge_x = 1) # simplify c...
#' Dimension Stability Analysis of \code{\link[EGAnet]{EGA}} #' #' \code{bootEGA} Estimates the number of dimensions of \emph{n} bootstraps #' using the empirical (partial) correlation matrix (parametric) or resampling from #' the empirical dataset (non-parametric). It also estimates a typical #' median network st...
/R/bootEGA.R
no_license
jmbh/EGAnet
R
false
false
12,383
r
#' Dimension Stability Analysis of \code{\link[EGAnet]{EGA}} #' #' \code{bootEGA} Estimates the number of dimensions of \emph{n} bootstraps #' using the empirical (partial) correlation matrix (parametric) or resampling from #' the empirical dataset (non-parametric). It also estimates a typical #' median network st...
\name{SCA} \alias{SCA} \alias{SCA.G3} \alias{SCA.GE} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Specific Combining Ability } \description{ SCA effect to fit Hayman2, Griffing3 (SCA.G3), GE2 and GE3 (SCA.GE) models with \code{lm} function } \usage{ SCA(P1, P2, type = "fix", data) SCA.G3(P1, P...
/man/SCA.Rd
no_license
spoicts/lmDiallel
R
false
false
1,457
rd
\name{SCA} \alias{SCA} \alias{SCA.G3} \alias{SCA.GE} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Specific Combining Ability } \description{ SCA effect to fit Hayman2, Griffing3 (SCA.G3), GE2 and GE3 (SCA.GE) models with \code{lm} function } \usage{ SCA(P1, P2, type = "fix", data) SCA.G3(P1, P...
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Correlation/oesophagus.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.04,family="gaussian",standardize=FALSE) sink('./oesophagus_018.txt',app...
/Model/EN/Correlation/oesophagus/oesophagus_018.R
no_license
esbgkannan/QSMART
R
false
false
359
r
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Correlation/oesophagus.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.04,family="gaussian",standardize=FALSE) sink('./oesophagus_018.txt',app...
fig05x014<-function(){ mass<-c(5.9,32.0,40.0,51.5,70.0,100.0,78.0,80.0,85.0,85.0, 110.0,115.0,125.0,130.0,120.0,120.0,130.0,135.0,110.0,130.0, 150.0,145.0,150.0,170.0,225.0,145.0,188.0,180.0,197.0,218.0, 300.0,260.0,265.0,250.0,250.0,300.0,320.0,514.0,556.0,840.0, 685.0,700.0,700.0,690.0,900.0,650.0,820.0,850.0,90...
/graphicsforstatistics_2e_figures_scripts_r/Chapter 5/fig05x014.R
no_license
saqibarfeen/coding_time
R
false
false
839
r
fig05x014<-function(){ mass<-c(5.9,32.0,40.0,51.5,70.0,100.0,78.0,80.0,85.0,85.0, 110.0,115.0,125.0,130.0,120.0,120.0,130.0,135.0,110.0,130.0, 150.0,145.0,150.0,170.0,225.0,145.0,188.0,180.0,197.0,218.0, 300.0,260.0,265.0,250.0,250.0,300.0,320.0,514.0,556.0,840.0, 685.0,700.0,700.0,690.0,900.0,650.0,820.0,850.0,90...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model_training.R \name{xgb_data} \alias{xgb_data} \title{XGboost data} \usage{ xgb_data( dat_train, target, dat_test = NULL, x_list = NULL, prop = 0.7, occur_time = NULL ) } \arguments{ \item{dat_train}{data.frame ...
/man/xgb_data.Rd
no_license
cran/creditmodel
R
false
true
838
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model_training.R \name{xgb_data} \alias{xgb_data} \title{XGboost data} \usage{ xgb_data( dat_train, target, dat_test = NULL, x_list = NULL, prop = 0.7, occur_time = NULL ) } \arguments{ \item{dat_train}{data.frame ...
# Constructs the overall matrix of the model. # pars: Paramter values to be used. # sigmaType: Structure of the matrices in the model. # 0 - Diagonal # 1 - Exchangeable # 2 - AR(1) # kK: Number of random effects. This is the dimension of the overall matrix model. # kR: ...
/R/constructSigma.R
no_license
cran/mcemGLM
R
false
false
3,478
r
# Constructs the overall matrix of the model. # pars: Paramter values to be used. # sigmaType: Structure of the matrices in the model. # 0 - Diagonal # 1 - Exchangeable # 2 - AR(1) # kK: Number of random effects. This is the dimension of the overall matrix model. # kR: ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/synthetic-datasets.R \name{getGrowthRateBasedDataset} \alias{getGrowthRateBasedDataset} \title{Convenience method to generate a random growth rate simulation} \usage{ getGrowthRateBasedDataset( growthSimulation = NULL, bootstraps = 100, ...
/r-library/man/getGrowthRateBasedDataset.Rd
permissive
terminological/jepidemic
R
false
true
1,019
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/synthetic-datasets.R \name{getGrowthRateBasedDataset} \alias{getGrowthRateBasedDataset} \title{Convenience method to generate a random growth rate simulation} \usage{ getGrowthRateBasedDataset( growthSimulation = NULL, bootstraps = 100, ...
###### This is HW1 from Data Analytics Tools and Techniques ### Where the real magic happens X_test = read.table("C:/Users/Mike/Documents/Data Analytics Tools and Techniques/UCI_HAR_Dataset/UCI HAR Dataset/test/X_test.txt", sep="") y_test = read.table("C:/Users/Mike/Documents/Data Analytics Tools and Techniques/UCI_...
/run_analysis.R
no_license
MrMikeMahoney/Data_Analytics_Tools_Tech
R
false
false
4,010
r
###### This is HW1 from Data Analytics Tools and Techniques ### Where the real magic happens X_test = read.table("C:/Users/Mike/Documents/Data Analytics Tools and Techniques/UCI_HAR_Dataset/UCI HAR Dataset/test/X_test.txt", sep="") y_test = read.table("C:/Users/Mike/Documents/Data Analytics Tools and Techniques/UCI_...
test_that("s_group works", { ind <- make_s_group(list(id = 1, month = "Jan")) expect_equal(names(ind), c("id", "month")) # burst names not duplicated expect_error(make_s_group(list(id = 1, id = 1)), "group names are duplicated") # There is an id column expect_error(make_s_group(list(month = "Jan", Year ...
/tests/testthat/test-burst_tj.R
permissive
jmsigner/sftrack
R
false
false
3,112
r
test_that("s_group works", { ind <- make_s_group(list(id = 1, month = "Jan")) expect_equal(names(ind), c("id", "month")) # burst names not duplicated expect_error(make_s_group(list(id = 1, id = 1)), "group names are duplicated") # There is an id column expect_error(make_s_group(list(month = "Jan", Year ...
## KOOPERBERG.R # KOOPERBERG BACKGROUND ADUSTMENT FOR GENEPIX DATA kooperberg <- function (RG, a = TRUE, layout=RG$printer, verbose=TRUE) # Kooperberg Bayesian background correction # Matt Ritchie # Charles Kooperberg contributed 'a' estimation functions (.getas, .varaux1, .varaux2) # Last modified 31 Octobe...
/R/background-kooperberg.R
no_license
hdeberg/limma
R
false
false
6,960
r
## KOOPERBERG.R # KOOPERBERG BACKGROUND ADUSTMENT FOR GENEPIX DATA kooperberg <- function (RG, a = TRUE, layout=RG$printer, verbose=TRUE) # Kooperberg Bayesian background correction # Matt Ritchie # Charles Kooperberg contributed 'a' estimation functions (.getas, .varaux1, .varaux2) # Last modified 31 Octobe...
# 符号图提供的六种基本符号 set.seed(123) par(mar = c(6, 1, 0.1, 0.1), las = 2) plot(1:6, rep(1, 6), type = "n", axes = FALSE, ann = FALSE, xlim = c(0.8, 7.2), ylim = c(0, 5), panel.first = grid()) x = seq(1, 2, length = 4) symbols(x, 1:4, circles = runif(4, 0.1, 0.6), add = TRUE, bg = heat.colors(4), inches = FALSE) sy...
/inst/examples/symbols_all.R
no_license
yihui/MSG
R
false
false
966
r
# 符号图提供的六种基本符号 set.seed(123) par(mar = c(6, 1, 0.1, 0.1), las = 2) plot(1:6, rep(1, 6), type = "n", axes = FALSE, ann = FALSE, xlim = c(0.8, 7.2), ylim = c(0, 5), panel.first = grid()) x = seq(1, 2, length = 4) symbols(x, 1:4, circles = runif(4, 0.1, 0.6), add = TRUE, bg = heat.colors(4), inches = FALSE) sy...
################################################################################ # LNR variance linear in mean parameterizaton ################################################################################ start.model <- function(dati,pnams,Bounds) { p<- sfun(dati,pnams,pc=.01,aprior=.5,tertune=.5) p$a <- min(p$...
/ModelComparisons/SPENCER/rc/MP-LNR1.R
no_license
sccastro/R_data
R
false
false
872
r
################################################################################ # LNR variance linear in mean parameterizaton ################################################################################ start.model <- function(dati,pnams,Bounds) { p<- sfun(dati,pnams,pc=.01,aprior=.5,tertune=.5) p$a <- min(p$...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PullTrueProj.R \name{PullTrueProj} \alias{PullTrueProj} \title{Pull True Projections Not used anywhere... yet.} \usage{ PullTrueProj(CTLNameList, out, MSEdir) } \arguments{ \item{CTLNameList}{Vector of CTL file names} \item{out}{List output ...
/man/PullTrueProj.Rd
permissive
tengguangliang/GeMS
R
false
true
873
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/PullTrueProj.R \name{PullTrueProj} \alias{PullTrueProj} \title{Pull True Projections Not used anywhere... yet.} \usage{ PullTrueProj(CTLNameList, out, MSEdir) } \arguments{ \item{CTLNameList}{Vector of CTL file names} \item{out}{List output ...
## workhorse function for compiling (collections of) exercises exams <- function(file, n = 1, nsamp = NULL, dir = NULL, template = "plain", inputs = NULL, header = list(Date = Sys.Date()), name = NULL, quiet = TRUE, edir = NULL, tdir = NULL, control = NULL) { ## convenience function strip_path <- function(fil...
/R/exams.R
no_license
MalloryJfeldman/exams
R
false
false
12,064
r
## workhorse function for compiling (collections of) exercises exams <- function(file, n = 1, nsamp = NULL, dir = NULL, template = "plain", inputs = NULL, header = list(Date = Sys.Date()), name = NULL, quiet = TRUE, edir = NULL, tdir = NULL, control = NULL) { ## convenience function strip_path <- function(fil...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \name{TSS_mm10} \alias{TSS_mm10} \title{TSS locations} \format{A named vectors of lengths with one item per chromosome} \source{ BSGenome package } \description{ A dataset containing chromosome sizes for common reference genome assembl...
/man/TSS_mm10.Rd
no_license
tdanehy/GenomicDistributions
R
false
true
326
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \name{TSS_mm10} \alias{TSS_mm10} \title{TSS locations} \format{A named vectors of lengths with one item per chromosome} \source{ BSGenome package } \description{ A dataset containing chromosome sizes for common reference genome assembl...
# %% --------------------------------------------------------------- # This script computes the ranking corresponding to each round # %% --------------------------------------------------------------- # Global variables DIR_IN <- "data-input/" # %% --------------------------------------------------------------- # Loa...
/main.R
no_license
VSablin/Zurich1953
R
false
false
6,554
r
# %% --------------------------------------------------------------- # This script computes the ranking corresponding to each round # %% --------------------------------------------------------------- # Global variables DIR_IN <- "data-input/" # %% --------------------------------------------------------------- # Loa...
library(shinydashboard) library(tidyverse) library(ggplot2) library(dplyr) library(usmap) library(plotly) library(DT) library(shinyWidgets) # load datset of prescription counts by state nba_85_to_now_grouped <- readRDS('data/85_to_now_grouped.rds') nba_14_to_present_merged <- readRDS('data/nba_14_to_present_merged.rds...
/nba-stats-shiny-dashboard/global.R
no_license
amarsee/nba-effects-of-rest-on-team-stats
R
false
false
967
r
library(shinydashboard) library(tidyverse) library(ggplot2) library(dplyr) library(usmap) library(plotly) library(DT) library(shinyWidgets) # load datset of prescription counts by state nba_85_to_now_grouped <- readRDS('data/85_to_now_grouped.rds') nba_14_to_present_merged <- readRDS('data/nba_14_to_present_merged.rds...
#' Replicate expression and return results in a list. #' #' Evalulate expression n times then combine results into a list #' #' This function runs an expression multiple times, and combines the #' result into a list. If there are no results, then this function will return #' a list of length 0 (\code{list()}). This f...
/R/rlply.r
no_license
tentacles-from-outer-space/plyr
R
false
false
3,855
r
#' Replicate expression and return results in a list. #' #' Evalulate expression n times then combine results into a list #' #' This function runs an expression multiple times, and combines the #' result into a list. If there are no results, then this function will return #' a list of length 0 (\code{list()}). This f...
#starts stuff1<-read.table("stuff1.txt",header=TRUE,sep=",") stuff1.label<-rep(1,100) stuff1<-cbind(stuff1,stuff1.label) names(stuff1)<-c("weight","height","label") stuff2<-read.table("stuff2.txt",header=TRUE,sep=",") stuff2.label<-rep(-1,100) stuff2<-cbind(stuff2,stuff2.label) names(stuff2)<-c("weight","he...
/handcode/split_train_and_test_sets.R
no_license
herrj1/R
R
false
false
542
r
#starts stuff1<-read.table("stuff1.txt",header=TRUE,sep=",") stuff1.label<-rep(1,100) stuff1<-cbind(stuff1,stuff1.label) names(stuff1)<-c("weight","height","label") stuff2<-read.table("stuff2.txt",header=TRUE,sep=",") stuff2.label<-rep(-1,100) stuff2<-cbind(stuff2,stuff2.label) names(stuff2)<-c("weight","he...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/energy_util.R \name{conditional.config.energy2} \alias{conditional.config.energy2} \title{Energy function for energy of a conditional configuration of states E(Xi | X/Xi). Uses the feature formulation.} \usage{ conditional.config.energy2( t...
/man/conditional.config.energy2.Rd
no_license
npetraco/CRFutil
R
false
true
820
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/energy_util.R \name{conditional.config.energy2} \alias{conditional.config.energy2} \title{Energy function for energy of a conditional configuration of states E(Xi | X/Xi). Uses the feature formulation.} \usage{ conditional.config.energy2( t...
#install packages install.packages("maps") install.packages("gglot2") install.packages("ggmap") #load GGPlot2 library(ggmap) library(ggplot2) library(maptools) library(datasets) library(maps) library(plyr) library(reshape2) #Set working directory setwd("C:\\Users\\tyler.DESKTOP-7I7VF8T\\Desktop\\OneDrive...
/Data-Science/Rio-Olympic-2016/map.R
no_license
Hackel15/Marquette-Projects
R
false
false
2,715
r
#install packages install.packages("maps") install.packages("gglot2") install.packages("ggmap") #load GGPlot2 library(ggmap) library(ggplot2) library(maptools) library(datasets) library(maps) library(plyr) library(reshape2) #Set working directory setwd("C:\\Users\\tyler.DESKTOP-7I7VF8T\\Desktop\\OneDrive...
# #Generating weights from prior # #Split into jobs in order to improve speed of the inference # library(data.table) # library(abind) # source("/well/mcvean/mtutert/thesis_code/thesis_code/coalescent_coverage/helper_functions.R") # file = snakemake@params$replicates # chunk = snakemake@pa...
/coalescent_coverage/prior_draws/draw_weights.R
no_license
marcustutert/thesis_code
R
false
false
6,904
r
# #Generating weights from prior # #Split into jobs in order to improve speed of the inference # library(data.table) # library(abind) # source("/well/mcvean/mtutert/thesis_code/thesis_code/coalescent_coverage/helper_functions.R") # file = snakemake@params$replicates # chunk = snakemake@pa...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/combine_mgNetworks.R \name{combine_mgNetworks} \alias{combine_mgNetworks} \title{Combine Mangal networks.} \usage{ combine_mgNetworks(...) } \arguments{ \item{...}{objects of class \code{mgNetworksCollection} or \code{mgNetwork} or a list #' ...
/man/combine_mgNetworks.Rd
no_license
KevCaz/rmangal
R
false
true
711
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/combine_mgNetworks.R \name{combine_mgNetworks} \alias{combine_mgNetworks} \title{Combine Mangal networks.} \usage{ combine_mgNetworks(...) } \arguments{ \item{...}{objects of class \code{mgNetworksCollection} or \code{mgNetwork} or a list #' ...
library(shiny) source("functionsGraph.R") # Define UI for application that draws a histogram ui <- fluidPage( # Application title navbarPage ( "Network Graphs", tabPanel("Point Network", selectInput("simpleNet", "Choose Family", c("Kapoor", "Anand")), visNetworkO...
/graph_app.R
no_license
aamodini/imdbBollywood
R
false
false
1,521
r
library(shiny) source("functionsGraph.R") # Define UI for application that draws a histogram ui <- fluidPage( # Application title navbarPage ( "Network Graphs", tabPanel("Point Network", selectInput("simpleNet", "Choose Family", c("Kapoor", "Anand")), visNetworkO...
hpc = read.delim('household_power_consumption.txt',sep = ';') hpc$Date = as.Date(as.character(hpc$Date),'%d/%m/%Y') hpc$Global_active_power = as.numeric(as.character(hpc$Global_active_power)) hpc = subset(hpc, hpc$Date >= '2007-02-01' & hpc$Date <= '2007-02-02') DT = as.POSIXct(paste(hpc$Date,hpc$Time), format = '%Y-%m...
/Exploratory Data Analysis/plot2.R
no_license
cc1101027/ExData_Plotting1
R
false
false
500
r
hpc = read.delim('household_power_consumption.txt',sep = ';') hpc$Date = as.Date(as.character(hpc$Date),'%d/%m/%Y') hpc$Global_active_power = as.numeric(as.character(hpc$Global_active_power)) hpc = subset(hpc, hpc$Date >= '2007-02-01' & hpc$Date <= '2007-02-02') DT = as.POSIXct(paste(hpc$Date,hpc$Time), format = '%Y-%m...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/strip_model.R \name{strip_model} \alias{strip_model} \title{Strip Model to Reduce Memory Footprint} \usage{ strip_model(model) } \arguments{ \item{model}{Object of class \code{glm} or \code{lm}} } \value{ Object of class \code{glm} or \code{l...
/man/strip_model.Rd
no_license
muschellij2/msseg
R
false
true
802
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/strip_model.R \name{strip_model} \alias{strip_model} \title{Strip Model to Reduce Memory Footprint} \usage{ strip_model(model) } \arguments{ \item{model}{Object of class \code{glm} or \code{lm}} } \value{ Object of class \code{glm} or \code{l...
library(moments) data=read.csv(choose.files()) metrics=data[,4:9] sta=data.frame(index=seq(1,10)) for(i in 1:6){ temp=metrics[,i] sta[,i+1]=c(fivenum(temp),mean(temp),skewness(temp)-3,kurtosis(temp),cor(temp,data$bug,method='pearson'),cor(temp,data$bug,method='spearman')) print(cor.test(temp,data$bug,method='pear...
/ex3_151278035_王洋/统计分析.R
no_license
NJUocean/Software-Metric
R
false
false
559
r
library(moments) data=read.csv(choose.files()) metrics=data[,4:9] sta=data.frame(index=seq(1,10)) for(i in 1:6){ temp=metrics[,i] sta[,i+1]=c(fivenum(temp),mean(temp),skewness(temp)-3,kurtosis(temp),cor(temp,data$bug,method='pearson'),cor(temp,data$bug,method='spearman')) print(cor.test(temp,data$bug,method='pear...
# Calculate quantiles # Hydrologic Response Units = HRUs library(data.table) library(dplyr) totS_data_yrs <- readRDS("WBEEP/cache/totS_yrs.rds") # A resulting value of 20% means that this value of stored water # is greater than 20% of the daily stored water values for that HRU # Calculate quantiles based on the l...
/WBEEP/rscripts/create_totalstorage_example_data/4_process_totS_yrs_percentiles.R
permissive
usgs-makerspace/makerspace-sandbox
R
false
false
2,653
r
# Calculate quantiles # Hydrologic Response Units = HRUs library(data.table) library(dplyr) totS_data_yrs <- readRDS("WBEEP/cache/totS_yrs.rds") # A resulting value of 20% means that this value of stored water # is greater than 20% of the daily stored water values for that HRU # Calculate quantiles based on the l...
\name{martin} \alias{martin} \docType{data} \title{ House martin count data.} \description{ House martin nest count data. Data are from Chapter 5 of Kery and Schaub (2012), Bayeisan Population Analysis Using WinBUGS - A heirarchical perspective. } \usage{data("martin")} \format{ A data frame with 20 observations on ...
/man/martin.Rd
no_license
chrissuthy/MT5767
R
false
false
767
rd
\name{martin} \alias{martin} \docType{data} \title{ House martin count data.} \description{ House martin nest count data. Data are from Chapter 5 of Kery and Schaub (2012), Bayeisan Population Analysis Using WinBUGS - A heirarchical perspective. } \usage{data("martin")} \format{ A data frame with 20 observations on ...
library(Hmisc) fname=file.choose() stopifnot(file.exists(fname)) titlename=strsplit(basename(fname),"\\.")[[1]][1]; #alternatively you can use #titlename=unlist(strsplit(basename(fname),"[.]"))[1] dat=read.csv(fname,sep="\t",skip=2) cond=dat[3:4] cond=cond[complete.cases(cond),] names(cond)=c("x","cond") ...
/GF-uv-fluor.R
no_license
YijiaXiong/scripts
R
false
false
2,213
r
library(Hmisc) fname=file.choose() stopifnot(file.exists(fname)) titlename=strsplit(basename(fname),"\\.")[[1]][1]; #alternatively you can use #titlename=unlist(strsplit(basename(fname),"[.]"))[1] dat=read.csv(fname,sep="\t",skip=2) cond=dat[3:4] cond=cond[complete.cases(cond),] names(cond)=c("x","cond") ...
library(ggplot2) set.seed(26061993) # Exercise a) tau = 0.4 p = 0.9 x = c(sample(c(0,1),1),rep(NA,249)) y = c(x[1] + rnorm(1,0,tau), rep(NA,249)) for (i in 2:250){ if (runif(1)<p){ x[i] = x[i-1] } else{x[i] = 1-x[i-1]} y[i] = x[i] + rnorm(1,0,tau) } df = data.frame(x = x, y = y) ggplot(df, aes(x = 1:250, y...
/Project 2 - code.R
no_license
henrisli/MA8001-Project-2
R
false
false
6,414
r
library(ggplot2) set.seed(26061993) # Exercise a) tau = 0.4 p = 0.9 x = c(sample(c(0,1),1),rep(NA,249)) y = c(x[1] + rnorm(1,0,tau), rep(NA,249)) for (i in 2:250){ if (runif(1)<p){ x[i] = x[i-1] } else{x[i] = 1-x[i-1]} y[i] = x[i] + rnorm(1,0,tau) } df = data.frame(x = x, y = y) ggplot(df, aes(x = 1:250, y...
################################################### ### chunk number 1: eval=FALSE ################################################### ## desktop=getwd() ## options(repos="http://cran.us.r-project.org") ## install.packages("plotrix",destdir=desktop,lib=desktop) ## library(plotrix,lib=desktop) ## install.packages("gplo...
/website/miscR.R
no_license
michaelfrancenelson/Bolker_2008_walkthrough
R
false
false
1,653
r
################################################### ### chunk number 1: eval=FALSE ################################################### ## desktop=getwd() ## options(repos="http://cran.us.r-project.org") ## install.packages("plotrix",destdir=desktop,lib=desktop) ## library(plotrix,lib=desktop) ## install.packages("gplo...
## A pair of functions that cache the inverse of a matrix ## Creates a special matrix object that can cache its inverse makeCacheMatrix <- function( m = matrix() ) { ## Initialize the inverse property i <- NULL ## Method to set the matrix set <- function( matrix ) { m <<- matrix ...
/cachematrix.R
no_license
dumiduattanayake/ProgrammingAssignment2
R
false
false
1,548
r
## A pair of functions that cache the inverse of a matrix ## Creates a special matrix object that can cache its inverse makeCacheMatrix <- function( m = matrix() ) { ## Initialize the inverse property i <- NULL ## Method to set the matrix set <- function( matrix ) { m <<- matrix ...
library(GFPLVCM) ### dependencies: MASS, fda, stats n=100 ## sample size pois_par=10 ## parameter for the Poission distribution to generate the observation times order_1=4; order_2=4 ## order of the B-splines in the s and u directions breaks=c(0,.2, .4, .6, .8, 1) ## knots of the B-splines #...
/Simulation_demo.R
no_license
BIG-S2/GFPLVCM
R
false
false
1,552
r
library(GFPLVCM) ### dependencies: MASS, fda, stats n=100 ## sample size pois_par=10 ## parameter for the Poission distribution to generate the observation times order_1=4; order_2=4 ## order of the B-splines in the s and u directions breaks=c(0,.2, .4, .6, .8, 1) ## knots of the B-splines #...
# params_mlogit_list() --------------------------------------------------------- #' Parameters of a list of multinomial logit models #' #' Create a list containing the parameters of multiple fitted multinomial logit models. #' Can be used to parameterize state transitions in a discrete time transition model #' by pass...
/R/params_mlogit_list.R
no_license
jeff-m-sullivan/hesim
R
false
false
2,787
r
# params_mlogit_list() --------------------------------------------------------- #' Parameters of a list of multinomial logit models #' #' Create a list containing the parameters of multiple fitted multinomial logit models. #' Can be used to parameterize state transitions in a discrete time transition model #' by pass...
# Reading data and put them into an array: data<-read.table("household_power_consumption.txt", sep=";", header=T, na.strings = "?") # Select a portion of the data that satisfies the dates below: small.data <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] # A useful object for dates: date.set <- strptime(paste(sma...
/plot2.R
no_license
choboroku/ExData_Plotting1
R
false
false
583
r
# Reading data and put them into an array: data<-read.table("household_power_consumption.txt", sep=";", header=T, na.strings = "?") # Select a portion of the data that satisfies the dates below: small.data <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] # A useful object for dates: date.set <- strptime(paste(sma...
rm(list=ls()) # on linux: sudo apt-get install r-cran-rjava to get Rcpp, JDK working (needed for these libraries) library(igraph) library(stringr) library(openxlsx) # modify your path as appropriate # note that this a slow/inefficient function - CSV or similar format would be better data <- read.xlsx("/home/rbshaffer...
/resources/terrorism_example/02_bipartiteprojection_centrality.R
permissive
rbshaffer/narg
R
false
false
3,135
r
rm(list=ls()) # on linux: sudo apt-get install r-cran-rjava to get Rcpp, JDK working (needed for these libraries) library(igraph) library(stringr) library(openxlsx) # modify your path as appropriate # note that this a slow/inefficient function - CSV or similar format would be better data <- read.xlsx("/home/rbshaffer...
data<-DBTS N<-as.numeric(dim(data)[1]) GBPEUR<-data$HU SEKEUR<-data$RS CADEUR<-data$WGenRO hurst_vol<-function(X) { returns<-diff(X)/X[-length(X)] D=data$datum[2:length(data$datum)] test=c(1,2,4,8,16,32) #this vector will be used to get to the number of subdivision at any time adjusted_returns<-matrix(0,nro...
/Hurst.R
no_license
marijanrancic/MT_MR
R
false
false
2,749
r
data<-DBTS N<-as.numeric(dim(data)[1]) GBPEUR<-data$HU SEKEUR<-data$RS CADEUR<-data$WGenRO hurst_vol<-function(X) { returns<-diff(X)/X[-length(X)] D=data$datum[2:length(data$datum)] test=c(1,2,4,8,16,32) #this vector will be used to get to the number of subdivision at any time adjusted_returns<-matrix(0,nro...
# Set working directory to specific dir in active RSS setwd('/active/cherry_t/OrgManuscript_SingleCell_Data/human_scRNA') # Load necessary libraries (dplyr v0.8.5; Seurat v3.1.1; patchwork v1.0.0; ggplot2 v3.3.0); make sure Seurat library has uwot installed (v0.1.4) library(dplyr) library(Seurat) library(patchwork) li...
/cherry_sc_org_manuscript/cherry_human_scRNASeq_d70s_0620.R
no_license
atimms/ratchet_scripts
R
false
false
7,623
r
# Set working directory to specific dir in active RSS setwd('/active/cherry_t/OrgManuscript_SingleCell_Data/human_scRNA') # Load necessary libraries (dplyr v0.8.5; Seurat v3.1.1; patchwork v1.0.0; ggplot2 v3.3.0); make sure Seurat library has uwot installed (v0.1.4) library(dplyr) library(Seurat) library(patchwork) li...
library(tidyverse) ## usage of the script ## ## $ Rscript circular_bar_great.R ../private_data/results/dev_codingNonMHC_lor_center_p001_100PCs_20180123.npz/phenotypes/asthma MGIPhenotype BFold ## source('circular_bar_no_legend.R') args <- commandArgs(TRUE) phenotype_dir <- args[1] ontology <- args[2] score <- args...
/uk_biobank/DeGAs/src/circular_bar_great_no_legend.R
permissive
rivas-lab/public-resources
R
false
false
1,428
r
library(tidyverse) ## usage of the script ## ## $ Rscript circular_bar_great.R ../private_data/results/dev_codingNonMHC_lor_center_p001_100PCs_20180123.npz/phenotypes/asthma MGIPhenotype BFold ## source('circular_bar_no_legend.R') args <- commandArgs(TRUE) phenotype_dir <- args[1] ontology <- args[2] score <- args...
source("data_extract_google.R") #inputs = df, api_interval, forecast_horizon patterns <- df %>% arrange(timestamp) %>% filter(as.numeric(timestamp) %% (24*60*60) != (9*60*60 + 15*60) - (5*60*60 + 30*60)) %>% group_by(date = as.Date(timestamp)) %>% mutate(open_high = ifelse(timestamp == min(timestamp), hi...
/high_low_overlap.R
no_license
iqcool1/aws-finance
R
false
false
1,747
r
source("data_extract_google.R") #inputs = df, api_interval, forecast_horizon patterns <- df %>% arrange(timestamp) %>% filter(as.numeric(timestamp) %% (24*60*60) != (9*60*60 + 15*60) - (5*60*60 + 30*60)) %>% group_by(date = as.Date(timestamp)) %>% mutate(open_high = ifelse(timestamp == min(timestamp), hi...
# read dwd data ---- #' Process data from the DWD CDC FTP Server #' #' Read climate data that was downloaded with \code{\link{dataDWD}}. #' The data is unzipped and subsequently, the file is read, processed and #' returned as a data.frame.\cr #' New users are advised to set \code{varnames=TRUE} to obtain more informa...
/R/readDWD.R
no_license
aadler/rdwd
R
false
false
34,353
r
# read dwd data ---- #' Process data from the DWD CDC FTP Server #' #' Read climate data that was downloaded with \code{\link{dataDWD}}. #' The data is unzipped and subsequently, the file is read, processed and #' returned as a data.frame.\cr #' New users are advised to set \code{varnames=TRUE} to obtain more informa...
#' --- #' output: github_document #' --- require(dplyr) df1 <- as.data.frame(installed.packages(),row.names = FALSE) df2 <- df1 %>% select(Package,LibPath,Version,Priority,Built)
/test.R
no_license
michaelblais/packages-report
R
false
false
183
r
#' --- #' output: github_document #' --- require(dplyr) df1 <- as.data.frame(installed.packages(),row.names = FALSE) df2 <- df1 %>% select(Package,LibPath,Version,Priority,Built)
## ---- load-soc-grad # Load datasets # Test and Training data load("data/Census.train.Rda") load("data/Census.test.Rda") # Load dataset with missingenss load("data/SocialGrade/Census.test.tidy.miss.Rda") # Create test.tidy and train.tidy datasets (Remove units with NCR codes for variable # & Remove the personal id...
/R/WFZ_SocialGrade_CompareImp.R
no_license
karetsu/imputation
R
false
false
7,361
r
## ---- load-soc-grad # Load datasets # Test and Training data load("data/Census.train.Rda") load("data/Census.test.Rda") # Load dataset with missingenss load("data/SocialGrade/Census.test.tidy.miss.Rda") # Create test.tidy and train.tidy datasets (Remove units with NCR codes for variable # & Remove the personal id...
library(httr) library(rvest) library(tm) library(tidyverse) library(pushoverr) url <- "http://www.customs.go.th/statistic_report.php?show_search=1" ua <- user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36") # specify month cmth<-Sys.Date() %...
/thai_import.R
no_license
jonfoong/argus-scrapers
R
false
false
1,786
r
library(httr) library(rvest) library(tm) library(tidyverse) library(pushoverr) url <- "http://www.customs.go.th/statistic_report.php?show_search=1" ua <- user_agent("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36") # specify month cmth<-Sys.Date() %...
tick_table<-function(u){ start=as.numeric(xpathSApply(u,"//AssayDataSet//RateSpans//StartTickIndex",xmlValue)) end=as.numeric(xpathSApply(u,"//AssayDataSet//RateSpans//EndTickIndex",xmlValue)) Measure=seq_along(start) df<-Map(function(x,y,z){ data.frame(Tick=seq(from=x,to=y,by=1),Measure=z) },x=star...
/R/asyr_tick_table.R
no_license
JARS3N/asyr
R
false
false
375
r
tick_table<-function(u){ start=as.numeric(xpathSApply(u,"//AssayDataSet//RateSpans//StartTickIndex",xmlValue)) end=as.numeric(xpathSApply(u,"//AssayDataSet//RateSpans//EndTickIndex",xmlValue)) Measure=seq_along(start) df<-Map(function(x,y,z){ data.frame(Tick=seq(from=x,to=y,by=1),Measure=z) },x=star...
# Copyright (c) 2014 Clear Channel Broadcasting, Inc. # https://github.com/iheartradio/ShinyBuilder # Licensed under the MIT License (MIT) .onLoad <- function(libname, pkgname) { require(shiny) require(RJSONIO) addResourcePath("ShinyBuilder", system.file("www", package = "ShinyBuilder")) } .onAttach <- functio...
/R/zzz.R
permissive
vsalesa/ShinyBuilder
R
false
false
365
r
# Copyright (c) 2014 Clear Channel Broadcasting, Inc. # https://github.com/iheartradio/ShinyBuilder # Licensed under the MIT License (MIT) .onLoad <- function(libname, pkgname) { require(shiny) require(RJSONIO) addResourcePath("ShinyBuilder", system.file("www", package = "ShinyBuilder")) } .onAttach <- functio...
## makeCacheMatrix creates a special "matrix" object that can cache its inverse. ## cacheSolve computes the inverse of the special "matrix" returned by ## makeCacheMatrix above. If the inverse has already been calculated (and the ## matrix has not changed), then the cachesolve should retrieve the inverse from ##...
/cachematrix.R
no_license
jerrybiii/ProgrammingAssignment2
R
false
false
1,549
r
## makeCacheMatrix creates a special "matrix" object that can cache its inverse. ## cacheSolve computes the inverse of the special "matrix" returned by ## makeCacheMatrix above. If the inverse has already been calculated (and the ## matrix has not changed), then the cachesolve should retrieve the inverse from ##...
## TODO: add verbose = FALSE argument cut down on chatter #' @title Allocate soil properties within various classification systems. #' #' @description Generic function to allocate soil properties to different classification schemes. #' #' @param ... arguments to specific allocation functions, see details and exampl...
/R/allocate.R
no_license
ncss-tech/aqp
R
false
false
24,404
r
## TODO: add verbose = FALSE argument cut down on chatter #' @title Allocate soil properties within various classification systems. #' #' @description Generic function to allocate soil properties to different classification schemes. #' #' @param ... arguments to specific allocation functions, see details and exampl...
setwd("C:/Users/Desktop/Coursera/Data Science Specialization/4. Exploratory Data Analysis/Project 1") #change this to your working directory unzip("exdata%2Fdata%2Fhousehold_power_consumption.zip", exdir = getwd()) #### Import Data #### # Measurements of electric power consumption in one household with a one-m...
/plot2.R
no_license
kmesso1/ExData_Plotting1
R
false
false
1,355
r
setwd("C:/Users/Desktop/Coursera/Data Science Specialization/4. Exploratory Data Analysis/Project 1") #change this to your working directory unzip("exdata%2Fdata%2Fhousehold_power_consumption.zip", exdir = getwd()) #### Import Data #### # Measurements of electric power consumption in one household with a one-m...
##################################### ## Method Definitions for SYSargs2 ## ##################################### ## Methods to return SYSargs2 components setMethod(f = "targets", signature = "SYSargs2", definition = function(x) { return(x@targets) }) setMethod(f = "targetsheader", signature = "SYSargs2", definitio...
/R/sysargs2_methods.R
no_license
JulongWei/systemPipeR
R
false
false
9,370
r
##################################### ## Method Definitions for SYSargs2 ## ##################################### ## Methods to return SYSargs2 components setMethod(f = "targets", signature = "SYSargs2", definition = function(x) { return(x@targets) }) setMethod(f = "targetsheader", signature = "SYSargs2", definitio...
# BNP Random Evolver # Made available under Apache 2.0 License # By Andy White # This script evolves Generation X-1 into Generation X # It saves each set of predictions as a CSV # and the parameters and error scores in a metadata CSV file # Leave running overnight and then run all features through # a master...
/BNP_Evolver.R
permissive
ajrwhite/KaggleBNP
R
false
false
14,293
r
# BNP Random Evolver # Made available under Apache 2.0 License # By Andy White # This script evolves Generation X-1 into Generation X # It saves each set of predictions as a CSV # and the parameters and error scores in a metadata CSV file # Leave running overnight and then run all features through # a master...
library(glmnet) mydata = read.table("./TrainingSet/LassoBIC/breast.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.5,family="gaussian",standardize=FALSE) sink('./Model/EN/Lasso/breast/breast_058.txt',append=TRUE...
/Model/EN/Lasso/breast/breast_058.R
no_license
leon1003/QSMART
R
false
false
351
r
library(glmnet) mydata = read.table("./TrainingSet/LassoBIC/breast.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.5,family="gaussian",standardize=FALSE) sink('./Model/EN/Lasso/breast/breast_058.txt',append=TRUE...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datadoc.R \docType{data} \name{FiktivDelelinje} \alias{FiktivDelelinje} \title{FiktivDelelinje} \format{ \if{html}{\out{<div class="sourceCode">}}\preformatted{Simple feature collection with 1956 features and 1 field Geometry type: LINESTRING...
/man/FiktivDelelinje.Rd
permissive
hmalmedal/N1000
R
false
true
1,739
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datadoc.R \docType{data} \name{FiktivDelelinje} \alias{FiktivDelelinje} \title{FiktivDelelinje} \format{ \if{html}{\out{<div class="sourceCode">}}\preformatted{Simple feature collection with 1956 features and 1 field Geometry type: LINESTRING...
estimate <- function(full_formula, null_formula, dat){ full_mod <- robu(as.formula(full_formula), studynum = study, var.eff.size = v, small = FALSE, data = dat) # Single coefficient ------------------------------------------------...
/prep_sim/estimation/scratch/1_estimation_functions.R
no_license
meghapsimatrix/dissertation_sim
R
false
false
1,315
r
estimate <- function(full_formula, null_formula, dat){ full_mod <- robu(as.formula(full_formula), studynum = study, var.eff.size = v, small = FALSE, data = dat) # Single coefficient ------------------------------------------------...
% Generated by roxygen2 (4.0.2): do not edit by hand \docType{package} \name{pipeR-package} \alias{pipeR-package} \title{The pipeR package} \description{ The pipeR package } \details{ pipeR provides various styles of function chaining methods: Pipe operator, Pipe object, and pipeline function, each representing a disti...
/man/pipeR-package.Rd
permissive
BrianDiggs/pipeR
R
false
false
779
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \docType{package} \name{pipeR-package} \alias{pipeR-package} \title{The pipeR package} \description{ The pipeR package } \details{ pipeR provides various styles of function chaining methods: Pipe operator, Pipe object, and pipeline function, each representing a disti...
train_data_corpus = corpus(train_data) tokenizer <- function(data) { tokens(train_data_corpus, what = "fastestword", remove_numbers = TRUE, remove_url = TRUE, split_hyphens = TRUE) } train_data_corpus = tokenizer(train_data_corpus) print("tokenization DONE") end3 = Sys.time()...
/tokenization.R
no_license
Gomathy-Sankar-K-11101998/Shiny-Text-Prediction-App
R
false
false
932
r
train_data_corpus = corpus(train_data) tokenizer <- function(data) { tokens(train_data_corpus, what = "fastestword", remove_numbers = TRUE, remove_url = TRUE, split_hyphens = TRUE) } train_data_corpus = tokenizer(train_data_corpus) print("tokenization DONE") end3 = Sys.time()...
#' Check that a GRanges object has been snapped #' to bins #' #' @param x GRanges object #' @param binSize Integer (numeric) describing #' the new size of each range. #' #' @return Logical #' #' @importFrom GenomicRanges start end #' #' @noRd .checkSnappedRanges <- function(x, binSize) { all((start(x) / binSize) %...
/R/utils.R
no_license
EricSDavis/mariner
R
false
false
9,871
r
#' Check that a GRanges object has been snapped #' to bins #' #' @param x GRanges object #' @param binSize Integer (numeric) describing #' the new size of each range. #' #' @return Logical #' #' @importFrom GenomicRanges start end #' #' @noRd .checkSnappedRanges <- function(x, binSize) { all((start(x) / binSize) %...
library(xlsx) # Create standard plate numbering Z <- t(array(1:12, dim=c(12,8))); X <- array(c("A","B","C","D","E","F","G","H"), dim=c(8,12)); Y <- paste(X, Z, sep=""); IDs <- array(Y, c(8,12)) # Writes 12 Ax-Hx columns into one. IDs <- array(t(IDs),c(96,1)) # Import plates and make list with Ct values rowname <- l...
/R scripts/qPCRs/better way to join sample primer and ct data.R
no_license
jucapitanio/Software
R
false
false
1,739
r
library(xlsx) # Create standard plate numbering Z <- t(array(1:12, dim=c(12,8))); X <- array(c("A","B","C","D","E","F","G","H"), dim=c(8,12)); Y <- paste(X, Z, sep=""); IDs <- array(Y, c(8,12)) # Writes 12 Ax-Hx columns into one. IDs <- array(t(IDs),c(96,1)) # Import plates and make list with Ct values rowname <- l...
\name{shape} \alias{shape} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Function to estimate eccentricity, variance on Gmax and volume. } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ shape(name, names_pop) } %- maybe also 'usage' for other obje...
/man/shape.Rd
no_license
schantepie/Gmatools
R
false
false
1,605
rd
\name{shape} \alias{shape} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Function to estimate eccentricity, variance on Gmax and volume. } \description{ %% ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{ shape(name, names_pop) } %- maybe also 'usage' for other obje...
# stl関数による要因分解 plot(stl(AirPassengers, "periodic"))
/chapter15/stl.R
no_license
AnguillaJaponica/RProgramming
R
false
false
69
r
# stl関数による要因分解 plot(stl(AirPassengers, "periodic"))
plotlyGeneralizedExtremeValueGEVDistribution <- function(plotrange, input, distType, probrange) { xseq<-seq(round(min(0,as.numeric(plotrange[1])),0),round(max(as.numeric(plotrange[2]),10),0),1) f29 <- 0 graphtype<-"" if(input$FunctionType == "PDF/PMF"){ f29<-dgev(xseq, as.numer...
/plotlyFunctions/GeneralizedExtremeValueGEV.R
no_license
SOCR/ProbDistCalc_RShiny
R
false
false
3,033
r
plotlyGeneralizedExtremeValueGEVDistribution <- function(plotrange, input, distType, probrange) { xseq<-seq(round(min(0,as.numeric(plotrange[1])),0),round(max(as.numeric(plotrange[2]),10),0),1) f29 <- 0 graphtype<-"" if(input$FunctionType == "PDF/PMF"){ f29<-dgev(xseq, as.numer...
#날짜 : 2021/01/28 #이름 : 김은표 #내용 : Ch16.비지도학습 - 군집분석 실습 교재 p543 library(ggplot2) #다이몬드 군집분석 data(diamonds) View(diamonds) #모집단에서 1000개 샘플링 sample <- sample(1:nrow(diamonds), 1000) df_test_sample <- diamonds[sample,] View(df_test_sample) #군집분석용 데이터프레임 생성 df_test_diamond <- df_test_sample[c('price', 'carat', 'depth', '...
/Ch16/16_1_Cluster.R
no_license
kepchef/R
R
false
false
707
r
#날짜 : 2021/01/28 #이름 : 김은표 #내용 : Ch16.비지도학습 - 군집분석 실습 교재 p543 library(ggplot2) #다이몬드 군집분석 data(diamonds) View(diamonds) #모집단에서 1000개 샘플링 sample <- sample(1:nrow(diamonds), 1000) df_test_sample <- diamonds[sample,] View(df_test_sample) #군집분석용 데이터프레임 생성 df_test_diamond <- df_test_sample[c('price', 'carat', 'depth', '...
if (!require("gapminder")){install.packages("gapminder")} library(ggplot2) library(gridExtra) library(dplyr) p <- ggplot(gapminder) plot1 <- p + aes(x=pop) + geom_histogram() plot2 <- p + aes(x=continent, y=lifeExp) + geom_violin() + stat_summary(color="blue") continent_freq <- gapminder %>% count(continent) plot3 <- ...
/Basic_ggplot2.R
no_license
Seonwhee-Genome/Data_Visualisation
R
false
false
1,128
r
if (!require("gapminder")){install.packages("gapminder")} library(ggplot2) library(gridExtra) library(dplyr) p <- ggplot(gapminder) plot1 <- p + aes(x=pop) + geom_histogram() plot2 <- p + aes(x=continent, y=lifeExp) + geom_violin() + stat_summary(color="blue") continent_freq <- gapminder %>% count(continent) plot3 <- ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/peptable.R \name{mergePep} \alias{mergePep} \title{Merge peptide table(s) into one} \usage{ mergePep( plot_log2FC_cv = TRUE, use_duppeps = TRUE, cut_points = Inf, omit_single_lfq = TRUE, parallel = TRUE, ... ) } \arguments{ \item{...
/man/mergePep.Rd
permissive
sailfish009/proteoQ
R
false
true
8,103
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/peptable.R \name{mergePep} \alias{mergePep} \title{Merge peptide table(s) into one} \usage{ mergePep( plot_log2FC_cv = TRUE, use_duppeps = TRUE, cut_points = Inf, omit_single_lfq = TRUE, parallel = TRUE, ... ) } \arguments{ \item{...
################################################################################################ ## Forming the dataframe for plotting LC and computing the lme model getLGmat<-function(cdat,resp=cdat$Resp[1],lgrps=levels(cdat$dataM$Grp), gcols=getCols(cdat$dataM$Grp),trans='None'){ if(length(lgr...
/Line_chart.R
no_license
kroemerlab/TumGrowth
R
false
false
5,247
r
################################################################################################ ## Forming the dataframe for plotting LC and computing the lme model getLGmat<-function(cdat,resp=cdat$Resp[1],lgrps=levels(cdat$dataM$Grp), gcols=getCols(cdat$dataM$Grp),trans='None'){ if(length(lgr...
#' @examples #' \dontrun{ #' res <- dfp_getReportDownloadUrlWithOptions(request_data) #' }
/examples/examples-dfp_getReportDownloadUrlWithOptions.R
no_license
StevenMMortimer/rdfp
R
false
false
92
r
#' @examples #' \dontrun{ #' res <- dfp_getReportDownloadUrlWithOptions(request_data) #' }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/heatmap.R \name{plot_na} \alias{plot_na} \title{Plot Heatmap for NA} \usage{ plot_na(data, order_rows = FALSE, order_cols = FALSE, title = "Missing Data") } \arguments{ \item{data}{Tibble or Dataframe.} \item{order_rows}{Logical. Reorder row...
/man/plot_na.Rd
no_license
edo91/ggfancy
R
false
true
876
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/heatmap.R \name{plot_na} \alias{plot_na} \title{Plot Heatmap for NA} \usage{ plot_na(data, order_rows = FALSE, order_cols = FALSE, title = "Missing Data") } \arguments{ \item{data}{Tibble or Dataframe.} \item{order_rows}{Logical. Reorder row...
#' Plotting output and parameters of inferential interest for IMIFA and related models #' #' @param x An object of class \code{"Results_IMIFA"} generated by \code{\link{get_IMIFA_results}}. #' @param plot.meth The type of plot to be produced for the \code{param} of interest, where \code{correlation} refers to ACF/PA...
/R/PlottingFunctions.R
no_license
cran/IMIFA
R
false
false
124,995
r
#' Plotting output and parameters of inferential interest for IMIFA and related models #' #' @param x An object of class \code{"Results_IMIFA"} generated by \code{\link{get_IMIFA_results}}. #' @param plot.meth The type of plot to be produced for the \code{param} of interest, where \code{correlation} refers to ACF/PA...
## ----setup, include=FALSE----------------------------------------------------- knitr::opts_chunk$set(echo = TRUE) ## ----------------------------------------------------------------------------- library(ERSA) ## ----eval=F------------------------------------------------------------------- # f <- lm(Fertility ~ . ,...
/inst/doc/ERSA.R
no_license
cran/ERSA
R
false
false
1,816
r
## ----setup, include=FALSE----------------------------------------------------- knitr::opts_chunk$set(echo = TRUE) ## ----------------------------------------------------------------------------- library(ERSA) ## ----eval=F------------------------------------------------------------------- # f <- lm(Fertility ~ . ,...
# Install Package install.packages('tidyverse') install.packages('readxl') # Run Library library(tidyverse) library(readxl) # Read File Excel rm(list = ls()) # Dir file excel setwd('C:/Users/MuhammadGusKhamim/Documents/Folder Data CSV/vais/') # read file my_files <- list.files(pattern = "*.xlsx") my_files # nba...
/Merge Excel.R
no_license
amimhayden22/Merge-Multiple-Excel-Files-with-R-Studio
R
false
false
453
r
# Install Package install.packages('tidyverse') install.packages('readxl') # Run Library library(tidyverse) library(readxl) # Read File Excel rm(list = ls()) # Dir file excel setwd('C:/Users/MuhammadGusKhamim/Documents/Folder Data CSV/vais/') # read file my_files <- list.files(pattern = "*.xlsx") my_files # nba...
get_nonmobiles <- function(ua_strings) { if (any(is.na(ua_strings))) { stop("Missing values in input vector cannot be parsed.") } flag <- grepl( "up.browser|up.link|mmp|smartphone|midp|wap|phone|iemobile|mobile|oneplus", ua_strings, ignore.case = TRUE ) return(1 - flag) }
/R/get_nonmobiles.R
no_license
kylepeyton/attentive
R
false
false
313
r
get_nonmobiles <- function(ua_strings) { if (any(is.na(ua_strings))) { stop("Missing values in input vector cannot be parsed.") } flag <- grepl( "up.browser|up.link|mmp|smartphone|midp|wap|phone|iemobile|mobile|oneplus", ua_strings, ignore.case = TRUE ) return(1 - flag) }
\name{skewness} \alias{skewness} \alias{skewness.default} \alias{skewness.data.frame} \alias{skew} \title{Coefficient of Skewness} \description{ Generate the coefficient of skewness based on a sample. } \usage{ skewness(x, na.rm = TRUE) skew(x, na.rm = TRUE) } \arguments{ \item{x}{An \R object} \item{na.rm}{a...
/R Package Creation/STAR/man/skewness.Rd
no_license
djnpisano/RScriptLibrary
R
false
false
477
rd
\name{skewness} \alias{skewness} \alias{skewness.default} \alias{skewness.data.frame} \alias{skew} \title{Coefficient of Skewness} \description{ Generate the coefficient of skewness based on a sample. } \usage{ skewness(x, na.rm = TRUE) skew(x, na.rm = TRUE) } \arguments{ \item{x}{An \R object} \item{na.rm}{a...
#' @title Efficiencies #' #' @description Extract the scores (optimal objective values) of the evaluated DMUs #' from a fuzzy DEA solution. Note that these scores may not always be interpreted #' as efficiencies. #' #' @param x Object of class \code{dea_fuzzy} obtained with some of the fuzzy DEA #' \code{modelfuzzy...
/R/efficiencies.dea_fuzzy.R
no_license
cran/deaR
R
false
false
7,668
r
#' @title Efficiencies #' #' @description Extract the scores (optimal objective values) of the evaluated DMUs #' from a fuzzy DEA solution. Note that these scores may not always be interpreted #' as efficiencies. #' #' @param x Object of class \code{dea_fuzzy} obtained with some of the fuzzy DEA #' \code{modelfuzzy...
# UK soil texture plot soil.texture.uk <- function (soiltexture = NULL, main = "", at = seq(0.1, 0.9, by = 0.1), axis.labels = c("percent sand", "percent silt", "percent clay"), tick.labels = list(l = seq(10, 90, by = 10), r = seq(10, 90, by = 10), b = seq(10, 90, by = 10)), show.names = TRUE, show.lines = T...
/plotrix/R/soil.texture.uk.R
no_license
edenduthie/palsR
R
false
false
2,256
r
# UK soil texture plot soil.texture.uk <- function (soiltexture = NULL, main = "", at = seq(0.1, 0.9, by = 0.1), axis.labels = c("percent sand", "percent silt", "percent clay"), tick.labels = list(l = seq(10, 90, by = 10), r = seq(10, 90, by = 10), b = seq(10, 90, by = 10)), show.names = TRUE, show.lines = T...
\name{cps4c_small} \alias{cps4c_small} \docType{data} \title{ cps4c_small Data } \description{ Obs: 1000 observations (subset of cps4.dat) } \usage{data("cps4c_small")} \format{ A data frame with 1000 observations on the following 12 variables. \describe{ \item{\code{wage}}{earnings per hour} \item{\cod...
/man/cps4c_small.Rd
no_license
Worathan/PoEdata
R
false
false
1,149
rd
\name{cps4c_small} \alias{cps4c_small} \docType{data} \title{ cps4c_small Data } \description{ Obs: 1000 observations (subset of cps4.dat) } \usage{data("cps4c_small")} \format{ A data frame with 1000 observations on the following 12 variables. \describe{ \item{\code{wage}}{earnings per hour} \item{\cod...
hotcode <- function(train, test){ train[,1:11] <- lapply(train[,1:11], as.character) test[,1:11] <- lapply( test[,1:11], as.character) train$Gender <- ifelse(train$Gender=='F', 0, 1) test$Gender <- ifelse(test$Gender=='F', 0, 1) train$Stay_In_Current_City_Years <- ifelse(train$Stay_In_Current_City_Ye...
/hotcode.R
no_license
jingliang92/analyticsvidhya_practice
R
false
false
5,020
r
hotcode <- function(train, test){ train[,1:11] <- lapply(train[,1:11], as.character) test[,1:11] <- lapply( test[,1:11], as.character) train$Gender <- ifelse(train$Gender=='F', 0, 1) test$Gender <- ifelse(test$Gender=='F', 0, 1) train$Stay_In_Current_City_Years <- ifelse(train$Stay_In_Current_City_Ye...
##1/13/16 ##Update Beta, n, seed, and file name rm(list=ls()) seed <- 754470050 ################################################################################### ##LIBRARIES## ################################################################################### require(survival) require(MASS) require(gaussquad) requ...
/groupedData/Simulations/SingleCovariate/varyBeta/code/Beta06_n200.R
no_license
emhuang1/groupedData
R
false
false
4,768
r
##1/13/16 ##Update Beta, n, seed, and file name rm(list=ls()) seed <- 754470050 ################################################################################### ##LIBRARIES## ################################################################################### require(survival) require(MASS) require(gaussquad) requ...
gr.longWB <- function (betas) { eta.yx <- as.vector(X %*% betas) if (parameterization %in% c("value", "both")) { Ys <- as.vector(Xs %*% betas) + Zsb WintF.vl.alph <- c(WintF.vl %*% alpha) Ws.intF.vl.alph <- c(Ws.intF.vl %*% alpha) eta.s <- Ws.intF.vl.alph * Ys } ...
/R/gr.longWB.R
no_license
cran/JM
R
false
false
2,016
r
gr.longWB <- function (betas) { eta.yx <- as.vector(X %*% betas) if (parameterization %in% c("value", "both")) { Ys <- as.vector(Xs %*% betas) + Zsb WintF.vl.alph <- c(WintF.vl %*% alpha) Ws.intF.vl.alph <- c(Ws.intF.vl %*% alpha) eta.s <- Ws.intF.vl.alph * Ys } ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/FrissMessageBox.R \name{showConfirm} \alias{showConfirm} \title{Shows a confirm message.} \usage{ showConfirm(session, inputName, message, okText = "OK", cancelText = "Cancel") } \arguments{ \item{session}{Shiny session object from ...
/man/showConfirm.Rd
no_license
ttraboue/FrissMsgBox
R
false
false
689
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/FrissMessageBox.R \name{showConfirm} \alias{showConfirm} \title{Shows a confirm message.} \usage{ showConfirm(session, inputName, message, okText = "OK", cancelText = "Cancel") } \arguments{ \item{session}{Shiny session object from ...
rga$methods( list( getData = function(ids, start.date = format(Sys.Date() - 8, "%Y-%m-%d"), end.date = format(Sys.Date() - 1, "%Y-%m-%d"), date.format = "%Y-%m-%d", metrics = "ga:users,ga:sessions,ga:pageviews", dimensions = "ga:date", ...
/R/core.R
no_license
tedconf/rga
R
false
false
13,230
r
rga$methods( list( getData = function(ids, start.date = format(Sys.Date() - 8, "%Y-%m-%d"), end.date = format(Sys.Date() - 1, "%Y-%m-%d"), date.format = "%Y-%m-%d", metrics = "ga:users,ga:sessions,ga:pageviews", dimensions = "ga:date", ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/class-snsp.R \docType{class} \name{snsp-class} \alias{snsp-class} \alias{snsp} \title{snsp-class} \description{ snsp-class }
/man/snsp-class.Rd
no_license
ABS-dev/DiagTestKit
R
false
true
204
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/class-snsp.R \docType{class} \name{snsp-class} \alias{snsp-class} \alias{snsp} \title{snsp-class} \description{ snsp-class }
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/omega.r \name{omega} \alias{omega} \title{Compute 1 to k-step transition proportions} \usage{ omega(x, k = NULL, labels = NULL) } \arguments{ \item{x}{either a transition matrix or 3-d array ( a set of transition matrices)} ...
/marked/man/omega.Rd
no_license
bmcclintock/marked
R
false
false
691
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/omega.r \name{omega} \alias{omega} \title{Compute 1 to k-step transition proportions} \usage{ omega(x, k = NULL, labels = NULL) } \arguments{ \item{x}{either a transition matrix or 3-d array ( a set of transition matrices)} ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{reorder_data} \alias{reorder_data} \title{Reorder fragments names represented as factor levels based on a specified metric} \usage{ reorder_data(df, by_model, by_prop, FUN = median, frag_col_name = "full_name") } \arguments{...
/man/reorder_data.Rd
no_license
DrrDom/rspci
R
false
true
1,039
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{reorder_data} \alias{reorder_data} \title{Reorder fragments names represented as factor levels based on a specified metric} \usage{ reorder_data(df, by_model, by_prop, FUN = median, frag_col_name = "full_name") } \arguments{...
dat_custom_transition <- data.frame( year_from = 2009, year_to = 2010, icd_from = "K52.9", icd_to = "A09.9", automatic_forward = "A", automatic_backward = "A", stringsAsFactors = FALSE ) icd_k52_2009 <- ICD10gm::icd_expand(data.frame(icd_spec = "K52.9"), year = 2009, col_ic...
/tests/testthat/test-icd_history.R
permissive
edonnachie/ICD10gm
R
false
false
1,185
r
dat_custom_transition <- data.frame( year_from = 2009, year_to = 2010, icd_from = "K52.9", icd_to = "A09.9", automatic_forward = "A", automatic_backward = "A", stringsAsFactors = FALSE ) icd_k52_2009 <- ICD10gm::icd_expand(data.frame(icd_spec = "K52.9"), year = 2009, col_ic...
df<- readRDS("summary.rds") str(df) sum(is.na(df)) library(dplyr) LA <- df[df$fips=="06037",] motor <- grepl("Vehicle",map$SCC.Level.Two) sub_map <- map[motor,] motor_merge_baltimore <- merge(sub_map,baltimore,by="SCC") motor_merge_baltimore$fips <- "baltimore" motor_merge_LA <- merge(sub_map,LA,by="SCC") motor_merg...
/Plot6.R
no_license
zigzagktz/Air-Pollutant-Analysis-for-US--1999-2008-
R
false
false
528
r
df<- readRDS("summary.rds") str(df) sum(is.na(df)) library(dplyr) LA <- df[df$fips=="06037",] motor <- grepl("Vehicle",map$SCC.Level.Two) sub_map <- map[motor,] motor_merge_baltimore <- merge(sub_map,baltimore,by="SCC") motor_merge_baltimore$fips <- "baltimore" motor_merge_LA <- merge(sub_map,LA,by="SCC") motor_merg...
#install.packages("rvest") library("rvest") webpage<-read_html('https://en.wikipedia.org/wiki/List_of_amendments_to_the_United_States_Constitution') tbls <- html_nodes(webpage, "table") tbls[3] tbls_ls <- webpage %>% html_nodes("table") %>% .[3] %>% html_table(fill = TRUE) tbls_ls df<-as.data.frame(tbls_ls)
/Wikipedia Table Scrapping.R
no_license
Akulm26/Webscrapping101
R
false
false
319
r
#install.packages("rvest") library("rvest") webpage<-read_html('https://en.wikipedia.org/wiki/List_of_amendments_to_the_United_States_Constitution') tbls <- html_nodes(webpage, "table") tbls[3] tbls_ls <- webpage %>% html_nodes("table") %>% .[3] %>% html_table(fill = TRUE) tbls_ls df<-as.data.frame(tbls_ls)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{OrdwayBirds} \alias{OrdwayBirds} \title{Birds captured and released at Ordway, complete and uncleaned} \format{A data frame with 15,829 observations on the bird's species, size, date found, and band number. \descri...
/man/OrdwayBirds.Rd
no_license
mesamiked/mdsr
R
false
true
2,255
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{OrdwayBirds} \alias{OrdwayBirds} \title{Birds captured and released at Ordway, complete and uncleaned} \format{A data frame with 15,829 observations on the bird's species, size, date found, and band number. \descri...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot-methods.R \name{plot_placebos} \alias{plot_placebos} \title{plot_placebos} \usage{ plot_placebos(data, time_window = NULL, prune = TRUE) } \arguments{ \item{data}{nested data of type \code{tbl_df}.} \item{time_window}{time window of the...
/man/plot_placebos.Rd
no_license
cran/tidysynth
R
false
true
2,902
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot-methods.R \name{plot_placebos} \alias{plot_placebos} \title{plot_placebos} \usage{ plot_placebos(data, time_window = NULL, prune = TRUE) } \arguments{ \item{data}{nested data of type \code{tbl_df}.} \item{time_window}{time window of the...
library(ggplot2) theme_set(theme_classic()) # Histogram on a Continuous (Numeric) Variable g <- ggplot(mpg, aes(displ)) + scale_fill_brewer(palette = "Spectral") require(gridExtra) plot1<- g + geom_histogram(aes(fill=class), binwidth = .1, col="black", size=...
/Day30_Histogram.R
no_license
sharifshohan/One_Figure_A_Day_Challenge
R
false
false
774
r
library(ggplot2) theme_set(theme_classic()) # Histogram on a Continuous (Numeric) Variable g <- ggplot(mpg, aes(displ)) + scale_fill_brewer(palette = "Spectral") require(gridExtra) plot1<- g + geom_histogram(aes(fill=class), binwidth = .1, col="black", size=...
suppressMessages(suppressWarnings(library(StatisticalModels))) suppressMessages(suppressWarnings(library(raster))) inDir <- "2_PrepareDiversityData/" modelsDir <- "3_RunSpeciesLevelModels/" climDir <- "20_PrepareRawClimateData/" outDir <- "21_CompareRawCimateModels/" load(paste(inDir,"diversity_data.Rd",sep="")) di...
/21_CompareRawCimateModels.R
no_license
timnewbold/BumblebeesLandUseAnalysisPublic
R
false
false
1,924
r
suppressMessages(suppressWarnings(library(StatisticalModels))) suppressMessages(suppressWarnings(library(raster))) inDir <- "2_PrepareDiversityData/" modelsDir <- "3_RunSpeciesLevelModels/" climDir <- "20_PrepareRawClimateData/" outDir <- "21_CompareRawCimateModels/" load(paste(inDir,"diversity_data.Rd",sep="")) di...
install.packages("rgl") install.packages("sna") install.packages("network") install.packages("igraph") library(network) library(sna) library(rgl) library(readxl) library(igraph) # Trabalha a partir de uma rede aleat?ria rede <- read.table("Rede Two Mode_Tarefa Aula 1_Paulista T4.csv",header=TRUE,sep = ",") dim(rede)...
/ARSTM/Tarefa1/script-2-mode.R
permissive
squassina/Trabalhos
R
false
false
4,354
r
install.packages("rgl") install.packages("sna") install.packages("network") install.packages("igraph") library(network) library(sna) library(rgl) library(readxl) library(igraph) # Trabalha a partir de uma rede aleat?ria rede <- read.table("Rede Two Mode_Tarefa Aula 1_Paulista T4.csv",header=TRUE,sep = ",") dim(rede)...
library(ape) testtree <- read.tree("9623_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="9623_0_unrooted.txt")
/codeml_files/newick_trees_processed/9623_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("9623_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="9623_0_unrooted.txt")
library(rpsychi) # Function to display the possible ranges of the F or t statistic from a one- or two-way ANOVA. # Assumes means and SDs have been rounded to two decimal place. f_range <- function (m.p, sd.p, n.p, title=FALSE, u.p=TRUE, show.t=FALSE, dp=2, labels=c()) { m.ok <- m.p if (class(m.ok) == "matrix") { ...
/R/Wansink-reanalyses.R
permissive
OmnesRes/pizzapizza
R
false
false
13,150
r
library(rpsychi) # Function to display the possible ranges of the F or t statistic from a one- or two-way ANOVA. # Assumes means and SDs have been rounded to two decimal place. f_range <- function (m.p, sd.p, n.p, title=FALSE, u.p=TRUE, show.t=FALSE, dp=2, labels=c()) { m.ok <- m.p if (class(m.ok) == "matrix") { ...
#!/usr/bin/env Rscript tr = read.delim("transitions.txt", '\t', header = T) em = read.delim("emissions.txt", '\t', header = T) setwd("H:/Asignment-2") tr = read.delim("transitions.txt", '\t', header = T) em = read.delim("emissions.txt", '\t', header = T) states = tr[,1] rownames(tr) = states tr = tr[,-1] em = em[,-1] r...
/.Rhistory
no_license
LachlanD/Asignment-2
R
false
false
1,200
rhistory
#!/usr/bin/env Rscript tr = read.delim("transitions.txt", '\t', header = T) em = read.delim("emissions.txt", '\t', header = T) setwd("H:/Asignment-2") tr = read.delim("transitions.txt", '\t', header = T) em = read.delim("emissions.txt", '\t', header = T) states = tr[,1] rownames(tr) = states tr = tr[,-1] em = em[,-1] r...
#' Style as a ribbon image #' #' @param data data frame with x, y, order, id, time #' @param burnin how many iterations should we discard as burnin? #' @param alpha_init how transparent is each line? #' @param alpha_decay how does transparency decay over iterations? #' @param seed_col what colour to draw the seed? (de...
/R/style_ribbon.R
permissive
sneakers-the-rat/jasmines
R
false
false
5,986
r
#' Style as a ribbon image #' #' @param data data frame with x, y, order, id, time #' @param burnin how many iterations should we discard as burnin? #' @param alpha_init how transparent is each line? #' @param alpha_decay how does transparency decay over iterations? #' @param seed_col what colour to draw the seed? (de...
##2.Have total emissions from PM2.5 decreased in the Baltimore City, Maryland (fips == "24510") from 1999 to 2008? ##Use the base plotting system to make a plot answering this question. #Load data if(!exists("NEI")){NEI <- readRDS("summarySCC_PM25.rds")} if(!exists("SCC")){SCC <- readRDS("Source_Classification_...
/plot2.R
no_license
dataperito/ExploratoryDataAnalysisAssignmentCourseProject2
R
false
false
763
r
##2.Have total emissions from PM2.5 decreased in the Baltimore City, Maryland (fips == "24510") from 1999 to 2008? ##Use the base plotting system to make a plot answering this question. #Load data if(!exists("NEI")){NEI <- readRDS("summarySCC_PM25.rds")} if(!exists("SCC")){SCC <- readRDS("Source_Classification_...