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
#' Return a user's information #' #' Get information about a Pinterest user using the ID or name. #' #'@param id a character string with a user ID. #'@param user a character string with a user name. #'@inheritParams get_board_pins_by_id #' #'@rdname get_user #' #'@return Either a data.frame, or an error. #' #'@export #...
/R/user_spec.R
permissive
ColinFay/rpinterest
R
false
false
1,896
r
#' Return a user's information #' #' Get information about a Pinterest user using the ID or name. #' #'@param id a character string with a user ID. #'@param user a character string with a user name. #'@inheritParams get_board_pins_by_id #' #'@rdname get_user #' #'@return Either a data.frame, or an error. #' #'@export #...
library(sjPlot) ### Name: plot_grid ### Title: Arrange list of plots as grid ### Aliases: plot_grid ### ** Examples library(ggeffects) data(efc) # fit model fit <- glm( tot_sc_e ~ c12hour + e17age + e42dep + neg_c_7, data = efc, family = poisson ) # plot marginal effects for each predictor, each as single p...
/data/genthat_extracted_code/sjPlot/examples/plot_grid.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
711
r
library(sjPlot) ### Name: plot_grid ### Title: Arrange list of plots as grid ### Aliases: plot_grid ### ** Examples library(ggeffects) data(efc) # fit model fit <- glm( tot_sc_e ~ c12hour + e17age + e42dep + neg_c_7, data = efc, family = poisson ) # plot marginal effects for each predictor, each as single p...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/zemissions_L270.nonghg_NEI_to_GCAM.R \name{module_emissions_L270.nonghg_nei_to_gcam} \alias{module_emissions_L270.nonghg_nei_to_gcam} \title{module_emissions_L270.nonghg_nei_to_gcam} \usage{ module_emissions_L270.nonghg_nei_to_gcam(command, ....
/input/gcamdata/man/module_emissions_L270.nonghg_nei_to_gcam.Rd
permissive
JGCRI/gcam-core
R
false
true
1,093
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/zemissions_L270.nonghg_NEI_to_GCAM.R \name{module_emissions_L270.nonghg_nei_to_gcam} \alias{module_emissions_L270.nonghg_nei_to_gcam} \title{module_emissions_L270.nonghg_nei_to_gcam} \usage{ module_emissions_L270.nonghg_nei_to_gcam(command, ....
#using new data frame, wifi5 with bad data removed, test KNN model #load libraries library(dplyr) library(ggplot2) library(caret) library(grid) library(gridExtra) #Load the necessary data setwd("~/Ubiqum/Project 4/Wifi Task/UJIndoorLoc") wifi5 <- readRDS("wifi5.rds") #create a subset of just building 1, floor 1 wifi...
/Knn_wifi5.R
no_license
jessicamkrueger/WiFiLocationing
R
false
false
2,221
r
#using new data frame, wifi5 with bad data removed, test KNN model #load libraries library(dplyr) library(ggplot2) library(caret) library(grid) library(gridExtra) #Load the necessary data setwd("~/Ubiqum/Project 4/Wifi Task/UJIndoorLoc") wifi5 <- readRDS("wifi5.rds") #create a subset of just building 1, floor 1 wifi...
library(gmodels) #### Für 2x2 Tabellen # 2x2 => bei größer Interpretation schwierig # # Effektgröße: Odds-Ratio # # Mittels: # 1. chi-squared + Odds-Ratio aus Kontingenztafel berechnen # 2. Logistische Regression # => liefern äquivalentes Ergebnis # # eg. CTR in AB-Test # => Effektgröße: Odds-Ratio # für Assoz...
/Logistische Regression - Effektgroesse chi2 vs Logreg.R
no_license
dschradick/R-Toolbox
R
false
false
1,561
r
library(gmodels) #### Für 2x2 Tabellen # 2x2 => bei größer Interpretation schwierig # # Effektgröße: Odds-Ratio # # Mittels: # 1. chi-squared + Odds-Ratio aus Kontingenztafel berechnen # 2. Logistische Regression # => liefern äquivalentes Ergebnis # # eg. CTR in AB-Test # => Effektgröße: Odds-Ratio # für Assoz...
# ### predicting the fine detritus from the rest of the data#################### # # ## should be no copying over # where_values <- function(x) which(!is.na(x)) # # # fine_cardoso2008<- function(coarse){ # exp(0.68961 * log(coarse) - 0.11363) # } # # detritus_wider <- detritus_wider %>% # mutate(detritus0_150 = ife...
/R/02_summarizing_data_copy.R
no_license
SrivastavaLab/cesabfunctionalwebsdata
R
false
false
11,643
r
# ### predicting the fine detritus from the rest of the data#################### # # ## should be no copying over # where_values <- function(x) which(!is.na(x)) # # # fine_cardoso2008<- function(coarse){ # exp(0.68961 * log(coarse) - 0.11363) # } # # detritus_wider <- detritus_wider %>% # mutate(detritus0_150 = ife...
testlist <- list(b = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0...
/mcga/inst/testfiles/ByteVectorToDoubles/libFuzzer_ByteVectorToDoubles/ByteVectorToDoubles_valgrind_files/1612761063-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
443
r
testlist <- list(b = c(0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0...
# Matrix inversion is usually a costly computation and there may be some benefit # to caching the inverse of a matrix rather than compute it repeatedly. The # following two functions are used to cache the inverse of a matrix. # makeCacheMatrix creates a list containing a function to # 1. set the value of the matrix # ...
/cachematrix.R
no_license
kiwikangaroo/ProgrammingAssignment2
R
false
false
1,662
r
# Matrix inversion is usually a costly computation and there may be some benefit # to caching the inverse of a matrix rather than compute it repeatedly. The # following two functions are used to cache the inverse of a matrix. # makeCacheMatrix creates a list containing a function to # 1. set the value of the matrix # ...
predictSplit=function(formula,newdata,alpha=0.01,rho=0.5, depthType='MBD'){ require(roahd) extract.residuals = function(regr){ return(regr$residuals) } extract.fitted = function(regr){ return(regr$fitted) } extract.coeff = function(regr){ return(regr$coefficients) } mf = model.f...
/Split_Conformal.R
no_license
matteo-fontana/IWTlmConformal
R
false
false
4,011
r
predictSplit=function(formula,newdata,alpha=0.01,rho=0.5, depthType='MBD'){ require(roahd) extract.residuals = function(regr){ return(regr$residuals) } extract.fitted = function(regr){ return(regr$fitted) } extract.coeff = function(regr){ return(regr$coefficients) } mf = model.f...
n <- 500 p <- 1000 sigma <- 1 snr <- 3 beta <- snr*sigma*sqrt(log(p)/n)*c(2,-3,2,2,-3,3,-2,3,-2,3,rep(0,p-10)) X <- matrix(rnorm(n*p), nrow=n) Y <- X%*%beta + rnorm(n,0,sigma) K <- 5 g <- p^3 Y.norm <- t(Y)%*%Y logPostc <- function(X, Y, g=p^3, s0=100, gamma){ gamma <- which(gamma==1) gamma.abs <- length(gamm...
/Reproduction/symScanForRep.R
no_license
rache011857/pMTM-for-VS
R
false
false
1,901
r
n <- 500 p <- 1000 sigma <- 1 snr <- 3 beta <- snr*sigma*sqrt(log(p)/n)*c(2,-3,2,2,-3,3,-2,3,-2,3,rep(0,p-10)) X <- matrix(rnorm(n*p), nrow=n) Y <- X%*%beta + rnorm(n,0,sigma) K <- 5 g <- p^3 Y.norm <- t(Y)%*%Y logPostc <- function(X, Y, g=p^3, s0=100, gamma){ gamma <- which(gamma==1) gamma.abs <- length(gamm...
#!/usr/bin/env Rscript library(ggplot2) library(grid) args<-commandArgs(T) data <- read.table(args[1],header=TRUE,sep="\t") data2 <- read.table(args[2],header=TRUE,sep="\t") pdf(args[3],height=10,width=20) grid.newpage() pushViewport(viewport(layout = grid.layout(2, 1))) vplayout <- function(x, y) viewport(layout.pos...
/R/barchart2.r.2018050611
no_license
ijayden-lung/hpc
R
false
false
778
2018050611
#!/usr/bin/env Rscript library(ggplot2) library(grid) args<-commandArgs(T) data <- read.table(args[1],header=TRUE,sep="\t") data2 <- read.table(args[2],header=TRUE,sep="\t") pdf(args[3],height=10,width=20) grid.newpage() pushViewport(viewport(layout = grid.layout(2, 1))) vplayout <- function(x, y) viewport(layout.pos...
rm(list = ls()) gc() library(data.table) library(dplyr) library(bit64) library(stringr) library(readxl) library(reshape2) library(knitr) library(ggplot2) library(plyr) library(gplots) library(lubridate) library(tcltk) library(googlesheets) library(gsheet) library(corrplot) library(xtable) library(tidyverse) options(sc...
/program/program03.R
no_license
lamfo-unb/KernelPCA_2
R
false
false
1,865
r
rm(list = ls()) gc() library(data.table) library(dplyr) library(bit64) library(stringr) library(readxl) library(reshape2) library(knitr) library(ggplot2) library(plyr) library(gplots) library(lubridate) library(tcltk) library(googlesheets) library(gsheet) library(corrplot) library(xtable) library(tidyverse) options(sc...
## The URL to download the data DataURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" ## Create a temporary file to download the data temp <- tempfile() download.file(DataURL,temp) ## Unzip the data and read it into R. NB the separator is ## semicolon ";". The file wi...
/plot3.R
no_license
SamPlayle/ExData_Plotting1
R
false
false
1,748
r
## The URL to download the data DataURL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" ## Create a temporary file to download the data temp <- tempfile() download.file(DataURL,temp) ## Unzip the data and read it into R. NB the separator is ## semicolon ";". The file wi...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/string.r \name{concat} \alias{\%+\%} \alias{concat} \title{Concatenate character vectors} \usage{ lhs \%+\% rhs } \arguments{ \item{lhs}{Left hand side, character vector.} \item{rhs}{Right hand side, character vector.} } \value{ Conc...
/man/concat.Rd
no_license
e3bo/crayon
R
false
false
729
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/string.r \name{concat} \alias{\%+\%} \alias{concat} \title{Concatenate character vectors} \usage{ lhs \%+\% rhs } \arguments{ \item{lhs}{Left hand side, character vector.} \item{rhs}{Right hand side, character vector.} } \value{ Conc...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions_s.R \name{surveyDistinctValues} \alias{surveyDistinctValues} \title{Number of distinct values (not missing) per fields} \usage{ surveyDistinctValues(ds = NULL, enumeratorID = NULL, enumeratorCheck = FALSE) } \arguments{ \item{ds}{da...
/man/surveyDistinctValues.Rd
permissive
Yussuph-Mohamed/HighFrequencyChecks
R
false
true
1,323
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions_s.R \name{surveyDistinctValues} \alias{surveyDistinctValues} \title{Number of distinct values (not missing) per fields} \usage{ surveyDistinctValues(ds = NULL, enumeratorID = NULL, enumeratorCheck = FALSE) } \arguments{ \item{ds}{da...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotlyGraphs.R \name{legendValidate} \alias{legendValidate} \title{Legend shape validation} \usage{ legendValidate(legend, nobjs) } \value{ none } \description{ Legend shape validation }
/man/legendValidate.Rd
no_license
lazypomelo/plotlyjs
R
false
true
265
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotlyGraphs.R \name{legendValidate} \alias{legendValidate} \title{Legend shape validation} \usage{ legendValidate(legend, nobjs) } \value{ none } \description{ Legend shape validation }
########################### Data Prep and Housekeeping ################################## #Check if the UCI HAR Dataset exists, if not, download and unzip if(!file.exists("UCI HAR Dataset")){ if(!file.exists("UCI_HAR_Dataset.zip")){ url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%...
/run_analysis.R
no_license
mscafuro13/GettingandCleaningData
R
false
false
3,192
r
########################### Data Prep and Housekeeping ################################## #Check if the UCI HAR Dataset exists, if not, download and unzip if(!file.exists("UCI HAR Dataset")){ if(!file.exists("UCI_HAR_Dataset.zip")){ url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%...
source("loaddata.R") png(filename = "plot4.png",width = 480,height=480) par(mfrow=c(2,2)) plot(pow$Time,pow$Global_active_power,type="l",ylab="Global Active Power") plot(pow$Time,pow$Voltage,type="l",xlab="datetime",ylab="Voltage") plot(pow$Time, pow$Sub_metering_1, type="l", col="black", ylab="Energy sub meteri...
/plot4.R
no_license
233hehe/ExData_Plotting1
R
false
false
705
r
source("loaddata.R") png(filename = "plot4.png",width = 480,height=480) par(mfrow=c(2,2)) plot(pow$Time,pow$Global_active_power,type="l",ylab="Global Active Power") plot(pow$Time,pow$Voltage,type="l",xlab="datetime",ylab="Voltage") plot(pow$Time, pow$Sub_metering_1, type="l", col="black", ylab="Energy sub meteri...
require(foreign) require(MASS) require(fmsb) ## read csv from file args <- commandArgs(trailingOnly = TRUE) print(args[1]) dat <- read.csv(args[1]) ## factor language varriable into dummie dat <- within(dat, lang <- factor(lang)) ## choose which dummy to use as reference dat <- within(dat, lang <- relevel(lang, ref =...
/r_scripts/nb_models.R
no_license
jmaddock/wiki_languages
R
false
false
1,129
r
require(foreign) require(MASS) require(fmsb) ## read csv from file args <- commandArgs(trailingOnly = TRUE) print(args[1]) dat <- read.csv(args[1]) ## factor language varriable into dummie dat <- within(dat, lang <- factor(lang)) ## choose which dummy to use as reference dat <- within(dat, lang <- relevel(lang, ref =...
\name{ROC.data.ex} \alias{ROC.data.ex} \docType{data} \title{ Example data } \description{ This hypothetical dataset contains records of the outcome, the predictor, gender, and age from 241 participants. } \usage{data("ROC.data.ex")} \format{ A data frame with 241 observations on the following 4 variables....
/man/ROC.data.ex.Rd
no_license
cran/ROCpsych
R
false
false
626
rd
\name{ROC.data.ex} \alias{ROC.data.ex} \docType{data} \title{ Example data } \description{ This hypothetical dataset contains records of the outcome, the predictor, gender, and age from 241 participants. } \usage{data("ROC.data.ex")} \format{ A data frame with 241 observations on the following 4 variables....
library(forecast) library(fpp) library(smooth) install.packages("readxl") library(readxl) plastics1 <- read.csv(file.choose()) # read theplastic data View(plasticdata) # Quarterly 4 months windows() plot(plastics1$Sales,type="o") X<- data.frame(outer(rep(month.abb,length = 60), month.abb,"==") + 0 )# Crea...
/Plastic sales forecasting.R
no_license
Sunainasram/Algorithms
R
false
false
4,748
r
library(forecast) library(fpp) library(smooth) install.packages("readxl") library(readxl) plastics1 <- read.csv(file.choose()) # read theplastic data View(plasticdata) # Quarterly 4 months windows() plot(plastics1$Sales,type="o") X<- data.frame(outer(rep(month.abb,length = 60), month.abb,"==") + 0 )# Crea...
library(stringr) library(tidyr) library(dplyr) library(ggplot2) #Using bacteria and archaea header file to categorise, similar to silva and greengenes. #Read in rdp bacteria header file with tabs #rdpbacteria2 <- read.csv("~/Desktop/16scandidate/rdp/bacteriaheader", header = FALSE, sep = ";", stringsAsFactors = FALSE) ...
/scripts/rdp.R
no_license
BenNolann/16scandidate
R
false
false
6,656
r
library(stringr) library(tidyr) library(dplyr) library(ggplot2) #Using bacteria and archaea header file to categorise, similar to silva and greengenes. #Read in rdp bacteria header file with tabs #rdpbacteria2 <- read.csv("~/Desktop/16scandidate/rdp/bacteriaheader", header = FALSE, sep = ";", stringsAsFactors = FALSE) ...
## This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setsolve <- function(solve) inv <<- solve getsolve <- function() inv list(set = set, get = get, ...
/cachematrix.R
no_license
sanmugdha/ProgrammingAssignment2
R
false
false
868
r
## This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setsolve <- function(solve) inv <<- solve getsolve <- function() inv list(set = set, get = get, ...
context("Testing get.seq()") test_that("get.seq() works properly", { skip_on_cran() skip_on_travis() outfile <- tempfile() # NR # Use mixed RefSeq, Uniprot, and PDB Accession. ids <- c("NP_851365", "P62873", "1L3R_E", "5P21_A") capture.output( seqs <- get.seq(ids, outfile=outfile, db='nr') ) expect...
/ver_devel/bio3d/tests/testthat/test-get.seq.R
no_license
Grantlab/bio3d
R
false
false
4,508
r
context("Testing get.seq()") test_that("get.seq() works properly", { skip_on_cran() skip_on_travis() outfile <- tempfile() # NR # Use mixed RefSeq, Uniprot, and PDB Accession. ids <- c("NP_851365", "P62873", "1L3R_E", "5P21_A") capture.output( seqs <- get.seq(ids, outfile=outfile, db='nr') ) expect...
PowerConsumption <- read.table("household_power_consumption.txt", header=T, sep=";", nrows=150000, stringsAsFactors=F) PowCon <- subset(PowerConsumption, Date == "1/2/2007" | Date == "2/2/2007" ) PowCon$DateTime <- strptime(paste(PowCon$Date, PowCon$Time), "%d/%m/%Y %H:%M:%S") png("plot3.png") plot(PowCon$DateTime, ...
/plot3.R
no_license
tianzhixi/ExData_Plotting1
R
false
false
686
r
PowerConsumption <- read.table("household_power_consumption.txt", header=T, sep=";", nrows=150000, stringsAsFactors=F) PowCon <- subset(PowerConsumption, Date == "1/2/2007" | Date == "2/2/2007" ) PowCon$DateTime <- strptime(paste(PowCon$Date, PowCon$Time), "%d/%m/%Y %H:%M:%S") png("plot3.png") plot(PowCon$DateTime, ...
/AV_Hack/pca_study.R
no_license
bithu30/myRepo
R
false
false
2,834
r
#' @title Compare admin years #' @description Compare two admin years: what was the difference between them (with CIs)? #' #' @param ind_gp indicator group #' @param ind indicator #' @param rd run_date #' @param measure prevalence, incidence, mortality, etc #' @param start_year baseline year for analysis #' @param end_...
/mbg/mbg_core_code/mbg_central/LBDCore/R/compare_admin_years.R
no_license
The-Oxford-GBD-group/typhi_paratyphi_modelling_code
R
false
false
4,558
r
#' @title Compare admin years #' @description Compare two admin years: what was the difference between them (with CIs)? #' #' @param ind_gp indicator group #' @param ind indicator #' @param rd run_date #' @param measure prevalence, incidence, mortality, etc #' @param start_year baseline year for analysis #' @param end_...
context("Univariate MCMC") N <- 40 k<- 2 p <- rep(1/k,k) x <- 3 nMC <- 5000 stdev=cbind(rep(1,k), rep(200,k)) Mu=seq(-trunc(k/2)*x,trunc(k/2)*x,length=k) W=c(0.2,0.8) sim <- sim_mixture(N,k,Mu,stdev,W=W) output_bayes <- bayesMCMC(sim$y, N, k, nMC) relab_est <- pivotal_relabelling(output_bayes$mu_switch, output_bayes...
/tests/testthat/test-bayesMCMC.R
no_license
LeoEgidi/pivmet
R
false
false
6,836
r
context("Univariate MCMC") N <- 40 k<- 2 p <- rep(1/k,k) x <- 3 nMC <- 5000 stdev=cbind(rep(1,k), rep(200,k)) Mu=seq(-trunc(k/2)*x,trunc(k/2)*x,length=k) W=c(0.2,0.8) sim <- sim_mixture(N,k,Mu,stdev,W=W) output_bayes <- bayesMCMC(sim$y, N, k, nMC) relab_est <- pivotal_relabelling(output_bayes$mu_switch, output_bayes...
require(desplot) # ---------------------------------------------------------------------------- # create data for tests dat0 <- data.frame(loc = c('loc1','loc1','loc1','loc1', 'loc2','loc2','loc2','loc2','loc2','loc2'), x=c(1,2,1,2, 1,2,3,1,2,3), y=c(1...
/tests/testthat/test_desplot.R
no_license
kwstat/desplot
R
false
false
9,395
r
require(desplot) # ---------------------------------------------------------------------------- # create data for tests dat0 <- data.frame(loc = c('loc1','loc1','loc1','loc1', 'loc2','loc2','loc2','loc2','loc2','loc2'), x=c(1,2,1,2, 1,2,3,1,2,3), y=c(1...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/schema.R \name{unify_schemas} \alias{unify_schemas} \title{Combine and harmonize schemas} \usage{ unify_schemas(..., schemas = list(...)) } \arguments{ \item{...}{\link{Schema}s to unify} \item{schemas}{Alternatively, a list of schemas} } \v...
/deps/arrow-0.17.1/r/man/unify_schemas.Rd
permissive
snowflakedb/libsnowflakeclient
R
false
true
561
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/schema.R \name{unify_schemas} \alias{unify_schemas} \title{Combine and harmonize schemas} \usage{ unify_schemas(..., schemas = list(...)) } \arguments{ \item{...}{\link{Schema}s to unify} \item{schemas}{Alternatively, a list of schemas} } \v...
##Read the file householdData <- read.csv("./household_power_consumption.txt", sep = ";", na.strings="?", stringsAsFactors = FALSE) ##Convert the Date variable from char to Date class householdData$Date <- as.Date(householdData$Date, format="%d/%m/%Y") #Subset the Data subHouseholdData <- su...
/plot4.R
no_license
poojasah/ExData_Plotting1
R
false
false
1,602
r
##Read the file householdData <- read.csv("./household_power_consumption.txt", sep = ";", na.strings="?", stringsAsFactors = FALSE) ##Convert the Date variable from char to Date class householdData$Date <- as.Date(householdData$Date, format="%d/%m/%Y") #Subset the Data subHouseholdData <- su...
library(ggplot2) setwd("~/Dropbox/Data Science/Projects/Natural Language Process/StupidBackoff_Python/programs/log") LogData = read.csv("./Log.csv") LogData$Test<- with(LogData, paste0(Method, " - 0", NumJobs, " Core")) LogData = LogData[LogData$PC=="ASUS" & LogData$Version=="Git 0.3",] Plot01 = ggplot(LogData, aes(...
/programs/DataAnalysis.R
no_license
lnevesp/natural-language-processing
R
false
false
1,141
r
library(ggplot2) setwd("~/Dropbox/Data Science/Projects/Natural Language Process/StupidBackoff_Python/programs/log") LogData = read.csv("./Log.csv") LogData$Test<- with(LogData, paste0(Method, " - 0", NumJobs, " Core")) LogData = LogData[LogData$PC=="ASUS" & LogData$Version=="Git 0.3",] Plot01 = ggplot(LogData, aes(...
setwd("C:/Users/dunnn2/Desktop/R Working Directory") data = read.csv("insects_data.csv") antLength = data$Antenna_Length Ant_data = data[order(data[,3]),] avgs = c () for( i in 1:(length(antLength)-1) ){ avgs[i] = (antLength[i] + antLength[i+1])/2 } # for each element in the avgs array{ # -c...
/HW2pt3.R
no_license
1123581321345589/R-Projects
R
false
false
2,277
r
setwd("C:/Users/dunnn2/Desktop/R Working Directory") data = read.csv("insects_data.csv") antLength = data$Antenna_Length Ant_data = data[order(data[,3]),] avgs = c () for( i in 1:(length(antLength)-1) ){ avgs[i] = (antLength[i] + antLength[i+1])/2 } # for each element in the avgs array{ # -c...
Sys.Date() # [1] "2016-09-23"
/functions/Sys.Date.R
no_license
ReneNyffenegger/about-r
R
false
false
30
r
Sys.Date() # [1] "2016-09-23"
#' Function to allow user to set timeout on a function call. #' #' This is separate from the curl timeout.ms parameter #' #' @importFrom R.utils evalWithTimeout #' @param test_fn The function call to test #' @param tlimit = 120 A timeout in seconds #' @param defaultvalue Default value #' @return If in a loop, passes on...
/inst/ignore/try_with_timeout.R
permissive
ropensci/taxize
R
false
false
817
r
#' Function to allow user to set timeout on a function call. #' #' This is separate from the curl timeout.ms parameter #' #' @importFrom R.utils evalWithTimeout #' @param test_fn The function call to test #' @param tlimit = 120 A timeout in seconds #' @param defaultvalue Default value #' @return If in a loop, passes on...
dat<-read.table("editdistancetable.txt", header=T, sep=",") pdf(file="editdistancefig.pdf", width=10, height=5) par(mfrow=c(1,3)) hist(subset(dat, cutoff==100)$dist, breaks="Scott", ylab="frequency", xlab="edit distance", main="Result of clustered data of 100% identity cutoff") hist(subset(dat, cutoff==95)$dist, ...
/work/makefigofeditdistance.R
no_license
nvt-1009/PrimerDesign
R
false
false
592
r
dat<-read.table("editdistancetable.txt", header=T, sep=",") pdf(file="editdistancefig.pdf", width=10, height=5) par(mfrow=c(1,3)) hist(subset(dat, cutoff==100)$dist, breaks="Scott", ylab="frequency", xlab="edit distance", main="Result of clustered data of 100% identity cutoff") hist(subset(dat, cutoff==95)$dist, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/content_objects.R \name{TestOrderLineItemProduct} \alias{TestOrderLineItemProduct} \title{TestOrderLineItemProduct Object} \usage{ TestOrderLineItemProduct(brand = NULL, channel = NULL, condition = NULL, contentLanguage = NULL, gtin = NULL,...
/googlecontentv2.auto/man/TestOrderLineItemProduct.Rd
permissive
Phippsy/autoGoogleAPI
R
false
true
1,368
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/content_objects.R \name{TestOrderLineItemProduct} \alias{TestOrderLineItemProduct} \title{TestOrderLineItemProduct Object} \usage{ TestOrderLineItemProduct(brand = NULL, channel = NULL, condition = NULL, contentLanguage = NULL, gtin = NULL,...
#launch deeplearning training source('deepfeatures.R') args <- commandArgs(trailingOnly = TRUE) print("Imprimiendo argumentos...") print(args[1]) print(args[2]) print(args[3]) computeDeepFeatures(args[1],strtoi(args[2]),imgPath=args[3],chunkSize=10000)
/deeplearningfeatures/launchlearning.R
no_license
pglez82/IFCB_quantification
R
false
false
253
r
#launch deeplearning training source('deepfeatures.R') args <- commandArgs(trailingOnly = TRUE) print("Imprimiendo argumentos...") print(args[1]) print(args[2]) print(args[3]) computeDeepFeatures(args[1],strtoi(args[2]),imgPath=args[3],chunkSize=10000)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datagen.R \name{datagen_uni} \alias{datagen_uni} \title{Unidimensional data generation.} \usage{ datagen_uni(J, K, n, fixed, mipattern, etadist = NULL) } \arguments{ \item{J}{Integer. Number of indicators.} \item{K}{Integer. Number of groups...
/man/datagen_uni.Rd
permissive
stephensrmmartin/MIRES
R
false
true
2,218
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datagen.R \name{datagen_uni} \alias{datagen_uni} \title{Unidimensional data generation.} \usage{ datagen_uni(J, K, n, fixed, mipattern, etadist = NULL) } \arguments{ \item{J}{Integer. Number of indicators.} \item{K}{Integer. Number of groups...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/frame.R \name{is.numeric} \alias{is.numeric} \title{Check if numeric} \usage{ is.numeric(x) } \arguments{ \item{x}{An H2OFrame object} } \description{ Check if numeric }
/man/is.numeric.Rd
no_license
cran/h2o
R
false
true
248
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/frame.R \name{is.numeric} \alias{is.numeric} \title{Check if numeric} \usage{ is.numeric(x) } \arguments{ \item{x}{An H2OFrame object} } \description{ Check if numeric }
## Script used to run sleepdata analysis ## Written by: Jasper Ginn ## ## For more information about the analysis, please visit ## <https://github.com/JasperHG90/sleepsimR-documentation> ## ## Version: 0.2 library(sleepsimR) library(argparser, quietly=TRUE) library(logger) # Set up a parser args <- arg_parser("Run ...
/app/run_sleepdata_analysis.R
permissive
JasperHG90/sleepsimR-sleepdata-analysis
R
false
false
6,202
r
## Script used to run sleepdata analysis ## Written by: Jasper Ginn ## ## For more information about the analysis, please visit ## <https://github.com/JasperHG90/sleepsimR-documentation> ## ## Version: 0.2 library(sleepsimR) library(argparser, quietly=TRUE) library(logger) # Set up a parser args <- arg_parser("Run ...
R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distributi...
/location.Map+Marker+Label.R
no_license
codeqwerty/study_R
R
false
false
7,312
r
R version 3.1.2 (2014-10-31) -- "Pumpkin Helmet" Copyright (C) 2014 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distributi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data-movie.R \docType{data} \name{movie_318} \alias{movie_318} \title{Grosse Pointe Blank} \format{ igraph object } \source{ https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3 https://www.imdb.com/title/tt0119229...
/man/movie_318.Rd
permissive
schochastics/networkdata
R
false
true
1,021
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data-movie.R \docType{data} \name{movie_318} \alias{movie_318} \title{Grosse Pointe Blank} \format{ igraph object } \source{ https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3 https://www.imdb.com/title/tt0119229...
rm( list=ls() ) library(GxEMM) source( '../code/gxemm.plot.R' ) type <- 'base' load( 'data/gwas_phens.Rdata' ) load( file='Rdata/mysub.Rdata' ) for( phen in gwas_phens ) try({ savefile1 <- paste0( 'Rdata/hom/' , phen, '_', type, '.Rdata' ) savefile2 <- paste0( 'Rdata/iid/' , phen, '_', type, '.Rdata' ) savefile3 ...
/rats/plotall.R
no_license
andywdahl/gxemm-scripts
R
false
false
585
r
rm( list=ls() ) library(GxEMM) source( '../code/gxemm.plot.R' ) type <- 'base' load( 'data/gwas_phens.Rdata' ) load( file='Rdata/mysub.Rdata' ) for( phen in gwas_phens ) try({ savefile1 <- paste0( 'Rdata/hom/' , phen, '_', type, '.Rdata' ) savefile2 <- paste0( 'Rdata/iid/' , phen, '_', type, '.Rdata' ) savefile3 ...
#' Compile trial-by-trial results #' #' Compiles a data frame of trial-by-trial results for each participant. #' This function is intended to be called once data have been collected #' for several participants; it allows the researcher to inspect #' CA-BAT results on a trial-by-trial level. #' #' Suppose that a partici...
/R/compile-trial-by-trial-results.R
permissive
pmcharrison/cabat
R
false
false
2,204
r
#' Compile trial-by-trial results #' #' Compiles a data frame of trial-by-trial results for each participant. #' This function is intended to be called once data have been collected #' for several participants; it allows the researcher to inspect #' CA-BAT results on a trial-by-trial level. #' #' Suppose that a partici...
library(caret) library(dplyr) library(rattle) make_NA_colname_vector <- function(dataframe, threshold){ NA_colname_vector <- vector() for (colname in names(dataframe)){ if (sum(is.na(dataframe[,colname]))/nrow(dataframe) > threshold){ NA_colname_vector <- append(NA_colname_vector, colname) } } NA...
/other_files/perfect_practice.R
no_license
thomasemurphy/practical_machine_learning_coursera_final_project
R
false
false
5,093
r
library(caret) library(dplyr) library(rattle) make_NA_colname_vector <- function(dataframe, threshold){ NA_colname_vector <- vector() for (colname in names(dataframe)){ if (sum(is.na(dataframe[,colname]))/nrow(dataframe) > threshold){ NA_colname_vector <- append(NA_colname_vector, colname) } } NA...
extract_temp_CTD <- function(fname){ d <- read.csv(fname) obs <- array(NA,dim=c(length(full_time),10)) depths <- c(0.1,1,2,3,4,5,6,7,8,9) for(i in 1:length(depths)){ index = which.min(abs(d$Depth_m -depths[i])) obs[1,i] <- d$Temp_C[index] } return(list(obs = obs, depths = depths)) }
/Rscripts/extract_temp_CTD.R
no_license
vahid-dan/SCC_forecasting
R
false
false
309
r
extract_temp_CTD <- function(fname){ d <- read.csv(fname) obs <- array(NA,dim=c(length(full_time),10)) depths <- c(0.1,1,2,3,4,5,6,7,8,9) for(i in 1:length(depths)){ index = which.min(abs(d$Depth_m -depths[i])) obs[1,i] <- d$Temp_C[index] } return(list(obs = obs, depths = depths)) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{statins} \alias{statins} \title{Statins for cholesterol lowering} \format{ A data frame with 38 rows and 7 variables: \describe{ \item{studyn}{numeric study ID} \item{studyc}{study name} \item{trtn}{numeric treatme...
/man/statins.Rd
no_license
dmphillippo/multinma
R
false
true
904
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{statins} \alias{statins} \title{Statins for cholesterol lowering} \format{ A data frame with 38 rows and 7 variables: \describe{ \item{studyn}{numeric study ID} \item{studyc}{study name} \item{trtn}{numeric treatme...
## * fx_modelPerf (documentation) ##' @title Summary Measures of Model Performance ##' @description Derive summary measures of model performance ##' ##' @param modelOutput ??? ##' @param dthresh ??? ##' @param many ??? ##' @param perm ??? ##' ##' @return A list of length five, containing the following elements: ##' \i...
/R/fx_modelPerf.R
no_license
fishpm/nruPredict
R
false
false
30,083
r
## * fx_modelPerf (documentation) ##' @title Summary Measures of Model Performance ##' @description Derive summary measures of model performance ##' ##' @param modelOutput ??? ##' @param dthresh ??? ##' @param many ??? ##' @param perm ??? ##' ##' @return A list of length five, containing the following elements: ##' \i...
#!/usr/bin/env Rscript library(matrixStats) library('getopt') spec = matrix(c( 'list', 'l', 1, "character", 'gcf', 'g', 1, "character", 'help' , 'h', 0, "logical", 'smooth' , 's', 0, "character", 'file_path', 'p', 2, "character", 'out_name', 'o', 2, "character" ), byrow=TRUE, ncol=4) opt = getopt(spec) ...
/sraPlotSummary.R
no_license
TJN25/R
R
false
false
8,270
r
#!/usr/bin/env Rscript library(matrixStats) library('getopt') spec = matrix(c( 'list', 'l', 1, "character", 'gcf', 'g', 1, "character", 'help' , 'h', 0, "logical", 'smooth' , 's', 0, "character", 'file_path', 'p', 2, "character", 'out_name', 'o', 2, "character" ), byrow=TRUE, ncol=4) opt = getopt(spec) ...
#1 - ряды #2 - адекватная модель #3 - 35 000 #4 - R^2=0.4, RSS=120, find ESS # R^2 = ESS/TSS # TSS = RSS + ESS Rsq <- 0.4 RSS <- 120 TSS <- RSS/(1-Rsq) ESS <- TSS - RSS ESS #5 df <- ChickWeight glimpse(df) db10 <- df[df$Time==10,] head(db10) round(mean(db10$weight),2) #6 df21 <- df[df$Time==21,] head(df21) aggrega...
/week5_test.R
no_license
YevgenyY/Econometrica
R
false
false
2,994
r
#1 - ряды #2 - адекватная модель #3 - 35 000 #4 - R^2=0.4, RSS=120, find ESS # R^2 = ESS/TSS # TSS = RSS + ESS Rsq <- 0.4 RSS <- 120 TSS <- RSS/(1-Rsq) ESS <- TSS - RSS ESS #5 df <- ChickWeight glimpse(df) db10 <- df[df$Time==10,] head(db10) round(mean(db10$weight),2) #6 df21 <- df[df$Time==21,] head(df21) aggrega...
rm(list=ls()) vN_PSA = 2 pkg = list("tidyverse","deSolve") invisible(lapply(pkg, require, character.only = TRUE)) run.id.base <- "vogi-numerical" Scenarios <- list (c("None","Single"),c("None","None"),c("None","Panel"),c("Panel","None")) mainDir <- "./run-data" subDir <- run.id.base if (!file.exists(file.path(mainDir...
/nber-aug2017/run-nber-psa.R
no_license
graveja0/rise-simulation
R
false
false
6,801
r
rm(list=ls()) vN_PSA = 2 pkg = list("tidyverse","deSolve") invisible(lapply(pkg, require, character.only = TRUE)) run.id.base <- "vogi-numerical" Scenarios <- list (c("None","Single"),c("None","None"),c("None","Panel"),c("Panel","None")) mainDir <- "./run-data" subDir <- run.id.base if (!file.exists(file.path(mainDir...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bam_strand_split.R \name{bam_strand_split} \alias{bam_strand_split} \title{Split BAM with paired-end data into forward-strand and reverse-strand} \usage{ bam_strand_split(inFiles, samtoolsPath = "~/anaconda2/bin/", outDest = "./", verbose =...
/man/bam_strand_split.Rd
no_license
rkirk822/rnaseq
R
false
true
1,333
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bam_strand_split.R \name{bam_strand_split} \alias{bam_strand_split} \title{Split BAM with paired-end data into forward-strand and reverse-strand} \usage{ bam_strand_split(inFiles, samtoolsPath = "~/anaconda2/bin/", outDest = "./", verbose =...
makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y){ x <<- y inv <<- NULL } get <- function() x setInverse <- function(solveMatrix) inv <<- solveMatrix getInverse <- function() inv list(set = set, get = get, setInverse = setInverse, getInverse = getInverse) } ca...
/Lexical Scoping.R
no_license
Z398/R-program
R
false
false
535
r
makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y){ x <<- y inv <<- NULL } get <- function() x setInverse <- function(solveMatrix) inv <<- solveMatrix getInverse <- function() inv list(set = set, get = get, setInverse = setInverse, getInverse = getInverse) } ca...
setwd('C://Users//bhave//Desktop//code//DataScience_Practice') getwd() iris_data <- read.csv("dataset/iris.csv",header = FALSE) View(iris_data) "Attribute Information: 1. sepal length in cm 2. sepal width in cm 3. petal length in cm 4. petal width in cm 5. class: -- Iris Setosa -- Iris Versicolour --...
/Iris_classification.R
no_license
bhavesh51/DataScience_Practice
R
false
false
823
r
setwd('C://Users//bhave//Desktop//code//DataScience_Practice') getwd() iris_data <- read.csv("dataset/iris.csv",header = FALSE) View(iris_data) "Attribute Information: 1. sepal length in cm 2. sepal width in cm 3. petal length in cm 4. petal width in cm 5. class: -- Iris Setosa -- Iris Versicolour --...
# this is a temp
/temp/temp.R
no_license
ShuningTong/R_Git_Lecture
R
false
false
16
r
# this is a temp
context("fitness support") test_that("positive_1d", { f <- function(x) -x^2 + 1 tol <- 1e-8 r <- positive_1d(f, 0, 0.1, tol=tol) expect_lt(r[[1]], -1 + tol) expect_gt(r[[2]], 1 - tol) tol <- 1e-3 r <- positive_1d(f, 0, 0.1, tol=tol) expect_lt(r[[1]], -1 + tol) expect_gt(r[[2]], 1 - tol) expect_er...
/tests/testthat/test-fitness-support.R
no_license
elchudi/plant
R
false
false
603
r
context("fitness support") test_that("positive_1d", { f <- function(x) -x^2 + 1 tol <- 1e-8 r <- positive_1d(f, 0, 0.1, tol=tol) expect_lt(r[[1]], -1 + tol) expect_gt(r[[2]], 1 - tol) tol <- 1e-3 r <- positive_1d(f, 0, 0.1, tol=tol) expect_lt(r[[1]], -1 + tol) expect_gt(r[[2]], 1 - tol) expect_er...
#' Starwars characters #' #' The original data, from SWAPI, the Star Wars API, <https://swapi.dev/>, has been revised #' to reflect additional research into gender and sex determinations of characters. #' #' @format A tibble with 87 rows and 14 variables: #' \describe{ #' \item{name}{Name of the character} #' \item{hei...
/R/data-starwars.R
permissive
tidyverse/dplyr
R
false
false
1,091
r
#' Starwars characters #' #' The original data, from SWAPI, the Star Wars API, <https://swapi.dev/>, has been revised #' to reflect additional research into gender and sex determinations of characters. #' #' @format A tibble with 87 rows and 14 variables: #' \describe{ #' \item{name}{Name of the character} #' \item{hei...
#' Read Landsat MTL metadata files #' #' Reads metadata and deals with legacy versions of Landsat metadata files and where possible adds missing information (radiometric gain and offset, earth-sun distance). #' #' @param file path to Landsat MTL file (...MTL.txt) #' @param raw Logical. If \code{TRUE} the full raw met...
/R/readMeta.R
no_license
digideskio/RStoolbox
R
false
false
14,478
r
#' Read Landsat MTL metadata files #' #' Reads metadata and deals with legacy versions of Landsat metadata files and where possible adds missing information (radiometric gain and offset, earth-sun distance). #' #' @param file path to Landsat MTL file (...MTL.txt) #' @param raw Logical. If \code{TRUE} the full raw met...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/omicplotr.run.R \name{omicplotr.run} \alias{omicplotr.run} \title{Run \code{omicplotR} \code{Shiny} app.} \usage{ omicplotr.run() } \description{ Launches \code{Shiny} for \code{omicplotR} in default browser. This graphical user interface fa...
/man/omicplotr.run.Rd
permissive
dgiguer/omicplotR
R
false
true
801
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/omicplotr.run.R \name{omicplotr.run} \alias{omicplotr.run} \title{Run \code{omicplotR} \code{Shiny} app.} \usage{ omicplotr.run() } \description{ Launches \code{Shiny} for \code{omicplotR} in default browser. This graphical user interface fa...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nearestN.R \name{nearestN} \alias{nearestN} \title{Nearest Value Index} \usage{ nearestN(value, values) } \arguments{ \item{value}{The value to be matched} \item{values}{The set of values with which the value is being compared} } \value{ Ind...
/man/nearestN.Rd
no_license
mathesong/granviller
R
false
true
481
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/nearestN.R \name{nearestN} \alias{nearestN} \title{Nearest Value Index} \usage{ nearestN(value, values) } \arguments{ \item{value}{The value to be matched} \item{values}{The set of values with which the value is being compared} } \value{ Ind...
testlist <- list(x = c(2.08655633926036e-308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) result <- do.call(myTAI:::cpp_geom_mean,testlist) str(result)
/myTAI/inst/testfiles/cpp_geom_mean/AFL_cpp_geom_mean/cpp_geom_mean_valgrind_files/1615842545-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
239
r
testlist <- list(x = c(2.08655633926036e-308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) result <- do.call(myTAI:::cpp_geom_mean,testlist) str(result)
#'Convert all \code{factor} columns to \code{character} columns in a #'\code{data.frame} #' #'Sometimes, we forget to use the \code{stringsAsFactors} argument when using #'\code{\link{read.table}} and related functions. By default, R converts #'character columns to factors. Instead of re-reading the data, the #'\code{\...
/R/FacsToChars.R
no_license
mrdwab/AMsnippets
R
false
false
1,527
r
#'Convert all \code{factor} columns to \code{character} columns in a #'\code{data.frame} #' #'Sometimes, we forget to use the \code{stringsAsFactors} argument when using #'\code{\link{read.table}} and related functions. By default, R converts #'character columns to factors. Instead of re-reading the data, the #'\code{\...
require(lubridate) prepareTempData <- function(data){ myData <- data myData$utc <- strptime(myData$utc, format="%d/%m/%Y %H:%M", tz="") myData$date <- strptime(myData$date, format="%d/%m/%Y", tz="") # Add on months myData <- cbind(myData, months(myData$date)) colnames(myData)[ncol(myData)] <- "month" myD...
/prepareTempData.R
no_license
clarelindeque/WeatheR
R
false
false
1,493
r
require(lubridate) prepareTempData <- function(data){ myData <- data myData$utc <- strptime(myData$utc, format="%d/%m/%Y %H:%M", tz="") myData$date <- strptime(myData$date, format="%d/%m/%Y", tz="") # Add on months myData <- cbind(myData, months(myData$date)) colnames(myData)[ncol(myData)] <- "month" myD...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/summary.pwrrasch.R \name{summary.pwrrasch} \alias{summary.pwrrasch} \title{Object Summary} \usage{ \method{summary}{pwrrasch}(object, ...) } \arguments{ \item{object}{\code{pwrrasch} object} \item{...}{Additional arguments...
/man/summary.pwrrasch.Rd
no_license
cran/pwrRasch
R
false
false
1,135
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/summary.pwrrasch.R \name{summary.pwrrasch} \alias{summary.pwrrasch} \title{Object Summary} \usage{ \method{summary}{pwrrasch}(object, ...) } \arguments{ \item{object}{\code{pwrrasch} object} \item{...}{Additional arguments...
## The functions below create a special object that stores a matrix and caches its inverse. Therefore, the inverse won't have to be calculated again when we need it; it will be looked up in the cache instead. ## the makeCacheMatrix function creates a special object (m) that stores a matrix and and caches its inverse....
/cachematrix.R
no_license
Elizasg/ProgrammingAssignment2
R
false
false
1,238
r
## The functions below create a special object that stores a matrix and caches its inverse. Therefore, the inverse won't have to be calculated again when we need it; it will be looked up in the cache instead. ## the makeCacheMatrix function creates a special object (m) that stores a matrix and and caches its inverse....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prepFieldData.R \name{prepFieldData} \alias{prepFieldData} \title{Prep data to to calculate phylogenetic fields} \usage{ prepFieldData(tree, dists, picante.cdm) } \arguments{ \item{tree}{Phylo object.} \item{dists}{A symmetric distance matri...
/man/prepFieldData.Rd
no_license
eliotmiller/metricTester
R
false
true
1,971
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/prepFieldData.R \name{prepFieldData} \alias{prepFieldData} \title{Prep data to to calculate phylogenetic fields} \usage{ prepFieldData(tree, dists, picante.cdm) } \arguments{ \item{tree}{Phylo object.} \item{dists}{A symmetric distance matri...
# Line Plots source("R/0_utilities.R") source("R/1.2_data_processing_combined.R") # --------------------------------------------------------------------- # Plot setup etqswe_day_sub <- etqswe_day %>% dplyr::filter(watershed %in% c("american","tuolumne", "kings","kern")) etqswe_day...
/R/1.3_figures_wyd_line.R
no_license
ryanrbart/vic_sierra_nevada_analysis
R
false
false
2,984
r
# Line Plots source("R/0_utilities.R") source("R/1.2_data_processing_combined.R") # --------------------------------------------------------------------- # Plot setup etqswe_day_sub <- etqswe_day %>% dplyr::filter(watershed %in% c("american","tuolumne", "kings","kern")) etqswe_day...
list_coop_files <- function(fileout, dirpath, dummy){ scipiper::sc_indicate(fileout, data_file = list.files(dirpath, full.names = TRUE)) } crosswalk_coop_dat <- function(outind = target_name, inind = '7a_temp_coop_munge/tmp/all_coop_dat.rds.ind', id_cro...
/7a_temp_coop_munge/src/crosswalk_fxns.R
no_license
vitensek/lake-temperature-model-prep
R
false
false
2,805
r
list_coop_files <- function(fileout, dirpath, dummy){ scipiper::sc_indicate(fileout, data_file = list.files(dirpath, full.names = TRUE)) } crosswalk_coop_dat <- function(outind = target_name, inind = '7a_temp_coop_munge/tmp/all_coop_dat.rds.ind', id_cro...
# EM algorithm for bivariate normal data -- # EXAMPLE 2 of Chapter 3 of the notes # Simulate a bivariate normal data set # for demonstration (or read in your own data # set here) set.seed(4) # Set the seed N <- 1000 # Sample size Emax <- 100 # max number of EM iterations tol <- 1e-5 # converge...
/course/st790_missing/examples/bvnormal_em.R
no_license
BowenNCSU/BowenNCSU.github.io
R
false
false
6,496
r
# EM algorithm for bivariate normal data -- # EXAMPLE 2 of Chapter 3 of the notes # Simulate a bivariate normal data set # for demonstration (or read in your own data # set here) set.seed(4) # Set the seed N <- 1000 # Sample size Emax <- 100 # max number of EM iterations tol <- 1e-5 # converge...
library(rerf) ### Name: RunFeatureImportanceCounts ### Title: Tabulate the unique feature combinations used in a single RerF ### tree ### Aliases: RunFeatureImportanceCounts ### ** Examples library(rerf) X <- iris[, -5] Y <- iris[[5]] store.impurity <- TRUE FUN <- RandMatContinuous forest <- RerF(X, Y, FUN = FUN,...
/data/genthat_extracted_code/rerf/examples/RunFeatureImportanceCounts.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
427
r
library(rerf) ### Name: RunFeatureImportanceCounts ### Title: Tabulate the unique feature combinations used in a single RerF ### tree ### Aliases: RunFeatureImportanceCounts ### ** Examples library(rerf) X <- iris[, -5] Y <- iris[[5]] store.impurity <- TRUE FUN <- RandMatContinuous forest <- RerF(X, Y, FUN = FUN,...
# init.R # # Example R code to install packages if not already installed # my_packages = c("shiny", "shinydashboard", "shinycssloaders", "shinyanimate", "shinydashboardPlus", "shinyEffects", "shinybusy", "shinyBS", "magrittr", "waiter", "fresh", "readr", "forecast", "tidyverse", "ggplot...
/GA/init.R
no_license
agbleze/Google_Analytics_time_series
R
false
false
656
r
# init.R # # Example R code to install packages if not already installed # my_packages = c("shiny", "shinydashboard", "shinycssloaders", "shinyanimate", "shinydashboardPlus", "shinyEffects", "shinybusy", "shinyBS", "magrittr", "waiter", "fresh", "readr", "forecast", "tidyverse", "ggplot...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tes_tfc_functions.R \name{calculate_fu_ex_product} \alias{calculate_fu_ex_product} \title{Calculate total final consumption of final and useful energy by product} \usage{ calculate_fu_ex_product( .sutdata, fd_sectors, country_colname = ...
/man/calculate_fu_ex_product.Rd
permissive
EnergyEconomyDecoupling/PFUWorkflow
R
false
true
2,956
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tes_tfc_functions.R \name{calculate_fu_ex_product} \alias{calculate_fu_ex_product} \title{Calculate total final consumption of final and useful energy by product} \usage{ calculate_fu_ex_product( .sutdata, fd_sectors, country_colname = ...
\name{install_bitbucket} \alias{install_bitbucket} \title{Install a package directly from bitbucket} \usage{ install_bitbucket(repo, username, ref = "master", branch = NULL, auth_user = NULL, password = NULL, ...) } \arguments{ \item{username}{bitbucket username} \item{repo}{Repo name} \item{ref}{Desired ...
/man/install_bitbucket.Rd
no_license
miraisolutions/devtools
R
false
false
1,280
rd
\name{install_bitbucket} \alias{install_bitbucket} \title{Install a package directly from bitbucket} \usage{ install_bitbucket(repo, username, ref = "master", branch = NULL, auth_user = NULL, password = NULL, ...) } \arguments{ \item{username}{bitbucket username} \item{repo}{Repo name} \item{ref}{Desired ...
#multi linear regression housing<- read.csv(file.choose()) #price is sale price. #aread is total size in sqft #bedrooms gives total number of bedrooms. #bathroom total number of bathrooms str(housing) #mainroad convert factor str(housing$mainroad) summary(factor(housing$mainroad)) #simple way is to convert ye...
/MLR 12 Jan.R
no_license
rdolia/All-my-codes
R
false
false
4,157
r
#multi linear regression housing<- read.csv(file.choose()) #price is sale price. #aread is total size in sqft #bedrooms gives total number of bedrooms. #bathroom total number of bathrooms str(housing) #mainroad convert factor str(housing$mainroad) summary(factor(housing$mainroad)) #simple way is to convert ye...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{pedWithGenotype} \alias{pedWithGenotype} \title{pedWithGenotype is a dataframe produced from qcPed by adding made up genotypes.} \format{ An object of class \code{data.frame} with 280 rows and 12 columns. } \usage{...
/man/pedWithGenotype.Rd
permissive
jhagberg/nprcgenekeepr
R
false
true
612
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{pedWithGenotype} \alias{pedWithGenotype} \title{pedWithGenotype is a dataframe produced from qcPed by adding made up genotypes.} \format{ An object of class \code{data.frame} with 280 rows and 12 columns. } \usage{...
################################ ## 01. 난수 생성 및 분포 함수 ## ################################ # 난수 발생 함수 # 함수들의 인자는 난수의 개수와 해당 분포들의 파라미터 rbinom # 이항 분포 rf # F 분포 rgeom # 기하 분포 rhyper # 음이항 분포 rnorm # 정규 분포 rpois # 포아송 분포 rt # t분포 runif # 연속 균등 분포 # 표본이 100개인 평균이 1이고 분산이 1인 정규분포 난수 생성 nrom_data <- data.frame(x...
/chapter07_통계분석.R
no_license
mes0419/ADP
R
false
false
18,291
r
################################ ## 01. 난수 생성 및 분포 함수 ## ################################ # 난수 발생 함수 # 함수들의 인자는 난수의 개수와 해당 분포들의 파라미터 rbinom # 이항 분포 rf # F 분포 rgeom # 기하 분포 rhyper # 음이항 분포 rnorm # 정규 분포 rpois # 포아송 분포 rt # t분포 runif # 연속 균등 분포 # 표본이 100개인 평균이 1이고 분산이 1인 정규분포 난수 생성 nrom_data <- data.frame(x...
house <- read.table("household_power_consumption.txt", sep=";", strip.white=TRUE, header = TRUE, na.strings = c("?","")) ##na.strings used to replace ? (and empty space) with NA #house[house == "?"] <- NA ##na.strings takes car...
/plot3.R
no_license
mrclarenceb/ExData_Plotting1
R
false
false
1,708
r
house <- read.table("household_power_consumption.txt", sep=";", strip.white=TRUE, header = TRUE, na.strings = c("?","")) ##na.strings used to replace ? (and empty space) with NA #house[house == "?"] <- NA ##na.strings takes car...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllClasses.R \docType{class} \name{bcbioRNASeq-class} \alias{bcbioRNASeq-class} \title{bcbio RNA-Seq data set} \description{ \code{bcbioRNASeq} is an S4 class that extends \code{RangedSummarizedExperiment}, and is designed to store a \href{ht...
/man/bcbioRNASeq-class.Rd
permissive
naumenko-sa/bcbioRNASeq
R
false
true
805
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AllClasses.R \docType{class} \name{bcbioRNASeq-class} \alias{bcbioRNASeq-class} \title{bcbio RNA-Seq data set} \description{ \code{bcbioRNASeq} is an S4 class that extends \code{RangedSummarizedExperiment}, and is designed to store a \href{ht...
# A Simple function for calculating the ARL using the cutoff from the data. This could # be improved perhaps by creating bootstrap estimate of the probability of a signal: P(Y > h) # This will work best if Y has a lot of data nonparShewhartARL <- function(Y, h, method = c("upper", "lower", "both")) { metho...
/monitoring/R/nonparShewhartARL.R
no_license
lhsego/sUtils
R
false
false
719
r
# A Simple function for calculating the ARL using the cutoff from the data. This could # be improved perhaps by creating bootstrap estimate of the probability of a signal: P(Y > h) # This will work best if Y has a lot of data nonparShewhartARL <- function(Y, h, method = c("upper", "lower", "both")) { metho...
#' Log-transform and normalise data by sequencing depth #' #' @param rca.obj RCA object. #' @param scale.factor scaling factor for log-normalization #' @return RCA object. #' @export #' dataLogNormalise <- function(rca.obj, scale.factor = 10000) { # Extract data from RCA object raw.data <- rca.obj$raw.data ...
/R/dataLogNormalise.R
no_license
linquynus/RCAv2-beta
R
false
false
769
r
#' Log-transform and normalise data by sequencing depth #' #' @param rca.obj RCA object. #' @param scale.factor scaling factor for log-normalization #' @return RCA object. #' @export #' dataLogNormalise <- function(rca.obj, scale.factor = 10000) { # Extract data from RCA object raw.data <- rca.obj$raw.data ...
#' COMM 550-Lab Seven- ANOVA II #'=========================================================== #' #### [Back](http://joshaclark.com/?page_id=138) #' Let's begin by installing two packages we need for this example #' heplots gives us access to a nice eta^2 function which we will #' discuss in a few minutes, while gplot...
/R scripts/l7.R
no_license
joshuaaclark/Comm550-R
R
false
false
7,347
r
#' COMM 550-Lab Seven- ANOVA II #'=========================================================== #' #### [Back](http://joshaclark.com/?page_id=138) #' Let's begin by installing two packages we need for this example #' heplots gives us access to a nice eta^2 function which we will #' discuss in a few minutes, while gplot...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/enrich_author.R \name{enrich_author} \alias{enrich_author} \title{Enrich Author Field} \usage{ enrich_author(df) } \arguments{ \item{df}{Preprocessed data.frame} } \value{ Augmented data.frame } \description{ Enrich author field. } \examples{...
/man/enrich_author.Rd
no_license
jamielatham15/bibliographica
R
false
true
479
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/enrich_author.R \name{enrich_author} \alias{enrich_author} \title{Enrich Author Field} \usage{ enrich_author(df) } \arguments{ \item{df}{Preprocessed data.frame} } \value{ Augmented data.frame } \description{ Enrich author field. } \examples{...
#' Comprueba cercanía con el punto de atencion (GOOGLE) #' @description La funcion genera en el archivo de datos una columna indicando si la ubicacion lonlat de cada fila esta lo suficientemente cerca del hospital o no. #' @param data_ggmap El dataset con las ubicaciones obtenidas por ggmap #' @param hospis_datos_shp U...
/R/checkea_clinica_ggmap.R
no_license
arielolafsalgado/geoche
R
false
false
2,420
r
#' Comprueba cercanía con el punto de atencion (GOOGLE) #' @description La funcion genera en el archivo de datos una columna indicando si la ubicacion lonlat de cada fila esta lo suficientemente cerca del hospital o no. #' @param data_ggmap El dataset con las ubicaciones obtenidas por ggmap #' @param hospis_datos_shp U...
## NaiveBayes library (e1071) ## Naive Bayes Classifier for Discrete Predictors: we use again the Congressional Voting Records of 1984 # Note refusals to vote have been treated as missing values! data (HouseVotes84, package="mlbench") View(HouseVotes84) model <- naiveBayes(Class ~ ., data = HouseVotes84) ...
/Naive Bayes and KNN Classifier.R
no_license
shailajayadav/R-Programming
R
false
false
4,530
r
## NaiveBayes library (e1071) ## Naive Bayes Classifier for Discrete Predictors: we use again the Congressional Voting Records of 1984 # Note refusals to vote have been treated as missing values! data (HouseVotes84, package="mlbench") View(HouseVotes84) model <- naiveBayes(Class ~ ., data = HouseVotes84) ...
# BEMTOOL - Bio-Economic Model TOOLs - version 2.5 # Authors: G. Lembo, I. Bitetto, M.T. Facchini, M.T. Spedicato 2018 # COISPA Tecnologia & Ricerca, Via dei Trulli 18/20 - (Bari), Italy # In case of use of the model, the Authors should be cited. # If you have any comments or suggestions please contact the following e...
/BEMTOOL-ver2.5-2018_0901/bmtgui/economic_params/price/price_elast_landing_byfleet/price_elast_landing_byfleet.add_columns.r
no_license
gresci/BEMTOOL2.5
R
false
false
1,822
r
# BEMTOOL - Bio-Economic Model TOOLs - version 2.5 # Authors: G. Lembo, I. Bitetto, M.T. Facchini, M.T. Spedicato 2018 # COISPA Tecnologia & Ricerca, Via dei Trulli 18/20 - (Bari), Italy # In case of use of the model, the Authors should be cited. # If you have any comments or suggestions please contact the following e...
library(ape); postscript("_tree.073108.ps",width=8,height=8,horizontal=F); t=read.tree("protbaci.label.curated.nwk"); plot(t, main="BG10490 final"); dev.off();
/bacillus.phylip.I3.1/BG10490/__tmp.plot.R
no_license
hongqin/BacillusSporeCoat
R
false
false
174
r
library(ape); postscript("_tree.073108.ps",width=8,height=8,horizontal=F); t=read.tree("protbaci.label.curated.nwk"); plot(t, main="BG10490 final"); dev.off();
# corr() corr <- function(directory, threshold = 0) { nobs <- complete(directory)[, "nobs"] # 使用上一題已經定義好的 complete() 函數 if (threshold > max(nobs)) { # 如果使用者輸入的門檻值超過所有測站的最大完整觀測值 return(NULL) } else { df_to_read <- nobs > threshold csv_files <- list.files(directory) # 使用內建函數 list.files() 建立出 CSV 檔案路徑 ...
/jhu_rprg_week2/corr.R
no_license
yychuang/datainpoint
R
false
false
1,033
r
# corr() corr <- function(directory, threshold = 0) { nobs <- complete(directory)[, "nobs"] # 使用上一題已經定義好的 complete() 函數 if (threshold > max(nobs)) { # 如果使用者輸入的門檻值超過所有測站的最大完整觀測值 return(NULL) } else { df_to_read <- nobs > threshold csv_files <- list.files(directory) # 使用內建函數 list.files() 建立出 CSV 檔案路徑 ...
## I wrote this R function which caches the Inverse of a matrix in memory to avoid recalculation when the inverse ##is requested for the same matrix again or calculate a new inverse if the matrix changes and caches the result in memory ## Function creates a special “matrix” and provides function to set values,get va...
/cachematrix.R
no_license
DariaGoncharenko/ProgrammingAssignment2
R
false
false
1,085
r
## I wrote this R function which caches the Inverse of a matrix in memory to avoid recalculation when the inverse ##is requested for the same matrix again or calculate a new inverse if the matrix changes and caches the result in memory ## Function creates a special “matrix” and provides function to set values,get va...
library(dst) ### Name: marrayToMatrix ### Title: Transformation of an array data to a matrix-represented relation ### Aliases: marrayToMatrix ### ** Examples wr_infovar = matrix(c(4,5,2,2), ncol = 2, dimnames = list(NULL, c("varnb", "size")) ) mtt <- array(c(0,1,0,0,0,0,0,1,0,1,0,1,1,0,1,0,1,1,1,0,1,0,1,1,1,1,1...
/data/genthat_extracted_code/dst/examples/marrayToMatrix.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
452
r
library(dst) ### Name: marrayToMatrix ### Title: Transformation of an array data to a matrix-represented relation ### Aliases: marrayToMatrix ### ** Examples wr_infovar = matrix(c(4,5,2,2), ncol = 2, dimnames = list(NULL, c("varnb", "size")) ) mtt <- array(c(0,1,0,0,0,0,0,1,0,1,0,1,1,0,1,0,1,1,1,0,1,0,1,1,1,1,1...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_commands.R \name{get_commands} \alias{get_commands} \title{Load all commands available on the FNA platform} \usage{ get_commands() } \arguments{ \item{login_data}{} } \value{ The list of commands available to the user with the specified u...
/man/get_commands.Rd
no_license
lubospernis/FNA_package
R
false
true
397
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_commands.R \name{get_commands} \alias{get_commands} \title{Load all commands available on the FNA platform} \usage{ get_commands() } \arguments{ \item{login_data}{} } \value{ The list of commands available to the user with the specified u...
library(tm) # This loads functions from package "tm", for text mining # Use `install.packages` function to install packages listed above, if # not already installed (e.g., `install.packages("tm")`) ############################################################################### #################### Variables to Modify...
/1 Extract text from PDFs.R
no_license
dtburk/gender-in-science-reports
R
false
false
4,760
r
library(tm) # This loads functions from package "tm", for text mining # Use `install.packages` function to install packages listed above, if # not already installed (e.g., `install.packages("tm")`) ############################################################################### #################### Variables to Modify...
# This function uses the "changepoint" package to create a ggplot object of a # time series of cover values showing where breaks in means occur. # # The function uses the data frame "...mtsd.csv" as the starting point. # This data frame must be created first. # # By Bart Huntley 25/05/2015 rm(list=ls()) dir="Z:\\D...
/ecp_chngpt.R
no_license
Bartesto/timeseriesR
R
false
false
4,304
r
# This function uses the "changepoint" package to create a ggplot object of a # time series of cover values showing where breaks in means occur. # # The function uses the data frame "...mtsd.csv" as the starting point. # This data frame must be created first. # # By Bart Huntley 25/05/2015 rm(list=ls()) dir="Z:\\D...
fastplm.boot <- function(seed, y, x, ind, sfe.index, cfe.index, cluster, parallel = FALSE, wild = FALSE, ...
/R/fastplm_boot.R
permissive
inkrement/fastplm
R
false
false
23,644
r
fastplm.boot <- function(seed, y, x, ind, sfe.index, cfe.index, cluster, parallel = FALSE, wild = FALSE, ...
testlist <- list(AgeVector = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ExpressionSet = structure(c(1.63064200184954e+212, 1.1156036290872e+157, 2.3453288146775e+59, 7.59955788945772e-256, 5.553983...
/myTAI/inst/testfiles/cpp_omitMatrix/AFL_cpp_omitMatrix/cpp_omitMatrix_valgrind_files/1615844961-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
1,089
r
testlist <- list(AgeVector = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), ExpressionSet = structure(c(1.63064200184954e+212, 1.1156036290872e+157, 2.3453288146775e+59, 7.59955788945772e-256, 5.553983...
#' spreadout #' #' This function unbins data. If qnull is given it uses quantiles, otherwise uniform #' @param x data set #' @param case setup info #' @return A numeric vector of observations without ties. #' @export #' @examples #' case <- list(B=1000, param = NULL, n = 1000, pnull = function(x, param) puni...
/R/spreadout.R
no_license
cran/simgof
R
false
false
1,217
r
#' spreadout #' #' This function unbins data. If qnull is given it uses quantiles, otherwise uniform #' @param x data set #' @param case setup info #' @return A numeric vector of observations without ties. #' @export #' @examples #' case <- list(B=1000, param = NULL, n = 1000, pnull = function(x, param) puni...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fit.interaction.model.R \name{fit.interaction.model} \alias{fit.interaction.model} \title{Cox model two features separately and together} \usage{ fit.interaction.model( feature1, feature2, expression.data, survival.data, data.type.o...
/man/fit.interaction.model.Rd
no_license
cran/SIMMS
R
false
true
2,178
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fit.interaction.model.R \name{fit.interaction.model} \alias{fit.interaction.model} \title{Cox model two features separately and together} \usage{ fit.interaction.model( feature1, feature2, expression.data, survival.data, data.type.o...
# ----------------------- Read data # set up library setwd("C:/Users/lenovo/Desktop/Folders/Subjects/Term 4/AMMA") # read data prd_spend <-read.csv(file="prod_spend.csv", head=T) names(prd_spend) str(prd_spend) summary(prd_spend) # ------------------------ Add column # Scena...
/Class 5 -Data Manipulation v2_short.R
no_license
snehel/AMMA_In_Class_Assignments
R
false
false
6,952
r
# ----------------------- Read data # set up library setwd("C:/Users/lenovo/Desktop/Folders/Subjects/Term 4/AMMA") # read data prd_spend <-read.csv(file="prod_spend.csv", head=T) names(prd_spend) str(prd_spend) summary(prd_spend) # ------------------------ Add column # Scena...
# Outline # Data structures # extent -- # polygons -- SpatialPolygons -- list(list(lakeline), list(holes)) # count data -- SpatialPointsDataFrame # fit variogram to the count data # pick N # draw q # calculate CPUE = N/A*q # simulate CPUE over extent # crop simulated data by lakeline and hole # convert into a spatia...
/R/temp.R
no_license
jBernardADFG/cpuesim
R
false
false
650
r
# Outline # Data structures # extent -- # polygons -- SpatialPolygons -- list(list(lakeline), list(holes)) # count data -- SpatialPointsDataFrame # fit variogram to the count data # pick N # draw q # calculate CPUE = N/A*q # simulate CPUE over extent # crop simulated data by lakeline and hole # convert into a spatia...
### Exercise 3 ### library(shiny) library(ggplot2) # Create a shiny server that creates a scatterplot. # It should take as an input the x_var, y_var, color, and size # Save the result of `renderPlot` to output$scatter server <- function(input, output){ output$scatter <- renderPlot({ # Store x and y values to p...
/exercise-3/server.R
permissive
hmstella/ch16-shiny
R
false
false
759
r
### Exercise 3 ### library(shiny) library(ggplot2) # Create a shiny server that creates a scatterplot. # It should take as an input the x_var, y_var, color, and size # Save the result of `renderPlot` to output$scatter server <- function(input, output){ output$scatter <- renderPlot({ # Store x and y values to p...