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
aux_dist = 0.05*c(rep.int(1, 20)); p_dist = c(0.06,0.06,0.06,0.06,0.06,0.15,0.13,0.14,0.15,0.13, c(rep.int(0,10))); accept <- 0; reject <- 0; c <- 3; valid_outcomes = vector("list",1000); for(k in 1:1000) { y = sample(1:1:20, size = 1, replace = TRUE, prob = aux_dist); i <- as.integer(y); u = runif(1, min = 0, ma...
/Project-3/Proj3_q5.r
no_license
Mahasweta-usc/EE_511_Assignments
R
false
false
865
r
aux_dist = 0.05*c(rep.int(1, 20)); p_dist = c(0.06,0.06,0.06,0.06,0.06,0.15,0.13,0.14,0.15,0.13, c(rep.int(0,10))); accept <- 0; reject <- 0; c <- 3; valid_outcomes = vector("list",1000); for(k in 1:1000) { y = sample(1:1:20, size = 1, replace = TRUE, prob = aux_dist); i <- as.integer(y); u = runif(1, min = 0, ma...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/viewPoints.R \name{plotViewpoint} \alias{plotViewpoint} \title{Plot coverage around a virtual 4C viewpoint} \usage{ plotViewpoint(x, region, ylab = "Signal", xlab = NULL, ...) } \arguments{ \item{x}{a GInteractions object which is output from...
/man/plotViewpoint.Rd
no_license
ComputationalRegulatoryGenomicsICL/GenomicInteractions
R
false
true
1,091
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/viewPoints.R \name{plotViewpoint} \alias{plotViewpoint} \title{Plot coverage around a virtual 4C viewpoint} \usage{ plotViewpoint(x, region, ylab = "Signal", xlab = NULL, ...) } \arguments{ \item{x}{a GInteractions object which is output from...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/load_ipeds.R \name{load_ipeds} \alias{load_ipeds} \title{Loads IPEDS data for a given year.} \usage{ load_ipeds(year = as.integer(format(Sys.Date(), "\%Y")) - 1, dir = getOption("ipeds.download.dir")) } \arguments{ \item{year}{the year of t...
/man/load_ipeds.Rd
no_license
tyleransom/ipeds
R
false
true
663
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/load_ipeds.R \name{load_ipeds} \alias{load_ipeds} \title{Loads IPEDS data for a given year.} \usage{ load_ipeds(year = as.integer(format(Sys.Date(), "\%Y")) - 1, dir = getOption("ipeds.download.dir")) } \arguments{ \item{year}{the year of t...
## Sum of powered score (SPU) test (boot, version 2, matrix used in permutation) ## ## It gives the p-values of the SPU test and aSPU test based on the parametric bootstrap. (This is version 2, matrix version is faster but if it doesn't work, we should use version 1, vector version) ## ## @param Y phenotype data. It ca...
/aSPU/R/aSPUboot2.R
no_license
ingted/R-Examples
R
false
false
4,587
r
## Sum of powered score (SPU) test (boot, version 2, matrix used in permutation) ## ## It gives the p-values of the SPU test and aSPU test based on the parametric bootstrap. (This is version 2, matrix version is faster but if it doesn't work, we should use version 1, vector version) ## ## @param Y phenotype data. It ca...
library(fastDummies) library(tidyverse) options(scipen=5) source("workflow/functions.R") load("data/app_data.Rda") ##====================================== app ====================================== str(app.tot,list.len=ncol(app.tot)) hist(app.tot$TARGET,main="Default class imbalance",xlab="Default?") ## total NAs ...
/workflow/2 - explore.R
no_license
collindching/Kaggle-Home-Credit
R
false
false
4,078
r
library(fastDummies) library(tidyverse) options(scipen=5) source("workflow/functions.R") load("data/app_data.Rda") ##====================================== app ====================================== str(app.tot,list.len=ncol(app.tot)) hist(app.tot$TARGET,main="Default class imbalance",xlab="Default?") ## total NAs ...
\name{jittervar} \alias{jittervar} %- Also NEED an `\alias' for EACH other topic documented here. \title{Jitter variables in a data matrix} \description{ Jitters some variables in a data matrix. } \usage{ jittervar(x,jitterv=NULL,factor=1) } %- maybe also `usage' for other objects documented here. \arguments{ \it...
/man/jittervar.Rd
no_license
cran/fpc
R
false
false
1,021
rd
\name{jittervar} \alias{jittervar} %- Also NEED an `\alias' for EACH other topic documented here. \title{Jitter variables in a data matrix} \description{ Jitters some variables in a data matrix. } \usage{ jittervar(x,jitterv=NULL,factor=1) } %- maybe also `usage' for other objects documented here. \arguments{ \it...
## Project 2 for R programming ## creates the special matrix that has the ability of keeping the cashed value ## and changing the matrix values makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinv <- function(inv) m <<- inv geti...
/cachematrix.R
no_license
mahdimk/ProgrammingAssignment2
R
false
false
687
r
## Project 2 for R programming ## creates the special matrix that has the ability of keeping the cashed value ## and changing the matrix values makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinv <- function(inv) m <<- inv geti...
\name{reinis} \alias{reinis} \docType{data} \title{ Risk factors of coronary heart disease } \description{ The dataset consist of \eqn{6} discrete variables as the potential risk factors of coronary heart disease. The data collected from \eqn{1841} men employed of a car factory in Czechoslovakia (Reinis et al. 1981)...
/man/reinis.Rd
no_license
cran/BDgraph
R
false
false
999
rd
\name{reinis} \alias{reinis} \docType{data} \title{ Risk factors of coronary heart disease } \description{ The dataset consist of \eqn{6} discrete variables as the potential risk factors of coronary heart disease. The data collected from \eqn{1841} men employed of a car factory in Czechoslovakia (Reinis et al. 1981)...
data <- read.table("household_power_consumption.txt", sep=";", header=TRUE, colClasses=c(rep("character",2), rep("numeric", 7)), na.strings = "?") dataneeded <- data[data$Date=="1/2/2007"|data$Date=="2/2/2007",] dataneeded <- transform(dataneeded, Date = as.Date(dataneeded$Date, format = "%d/%m/%Y"), Time = strptime(pa...
/plot2.R
no_license
senzhang1989/ExData_Plotting1
R
false
false
644
r
data <- read.table("household_power_consumption.txt", sep=";", header=TRUE, colClasses=c(rep("character",2), rep("numeric", 7)), na.strings = "?") dataneeded <- data[data$Date=="1/2/2007"|data$Date=="2/2/2007",] dataneeded <- transform(dataneeded, Date = as.Date(dataneeded$Date, format = "%d/%m/%Y"), Time = strptime(pa...
#install.packages("RefFreeEWAS") library(RefFreeEWAS) #### EXAMPLE #### data(RefFreeEWAS) ## Sim data RefFree.Output<-RefFreeEwasModel(t(simu$Y),simu$X,K=5) dim(RefFree.Output$U) ## Data from RefEWAS RefFree.Output<-RefFreeEwasModel(rfEwasExampleBetaValues,cbind(1,rfEwasExampleCovariate),K=5) # z.score.rewas <- ...
/example_methods/RefFreeEWAS_method.R
no_license
adowneywall/EWAS_test
R
false
false
601
r
#install.packages("RefFreeEWAS") library(RefFreeEWAS) #### EXAMPLE #### data(RefFreeEWAS) ## Sim data RefFree.Output<-RefFreeEwasModel(t(simu$Y),simu$X,K=5) dim(RefFree.Output$U) ## Data from RefEWAS RefFree.Output<-RefFreeEwasModel(rfEwasExampleBetaValues,cbind(1,rfEwasExampleCovariate),K=5) # z.score.rewas <- ...
library(shinydashboard) require(shiny) require(highcharter) #layout of the dashboard #defining character vectors for select inputs country<-c("India","United States","Mexico","Canada","China, People's Republic of","Japan","Russian Federation","Germany","United Kingdom","European Union", "ASEAN-5","New Zeala...
/Inflation-Rates/ui.R
permissive
vitorgamer58/Time-series-analysis-of-Inflation-rates-using-ShinyDashboard
R
false
false
5,469
r
library(shinydashboard) require(shiny) require(highcharter) #layout of the dashboard #defining character vectors for select inputs country<-c("India","United States","Mexico","Canada","China, People's Republic of","Japan","Russian Federation","Germany","United Kingdom","European Union", "ASEAN-5","New Zeala...
dfcomn2 <- function (ipsi = -9, c = -1.345, h1 = -1.7, h2 = -3.4, h3 = -8.5, xk = -1.548, d = -1.345, beta = -0.5, bet0 = -1, iucv = -1, a2 = 0, b2 = -3, chk = -9, ckw = -2, bb = -1, bt = -1, cw = -1, em = -1.345, cr = -2, vk = -1, np = -2, nu = -1, v7 = -1, iwww = -1) { # if(!exists(".dFv", , env...
/RobustAFT/R/dfcomn2.R
no_license
ingted/R-Examples
R
false
false
1,975
r
dfcomn2 <- function (ipsi = -9, c = -1.345, h1 = -1.7, h2 = -3.4, h3 = -8.5, xk = -1.548, d = -1.345, beta = -0.5, bet0 = -1, iucv = -1, a2 = 0, b2 = -3, chk = -9, ckw = -2, bb = -1, bt = -1, cw = -1, em = -1.345, cr = -2, vk = -1, np = -2, nu = -1, v7 = -1, iwww = -1) { # if(!exists(".dFv", , env...
#' Average Mutual Information (AMI) #' @description #' Functions for estimating the Average Mutual Information (AMI) of a time #' series. #' @details #' The Average Mutual Information (AMI) measures how much one random variable tells us about #' another. In the context of time series analysis, AMI #' helps to quantif...
/nonlinearTseries/R/mutualInformation.R
no_license
ingted/R-Examples
R
false
false
4,868
r
#' Average Mutual Information (AMI) #' @description #' Functions for estimating the Average Mutual Information (AMI) of a time #' series. #' @details #' The Average Mutual Information (AMI) measures how much one random variable tells us about #' another. In the context of time series analysis, AMI #' helps to quantif...
# setwd('C:/Users/germa/Box Sync/My_Documents') #dell # setwd('C:/Users/germanm2/Box Sync/My_Documents')#CPSC # setwd("/home/germanm2") setwd('~') source('./Codes_useful/R.libraries.R') source('./Codes_useful/gm_functions.R') source('./vr_value/Codes/parameters.R') library(randomForest) # eonr_mukey_dt3 <- readRDS("...
/Codes/old_codes/4_economics_field_and_local_RF_sep12.R
no_license
germanmandrini/n_policy
R
false
false
27,425
r
# setwd('C:/Users/germa/Box Sync/My_Documents') #dell # setwd('C:/Users/germanm2/Box Sync/My_Documents')#CPSC # setwd("/home/germanm2") setwd('~') source('./Codes_useful/R.libraries.R') source('./Codes_useful/gm_functions.R') source('./vr_value/Codes/parameters.R') library(randomForest) # eonr_mukey_dt3 <- readRDS("...
/Preparando_mapaviolencia_BR.R
no_license
elizapsalvadori/Paper-Feminicidio
R
false
false
5,947
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotYVariance.pls} \alias{plotYVariance.pls} \title{Explained Y variance plot for PLS} \usage{ \method{plotYVariance}{pls}(obj, type = "b", main = "Y variance", xlab = "Components", ylab = "Explained variance, \%", ...) } \argum...
/man/plotYVariance.pls.Rd
no_license
KasperSkytte/mdatools
R
false
true
734
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pls.R \name{plotYVariance.pls} \alias{plotYVariance.pls} \title{Explained Y variance plot for PLS} \usage{ \method{plotYVariance}{pls}(obj, type = "b", main = "Y variance", xlab = "Components", ylab = "Explained variance, \%", ...) } \argum...
classes <- c( Date="character", Time="character", Global_active_power="numeric", Global_reactive_power="numeric", Voltage="numeric", Global_intensity="numeric", Sub_metering_1="numeric", Sub_metering_2="numeric", Sub_metering_3="numeric" ) allData <- read.csv('household_power_consumption.txt', sep=";"...
/plot4.R
no_license
GermanDZ/ExData_Plotting1
R
false
false
1,201
r
classes <- c( Date="character", Time="character", Global_active_power="numeric", Global_reactive_power="numeric", Voltage="numeric", Global_intensity="numeric", Sub_metering_1="numeric", Sub_metering_2="numeric", Sub_metering_3="numeric" ) allData <- read.csv('household_power_consumption.txt', sep=";"...
library(dplyr) library(lubridate) # read data data <- read.table("data/household_power_consumption.txt", sep = ";", header = T, na.strings = "?") data_tb <- tbl_df(data) # select target dates data_tb <- filter(data_tb, Date == "1/2/2007" | Date == "2/2/2007") # Clean NAs good <- complete.cases(data...
/plot2.R
no_license
eufmike-courses/ExData_Plotting1
R
false
false
695
r
library(dplyr) library(lubridate) # read data data <- read.table("data/household_power_consumption.txt", sep = ";", header = T, na.strings = "?") data_tb <- tbl_df(data) # select target dates data_tb <- filter(data_tb, Date == "1/2/2007" | Date == "2/2/2007") # Clean NAs good <- complete.cases(data...
#' Creates linkage plan #' #' @param J number of items per form #' @param forms number of forms #' @param C number of items in common between two forms #' @param forms.linked maximum number of forms linked to one form #' @param wrap.around if \code{TRUE}, links last form to first form #' @return matrix with the number ...
/R/createLinkagePlan.R
no_license
cran/simExam
R
false
false
1,034
r
#' Creates linkage plan #' #' @param J number of items per form #' @param forms number of forms #' @param C number of items in common between two forms #' @param forms.linked maximum number of forms linked to one form #' @param wrap.around if \code{TRUE}, links last form to first form #' @return matrix with the number ...
library(mice) library(dplyr) args=commandArgs(T) #workingDir = "" #setwd(workingDir); refDir = "models/imputation.csv" method ='pmm' #load data train_data <- read.table(refDir,header=F, check.names=F, sep=",") #1590 obs of 65 variables train_data_df <- data.frame(train_data, row.names=train_data[,1]) #s...
/data_imputation.R
no_license
leonadoan/covid19_critically_ill
R
false
false
1,959
r
library(mice) library(dplyr) args=commandArgs(T) #workingDir = "" #setwd(workingDir); refDir = "models/imputation.csv" method ='pmm' #load data train_data <- read.table(refDir,header=F, check.names=F, sep=",") #1590 obs of 65 variables train_data_df <- data.frame(train_data, row.names=train_data[,1]) #s...
# Seven Bridges API base url .sbg_baseurl <- list( "cgc" = "https://cgc-api.sbgenomics.com/v2/", "aws-us" = "https://api.sbgenomics.com/v2/", "aws-eu" = "https://eu-api.sbgenomics.com/v2/", "ali-cn" = "https://api.sevenbridges.cn/v2/", "cavatica" = "https://cavatica-api.sbgenomics.com/v2/", "f4c" = "https:/...
/R/class-auth-utils.R
permissive
sbg/sevenbridges-r
R
false
false
4,976
r
# Seven Bridges API base url .sbg_baseurl <- list( "cgc" = "https://cgc-api.sbgenomics.com/v2/", "aws-us" = "https://api.sbgenomics.com/v2/", "aws-eu" = "https://eu-api.sbgenomics.com/v2/", "ali-cn" = "https://api.sevenbridges.cn/v2/", "cavatica" = "https://cavatica-api.sbgenomics.com/v2/", "f4c" = "https:/...
a = read.csv("D:\\Downloads\\ee-chart (1).csv") View(a) as.numeric(gsub(",", "", a$NDVI))
/Doutorado/Chapter-1/Processos de bancos de dados/Old Process/Open_MODIS_time_series.R
no_license
Eduardoqm/Science-Repository
R
false
false
90
r
a = read.csv("D:\\Downloads\\ee-chart (1).csv") View(a) as.numeric(gsub(",", "", a$NDVI))
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DsATAC-class.R \docType{methods} \name{getMotifFootprints,DsATAC-method} \alias{getMotifFootprints,DsATAC-method} \alias{getMotifFootprints} \title{getMotifFootprints-methods} \usage{ \S4method{getMotifFootprints}{DsATAC}(.object, motifNames,...
/man/getMotifFootprints-DsATAC-method.Rd
no_license
Jessica-2019/ChrAccR
R
false
true
1,903
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DsATAC-class.R \docType{methods} \name{getMotifFootprints,DsATAC-method} \alias{getMotifFootprints,DsATAC-method} \alias{getMotifFootprints} \title{getMotifFootprints-methods} \usage{ \S4method{getMotifFootprints}{DsATAC}(.object, motifNames,...
### This function is a component of astrochron: An R Package for Astrochronology ### Copyright (C) 2016 Stephen R. Meyers ### ########################################################################### ### function prewhiteAR - (SRM: October 3, 2012; Oct. 11, 2012; Oct 15, 2012 ### April 24,...
/R/FUNCTION-prewhiteAR_v6.R
no_license
cran/astrochron
R
false
false
3,000
r
### This function is a component of astrochron: An R Package for Astrochronology ### Copyright (C) 2016 Stephen R. Meyers ### ########################################################################### ### function prewhiteAR - (SRM: October 3, 2012; Oct. 11, 2012; Oct 15, 2012 ### April 24,...
# NADLEH and STELLAKO 2021 # DNA pull requests for MGL and scale priorities for PSC # NOTE THIS SCRIPT DIVDED INTO 3 SECTIONS: # Initial DNA investigation and pull, lines ~15-214 # PSC scale priorities, lines ~218-335 # Second DNA investigation and pull, lines ~343 ...
/nadleh-smolts/dna_pulls_2021.R
permissive
khdavidson/fraser-sox
R
false
false
21,617
r
# NADLEH and STELLAKO 2021 # DNA pull requests for MGL and scale priorities for PSC # NOTE THIS SCRIPT DIVDED INTO 3 SECTIONS: # Initial DNA investigation and pull, lines ~15-214 # PSC scale priorities, lines ~218-335 # Second DNA investigation and pull, lines ~343 ...
# Load the libraries necessary to read pages from the web. library(RSelenium) # Initialize variables. pageIndex <- integer() NRDB <- remoteDriver() indexURLTemplate <- "http://netrunnerdb.com/en/decklists/find/PGIDX?sort=date&faction=Corp&lastpack=&author=&title=" URLElementList <- list() deckURLList <- list() newU...
/CompileNRDBCorpURLList.R
no_license
MTKnife/Netrunner-Social-Network-Analysis-2
R
false
false
2,790
r
# Load the libraries necessary to read pages from the web. library(RSelenium) # Initialize variables. pageIndex <- integer() NRDB <- remoteDriver() indexURLTemplate <- "http://netrunnerdb.com/en/decklists/find/PGIDX?sort=date&faction=Corp&lastpack=&author=&title=" URLElementList <- list() deckURLList <- list() newU...
#' @title Fiscal management report #' @description The fiscal management report will contain comparative #' statements with the limits referred to in the fiscal responsibility law, of #' the following amounts: total personnel expenses, showing expenses with #' assets, inactive and pensioners, net consolidated debt, gra...
/R/get_fiscal.R
permissive
aspeddro/siconfir
R
false
false
3,054
r
#' @title Fiscal management report #' @description The fiscal management report will contain comparative #' statements with the limits referred to in the fiscal responsibility law, of #' the following amounts: total personnel expenses, showing expenses with #' assets, inactive and pensioners, net consolidated debt, gra...
context("testing tokens") ## ## tokens_hashed tests ## test_that("nsyllable works as expected", { txt <- c(one = "super freakily yes", two = "merrily all go aerodynamic") toksh <- tokens(txt) toks <- tokenize(txt) expect_equivalent(nsyllable(toks), nsyllable(toksh), list(c(2, 3, 1), c(3, ...
/tests/testthat/test-tokens.R
no_license
Jonifranc/quanteda
R
false
false
18,311
r
context("testing tokens") ## ## tokens_hashed tests ## test_that("nsyllable works as expected", { txt <- c(one = "super freakily yes", two = "merrily all go aerodynamic") toksh <- tokens(txt) toks <- tokenize(txt) expect_equivalent(nsyllable(toks), nsyllable(toksh), list(c(2, 3, 1), c(3, ...
/proyecto 2.R
no_license
diegozelada/proyecto2-Zelada-Morgado
R
false
false
7,417
r
# github stars data ------------------------------------------------------- ## list tidyverse packages tidypacks <- c("tidyverse/broom", "hadley/dplyr", "wesm/feather", "tidyverse/forcats", "hadley/ggplot2", "tidyverse/haven", "hadley/httr", "rstats-db/hms", "jeroenooms/jsonlite", ...
/data-raw/DATASET.R
permissive
shahreyar-abeer/cranstars
R
false
false
1,360
r
# github stars data ------------------------------------------------------- ## list tidyverse packages tidypacks <- c("tidyverse/broom", "hadley/dplyr", "wesm/feather", "tidyverse/forcats", "hadley/ggplot2", "tidyverse/haven", "hadley/httr", "rstats-db/hms", "jeroenooms/jsonlite", ...
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Correlation/lymphoid.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.65,family="gaussian",standardize=FALSE) sink('./lymphoid_070.txt',append=...
/Model/EN/Correlation/lymphoid/lymphoid_070.R
no_license
esbgkannan/QSMART
R
false
false
355
r
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Correlation/lymphoid.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.65,family="gaussian",standardize=FALSE) sink('./lymphoid_070.txt',append=...
source("loadData.R") #' Building plot 3 #' #' @param data dataframe or arguments to `loadData` function #' @param fileName output PNG file name or NULL to plot on the default device (screen) #' @param ... additional parameters to `plot` and `points` functions #' @param leg.par list of additional parameters to `legen...
/plot3.R
no_license
Odomontois/ExData_Plotting1
R
false
false
1,641
r
source("loadData.R") #' Building plot 3 #' #' @param data dataframe or arguments to `loadData` function #' @param fileName output PNG file name or NULL to plot on the default device (screen) #' @param ... additional parameters to `plot` and `points` functions #' @param leg.par list of additional parameters to `legen...
#' Evaluate introns and exons expressions from BAM or SAM files #' @description Given a TranscriptDb object and a list of BAM or SAM files #' "quantifyExpressionsFormBAMs" evaluates exons and introns expressions #' and the associated variances per each gene. #' @param txdb A TranscriptDB object #' @param BAMfiles A ve...
/R/quantifyExpressionsFromBAMs.R
no_license
ste-depo/INSPEcT
R
false
false
11,413
r
#' Evaluate introns and exons expressions from BAM or SAM files #' @description Given a TranscriptDb object and a list of BAM or SAM files #' "quantifyExpressionsFormBAMs" evaluates exons and introns expressions #' and the associated variances per each gene. #' @param txdb A TranscriptDB object #' @param BAMfiles A ve...
##Uso do alcool dentro da rede do RTI ##Instalar os pacotes importantes/Install important packages # install.packages ("IsingFit") # install.packages ("qgraph") # install.packages ("ggplot2") # install.packages("car") # install.packages("mgm") # install.packages("NetworkComparisonTest") library(qgraph) library(IsingF...
/Duke_DGHI/KBS-Alcohol+RTI+MM.R
no_license
souzajvp/analytical_codes
R
false
false
9,509
r
##Uso do alcool dentro da rede do RTI ##Instalar os pacotes importantes/Install important packages # install.packages ("IsingFit") # install.packages ("qgraph") # install.packages ("ggplot2") # install.packages("car") # install.packages("mgm") # install.packages("NetworkComparisonTest") library(qgraph) library(IsingF...
#' @title Query a List of Lightnings #' #' @description #' Retrieve a list of lightning strikes from the Meteomatics Weather API #' #' @param startdate An ISOdatetime of the format %Y-%m-%dT%H:%M:%OSZ. The start #' date gets converted into UTC if another timezone is selected. #' @param enddate An ISOda...
/R/query_lightnings.R
permissive
meteomatics/R-connector-api
R
false
false
4,129
r
#' @title Query a List of Lightnings #' #' @description #' Retrieve a list of lightning strikes from the Meteomatics Weather API #' #' @param startdate An ISOdatetime of the format %Y-%m-%dT%H:%M:%OSZ. The start #' date gets converted into UTC if another timezone is selected. #' @param enddate An ISOda...
### Check the data file otherwise download and unzip it if(!file.exists("exdata-data-household_power_consumption.zip")) { temp <- tempfile() download.file("http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp) file <- unzip(temp) unlink(temp) } ### read data and pl...
/plot2.R
no_license
sangaj/ExData_Plotting1
R
false
false
854
r
### Check the data file otherwise download and unzip it if(!file.exists("exdata-data-household_power_consumption.zip")) { temp <- tempfile() download.file("http://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp) file <- unzip(temp) unlink(temp) } ### read data and pl...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{prepare_data} \alias{prepare_data} \title{Prepare the data for plotting} \usage{ prepare_data(data, xlim, ylim, title) } \arguments{ \item{data}{A data frame for operations} \item{xlim, ylim}{X and Y axis limits.} \item{title}...
/man/prepare_data.Rd
no_license
wendythedatanerd/shinyScatterplot
R
false
true
480
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{prepare_data} \alias{prepare_data} \title{Prepare the data for plotting} \usage{ prepare_data(data, xlim, ylim, title) } \arguments{ \item{data}{A data frame for operations} \item{xlim, ylim}{X and Y axis limits.} \item{title}...
silent <- lapply( c("knitr", "tidyverse", "cowplot", "doParallel", "kableExtra", "glmnet", "broom", "GWASTools", "SNPRelate"), library, character.only=T) args <- commandArgs(trailingOnly=T) dv_withEx <- args[1] rf <- args[2] main_effect_threshold <- args[3] INT <- function(x) qnorm((rank(x, na.last="keep") - 0.5) / ...
/scripts/archive/sfa_gwis_gwastools/sfa_gwis_gwastools_whi.R
no_license
echoheqian/whi-diet-response
R
false
false
5,854
r
silent <- lapply( c("knitr", "tidyverse", "cowplot", "doParallel", "kableExtra", "glmnet", "broom", "GWASTools", "SNPRelate"), library, character.only=T) args <- commandArgs(trailingOnly=T) dv_withEx <- args[1] rf <- args[2] main_effect_threshold <- args[3] INT <- function(x) qnorm((rank(x, na.last="keep") - 0.5) / ...
skip_if_not_installed("estimatr") skip_if_not_installed("ivreg") # iv_robust -------------------------------------------------------------- # ========================================================================= test_that("get_predicted.default - iv_robust", { data(Kmenta, package = "ivreg") x <- es...
/tests/testthat/test-get_predicted-iv.R
no_license
cran/insight
R
false
false
2,246
r
skip_if_not_installed("estimatr") skip_if_not_installed("ivreg") # iv_robust -------------------------------------------------------------- # ========================================================================= test_that("get_predicted.default - iv_robust", { data(Kmenta, package = "ivreg") x <- es...
#' Pseudo-Invariant Features based Image Matching #' #' Match one scene to another based on linear regression of pseudo-invariant features (PIF). #' #' @param img RasterStack or RasterBrick. Image to be adjusted. #' @param ref RasterStack or RasterBruck. Reference image. #' @param method Method to calculate pixel sim...
/R/pifMatch.R
no_license
16EAGLE/RStoolbox
R
false
false
4,881
r
#' Pseudo-Invariant Features based Image Matching #' #' Match one scene to another based on linear regression of pseudo-invariant features (PIF). #' #' @param img RasterStack or RasterBrick. Image to be adjusted. #' @param ref RasterStack or RasterBruck. Reference image. #' @param method Method to calculate pixel sim...
library(shiny) #' pageUploadDataUI #' #' UI function for the page 'Upload measurement data' #' #' @param id Identifier for the namespace of this module #' #' @return A HTML tag object pageUploadDataUI <- function(id){ # create namespace function ns <- NS(id) tagList( h2("Upload measurement data"), ...
/R/page_uploadData.R
permissive
EarthSystemDiagnostics/cpt-picarr
R
false
false
6,248
r
library(shiny) #' pageUploadDataUI #' #' UI function for the page 'Upload measurement data' #' #' @param id Identifier for the namespace of this module #' #' @return A HTML tag object pageUploadDataUI <- function(id){ # create namespace function ns <- NS(id) tagList( h2("Upload measurement data"), ...
sumDigits = function(aBigz) { require(gmp) sum(sapply(strsplit(as.character(aBigz), NULL), as.numeric)) } findFactors = function(n) { # Includes 1 but not n ints = seq_len(n - 1) ints[!(n %% ints)] } # Inefficient: isprime = function(x) length(findFactors(x)) == 1 mulitOrder = function(a, n, prec = 200) {...
/euler_functions.R
no_license
michaellevy/project_euleR
R
false
false
560
r
sumDigits = function(aBigz) { require(gmp) sum(sapply(strsplit(as.character(aBigz), NULL), as.numeric)) } findFactors = function(n) { # Includes 1 but not n ints = seq_len(n - 1) ints[!(n %% ints)] } # Inefficient: isprime = function(x) length(findFactors(x)) == 1 mulitOrder = function(a, n, prec = 200) {...
mk_chrono <- function(x, prefix = "CRONO", biweight = TRUE, prewhiten = FALSE, stc = c(5, 2, 1), order.max.prewhiten = 3) { prefix <- as.character(prefix) if (order.max.prewhiten < 1) { prewhiten <- FALSE } SAMPLE_DE...
/R/mk_chrono.R
no_license
cran/detrendeR
R
false
false
983
r
mk_chrono <- function(x, prefix = "CRONO", biweight = TRUE, prewhiten = FALSE, stc = c(5, 2, 1), order.max.prewhiten = 3) { prefix <- as.character(prefix) if (order.max.prewhiten < 1) { prewhiten <- FALSE } SAMPLE_DE...
#Reading Data setwd('D:/Rwd') pcdf<-read.table("household_power_consumption.txt",header=TRUE,sep=";",colClasses=c('character','character','numeric','numeric','numeric','numeric','numeric','numeric','numeric'),na.strings='?') #Data Preparation pcdf$DateTime<-paste(pcdf$Date,pcdf$Time) pcdf$DateTime<-strptime(pcdf...
/plot3.R
no_license
zoharsan/ExData_Plotting1
R
false
false
857
r
#Reading Data setwd('D:/Rwd') pcdf<-read.table("household_power_consumption.txt",header=TRUE,sep=";",colClasses=c('character','character','numeric','numeric','numeric','numeric','numeric','numeric','numeric'),na.strings='?') #Data Preparation pcdf$DateTime<-paste(pcdf$Date,pcdf$Time) pcdf$DateTime<-strptime(pcdf...
numPerPatch59512 <- c(2476,2524)
/NatureEE-data-archive/Run202971/JAFSdata/JAFSnumPerPatch59512.R
no_license
flaxmans/NatureEE2017
R
false
false
33
r
numPerPatch59512 <- c(2476,2524)
# Passing the update argument to the resulting options manager will update # the provided keys and values. Note that update[[1]] are the keys and # update[[2]] are the values. # Examples of using options.manager # log.options <- options.manager('log.options', defaults=list(logger='ROOT')) # log.options(a=123, b=6234...
/R/options.R
no_license
zatonovo/futile.options
R
false
false
2,756
r
# Passing the update argument to the resulting options manager will update # the provided keys and values. Note that update[[1]] are the keys and # update[[2]] are the values. # Examples of using options.manager # log.options <- options.manager('log.options', defaults=list(logger='ROOT')) # log.options(a=123, b=6234...
\name{MulticoreParam-class} \Rdversion{1.1} \docType{class} \alias{MulticoreParam} \alias{MulticoreParam-class} \alias{bpisup,MulticoreParam-method} \alias{bpschedule,MulticoreParam-method} \alias{bplapply,ANY,MulticoreParam-method} \alias{bpvec,ANY,MulticoreParam-method} \alias{bparallelize,ANY,MulticoreParam-metho...
/man/MulticoreParam-class.Rd
no_license
ttriche/BiocParallel
R
false
false
3,408
rd
\name{MulticoreParam-class} \Rdversion{1.1} \docType{class} \alias{MulticoreParam} \alias{MulticoreParam-class} \alias{bpisup,MulticoreParam-method} \alias{bpschedule,MulticoreParam-method} \alias{bplapply,ANY,MulticoreParam-method} \alias{bpvec,ANY,MulticoreParam-method} \alias{bparallelize,ANY,MulticoreParam-metho...
\name{coxscor} \alias{coxscor} \title{ internal functions from Tibshirani's software package GSA } \description{ internal functions from Tibshirani's software package GSA } \references{ Bair, Eric, Trevor Hastie, Debashis Paul, and Robert Tibshirani. Prediction by Supervised Principal Components.Journal of t...
/man/coxscor.Rd
no_license
bhelmi/MetaPath
R
false
false
427
rd
\name{coxscor} \alias{coxscor} \title{ internal functions from Tibshirani's software package GSA } \description{ internal functions from Tibshirani's software package GSA } \references{ Bair, Eric, Trevor Hastie, Debashis Paul, and Robert Tibshirani. Prediction by Supervised Principal Components.Journal of t...
#' AAStringSet viral annotation data #' #' `SV_seq` is a AAStringSet with information about viral proteins #' @source \url{https://core.ac.uk/download/pdf/211022451.pdf} "SV_seq" #' Qfeature mocked data #' #' `QWCLpeptidessmall` is a small `QFeatures` object for testing. #' SummarizedExperiment with 5 rows and 9 col...
/R/data.R
no_license
demar01/RIC
R
false
false
532
r
#' AAStringSet viral annotation data #' #' `SV_seq` is a AAStringSet with information about viral proteins #' @source \url{https://core.ac.uk/download/pdf/211022451.pdf} "SV_seq" #' Qfeature mocked data #' #' `QWCLpeptidessmall` is a small `QFeatures` object for testing. #' SummarizedExperiment with 5 rows and 9 col...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{filter_db_germline_variants} \alias{filter_db_germline_variants} \title{Function that filters a data frame with variants according to population-specific germline frequencies} \usage{ filter_db_germline_variants(var_df, pop = "e...
/man/filter_db_germline_variants.Rd
no_license
Jkang-alien/OncoVarReporter
R
false
true
716
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{filter_db_germline_variants} \alias{filter_db_germline_variants} \title{Function that filters a data frame with variants according to population-specific germline frequencies} \usage{ filter_db_germline_variants(var_df, pop = "e...
#' @title Mask RCNN infer dataloader #' #' @description A `DataLoader` with a custom `collate_fn` that batches items as required for inferring the model. #' #' @param dataset Possibly a `Dataset` object, but more generally, any `Sequence` that returns records. #' @param batch_tfms Transforms to be applied at the batc...
/R/icevision_mask_rcnn.R
permissive
Cdk29/fastai
R
false
false
1,266
r
#' @title Mask RCNN infer dataloader #' #' @description A `DataLoader` with a custom `collate_fn` that batches items as required for inferring the model. #' #' @param dataset Possibly a `Dataset` object, but more generally, any `Sequence` that returns records. #' @param batch_tfms Transforms to be applied at the batc...
# Copyright 2011 Revolution Analytics # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
/pkg/tests/logistic-regression.R
no_license
dkvasnicka/rmr2
R
false
false
2,210
r
# Copyright 2011 Revolution Analytics # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed...
library(tidyverse) library(readxl) library(janitor) r_trial_data <- read_excel("data-raw/R trial 10.13.21.xlsx") %>% clean_names() r_trial_data %>% mutate(year = 2020) r_trial_data %>% select(contains("going_well")) r_trial_data %>% count(going_well_design) r_trial_data %>% count(going_well_admi...
/live-examples.R
no_license
jclavijo1/r-project-juan
R
false
false
1,281
r
library(tidyverse) library(readxl) library(janitor) r_trial_data <- read_excel("data-raw/R trial 10.13.21.xlsx") %>% clean_names() r_trial_data %>% mutate(year = 2020) r_trial_data %>% select(contains("going_well")) r_trial_data %>% count(going_well_design) r_trial_data %>% count(going_well_admi...
#' plotHAZTreatmentEff #' #' @description Plots the simulated data in a FAIRsimulator \code{study} object with treatment effects. #' @param StudyObj A FAIRsimulator \code{study} object. #' @param treatmentNames A vector of treatment names. Default is the treatment names assigned at study initialisation. #' @param tre...
/R/plotHAZTreatmentEff.R
permissive
HBGDki/FAIRsimulator
R
false
false
2,226
r
#' plotHAZTreatmentEff #' #' @description Plots the simulated data in a FAIRsimulator \code{study} object with treatment effects. #' @param StudyObj A FAIRsimulator \code{study} object. #' @param treatmentNames A vector of treatment names. Default is the treatment names assigned at study initialisation. #' @param tre...
getmode <- function(v) { uniqv <- unique(v) uniqv[which.max(tabulate(match(v, uniqv)))] }
/fishing-ground-change/R/getmode.R
no_license
mfisher5/VMS-NWFSC-2
R
false
false
93
r
getmode <- function(v) { uniqv <- unique(v) uniqv[which.max(tabulate(match(v, uniqv)))] }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/checkHeight.R \name{checkHeight} \alias{checkHeight} \title{Return the height difference of the input dataframe withe the mean height of the dataframe} \usage{ checkHeight(students.input, sex.specific = TRUE, print.statement = FALSE) } \argum...
/man/checkHeight.Rd
no_license
MiGraber/myTestPackage
R
false
true
795
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/checkHeight.R \name{checkHeight} \alias{checkHeight} \title{Return the height difference of the input dataframe withe the mean height of the dataframe} \usage{ checkHeight(students.input, sex.specific = TRUE, print.statement = FALSE) } \argum...
library(checkmate) library(testthat) library(raster) context("getHistory") test_that("getHistory of a geom", { coords <- data.frame(x = c(40, 70, 70, 50), y = c(40, 40, 60, 70), fid = 1) window <- data.frame(x = c(0, 80), y = c(0, 80)) aGeom <...
/tests/testthat/test_getHistory.R
no_license
gisdevelope/rasterTools
R
false
false
1,141
r
library(checkmate) library(testthat) library(raster) context("getHistory") test_that("getHistory of a geom", { coords <- data.frame(x = c(40, 70, 70, 50), y = c(40, 40, 60, 70), fid = 1) window <- data.frame(x = c(0, 80), y = c(0, 80)) aGeom <...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/5_plotFunctions.R \name{QueryStarPlot} \alias{QueryStarPlot} \title{QueryStarPlot} \usage{ QueryStarPlot( fsom, query, plot = TRUE, colorPalette = FlowSOM_colors, backgroundColors = "#CA0020", ... ) } \arguments{ \item{fsom}{FlowS...
/man/QueryStarPlot.Rd
no_license
SofieVG/FlowSOM
R
false
true
2,161
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/5_plotFunctions.R \name{QueryStarPlot} \alias{QueryStarPlot} \title{QueryStarPlot} \usage{ QueryStarPlot( fsom, query, plot = TRUE, colorPalette = FlowSOM_colors, backgroundColors = "#CA0020", ... ) } \arguments{ \item{fsom}{FlowS...
context("plot") test_that("disconstinuity are correctly identified",{ set.seed(12) series <- c(rnorm(10, 0, .01), rnorm(10, 1, .01)) expect_equivalent(identify_discontinuity(series), c(rep(1, 10), rep(2, 10)) ) })
/tests/testthat/test-plot.R
permissive
alaindanet/indirect_facilitation_model
R
false
false
229
r
context("plot") test_that("disconstinuity are correctly identified",{ set.seed(12) series <- c(rnorm(10, 0, .01), rnorm(10, 1, .01)) expect_equivalent(identify_discontinuity(series), c(rep(1, 10), rep(2, 10)) ) })
temp <- tempfile() download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp) data <- read.table(unz(temp, "household_power_consumption.txt"),header=TRUE,na.strings = "NA",sep = ";") unlink(temp) filtereddata <- data[(as.Date(data$Date, format = "%d/%m/%Y") == "2007-02-...
/plot1.R
no_license
ndanchak/ExData_Plotting1
R
false
false
652
r
temp <- tempfile() download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip",temp) data <- read.table(unz(temp, "household_power_consumption.txt"),header=TRUE,na.strings = "NA",sep = ";") unlink(temp) filtereddata <- data[(as.Date(data$Date, format = "%d/%m/%Y") == "2007-02-...
## A code for a pair of functions that cache and compute the inverse of a matrix in ## order to eliminate computational tasked attached to matrix inversion ## The function makeCacheMatrix creates a special "matrix" object that can cache its ## inverse. makeCacheMatrix <- function(x = matrix()) { m <- NULL set <...
/cachematrix.R
no_license
bibabura/ProgrammingAssignment2
R
false
false
924
r
## A code for a pair of functions that cache and compute the inverse of a matrix in ## order to eliminate computational tasked attached to matrix inversion ## The function makeCacheMatrix creates a special "matrix" object that can cache its ## inverse. makeCacheMatrix <- function(x = matrix()) { m <- NULL set <...
#' @title catseyes #' @description The catseyes() function is used to plot catseye interval(s) onto a an existing #' basic R plot background. #' Catseye plots illustrate the normal distribution of the mean (picture a normal bell curve #' reflected over its base and rotated 90 degrees), with a shaded confidence inte...
/R/catseyes.R
no_license
cran/catseyes
R
false
false
20,059
r
#' @title catseyes #' @description The catseyes() function is used to plot catseye interval(s) onto a an existing #' basic R plot background. #' Catseye plots illustrate the normal distribution of the mean (picture a normal bell curve #' reflected over its base and rotated 90 degrees), with a shaded confidence inte...
# data set start date is Dec 16, 2006 at 17:24:00 # only want data from Feb 1, 2007 00:00:00 to Feb 2, 2007 24:00:00 # read in first line for start information startdate = read.csv("household_power_consumption.txt",sep=";",nrow=1) # convert to date/time information startdate$datetime = strptime( paste(startdate$Date,...
/plot3.R
no_license
AdamFilion/ExData_Plotting1
R
false
false
1,893
r
# data set start date is Dec 16, 2006 at 17:24:00 # only want data from Feb 1, 2007 00:00:00 to Feb 2, 2007 24:00:00 # read in first line for start information startdate = read.csv("household_power_consumption.txt",sep=";",nrow=1) # convert to date/time information startdate$datetime = strptime( paste(startdate$Date,...
keepImportantColumns <- function(mapping, metabol = F){ mapping <- as.data.frame(mapping) #keep <- colnames(ps@sam_data)[c(1, 4, 11, 12, 17, 22, 23, 38, 39, 40, 41, 42, 43, 48, 49, 53, 54, 105, 106, 107, # 112:118, 138, 140)] keep_names <- c('Biospecimen.Barcode', 'Biospecimen.Name', 'Host...
/scripts/clean_mapping_ml_2.R
no_license
MaudeDavidLab/M3_Phyloseq_Analysis
R
false
false
7,771
r
keepImportantColumns <- function(mapping, metabol = F){ mapping <- as.data.frame(mapping) #keep <- colnames(ps@sam_data)[c(1, 4, 11, 12, 17, 22, 23, 38, 39, 40, 41, 42, 43, 48, 49, 53, 54, 105, 106, 107, # 112:118, 138, 140)] keep_names <- c('Biospecimen.Barcode', 'Biospecimen.Name', 'Host...
tm1_get_instances <- function(adminhost = "localhost", port = "5898", ssl = TRUE) { u1 <- ifelse(ssl==TRUE, "https://", "http://") u2 <- adminhost u3 <- ":" u4 <- port u5 <- "/" u6<- "api/v1/Servers" # url development url <- paste0(u1, u2, u3, u4, u5, u6) #url = "https://localhost:5898/api/v1/Serve...
/R/tm1_get_instances.R
no_license
cran/tm1r
R
false
false
633
r
tm1_get_instances <- function(adminhost = "localhost", port = "5898", ssl = TRUE) { u1 <- ifelse(ssl==TRUE, "https://", "http://") u2 <- adminhost u3 <- ":" u4 <- port u5 <- "/" u6<- "api/v1/Servers" # url development url <- paste0(u1, u2, u3, u4, u5, u6) #url = "https://localhost:5898/api/v1/Serve...
#'List Tables in Catalog/Schema #' #'@description #'This function returns a list of all tables in defined Catalog/Schema #' #'@param conn The connection to the database #'@param pattern optional SQL pattern for filtering table names, #' e.g. \sQuote{\%test\%} #'@param ... currently ignored #'@export #' @...
/R/showTables.R
no_license
Doorda/doorda-r-sdk
R
false
false
929
r
#'List Tables in Catalog/Schema #' #'@description #'This function returns a list of all tables in defined Catalog/Schema #' #'@param conn The connection to the database #'@param pattern optional SQL pattern for filtering table names, #' e.g. \sQuote{\%test\%} #'@param ... currently ignored #'@export #' @...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsmfa_graphs.R \name{loading_plot} \alias{loading_plot} \title{Create plot of loadings for two dimensions} \usage{ loading_plot( loadings, axis1 = 1, axis2 = 2, col_points = "blueviolet", constraints = NULL, arrows = TRUE, ... ...
/man/loading_plot.Rd
permissive
LukeMoraglia/plsmfa
R
false
true
1,333
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plsmfa_graphs.R \name{loading_plot} \alias{loading_plot} \title{Create plot of loadings for two dimensions} \usage{ loading_plot( loadings, axis1 = 1, axis2 = 2, col_points = "blueviolet", constraints = NULL, arrows = TRUE, ... ...
library(pandocfilters) ### Name: Para ### Title: Paragraph ### Aliases: Para ### ** Examples Para("x")
/data/genthat_extracted_code/pandocfilters/examples/Para.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
110
r
library(pandocfilters) ### Name: Para ### Title: Paragraph ### Aliases: Para ### ** Examples Para("x")
## Creates an object which can store a matrix and inverse of the matrix. makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setsolve <- function(solve) m <<- solve getsolve <- function() m ...
/coursera/R-programming/assignment-2/cachematrix.R
no_license
shanaka-desoysa/datascience
R
false
false
813
r
## Creates an object which can store a matrix and inverse of the matrix. makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setsolve <- function(solve) m <<- solve getsolve <- function() m ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{Sluggan} \alias{Sluggan} \title{Sluggan Moss data} \format{A data frame with 31 observations on the following 6 variables: \describe{ \item{\code{id}}{ID of each age} \item{\code{ages}}{Age in (14C) years BP} \item...
/man/Sluggan.Rd
no_license
ercrema/Bchron
R
false
true
1,020
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{Sluggan} \alias{Sluggan} \title{Sluggan Moss data} \format{A data frame with 31 observations on the following 6 variables: \describe{ \item{\code{id}}{ID of each age} \item{\code{ages}}{Age in (14C) years BP} \item...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/server.R \name{counting} \alias{counting} \title{Counting peptides} \usage{ counting(dt) } \arguments{ \item{dt}{A data table or data frame.} } \value{ Data table containing counts of peptides for each protein. } \description{ Count the occur...
/man/counting.Rd
no_license
michbur/shiny-density
R
false
true
412
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/server.R \name{counting} \alias{counting} \title{Counting peptides} \usage{ counting(dt) } \arguments{ \item{dt}{A data table or data frame.} } \value{ Data table containing counts of peptides for each protein. } \description{ Count the occur...
library(tidyverse) library(RCurl) library(XML) library(stringr) library(simpleboot) library(boot) ### Get Risk Rankings from Fantasy Pros if(week == 0){ rankings_fp <- getURL("https://www.fantasypros.com/nfl/rankings/ppr-cheatsheets.php#") rankings_fp <- readHTMLTable(rankings_fp, stringsAsFactors = FALSE)$`rank-data`...
/Calculations/Risk.R
no_license
gberg1303/Projection-Scraping
R
false
false
7,615
r
library(tidyverse) library(RCurl) library(XML) library(stringr) library(simpleboot) library(boot) ### Get Risk Rankings from Fantasy Pros if(week == 0){ rankings_fp <- getURL("https://www.fantasypros.com/nfl/rankings/ppr-cheatsheets.php#") rankings_fp <- readHTMLTable(rankings_fp, stringsAsFactors = FALSE)$`rank-data`...
##### importance.R ----- # Code taken from: https://github.com/skoval/iid/blob/master/code/importance.R importance <- function(point_x, point_y, game_x, game_y, set_x, set_y, tiebreak = FALSE, bestof3 = FALSE){ point_importance <- function(serve, return, tiebreak = FALSE){ win <- ...
/projects/roland_garros_project/src/importance.R
no_license
petertea96/tennis_analytics
R
false
false
2,067
r
##### importance.R ----- # Code taken from: https://github.com/skoval/iid/blob/master/code/importance.R importance <- function(point_x, point_y, game_x, game_y, set_x, set_y, tiebreak = FALSE, bestof3 = FALSE){ point_importance <- function(serve, return, tiebreak = FALSE){ win <- ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fars_functions.R \name{fars_read} \alias{fars_read} \title{Read in data from a file} \usage{ fars_read(filename) } \arguments{ \item{filename}{An atomic character vector holding the path name of the file.} } \value{ A tbl_df data structure wi...
/man/fars_read.Rd
no_license
sdbecker-zz/FARS
R
false
true
799
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fars_functions.R \name{fars_read} \alias{fars_read} \title{Read in data from a file} \usage{ fars_read(filename) } \arguments{ \item{filename}{An atomic character vector holding the path name of the file.} } \value{ A tbl_df data structure wi...
# This file was generated by Rcpp::compileAttributes # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #' Calculating distances between two sets of points #' #' Calculates pairwise distances between two sets of points. #' #' @param a matrix containing a set of coordinates. #' @param b matrix containing another s...
/R/RcppExports.R
no_license
dill/admbsecr
R
false
false
2,126
r
# This file was generated by Rcpp::compileAttributes # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 #' Calculating distances between two sets of points #' #' Calculates pairwise distances between two sets of points. #' #' @param a matrix containing a set of coordinates. #' @param b matrix containing another s...
library(stringi) library(tm) library(gofastr) library(ggplot2) library(ggrepel) library(reshape2) library(RColorBrewer) library(dplyr) library(stringr) library(scales) # load data load(file = "Kitu/College/Junior Year/Extracurriculars/Data Science Research Internship/final_dat...
/Final Dataset Correlation between MH and RN/final_dataset_correlation_btwn_MH_and_RN.R
no_license
Key2-Success/HeartBD2K
R
false
false
7,453
r
library(stringi) library(tm) library(gofastr) library(ggplot2) library(ggrepel) library(reshape2) library(RColorBrewer) library(dplyr) library(stringr) library(scales) # load data load(file = "Kitu/College/Junior Year/Extracurriculars/Data Science Research Internship/final_dat...
#!/usr/bin/env Rscript require(ggplot2) require(plyr) out <- commandArgs(trailingOnly = TRUE)[1] raw_data <- read.csv("stdin") d <- ddply(raw_data, .(Size, Name, Digits), summarize, Time = min(Time)) for(i in unique(d$Size)) { png(filename=paste0(paste(out, i, sep="_"), ".png"), width=800, height=600)...
/scripts/graph.R
no_license
rittik-hub/cxx-benchmark-count-digits
R
false
false
546
r
#!/usr/bin/env Rscript require(ggplot2) require(plyr) out <- commandArgs(trailingOnly = TRUE)[1] raw_data <- read.csv("stdin") d <- ddply(raw_data, .(Size, Name, Digits), summarize, Time = min(Time)) for(i in unique(d$Size)) { png(filename=paste0(paste(out, i, sep="_"), ".png"), width=800, height=600)...
date <- Sys.Date() - 3 url <- sprintf( "https://geovision.uned.ac.cr/oges/archivos_covid/%s/%s_CSV_GENERAL.csv", format(date, "%Y_%m_%d"), format(date, "%m_%d_%y") ) df <- fread(url, showProgress = FALSE, select = c("nue_posi", "conf_nexo","nue_descar", "FECHA")) df[, lab_pos := zoo::na.fill(...
/scripts/scripts/testing/automations/batch/costa_rica.R
no_license
Naty1209/Covid
R
false
false
939
r
date <- Sys.Date() - 3 url <- sprintf( "https://geovision.uned.ac.cr/oges/archivos_covid/%s/%s_CSV_GENERAL.csv", format(date, "%Y_%m_%d"), format(date, "%m_%d_%y") ) df <- fread(url, showProgress = FALSE, select = c("nue_posi", "conf_nexo","nue_descar", "FECHA")) df[, lab_pos := zoo::na.fill(...
#' Cross reference a figure caption #' #' @description #' list, cross reference a `fig.cap` in r markdown with label and link of pdf #' @examples #' library(ggplot2) #' ggplot(data = mpg, aes(x = displ, y = hwy)) + #' geom_point() + #' labs(caption = fig$cap("fig-chunk-name", "Caption name")) #' fig$ref("fig-chunk-...
/R/number_figure.R
permissive
ygeunkim/rmdtool
R
false
false
1,444
r
#' Cross reference a figure caption #' #' @description #' list, cross reference a `fig.cap` in r markdown with label and link of pdf #' @examples #' library(ggplot2) #' ggplot(data = mpg, aes(x = displ, y = hwy)) + #' geom_point() + #' labs(caption = fig$cap("fig-chunk-name", "Caption name")) #' fig$ref("fig-chunk-...
### Open the dataset HPC <- read.csv("C:/Users/Admin/Desktop/Coursera/Datasets/Exploratory Analysis/household_power_consumption/household_power_consumption.txt", sep=";") ### Fitler dataset for dates requested HPC2 <- HPC[as.Date(HPC$Date, "%d/%m/%Y") %in% as.Date(c("2007-02-01", "2007-02-02")),] ### Combine dates ...
/Plot_2.R
no_license
KeithARussel/ExData_Plotting1
R
false
false
820
r
### Open the dataset HPC <- read.csv("C:/Users/Admin/Desktop/Coursera/Datasets/Exploratory Analysis/household_power_consumption/household_power_consumption.txt", sep=";") ### Fitler dataset for dates requested HPC2 <- HPC[as.Date(HPC$Date, "%d/%m/%Y") %in% as.Date(c("2007-02-01", "2007-02-02")),] ### Combine dates ...
################################################################################ # CHANGE LOG (last 20 changes) # 17.02.2019: Fixed Error in if (svalue(savegui_chk)) { : argument is of length zero (tcltk) # 07.08.2017: Added audit trail. # 13.07.2017: Fixed narrow dropdown with hidden argument ellipsize = "none". # 07....
/R/removeSpike_gui.r
no_license
sctyner/strvalidator
R
false
false
9,523
r
################################################################################ # CHANGE LOG (last 20 changes) # 17.02.2019: Fixed Error in if (svalue(savegui_chk)) { : argument is of length zero (tcltk) # 07.08.2017: Added audit trail. # 13.07.2017: Fixed narrow dropdown with hidden argument ellipsize = "none". # 07....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/models.R \name{deterministic_model} \alias{deterministic_model} \title{Simple SEEIR model creation. We will use this structure to ensure that model fitting is flexible in the future as more models are added} \usage{ deterministic_model() } \...
/man/deterministic_model.Rd
permissive
willpearse/squire
R
false
true
358
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/models.R \name{deterministic_model} \alias{deterministic_model} \title{Simple SEEIR model creation. We will use this structure to ensure that model fitting is flexible in the future as more models are added} \usage{ deterministic_model() } \...
googlePolygonDependency <- function() { list( createHtmlDependency( name = "polygons", version = "1.0.0", src = system.file("htmlwidgets/lib/polygons", package = "googleway"), script = c("polygons.js"), all_files = FALSE ) ) } #' Add polygon #' #' Add a polygon to a google map...
/R/google_map_layer_polygon.R
no_license
Felipe86100201/googleway
R
false
false
13,007
r
googlePolygonDependency <- function() { list( createHtmlDependency( name = "polygons", version = "1.0.0", src = system.file("htmlwidgets/lib/polygons", package = "googleway"), script = c("polygons.js"), all_files = FALSE ) ) } #' Add polygon #' #' Add a polygon to a google map...
library(textir) library(irlba) library(msgpackR) # !!! ALL VARS DECLARED HERE ARE GLOBAL !!! # read data and get triplet probs <- msgpackR::unpack("../aoj-problem-data.msg") rows <- unlist(mapply(function(p,n) { rep(n,length(p[["solvers"]])) }, probs, 1:length(probs))) cols <- unlist(lapply(probs, function(p...
/r/read-aoj-problem-data.r
no_license
dai1741/AOJ-clustering-and-regression
R
false
false
983
r
library(textir) library(irlba) library(msgpackR) # !!! ALL VARS DECLARED HERE ARE GLOBAL !!! # read data and get triplet probs <- msgpackR::unpack("../aoj-problem-data.msg") rows <- unlist(mapply(function(p,n) { rep(n,length(p[["solvers"]])) }, probs, 1:length(probs))) cols <- unlist(lapply(probs, function(p...
# cec 2015_problem_data gens = c(50000 * matrix(1, 1, 5), 200000, 200000, 400000, 400000, 200000*matrix(1,1, 4), 400000 * matrix(1, 1, 7)) nopt = c(2, 5, 1, 4, 2, 18, 36, 81, 216, 12, 6, 8, 6, 6, 8, 6, 8, 6, 8, 8) dims = c(1, 1, 1, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 3, 5, 5, 10, 10, 20) mn = list(0, 0, 0, c(-6, -6), ...
/R/cec_2015_problem_data.R
no_license
hfjn/nmmso_benchmark
R
false
false
1,013
r
# cec 2015_problem_data gens = c(50000 * matrix(1, 1, 5), 200000, 200000, 400000, 400000, 200000*matrix(1,1, 4), 400000 * matrix(1, 1, 7)) nopt = c(2, 5, 1, 4, 2, 18, 36, 81, 216, 12, 6, 8, 6, 6, 8, 6, 8, 6, 8, 8) dims = c(1, 1, 1, 2, 2, 2, 2, 3, 3, 2, 2, 2, 2, 3, 3, 5, 5, 10, 10, 20) mn = list(0, 0, 0, c(-6, -6), ...
#this version of the script has been tested on igraph 1.0.1 #load libraries library("igraph") library("RColorBrewer") #load the edges with time stamp #there are three columns in edges: id1,id2,time edges <- read.table("~/R/data/rcomments/edges_time.csv",header=T) #generate the full graph g <- graph.data.frame(edges,d...
/igraphAnimTest.R
no_license
toosuto-r/redditComments
R
false
false
2,036
r
#this version of the script has been tested on igraph 1.0.1 #load libraries library("igraph") library("RColorBrewer") #load the edges with time stamp #there are three columns in edges: id1,id2,time edges <- read.table("~/R/data/rcomments/edges_time.csv",header=T) #generate the full graph g <- graph.data.frame(edges,d...
#' Regression-with-Residuals Analysis of Causal Mediation #' #' \code{rwrmed} is a function that implements the regression-with-residuals (RWR) #' approach to causal mediation, allowing for post-treatment confounding of the mediator-outcome #' relationship. Specifically, it fits user-specified mediator and outcome ...
/R/rwrmed.R
no_license
xiangzhou09/rwrmed
R
false
false
7,571
r
#' Regression-with-Residuals Analysis of Causal Mediation #' #' \code{rwrmed} is a function that implements the regression-with-residuals (RWR) #' approach to causal mediation, allowing for post-treatment confounding of the mediator-outcome #' relationship. Specifically, it fits user-specified mediator and outcome ...
# load packages library(dplyr) library(Seurat) library(patchwork) library(celldex) library(SingleR) ### Set working directory ### setwd("D:/YUHS/65.이영인교수님/2.ANALYSIS/QC") ### Load data ### # modify path! data <- Read10X(data.dir = '../../1.DATA/Study1-1.GSE181297_RAW/Ke01/') # Should modify prefix! prefix = "Ke02" ob...
/scRNA_10X.r
no_license
fortissi2mo/project1
R
false
false
7,871
r
# load packages library(dplyr) library(Seurat) library(patchwork) library(celldex) library(SingleR) ### Set working directory ### setwd("D:/YUHS/65.이영인교수님/2.ANALYSIS/QC") ### Load data ### # modify path! data <- Read10X(data.dir = '../../1.DATA/Study1-1.GSE181297_RAW/Ke01/') # Should modify prefix! prefix = "Ke02" ob...
readTreeMask =function (rwl, stc = c(5, 2, 1)) { if (sum(stc) != 8) stop("Site-Tree-Core mask does not sum to 8") ids = colnames(rwl) #series names # ids = format(ids,width=8, align="l") test = function (x, site.chars=stc) { out=c(NA,NA,NA) out[1] = substring(x, 1, stc[1]) ...
/detrendeR/R/readTreeMask.r
no_license
ingted/R-Examples
R
false
false
1,039
r
readTreeMask =function (rwl, stc = c(5, 2, 1)) { if (sum(stc) != 8) stop("Site-Tree-Core mask does not sum to 8") ids = colnames(rwl) #series names # ids = format(ids,width=8, align="l") test = function (x, site.chars=stc) { out=c(NA,NA,NA) out[1] = substring(x, 1, stc[1]) ...
sf <- gpx_sf( system.file("./gpx/city_trail.gpx", package = "gpx") ) city_trail <- sf usethis::use_data(city_trail) mapdeck( location = c(145, -37.8) , zoom = 10 , style = mapdeck_style("dark") ) %>% add_trips( data = sf , animation_speed = 2000 , trail_length = 1000 , stroke_colour = "#FFFFFF" ) # ma...
/data-raw/city_trail.R
no_license
SymbolixAU/mapdeck
R
false
false
612
r
sf <- gpx_sf( system.file("./gpx/city_trail.gpx", package = "gpx") ) city_trail <- sf usethis::use_data(city_trail) mapdeck( location = c(145, -37.8) , zoom = 10 , style = mapdeck_style("dark") ) %>% add_trips( data = sf , animation_speed = 2000 , trail_length = 1000 , stroke_colour = "#FFFFFF" ) # ma...
## Author: Luke Tuttle ## Created: Tue Jun 23 11:53:21 2020 ## Updated: ## Purpose of script: to provide a self contained function for downloading Census ACS data ## ## ## ----------------------- ## Notes: BEWARE!!!!!!!! 2009 VARIABLE LABELS TYPICALLY DIFFER FROM THE OTHER YEARS ## This function relies on the tidycensu...
/get_acs_combo.R
no_license
LukeTuttle/tidycensus-wrapper
R
false
false
15,532
r
## Author: Luke Tuttle ## Created: Tue Jun 23 11:53:21 2020 ## Updated: ## Purpose of script: to provide a self contained function for downloading Census ACS data ## ## ## ----------------------- ## Notes: BEWARE!!!!!!!! 2009 VARIABLE LABELS TYPICALLY DIFFER FROM THE OTHER YEARS ## This function relies on the tidycensu...
options(scipen=100) # Rscript cmp_obs_permut_ratios.R script_name <- "cmp_obs_permut_ratios.R" require(foreach) require(doMC) registerDoMC(40) startTime <- Sys.time() cat("> START ", script_name, "\n") buildTable <- TRUE plotCex <- 1.4 plotType <- "png" myHeight <- 400 myWidth <- 600 outFolder <- "CMP_OBS_PER...
/cmp_obs_permut_ratios.R
no_license
marzuf/v2_Yuanlong_Cancer_HiC_data_TAD_DA
R
false
false
3,833
r
options(scipen=100) # Rscript cmp_obs_permut_ratios.R script_name <- "cmp_obs_permut_ratios.R" require(foreach) require(doMC) registerDoMC(40) startTime <- Sys.time() cat("> START ", script_name, "\n") buildTable <- TRUE plotCex <- 1.4 plotType <- "png" myHeight <- 400 myWidth <- 600 outFolder <- "CMP_OBS_PER...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/unitconversion.fluid.dram.to.minim.R \name{unitconversion.fluid.dram.to.minim} \alias{unitconversion.fluid.dram.to.minim} \title{Unit Conversion - Liquid Volume - Fluid Dram to Minim} \usage{ unitconversion.fluid.dram.to.minim(x = 1) } \argum...
/man/unitconversion.fluid.dram.to.minim.Rd
permissive
burrm/lolcat
R
false
true
492
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/unitconversion.fluid.dram.to.minim.R \name{unitconversion.fluid.dram.to.minim} \alias{unitconversion.fluid.dram.to.minim} \title{Unit Conversion - Liquid Volume - Fluid Dram to Minim} \usage{ unitconversion.fluid.dram.to.minim(x = 1) } \argum...
\name{VSLiteR-package} \alias{VSLiteR-package} \alias{VSLiteR} \docType{package} \title{VS-Lite model of tree-ring growth, in R.} \description{Efficient simulation of dendrochronologies from climate input data; a "lite" version of the full, biology-based Vaganov-Shashkin model.} \details{ \tabular{ll}{ Package: \tab VS...
/man/VSLiteR-package.Rd
no_license
suztolwinskiward/VSLiteR
R
false
false
1,307
rd
\name{VSLiteR-package} \alias{VSLiteR-package} \alias{VSLiteR} \docType{package} \title{VS-Lite model of tree-ring growth, in R.} \description{Efficient simulation of dendrochronologies from climate input data; a "lite" version of the full, biology-based Vaganov-Shashkin model.} \details{ \tabular{ll}{ Package: \tab VS...
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554...
/DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615834793-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
2,048
r
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554...
##### structure/blackbox of ggpairsTinkering script > attributes(customPairs) $names [1] "data" "plots" "title" "xlab" "ylab" "showStrips" "xAxisLabels" "yAxisLabels" [9] "showXAxisPlotLabels" "showYAxisPlotLabels" "lab...
/Sandbox/ggPairs_structure.R
no_license
CDSRG/DB-tools
R
false
false
28,905
r
##### structure/blackbox of ggpairsTinkering script > attributes(customPairs) $names [1] "data" "plots" "title" "xlab" "ylab" "showStrips" "xAxisLabels" "yAxisLabels" [9] "showXAxisPlotLabels" "showYAxisPlotLabels" "lab...
library(pdftools) library(plyr) setwd('/Users/doctor_ew/Documents/GitHub/investor_sentiments/pdfs') # Initialize text and dataframe results = data.frame(filename=' ', category=' ', word=' ', occurrences=' ', stringsAsFactors = FALSE) swap = list(filename=' ', category=' ', word=' ', occurrences=0) files <- list.files...
/keywords.R
no_license
v1nsai/investor_sentiments
R
false
false
1,679
r
library(pdftools) library(plyr) setwd('/Users/doctor_ew/Documents/GitHub/investor_sentiments/pdfs') # Initialize text and dataframe results = data.frame(filename=' ', category=' ', word=' ', occurrences=' ', stringsAsFactors = FALSE) swap = list(filename=' ', category=' ', word=' ', occurrences=0) files <- list.files...
library(tidyverse) library(patchwork) # parameters mu_ab_list <- data.frame(name = c("Pfizer", "AstraZeneca", "Sinovac", "Moderna"), mu_ab_d1 = c(13/94, 1/59, 28/164, ((185+273)/2)/321 ), mu_ab_d2 = c(223/94, 32/59, 28/164, 654/158)) ab_50 <- 0.2 # titre relative to c...
/main_2_doses_correlated.R
permissive
mrc-ide/covid-titre-efficacy
R
false
false
6,021
r
library(tidyverse) library(patchwork) # parameters mu_ab_list <- data.frame(name = c("Pfizer", "AstraZeneca", "Sinovac", "Moderna"), mu_ab_d1 = c(13/94, 1/59, 28/164, ((185+273)/2)/321 ), mu_ab_d2 = c(223/94, 32/59, 28/164, 654/158)) ab_50 <- 0.2 # titre relative to c...
library(GeneNet) ### Name: network.make.graph ### Title: Graphical Gaussian Models: Plotting the Network ### Aliases: network.make.graph network.make.dot node.degree edge.info ### num.nodes ### Keywords: hplot ### ** Examples # load GeneNet library library("GeneNet") # generate random network with 20 nodes and ...
/data/genthat_extracted_code/GeneNet/examples/network.make.graph.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,288
r
library(GeneNet) ### Name: network.make.graph ### Title: Graphical Gaussian Models: Plotting the Network ### Aliases: network.make.graph network.make.dot node.degree edge.info ### num.nodes ### Keywords: hplot ### ** Examples # load GeneNet library library("GeneNet") # generate random network with 20 nodes and ...
dataset <- Prostate[c(1:67),] model1 <- lm(dataset$lpsa ~ dataset$lweight + dataset$age + dataset$lcavol + dataset$lbph + dataset$svi + dataset$lcp + dataset$gleason + dataset$pgg45) summary(model1) model2 <- lm(dataset$lpsa ~ 1) step(model2, scope = list(lower = model2, upper = model1), direction = "forward") model3 <...
/Assignment 10.R
no_license
coolbeans201/AppliedMultivariateAnalysis
R
false
false
1,797
r
dataset <- Prostate[c(1:67),] model1 <- lm(dataset$lpsa ~ dataset$lweight + dataset$age + dataset$lcavol + dataset$lbph + dataset$svi + dataset$lcp + dataset$gleason + dataset$pgg45) summary(model1) model2 <- lm(dataset$lpsa ~ 1) step(model2, scope = list(lower = model2, upper = model1), direction = "forward") model3 <...