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 |
|---|---|---|---|---|---|---|---|---|---|
testIndBinom = function(target, dataset, xIndex, csIndex, wei = NULL, univariateModels = NULL , hash = FALSE, stat_hash = NULL,
pvalue_hash = NULL) {
# TESTINDPOIS Conditional Independence Test for discrete class variables
# PVALUE = TESTINDPOIS(Y, DATA, XINDEX, CSINDEX)
# This test... | /R/testIndBinom.R | no_license | cran/MXM | R | false | false | 5,037 | r | testIndBinom = function(target, dataset, xIndex, csIndex, wei = NULL, univariateModels = NULL , hash = FALSE, stat_hash = NULL,
pvalue_hash = NULL) {
# TESTINDPOIS Conditional Independence Test for discrete class variables
# PVALUE = TESTINDPOIS(Y, DATA, XINDEX, CSINDEX)
# This test... |
#'
#' Taxa de mortalidade na infância - C.16
#'
#' Follows the RIPSA 2012 card \url{http://fichas.ripsa.org.br/2012/c-16}
#'
#' @param conn Connection object created with \code{\link{pcdas_connect}}.
#' @param ano numeric. Year.
#' @param multi Indicator multiplier. Defaults to RIPSA recommendation.
#'
#' @return A \co... | /R/indi_c.16.R | no_license | rfsaldanha/pcdasindi-1 | R | false | false | 846 | r | #'
#' Taxa de mortalidade na infância - C.16
#'
#' Follows the RIPSA 2012 card \url{http://fichas.ripsa.org.br/2012/c-16}
#'
#' @param conn Connection object created with \code{\link{pcdas_connect}}.
#' @param ano numeric. Year.
#' @param multi Indicator multiplier. Defaults to RIPSA recommendation.
#'
#' @return A \co... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Lasso/haematopoietic.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="mae",alpha=0.04,family="gaussian",standardize=FALSE)
sink('./haematopoietic_020.txt',a... | /Model/EN/Lasso/haematopoietic/haematopoietic_020.R | no_license | esbgkannan/QSMART | R | false | false | 361 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Lasso/haematopoietic.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="mae",alpha=0.04,family="gaussian",standardize=FALSE)
sink('./haematopoietic_020.txt',a... |
library(VineCopula)
#This function takes a bivariable dataset (matrix or dataframe) and gets the
#associated sample from the underlying copula by taking ranks.
#
#Args
#d An N by 2 matrix or data frame
#rankon Should ranks be taken? This could be F, for instance, if data
# were simulated from... | /getcopula.R | no_license | sghosh89/BIVAN | R | false | false | 997 | r | library(VineCopula)
#This function takes a bivariable dataset (matrix or dataframe) and gets the
#associated sample from the underlying copula by taking ranks.
#
#Args
#d An N by 2 matrix or data frame
#rankon Should ranks be taken? This could be F, for instance, if data
# were simulated from... |
#-----------------------------------------------------------------------------------------------------------------------
# H2O Key-Value Store Functions
#-----------------------------------------------------------------------------------------------------------------------
.key.validate <- function(key) {
if (!missi... | /h2o-r/h2o-package/R/kvstore.R | permissive | zxsted/h2o-3 | R | false | false | 12,190 | r | #-----------------------------------------------------------------------------------------------------------------------
# H2O Key-Value Store Functions
#-----------------------------------------------------------------------------------------------------------------------
.key.validate <- function(key) {
if (!missi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/window.R
\name{rolling_mean}
\alias{rolling_mean}
\title{Compute the rolling mean with different windows and thresholds.}
\usage{
rolling_mean(x, width = 8, thresh = 0)
}
\arguments{
\item{x}{the input numeric value}
\item{width}{The maximum... | /man/rolling_mean.Rd | permissive | paulroberts68/rcaaqs | R | false | true | 683 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/window.R
\name{rolling_mean}
\alias{rolling_mean}
\title{Compute the rolling mean with different windows and thresholds.}
\usage{
rolling_mean(x, width = 8, thresh = 0)
}
\arguments{
\item{x}{the input numeric value}
\item{width}{The maximum... |
cfg <- config("feature2")
sys <- sapply(cfg, `[[`, "category")
u_sys <- unique(sys)
sort_sys <- lapply(u_sys,
function(s) sapply(cfg[which(sys == s)], `[[`, "full_name"))
names(sort_sys) <- u_sys
groups <- Reduce(
c,
lapply(sort_sys, function(x) paste(sapply(x, str_to_title), collapse = ", ... | /scripts/tables/variable-grouping.R | permissive | eth-mds/recoils | R | false | false | 550 | r |
cfg <- config("feature2")
sys <- sapply(cfg, `[[`, "category")
u_sys <- unique(sys)
sort_sys <- lapply(u_sys,
function(s) sapply(cfg[which(sys == s)], `[[`, "full_name"))
names(sort_sys) <- u_sys
groups <- Reduce(
c,
lapply(sort_sys, function(x) paste(sapply(x, str_to_title), collapse = ", ... |
library("ggplot2")
setwd("~/Desktop/datasciencecoursera/4_Exploratory_Data_Analysis/project2")
path <- getwd()
download.file(url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
, destfile = paste(path, "dataFiles.zip", sep = "/"))
unzip(zipfile = "dataFiles.zip")
# Load the NEI & ... | /Exploratory Data Analysis/Week4/Project2/plot5.R | no_license | AhmedFakhry47/DataScience-Specialization-With-R-JohnHopkinsUniversity | R | false | false | 1,125 | r | library("ggplot2")
setwd("~/Desktop/datasciencecoursera/4_Exploratory_Data_Analysis/project2")
path <- getwd()
download.file(url = "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
, destfile = paste(path, "dataFiles.zip", sep = "/"))
unzip(zipfile = "dataFiles.zip")
# Load the NEI & ... |
#=============================================================================
#
# Script for formatting Scottish Fire and Rescue Service data for
# upload to statistics.gov.scot
#
# raw data from https://www.firescotland.gov.uk/about-us/fire-and-rescue-statistics.aspx
#
# Data, Statistics and Outcomes
# Scott... | /2019_11_fire_incident.R | no_license | LiamCavin/statistics.gov.scot-reformatting | R | false | false | 22,324 | r | #=============================================================================
#
# Script for formatting Scottish Fire and Rescue Service data for
# upload to statistics.gov.scot
#
# raw data from https://www.firescotland.gov.uk/about-us/fire-and-rescue-statistics.aspx
#
# Data, Statistics and Outcomes
# Scott... |
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
vLA_NEI <- vehiclesNEI[vehiclesNEI$fips=="06037",]
vLA_NEI$city <- "Los Angeles County"
vBmore_NEI <- vehiclesNEI[vehiclesNEI$fips == "24510",]
vBmore_NEI$city <- "Baltimore City"
bothNEI <- rbind(vBmore_NEI,vLA_NEI)
library(g... | /plot6.R | no_license | SudhirChowdhary/Assignment2 | R | false | false | 738 | r |
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
vLA_NEI <- vehiclesNEI[vehiclesNEI$fips=="06037",]
vLA_NEI$city <- "Los Angeles County"
vBmore_NEI <- vehiclesNEI[vehiclesNEI$fips == "24510",]
vBmore_NEI$city <- "Baltimore City"
bothNEI <- rbind(vBmore_NEI,vLA_NEI)
library(g... |
#using R Studio
install.packages("Rtwitter" , repos="https://cran.rstudio.com/")
install.packages("RoAuth" , repos="https://cran.rstudio.com/")
install.packages("RCurl" , repos="https://cran.rstudio.com/")
install.packages("httr" , repos="https://cran.rstudio.com/")
install.packages("igraph" , repos="https://cran... | /GetUsersTwitter.R | no_license | project-nti17/Twitter | R | false | false | 874 | r | #using R Studio
install.packages("Rtwitter" , repos="https://cran.rstudio.com/")
install.packages("RoAuth" , repos="https://cran.rstudio.com/")
install.packages("RCurl" , repos="https://cran.rstudio.com/")
install.packages("httr" , repos="https://cran.rstudio.com/")
install.packages("igraph" , repos="https://cran... |
# data will need to be an unmarkedMultFrame
gmultmix <- function(lambdaformula, phiformula, pformula, data,
mixture=c('P', 'NB'), K, starts, method = "BFGS", se = TRUE,
engine=c("C","R"), ...)
{
if(!is(data, "unmarkedFrameGMM"))
stop("Data is not of class unmarkedFrameGMM.")
engine <- match.arg(engine, c... | /fuzzedpackages/unmarked/R/gmultmix.R | no_license | akhikolla/testpackages | R | false | false | 6,120 | r |
# data will need to be an unmarkedMultFrame
gmultmix <- function(lambdaformula, phiformula, pformula, data,
mixture=c('P', 'NB'), K, starts, method = "BFGS", se = TRUE,
engine=c("C","R"), ...)
{
if(!is(data, "unmarkedFrameGMM"))
stop("Data is not of class unmarkedFrameGMM.")
engine <- match.arg(engine, c... |
#PAGE=78
a=45
b=90
d=90
c=d/a
f=d/b
e=2*d
avg=e/(c+f)
cat(avg,'km/h')
| /Schaum'S_Outline_Series_-_Theory_And_Problems_Of_Statistics_by_Murray_R._Spiegel/CH3/EX3.3.41/Ex3_3_41.R | permissive | FOSSEE/R_TBC_Uploads | R | false | false | 79 | r | #PAGE=78
a=45
b=90
d=90
c=d/a
f=d/b
e=2*d
avg=e/(c+f)
cat(avg,'km/h')
|
## Download data
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
destfile <- "C:\\Users\\Windows\\Documents\\JHU_Data_Science\\Course_4\\Exploratory-data-analysis-project-2\\data.zip"
download.file(url, destfile)
## Read in data
nei <- readRDS("~/JHU_Data_Science/Course_4/Exploratory-... | /plot4.R | no_license | FyzHsn/Exploratory-data-analysis-project-2 | R | false | false | 1,599 | r | ## Download data
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
destfile <- "C:\\Users\\Windows\\Documents\\JHU_Data_Science\\Course_4\\Exploratory-data-analysis-project-2\\data.zip"
download.file(url, destfile)
## Read in data
nei <- readRDS("~/JHU_Data_Science/Course_4/Exploratory-... |
testlist <- list(data = structure(c(-3.59807034632526e-38, 2.84809453888922e-306 ), .Dim = 1:2), q = 0)
result <- do.call(biwavelet:::rcpp_row_quantile,testlist)
str(result) | /biwavelet/inst/testfiles/rcpp_row_quantile/libFuzzer_rcpp_row_quantile/rcpp_row_quantile_valgrind_files/1610556041-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 173 | r | testlist <- list(data = structure(c(-3.59807034632526e-38, 2.84809453888922e-306 ), .Dim = 1:2), q = 0)
result <- do.call(biwavelet:::rcpp_row_quantile,testlist)
str(result) |
library(sp)
library(rgdal)
library(raster)
library(bitops)
### Parallelization
library(Rmpi)
library(doMPI)
library(foreach)
if(length(grep("parallel=",commandArgs(T)))==1) {
pos <- grep("parallel=",commandArgs(T))
parallel <- as.logical(strsplit(commandArgs(T)[pos],"parallel=")[[1]][2])
if(is.na(parallel)==T) s... | /RECO_model/scripts/download_and_reproject/prepare_input_maps_evi.R | no_license | mossypanga/Drought_CA | R | false | false | 17,541 | r |
library(sp)
library(rgdal)
library(raster)
library(bitops)
### Parallelization
library(Rmpi)
library(doMPI)
library(foreach)
if(length(grep("parallel=",commandArgs(T)))==1) {
pos <- grep("parallel=",commandArgs(T))
parallel <- as.logical(strsplit(commandArgs(T)[pos],"parallel=")[[1]][2])
if(is.na(parallel)==T) s... |
library(bayesCT)
### Name: normal_outcome
### Title: Parameters for treatment and control in normal case
### Aliases: normal_outcome
### ** Examples
normal_outcome(mu_control = 12, mu_treatment = 8, sd_treatment = 2.2, sd_control = 1.6)
| /data/genthat_extracted_code/bayesCT/examples/normal_outcome.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 244 | r | library(bayesCT)
### Name: normal_outcome
### Title: Parameters for treatment and control in normal case
### Aliases: normal_outcome
### ** Examples
normal_outcome(mu_control = 12, mu_treatment = 8, sd_treatment = 2.2, sd_control = 1.6)
|
#library(glmnet)
#library(Hmisc)
#library(mpath)
#library(kknn)
#library(randomForest)
#' lasso imputation - single column
#'
#' Impute results for a specific gene or cell using lasso
#'
#' @param ID string for the cell or gene to impute, must be a column name in the data
#' @param simData data
#' @param genes TRUE/... | /R/mixedSpeciesLasso.R | no_license | hkumar6/gene.expression | R | false | false | 3,315 | r | #library(glmnet)
#library(Hmisc)
#library(mpath)
#library(kknn)
#library(randomForest)
#' lasso imputation - single column
#'
#' Impute results for a specific gene or cell using lasso
#'
#' @param ID string for the cell or gene to impute, must be a column name in the data
#' @param simData data
#' @param genes TRUE/... |
library(shiny)
library(shinydashboard)
library(shinyjs)
library(shiny)
library(shinydashboard)
library(shinyjs)
ui <- dashboardPage(
skin="blue",
dashboardHeader(
title="Recommender System Inspector",
titleWidth = 450
),
dashboardSidebar(
# selectInput("sessionId", "Session Id: ", c(1,2,3))
... | /ui.R | no_license | NavaresCoolblue/recommender-inspector | R | false | false | 587 | r | library(shiny)
library(shinydashboard)
library(shinyjs)
library(shiny)
library(shinydashboard)
library(shinyjs)
ui <- dashboardPage(
skin="blue",
dashboardHeader(
title="Recommender System Inspector",
titleWidth = 450
),
dashboardSidebar(
# selectInput("sessionId", "Session Id: ", c(1,2,3))
... |
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../../h2o-runit.R')
# Test PCA on arrests.csv
test.pca.arrests <- function(conn) {
Log.info("Importing arrests.csv data...\n")
arrests.hex <- h2o.uploadFile(conn, locate("smalldata/pca_test/USArrests.csv"))
arrests.sum <- summary(arre... | /h2o-r/tests/testdir_algos/pca/runit_pca_arrests.R | permissive | darraghdog/h2o-dev | R | false | false | 689 | r | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source('../../h2o-runit.R')
# Test PCA on arrests.csv
test.pca.arrests <- function(conn) {
Log.info("Importing arrests.csv data...\n")
arrests.hex <- h2o.uploadFile(conn, locate("smalldata/pca_test/USArrests.csv"))
arrests.sum <- summary(arre... |
# Test Code File for coauthored work
two <- 1 + 1
two
# Making a commit to a new branch
three <- 1 + 2
# This is an example of your coauthor doing work on a file.
11111111111111111111111111111111111111111111111111111111
| /Test File.R | no_license | MikaelaKarstens/GitHub-For-Research | R | false | false | 225 | r | # Test Code File for coauthored work
two <- 1 + 1
two
# Making a commit to a new branch
three <- 1 + 2
# This is an example of your coauthor doing work on a file.
11111111111111111111111111111111111111111111111111111111
|
\name{new_period}
\alias{new_period}
\title{Create a period object.}
\usage{new_period(...)}
\description{
Create a period object.
}
\details{
new_period creates a period object with the specified
values. Within a period object, time units do not have a
fixed length (except for seconds) until they are added t... | /man/new_period.Rd | no_license | jthetzel/lubridate | R | false | false | 1,945 | rd | \name{new_period}
\alias{new_period}
\title{Create a period object.}
\usage{new_period(...)}
\description{
Create a period object.
}
\details{
new_period creates a period object with the specified
values. Within a period object, time units do not have a
fixed length (except for seconds) until they are added t... |
make_summary_plot_pdf <- function(dataset, name, n){
# library(ggplot2)
# library(extrafont)
loadfonts(quiet = TRUE)
dataset$module <- factor(dataset$module,
levels = c("Overall Score", "Emotion Recognition", "Social Perspective-Taking","Social Problem-Solving", "Self Control"))
... | /scripts/functions/EE/make_summary_plot_function_pdf.R | no_license | mariakharitonova/GitRTest | R | false | false | 1,777 | r | make_summary_plot_pdf <- function(dataset, name, n){
# library(ggplot2)
# library(extrafont)
loadfonts(quiet = TRUE)
dataset$module <- factor(dataset$module,
levels = c("Overall Score", "Emotion Recognition", "Social Perspective-Taking","Social Problem-Solving", "Self Control"))
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nearest_dbox2.R
\name{nearest_dbox2}
\alias{nearest_dbox2}
\title{Nearest Dbox}
\usage{
nearest_dbox2(lat1d_vec, lon1d_vec, lat2d_vec, lon2d_vec, mode = c("driving",
"transit", "walking", "bicycling"), value = c("distance_m", "distance_text... | /man/nearest_dbox2.Rd | permissive | sgrav007/mapupgrade | R | false | true | 1,215 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nearest_dbox2.R
\name{nearest_dbox2}
\alias{nearest_dbox2}
\title{Nearest Dbox}
\usage{
nearest_dbox2(lat1d_vec, lon1d_vec, lat2d_vec, lon2d_vec, mode = c("driving",
"transit", "walking", "bicycling"), value = c("distance_m", "distance_text... |
load.oscar = function(file, lats = NULL, lons = NULL) {
f = ncdf4::nc_open(file)
oscar = f
u = ncdf4::ncvar_get(f, 'u')
v = ncdf4::ncvar_get(f, 'v')
nc_close(f)
## Set names
times = as.POSIXct(oscar$var$u$dim[[4]]$vals * 86400, origin = '1992-10-05 00:00:00', tz = 'GMT')
dimnames(u) = list(longitu... | /RX/SATELLITE.source.r | no_license | tbrycekelly/Lateral-connectivity-in-the-gom | R | false | false | 4,022 | r | load.oscar = function(file, lats = NULL, lons = NULL) {
f = ncdf4::nc_open(file)
oscar = f
u = ncdf4::ncvar_get(f, 'u')
v = ncdf4::ncvar_get(f, 'v')
nc_close(f)
## Set names
times = as.POSIXct(oscar$var$u$dim[[4]]$vals * 86400, origin = '1992-10-05 00:00:00', tz = 'GMT')
dimnames(u) = list(longitu... |
# libraries
pacman::p_load(magrittr,dplyr,tidyr,broom,rio,methods)
best_model_select <- function(infile,difference,oname){
d.data <- import(infile) %>%
select(OTU_IDs,Poiss_qval,NB_qval,ZINB_qval,matches(difference),taxonomy,bic.pois,bic.nb,bic.zinb) %>%
rowwise() %>%
mutate(`bic.pois`= ifelse(is.na(`bic.pois`)... | /src/best_model_selection.R | no_license | alifar76/filter-threemodel-otus | R | false | false | 1,419 | r | # libraries
pacman::p_load(magrittr,dplyr,tidyr,broom,rio,methods)
best_model_select <- function(infile,difference,oname){
d.data <- import(infile) %>%
select(OTU_IDs,Poiss_qval,NB_qval,ZINB_qval,matches(difference),taxonomy,bic.pois,bic.nb,bic.zinb) %>%
rowwise() %>%
mutate(`bic.pois`= ifelse(is.na(`bic.pois`)... |
library(rmongodb)
library(stringr)
library(plyr)
library(parallel)
library(Hmisc)
PrepareLine <- function(readLine,data){
splitLine <- str_split(readLine,"\\s+")
splitLine <- unlist(splitLine)
splitLine <- tolower(splitLine)
stopWords <- match(splitLine,data)
splitLine <- splitLine[is.na(stopWords) == TRUE] ... | /r_scripts/PrepareDataStopWord.R | no_license | mmiotk/MapReduceMongoDB | R | false | false | 2,677 | r | library(rmongodb)
library(stringr)
library(plyr)
library(parallel)
library(Hmisc)
PrepareLine <- function(readLine,data){
splitLine <- str_split(readLine,"\\s+")
splitLine <- unlist(splitLine)
splitLine <- tolower(splitLine)
stopWords <- match(splitLine,data)
splitLine <- splitLine[is.na(stopWords) == TRUE] ... |
rm(list=ls())
setwd("C:/Rcode")
#ExacData <- read.csv("ExacData.csv",header=TRUE)
#ExacData <- as.data.frame(ExacData)
######## Import the raw data ##################################################################
exacdata <- read.csv("C:/Rcode/exacerbation.csv",header=TRUE)
exacdata <- as.data.frame(exacdata)
exac... | /R code/ExecBHTest.R | no_license | zhangzeyangcsml/CSML-Final-Project-2015 | R | false | false | 6,039 | r | rm(list=ls())
setwd("C:/Rcode")
#ExacData <- read.csv("ExacData.csv",header=TRUE)
#ExacData <- as.data.frame(ExacData)
######## Import the raw data ##################################################################
exacdata <- read.csv("C:/Rcode/exacerbation.csv",header=TRUE)
exacdata <- as.data.frame(exacdata)
exac... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rxrandom.R
\name{rxexp}
\alias{rxexp}
\title{Simulate exponential variable from threefry generator}
\usage{
rxexp(rate, n = 1L, ncores = 1L)
}
\arguments{
\item{rate}{vector of rates.}
\item{n}{number of observations. If \code{len... | /man/rxexp.Rd | no_license | cran/RxODE | R | false | true | 2,036 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rxrandom.R
\name{rxexp}
\alias{rxexp}
\title{Simulate exponential variable from threefry generator}
\usage{
rxexp(rate, n = 1L, ncores = 1L)
}
\arguments{
\item{rate}{vector of rates.}
\item{n}{number of observations. If \code{len... |
## Step 1- Merge the train and test sets to create one data set
# Read X_train.txt, Y_train.txt & subject_train.txt and stored them in xTrain, yTrain, subjectTrain respectively
xTrain <- read.table("./Dataset/train/X_train.txt")
yTrain <- read.table("./Dataset/train/y_train.txt")
subjectTrain <- read.table("./Dat... | /run_analysis.R | no_license | RakeshMalvy41291/Getting-and-Cleaning-Data | R | false | false | 2,319 | r | ## Step 1- Merge the train and test sets to create one data set
# Read X_train.txt, Y_train.txt & subject_train.txt and stored them in xTrain, yTrain, subjectTrain respectively
xTrain <- read.table("./Dataset/train/X_train.txt")
yTrain <- read.table("./Dataset/train/y_train.txt")
subjectTrain <- read.table("./Dat... |
household_power_consumption <- read.csv("~/data/household_power_consumption.txt", sep=";", stringsAsFactors=FALSE)
HPC2007<-household_power_consumption[household_power_consumption$Date=="1/2/2007" | household_power_consumption$Date=="2/2/2007",]
rm(household_power_consumption)
HPC2007$Global_active_power<-as.numeric(HP... | /plot1.R | no_license | lauraebaker/ExData_Plotting1 | R | false | false | 542 | r | household_power_consumption <- read.csv("~/data/household_power_consumption.txt", sep=";", stringsAsFactors=FALSE)
HPC2007<-household_power_consumption[household_power_consumption$Date=="1/2/2007" | household_power_consumption$Date=="2/2/2007",]
rm(household_power_consumption)
HPC2007$Global_active_power<-as.numeric(HP... |
testlist <- list(Rs = numeric(0), atmp = 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), relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615854813-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 750 | r | testlist <- list(Rs = numeric(0), atmp = 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), relh = -1.72131968218895e+83, temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e... |
##### info ####
# file: elymus_adult_seed_production_fung_model_2019_density_exp
# author: Amy Kendig
# date last edited: 11/11/20
# goal: estimate Elymus adult seed production based on fungicide treatments
#### set up ####
# clear all existing data
rm(list=ls())
# load packages
library(tidyverse)
library(brms)
#... | /code/elymus_adult_seed_production_fung_model_2019_density_exp.R | no_license | aekendig/microstegium-bipolaris | R | false | false | 5,013 | r | ##### info ####
# file: elymus_adult_seed_production_fung_model_2019_density_exp
# author: Amy Kendig
# date last edited: 11/11/20
# goal: estimate Elymus adult seed production based on fungicide treatments
#### set up ####
# clear all existing data
rm(list=ls())
# load packages
library(tidyverse)
library(brms)
#... |
library(ggplot2)
test_files <- list.files("tests", pattern = "*.csv", full.names = TRUE,
recursive = FALSE)
titles <- c("Cilindro de 7/8\" em diâmetro",
"12 mm de largura x 8 mm de espessura",
"Cilindro 150 mm de diâmetro",
"Ensaio de tensão-defor... | /plot.R | no_license | andrekorol/resistencia-dos-materiais | R | false | false | 1,080 | r | library(ggplot2)
test_files <- list.files("tests", pattern = "*.csv", full.names = TRUE,
recursive = FALSE)
titles <- c("Cilindro de 7/8\" em diâmetro",
"12 mm de largura x 8 mm de espessura",
"Cilindro 150 mm de diâmetro",
"Ensaio de tensão-defor... |
############################################################
# Get data from source Ethernet
############################################################
URL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
fileNameTemp <- "exdata-data-household_power_consumption.zi... | /plot1.r | no_license | mresendizipn/ExData_Plotting1 | R | false | false | 1,731 | r | ############################################################
# Get data from source Ethernet
############################################################
URL <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
fileNameTemp <- "exdata-data-household_power_consumption.zi... |
# Case Study - Denco
#Manufacturing Firm with sales data of partnum and customer with region wise sales
# Should know - import, table, dplyr, aggregate etc
#read file : Method1
sales1 = read.csv("./data/denco.csv")
str(sales1) #see if data is loaded and check its structure
head(sales1)
#read file : Method2 : when l... | /92-wksp2/1d3-dencoCase.R | no_license | DUanalytics/rAnalytics | R | false | false | 4,430 | r | # Case Study - Denco
#Manufacturing Firm with sales data of partnum and customer with region wise sales
# Should know - import, table, dplyr, aggregate etc
#read file : Method1
sales1 = read.csv("./data/denco.csv")
str(sales1) #see if data is loaded and check its structure
head(sales1)
#read file : Method2 : when l... |
`ll.aRC.theta.A2` =
function(par0, bs1, bs2, ni, ni0, sex, xs){
theta = par0
return(ll.aRC(par0=bs1, ni=ni[sex == 1], ni0=ni0[sex == 1], xs=xs[sex == 1], theta=theta) +
ll.aRC(par0=bs2, ni=ni[sex == -1], ni0=ni0[sex == -1], xs=xs[sex == -1], theta=theta))
} | /R/ll.aRC.theta.A2.R | no_license | cran/rxSeq | R | false | false | 277 | r | `ll.aRC.theta.A2` =
function(par0, bs1, bs2, ni, ni0, sex, xs){
theta = par0
return(ll.aRC(par0=bs1, ni=ni[sex == 1], ni0=ni0[sex == 1], xs=xs[sex == 1], theta=theta) +
ll.aRC(par0=bs2, ni=ni[sex == -1], ni0=ni0[sex == -1], xs=xs[sex == -1], theta=theta))
} |
library(shiny)
library(ggplot2)
library(leaflet)
library(raster)
library(dygraphs)
library(plyr)
library(xts)
library(zoo)
library(stringr)
library(lubridate)
library(DT)
library(reshape2)
#load dataset
dat <- read.csv('data/final.csv',stringsAsFactors = FALSE, header=T)
#create a empty factor variable to filter the d... | /urban_mobility_research/shiny_website/server.R | no_license | ziqiguo/Guo-Ziqi-Undergrad | R | false | false | 32,583 | r | library(shiny)
library(ggplot2)
library(leaflet)
library(raster)
library(dygraphs)
library(plyr)
library(xts)
library(zoo)
library(stringr)
library(lubridate)
library(DT)
library(reshape2)
#load dataset
dat <- read.csv('data/final.csv',stringsAsFactors = FALSE, header=T)
#create a empty factor variable to filter the d... |
simu.2drarma = function (alpha = NA, phi = NA, theta = NA,
p = NA, q = NA, n = NA, k = NA, ne = 1)
{
# n is the number of rows
# k is the number of columns
# ne is related to the employed neighborhood
# ne = 1: strongly causal neighborhood (used in Palm, Bayer, and Cintra ?)
# ne ... | /simu_2drarma.r | no_license | palmbg/2D-RARMA-model | R | false | false | 7,944 | r | simu.2drarma = function (alpha = NA, phi = NA, theta = NA,
p = NA, q = NA, n = NA, k = NA, ne = 1)
{
# n is the number of rows
# k is the number of columns
# ne is related to the employed neighborhood
# ne = 1: strongly causal neighborhood (used in Palm, Bayer, and Cintra ?)
# ne ... |
#' Convert loadflex to EGRET object
#'
#' @description Convert a loadflex object into an EGRET object for plotting.
#'
#' @param load.model a load model (loadReg2, loadComp, loadInterp, loadLm, etc.)
#' whose data and predictions are to be converted to EGRET format
#' @param newdata data.frame of data used to gen... | /R/convertToEGRET.R | permissive | McDowellLab/loadflex | R | false | false | 10,153 | r | #' Convert loadflex to EGRET object
#'
#' @description Convert a loadflex object into an EGRET object for plotting.
#'
#' @param load.model a load model (loadReg2, loadComp, loadInterp, loadLm, etc.)
#' whose data and predictions are to be converted to EGRET format
#' @param newdata data.frame of data used to gen... |
## Marc Tagne Assignment 1 : EDA COURSERA
##
## get the vector of classes to be assumed for the columns
testdata <- read.table("hpc.txt", header = TRUE , sep=";", na.strings = "?", comment.char = "", nrows = 100)
##get the columns' class
cclasses <- sapply(testdata, class)
#get rows 1/2/2007 to 2/2/2007 : Our overall... | /plot4.R | no_license | mtagne/ExData_Plotting1 | R | false | false | 2,153 | r |
## Marc Tagne Assignment 1 : EDA COURSERA
##
## get the vector of classes to be assumed for the columns
testdata <- read.table("hpc.txt", header = TRUE , sep=";", na.strings = "?", comment.char = "", nrows = 100)
##get the columns' class
cclasses <- sapply(testdata, class)
#get rows 1/2/2007 to 2/2/2007 : Our overall... |
# Logical Operators
# AND - &
# OR - |
# NOT - !
x <- 10
x < 20
x > 5
x < 20 & x > 5
(x < 20) & (x>5)
(x < 20) & (x>5) & (x == 10)
x==2 & x > 1
x==2 | x > 1
x==1 | x==12
(10==1)
!(10==1)
!!(10==1)
df <- mtcars
df
df[df['mpg'] >= 20,] # Notice the use of indexing with the comma
# subset(df,mpg>=20) # Could also use su... | /Source Files/20_Programming with R.R | no_license | tanussingh/Machine-Learning | R | false | false | 3,814 | r | # Logical Operators
# AND - &
# OR - |
# NOT - !
x <- 10
x < 20
x > 5
x < 20 & x > 5
(x < 20) & (x>5)
(x < 20) & (x>5) & (x == 10)
x==2 & x > 1
x==2 | x > 1
x==1 | x==12
(10==1)
!(10==1)
!!(10==1)
df <- mtcars
df
df[df['mpg'] >= 20,] # Notice the use of indexing with the comma
# subset(df,mpg>=20) # Could also use su... |
#outcomesFile <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
rankall <- function(outcome, num = "best") {
## Read outcome data
outcomesFile <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
outcomesList <- c("heart attack", "he... | /rankall.R | no_license | arkut/rdataclean | R | false | false | 1,212 | r |
#outcomesFile <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
rankall <- function(outcome, num = "best") {
## Read outcome data
outcomesFile <- read.csv("outcome-of-care-measures.csv", colClasses = "character")
outcomesList <- c("heart attack", "he... |
###
# training gbm model - one vs all apprach
###
library(caret)
library(gbm)
library(pROC)
# set working directory
WORK.DIR <- "./src/stk_model/gbm2_1"
# Common Functions and Global variables
source("./src/CommonFunctions.R")
source(paste0(WORK.DIR,"/ModelCommonFunctions.R"))
# set caret training parameters
CARET... | /src/stk_model/gbm2_1/train_model.R | no_license | jimthompson5802/kaggle-OttoGroup | R | false | false | 4,190 | r | ###
# training gbm model - one vs all apprach
###
library(caret)
library(gbm)
library(pROC)
# set working directory
WORK.DIR <- "./src/stk_model/gbm2_1"
# Common Functions and Global variables
source("./src/CommonFunctions.R")
source(paste0(WORK.DIR,"/ModelCommonFunctions.R"))
# set caret training parameters
CARET... |
rif_capital <- function(has_title_row, has_star, ...) {
title <- rif_title(has_title_row, ...)
type <- rif_type(has_star, ...)
new_pillar_capital(title, type)
}
| /R/rowid-capital.R | permissive | r-lib/pillar | R | false | false | 167 | r | rif_capital <- function(has_title_row, has_star, ...) {
title <- rif_title(has_title_row, ...)
type <- rif_type(has_star, ...)
new_pillar_capital(title, type)
}
|
#' List imf database IDs
#'
#' @param return_raw logical. Whether to return the raw dataflow list or a
#' data frame with database IDs and names.
#' @param times numeric. Maximum number of requests to attempt.
#'
#' @return If \code{return_raw = FALSE} then a data frame with the database IDs
#' and descriptions is retu... | /R/data_functions.R | no_license | techtronics/imfr | R | false | false | 7,614 | r | #' List imf database IDs
#'
#' @param return_raw logical. Whether to return the raw dataflow list or a
#' data frame with database IDs and names.
#' @param times numeric. Maximum number of requests to attempt.
#'
#' @return If \code{return_raw = FALSE} then a data frame with the database IDs
#' and descriptions is retu... |
# CREATEBINNULL2.R
# Part of the FALCON (Framework of Adaptive ensembLes for the Comparison Of
# Nestedness) package: https://github.com/sjbeckett/FALCON
# Last updated: 11th July 2014
CREATEBINNULL2 <- function(MATRIX,numbernulls,measures,binNull,sortVar) { #FF
# Fixed - Fixed null model
#Creates null matrices that c... | /R/NULLS/CREATEBINNULL2.R | permissive | latuji/FALCON | R | false | false | 2,246 | r | # CREATEBINNULL2.R
# Part of the FALCON (Framework of Adaptive ensembLes for the Comparison Of
# Nestedness) package: https://github.com/sjbeckett/FALCON
# Last updated: 11th July 2014
CREATEBINNULL2 <- function(MATRIX,numbernulls,measures,binNull,sortVar) { #FF
# Fixed - Fixed null model
#Creates null matrices that c... |
# R script to run author supplied code, typically used to install additional R packages
# contains placeholders which are inserted by the compile script
# NOTE: this script is executed in the chroot context; check paths!
r <- getOption("repos")
r["CRAN"] <- "http://cloud.r-project.org"
options(repos=r)
# ===========... | /apps/dashr-object-detection/init.R | permissive | billshi18/dash-sample-apps | R | false | false | 3,900 | r |
# R script to run author supplied code, typically used to install additional R packages
# contains placeholders which are inserted by the compile script
# NOTE: this script is executed in the chroot context; check paths!
r <- getOption("repos")
r["CRAN"] <- "http://cloud.r-project.org"
options(repos=r)
# ===========... |
#' Add an intercept column to `data`
#'
#' This function adds an integer column of `1`'s to `data`.
#'
#' If a column named `name` already exists in `data`, then `data` is returned
#' unchanged and a warning is issued.
#'
#' @param data A data frame or matrix.
#'
#' @param name The name for the intercept column. Defaul... | /R/intercept.R | permissive | DavisVaughan/hardhat | R | false | false | 1,717 | r | #' Add an intercept column to `data`
#'
#' This function adds an integer column of `1`'s to `data`.
#'
#' If a column named `name` already exists in `data`, then `data` is returned
#' unchanged and a warning is issued.
#'
#' @param data A data frame or matrix.
#'
#' @param name The name for the intercept column. Defaul... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/help.R
\docType{import}
\name{reexports}
\alias{reexports}
\alias{melt}
\title{Objects exported from other packages}
\keyword{internal}
\description{
These objects are imported from other packages. Follow the links
below to see their document... | /man/reexports.Rd | no_license | gustavdelius/mizer | R | false | true | 391 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/help.R
\docType{import}
\name{reexports}
\alias{reexports}
\alias{melt}
\title{Objects exported from other packages}
\keyword{internal}
\description{
These objects are imported from other packages. Follow the links
below to see their document... |
library(signal)
### Name: cheby1
### Title: Generate a Chebyshev filter.
### Aliases: cheby1 cheby1.default cheby1.FilterOfOrder cheby2
### cheby2.default cheby2.FilterOfOrder
### Keywords: math
### ** Examples
# compare the frequency responses of 5th-order Butterworth and Chebyshev filters.
bf <- butter(5, 0... | /data/genthat_extracted_code/signal/examples/cheby1.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 853 | r | library(signal)
### Name: cheby1
### Title: Generate a Chebyshev filter.
### Aliases: cheby1 cheby1.default cheby1.FilterOfOrder cheby2
### cheby2.default cheby2.FilterOfOrder
### Keywords: math
### ** Examples
# compare the frequency responses of 5th-order Butterworth and Chebyshev filters.
bf <- butter(5, 0... |
#-Where is user tweeting from?-
user$location
loc <- subset(dfT, select = c('latitude','longitude'))
print(paste0("User's location: ", user$location))
dfT$longitude
dfT$latitude
#coords2continent = function(points)
#{
# countriesSP <- getMap(resolution='low')
# #countriesSP <- getMap(resolution='hi... | /location.r | no_license | asmitapoddar/Twitter-Crawling-and-Visualization | R | false | false | 1,054 | r | #-Where is user tweeting from?-
user$location
loc <- subset(dfT, select = c('latitude','longitude'))
print(paste0("User's location: ", user$location))
dfT$longitude
dfT$latitude
#coords2continent = function(points)
#{
# countriesSP <- getMap(resolution='low')
# #countriesSP <- getMap(resolution='hi... |
library(rstudioapi)
library(plyr)
library(dplyr)
library(sqldf)
library(data.table)
library(RODBC)
#Connect to demographic warehouse through SQL
channel <- odbcDriverConnect('driver={SQL Server};server=sql2014a8; database=demographic_warehouse; trusted_connection=true')
#Save SQL views as data frames
sr13 <- sqlQu... | /Unfiled/SR14Forecast/SubRegional/Katie_Emp_13vs17_Check.R | no_license | SANDAG/QA | R | false | false | 1,880 | r |
library(rstudioapi)
library(plyr)
library(dplyr)
library(sqldf)
library(data.table)
library(RODBC)
#Connect to demographic warehouse through SQL
channel <- odbcDriverConnect('driver={SQL Server};server=sql2014a8; database=demographic_warehouse; trusted_connection=true')
#Save SQL views as data frames
sr13 <- sqlQu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mkm.R
\docType{class}
\name{mkm-class}
\alias{mkm-class}
\alias{show,mkm-method}
\title{A S4 class of multiple Kriging models}
\usage{
\S4method{show}{mkm}(object)
}
\arguments{
\item{object}{A \code{mkm} object.}
}
\description{
A S4 class o... | /man/mkm-class.Rd | no_license | coldfir3/moko | R | false | true | 1,198 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mkm.R
\docType{class}
\name{mkm-class}
\alias{mkm-class}
\alias{show,mkm-method}
\title{A S4 class of multiple Kriging models}
\usage{
\S4method{show}{mkm}(object)
}
\arguments{
\item{object}{A \code{mkm} object.}
}
\description{
A S4 class o... |
setMethodS3("getSnpPositions", "AromaCellSequenceFile", function(this, cells, ..., force=FALSE, verbose=FALSE) {
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Validate arguments
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Argument 'cells':
if (!is... | /aroma.core/R/AromaCellSequenceFile.SNPs.R | no_license | ingted/R-Examples | R | false | false | 12,813 | r | setMethodS3("getSnpPositions", "AromaCellSequenceFile", function(this, cells, ..., force=FALSE, verbose=FALSE) {
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Validate arguments
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Argument 'cells':
if (!is... |
library(readstata13)
## 1950 - 2005 panel data from Burke&Emrick ##
thepanel <- read.dta("us_panel.dta")
thepanel$logcornyield <- log(thepanel$cornyield)
thepanel$lower = thepanel$dday0C
thepanel$higher = thepanel$dday29C
# specify the study region
usepanel <- thepanel[which( thepanel$longitude>-100
... | /wayfair_data/makedata/DataGeneration.r | permissive | MarkWang90/Tool-box | R | false | false | 3,583 | r |
library(readstata13)
## 1950 - 2005 panel data from Burke&Emrick ##
thepanel <- read.dta("us_panel.dta")
thepanel$logcornyield <- log(thepanel$cornyield)
thepanel$lower = thepanel$dday0C
thepanel$higher = thepanel$dday29C
# specify the study region
usepanel <- thepanel[which( thepanel$longitude>-100
... |
rver <- as.numeric(paste(version$major, gsub('\\.','', version$minor), sep = '.'))
if(rver>=3.6){
RNGkind(sample.kind = "Rounding") #Utiliza redondeo (compatibilidad entre versiones de R)
}
estfuente <- paste0(
'https://raw.githubusercontent.com/biogeografia-201902/',
'miembros-y-colaboradores/master/suscripcione... | /src/meridiano_aleatorio.R | no_license | biogeografia-201902/unidad-2-asignacion-1-contexto-fisico-plantilla-geo-maritzafg | R | false | false | 647 | r | rver <- as.numeric(paste(version$major, gsub('\\.','', version$minor), sep = '.'))
if(rver>=3.6){
RNGkind(sample.kind = "Rounding") #Utiliza redondeo (compatibilidad entre versiones de R)
}
estfuente <- paste0(
'https://raw.githubusercontent.com/biogeografia-201902/',
'miembros-y-colaboradores/master/suscripcione... |
getwd()
setwd(here::here("/analysis/VOCC"))
library("gfranges")
library("dplyr")
library("ggplot2")
# species <- "Redbanded Rockfish"
# species <- "Pacific Ocean Perch"
# species <- "Pacific Cod"
species <- "Arrowtooth Flounder"
# species <- "Petrale Sole"
spp <- gsub(" ", "-", gsub("\\/", "-", tolower(species)))
c... | /analysis/VOCC/old-code/4-vocc-biotic.R | no_license | pbs-assess/gfranges | R | false | false | 13,574 | r | getwd()
setwd(here::here("/analysis/VOCC"))
library("gfranges")
library("dplyr")
library("ggplot2")
# species <- "Redbanded Rockfish"
# species <- "Pacific Ocean Perch"
# species <- "Pacific Cod"
species <- "Arrowtooth Flounder"
# species <- "Petrale Sole"
spp <- gsub(" ", "-", gsub("\\/", "-", tolower(species)))
c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-index-mcmc.R
\name{plot_index_mcmc}
\alias{plot_index_mcmc}
\title{Plot MCMC index fits or residuals for iSCAM models}
\usage{
plot_index_mcmc(
models,
type = c("fits", "resids"),
surv_index,
gear = NULL,
start_year = 1996,
e... | /man/plot_index_mcmc.Rd | no_license | pbs-assess/gfiscamutils | R | false | true | 3,206 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-index-mcmc.R
\name{plot_index_mcmc}
\alias{plot_index_mcmc}
\title{Plot MCMC index fits or residuals for iSCAM models}
\usage{
plot_index_mcmc(
models,
type = c("fits", "resids"),
surv_index,
gear = NULL,
start_year = 1996,
e... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genericrules.R
\name{contains_exactly}
\alias{contains_exactly}
\alias{contains_at_least}
\alias{contains_at_most}
\alias{does_not_contain}
\title{Check records using a predifined table of (im)possible values}
\usage{
contains_exactly(keys, b... | /man/contains_exactly.Rd | no_license | cran/validate | R | false | true | 4,707 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/genericrules.R
\name{contains_exactly}
\alias{contains_exactly}
\alias{contains_at_least}
\alias{contains_at_most}
\alias{does_not_contain}
\title{Check records using a predifined table of (im)possible values}
\usage{
contains_exactly(keys, b... |
url <- 'https://raw.githubusercontent.com/plotly/datasets/master/2011_february_aa_flight_paths.csv'
flights <- read.csv(url)
flights$id <- seq_len(nrow(flights))
flights$stroke <- sample(1:3, size = nrow(flights), replace = T)
library(mapdeck)
mapdeck(token = MAPBOX_API_KEY, style = mapdeck_style("dark"), pitch = 45)... | /Code/elevation_tests.R | no_license | kstierhoff/sdBayTransits | R | false | false | 4,165 | r | url <- 'https://raw.githubusercontent.com/plotly/datasets/master/2011_february_aa_flight_paths.csv'
flights <- read.csv(url)
flights$id <- seq_len(nrow(flights))
flights$stroke <- sample(1:3, size = nrow(flights), replace = T)
library(mapdeck)
mapdeck(token = MAPBOX_API_KEY, style = mapdeck_style("dark"), pitch = 45)... |
## From the program assignment:
## "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 functions makeCacheMatrix and cacheSolve enable caching the inverse
## of a matrix.
## Create a special m... | /cachematrix.R | no_license | sorbek/ProgrammingAssignment2 | R | false | false | 1,335 | r | ## From the program assignment:
## "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 functions makeCacheMatrix and cacheSolve enable caching the inverse
## of a matrix.
## Create a special m... |
# loading libraries
library(spatstat)
library(here)
library(sp)
library(rgeos)
library(maptools)
library(GISTools)
library(tmap)
library(sf)
library(geojson)
library(geojsonio)
library(tmaptools)
library(dplyr)
library(stringr)
library(readr)
library(rgdal)
library(tmap)
library(janitor)
library(ggplot2)
library(raste... | /Raster_Analysis.R | no_license | pietrostefani/Beirut_explosion | R | false | false | 4,023 | r | # loading libraries
library(spatstat)
library(here)
library(sp)
library(rgeos)
library(maptools)
library(GISTools)
library(tmap)
library(sf)
library(geojson)
library(geojsonio)
library(tmaptools)
library(dplyr)
library(stringr)
library(readr)
library(rgdal)
library(tmap)
library(janitor)
library(ggplot2)
library(raste... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jfids.R
\name{jfimagestem_forfile}
\alias{jfimagestem_forfile}
\title{Return the janelia image name for a path (excluding any file extension)}
\usage{
jfimagestem_forfile(file, checkExists = FALSE)
}
\arguments{
\item{file}{Path to file(s) to... | /man/jfimagestem_forfile.Rd | no_license | jefferis/flylight | R | false | true | 797 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/jfids.R
\name{jfimagestem_forfile}
\alias{jfimagestem_forfile}
\title{Return the janelia image name for a path (excluding any file extension)}
\usage{
jfimagestem_forfile(file, checkExists = FALSE)
}
\arguments{
\item{file}{Path to file(s) to... |
#' Afghanistan Survey Data
#'
#' Survey data containing questions on support for various combatants during wartime.
#'
#' @format A data frame with 2754 rows and 11 variables:
#' \describe{
#' \item{ province }{ character: province where the respondent lives }
#' \item{ district }{ character: district where the respo... | /R/afghan.R | no_license | Musaab-Farooqui/qss-package | R | false | false | 1,900 | r | #' Afghanistan Survey Data
#'
#' Survey data containing questions on support for various combatants during wartime.
#'
#' @format A data frame with 2754 rows and 11 variables:
#' \describe{
#' \item{ province }{ character: province where the respondent lives }
#' \item{ district }{ character: district where the respo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LDSC_Pipeline_Functions.R
\name{get_LDSC_fixed_args}
\alias{get_LDSC_fixed_args}
\title{Get fixed LDSC arguments.}
\usage{
get_LDSC_fixed_args(Baseline_model = NULL)
}
\arguments{
\item{Baseline_model}{Choose baseline model to run heritabilit... | /man/get_LDSC_fixed_args.Rd | permissive | kevinluolk/LDSCforRyten | R | false | true | 599 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LDSC_Pipeline_Functions.R
\name{get_LDSC_fixed_args}
\alias{get_LDSC_fixed_args}
\title{Get fixed LDSC arguments.}
\usage{
get_LDSC_fixed_args(Baseline_model = NULL)
}
\arguments{
\item{Baseline_model}{Choose baseline model to run heritabilit... |
eval_bsp <- function(y, order = 3, supp = range(y)) {
# Evaluate a Bernstein Polynom (bsp) with a predefined order on a predefined
# support that is used for scaling since a Beta distribution is defined on (0,1).
# MLT Vignette p. 9
#
# y: numeric vector of length n
# order: postive integer which is cal... | /R/helperfuns_trafomodels.R | permissive | bio-datascience/deepregression | R | false | false | 10,796 | r | eval_bsp <- function(y, order = 3, supp = range(y)) {
# Evaluate a Bernstein Polynom (bsp) with a predefined order on a predefined
# support that is used for scaling since a Beta distribution is defined on (0,1).
# MLT Vignette p. 9
#
# y: numeric vector of length n
# order: postive integer which is cal... |
#############################################################
## R code to accompany the textbook
## Statistics: The Art & Science of Learning from Data
## by A. Agresti, C. Franklin and B. Klingenberg
## 5th Edition, Pearson 2021
## Web: ArtofStat.com
## Copyright: Bernhard Klingenberg
################################... | /Chapter_9/Chp_9_Example_4.R | no_license | artofstat/RCode | R | false | false | 1,010 | r | #############################################################
## R code to accompany the textbook
## Statistics: The Art & Science of Learning from Data
## by A. Agresti, C. Franklin and B. Klingenberg
## 5th Edition, Pearson 2021
## Web: ArtofStat.com
## Copyright: Bernhard Klingenberg
################################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/payload_PARAMETERS_PARENT.R
\name{par_display_capabilities}
\alias{par_display_capabilities}
\title{Parse PARAMETERS packet for display capabilities}
\usage{
par_display_capabilities(value, key)
}
\arguments{
\item{value}{portion of payload t... | /man/par_display_capabilities.Rd | permissive | muschellij2/AGread | R | false | true | 469 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/payload_PARAMETERS_PARENT.R
\name{par_display_capabilities}
\alias{par_display_capabilities}
\title{Parse PARAMETERS packet for display capabilities}
\usage{
par_display_capabilities(value, key)
}
\arguments{
\item{value}{portion of payload t... |
### Importing Data
GDP_data <- read.csv("C:\\Users\\tsankar\\Documents\\Datascience\\Assignments\\getdata-data-GDP.csv", skip = 5, nrows = 190, stringsAsFactors = F,header = F)
EDU_data <- read.csv("C:\\Users\\tsankar\\Documents\\Datascience\\Assignments\\getdata-data-EDSTATS_Country.csv", stringsAsFactors = F)
| /Data Import.R | no_license | thangamsankar/SalesData | R | false | false | 316 | r | ### Importing Data
GDP_data <- read.csv("C:\\Users\\tsankar\\Documents\\Datascience\\Assignments\\getdata-data-GDP.csv", skip = 5, nrows = 190, stringsAsFactors = F,header = F)
EDU_data <- read.csv("C:\\Users\\tsankar\\Documents\\Datascience\\Assignments\\getdata-data-EDSTATS_Country.csv", stringsAsFactors = F)
|
#Remove Nas in a list
na.omit.list <- function(y) { return(y[!sapply(y, function(x) all(is.na(x)))]) }
# Initialization of lists
lists_init <- function(data, names) {
small_list <- list()
big_list <- list()
for(i in 1:length(names)){
vector <- as.character(names[,i])
vector <- vector[!is.na(vector)]
... | /internal/internal_functions.R | no_license | hedibmustapha/Case-Management-Adjustable-by-Date | R | false | false | 2,441 | r | #Remove Nas in a list
na.omit.list <- function(y) { return(y[!sapply(y, function(x) all(is.na(x)))]) }
# Initialization of lists
lists_init <- function(data, names) {
small_list <- list()
big_list <- list()
for(i in 1:length(names)){
vector <- as.character(names[,i])
vector <- vector[!is.na(vector)]
... |
library(sqldf)
library(lubridate)
dir="C:/Users/dwilliams/Dropbox/Coursework/Coursera/DataScienceSpec/Exploratory Data Analysis"
setwd(dir)
file = "./data/household_power_consumption.txt"
if(!exists("data")) {
firstRows <- read.table(file, header = TRUE, sep=";", comment.char="", nrows=5)
classes <- sapply(fir... | /plot2.R | no_license | dawilliams2003/ExData_Plotting1 | R | false | false | 1,003 | r | library(sqldf)
library(lubridate)
dir="C:/Users/dwilliams/Dropbox/Coursework/Coursera/DataScienceSpec/Exploratory Data Analysis"
setwd(dir)
file = "./data/household_power_consumption.txt"
if(!exists("data")) {
firstRows <- read.table(file, header = TRUE, sep=";", comment.char="", nrows=5)
classes <- sapply(fir... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_tbl_data.R
\name{extract_tbl_data}
\alias{extract_tbl_data}
\title{Extract table data from web page}
\usage{
extract_tbl_data(src_url, tbl_id)
}
\arguments{
\item{src_url}{The http(s)link to the source web page}
\item{tbl_id}{A uniqu... | /man/extract_tbl_data.Rd | permissive | Green-EyE/glamr | R | false | true | 426 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extract_tbl_data.R
\name{extract_tbl_data}
\alias{extract_tbl_data}
\title{Extract table data from web page}
\usage{
extract_tbl_data(src_url, tbl_id)
}
\arguments{
\item{src_url}{The http(s)link to the source web page}
\item{tbl_id}{A uniqu... |
#' @title Plot Gene Expression Data
#' @description Visualize gene expression data for exploratory data analysis
#'
#' @details
#' The \code{genePlot} is designed to make visualization of gene expression data simple and easy for R novices and bioinformaticians alike.
#' The function is an S3 generic that accept various... | /R/genePlot.R | no_license | crisjs/bvt | R | false | false | 27,332 | r | #' @title Plot Gene Expression Data
#' @description Visualize gene expression data for exploratory data analysis
#'
#' @details
#' The \code{genePlot} is designed to make visualization of gene expression data simple and easy for R novices and bioinformaticians alike.
#' The function is an S3 generic that accept various... |
## This code generates a line graph of the "Global Active Power" used by a single household
## sampled in one-minute intervals between February 1, 2007 and February 2, 2007. The original
## dataset is downloaded from the UCI Machine Learning Repository.
library(data.table)
## Download data from UCI Machine Learning... | /plot2.R | no_license | jedes01/ExData_Plotting1 | R | false | false | 1,263 | r | ## This code generates a line graph of the "Global Active Power" used by a single household
## sampled in one-minute intervals between February 1, 2007 and February 2, 2007. The original
## dataset is downloaded from the UCI Machine Learning Repository.
library(data.table)
## Download data from UCI Machine Learning... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connections.R
\name{yotov_db}
\alias{yotov_db}
\title{The local Yotov database}
\usage{
yotov_db(dbdir = yotov_path())
}
\arguments{
\item{dbdir}{The location of the database on disk. Defaults to
\code{yotovdb} under \code{\link[rappdirs:user... | /man/yotov_db.Rd | permissive | aadilnakhoda/yotover | R | false | true | 936 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connections.R
\name{yotov_db}
\alias{yotov_db}
\title{The local Yotov database}
\usage{
yotov_db(dbdir = yotov_path())
}
\arguments{
\item{dbdir}{The location of the database on disk. Defaults to
\code{yotovdb} under \code{\link[rappdirs:user... |
## Script to try the maximal coupling of Dirichlet distributions
## this is work in progress
rm(list = ls())
set.seed(2)
library(couplingdeduplication)
size_ <- 3
alpha1 <- rexp(size_)
alpha2 <- rexp(size_)
alphatilde1 <- alpha1 / sum(alpha1)
alphatilde2 <- alpha2 / sum(alpha2)
nrep <- 1e4
samples1 <- matrix(NA, nr... | /couplingdeduplication/inst/test_coupleddirichlet.R | no_license | EmiliaPompe/discussion_unified_framework | R | false | false | 786 | r | ## Script to try the maximal coupling of Dirichlet distributions
## this is work in progress
rm(list = ls())
set.seed(2)
library(couplingdeduplication)
size_ <- 3
alpha1 <- rexp(size_)
alpha2 <- rexp(size_)
alphatilde1 <- alpha1 / sum(alpha1)
alphatilde2 <- alpha2 / sum(alpha2)
nrep <- 1e4
samples1 <- matrix(NA, nr... |
#################################################
# #
# Statistical Univariate forecasting methods #
# #
#################################################
# // Statistical Benchmark methods: local time series forecasting //
... | /modules/statistical_univariate_frc_methods.R | no_license | papaemman/m5_forecasting_competition | R | false | false | 7,165 | r | #################################################
# #
# Statistical Univariate forecasting methods #
# #
#################################################
# // Statistical Benchmark methods: local time series forecasting //
... |
rm( list=ls() )
#
get.and.clean.household.power.consumption <- function() {
hpc <- read.csv2( "data/household_power_consumption.txt" , dec=".", na.strings=c("","?","NA") , stringsAsFactors=FALSE )
# cast '$Date' to R-Date...
hpc$Date <- as.Date( hpc$Date , "%e/%m/%Y" )
# subset the data for specific range.... | /plot4.R | no_license | AlexOcculate/ExData_Plotting1 | R | false | false | 1,631 | r | rm( list=ls() )
#
get.and.clean.household.power.consumption <- function() {
hpc <- read.csv2( "data/household_power_consumption.txt" , dec=".", na.strings=c("","?","NA") , stringsAsFactors=FALSE )
# cast '$Date' to R-Date...
hpc$Date <- as.Date( hpc$Date , "%e/%m/%Y" )
# subset the data for specific range.... |
vcov.bigRreg <- function(x) {
pp1 <- length(x$xbar)+1
K <- diag(pp1)
K[1,(2:pp1)] <- -(x$xbar)
K %*% vcov.bigRfit_xc1(x) %*% t(K)
}
| /R/vcov.bigRreg.R | no_license | kloke/bigRfit | R | false | false | 144 | r | vcov.bigRreg <- function(x) {
pp1 <- length(x$xbar)+1
K <- diag(pp1)
K[1,(2:pp1)] <- -(x$xbar)
K %*% vcov.bigRfit_xc1(x) %*% t(K)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metutils.R
\name{par2ppfd}
\alias{par2ppfd}
\title{par2ppfd}
\usage{
par2ppfd(watts)
}
\arguments{
\item{watts}{PAR (W / m2)}
}
\value{
PPFD (umol / m2 / s)
}
\description{
convert PAR to PPFD
}
\details{
Converts photosynthetically active ra... | /modules/data.atmosphere/man/par2ppfd.Rd | permissive | ashiklom/pecan | R | false | true | 617 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metutils.R
\name{par2ppfd}
\alias{par2ppfd}
\title{par2ppfd}
\usage{
par2ppfd(watts)
}
\arguments{
\item{watts}{PAR (W / m2)}
}
\value{
PPFD (umol / m2 / s)
}
\description{
convert PAR to PPFD
}
\details{
Converts photosynthetically active ra... |
source("adaptconcept2_sFFLHD_R6.R")
nruns <- 10
D <- 2
func <- banana
actual_des_func <- actual_des_func_grad_norm2_mean_banana #get_num_actual_des_func_grad_norm2_mean(Banana15)
n0 <- 3*D # 3 initial points
n_final <- 20*D # Final number of points, maybe 10D, more for lower D?
n_batches_to_run <- 1+ceiling((n_final-n0... | /meeting_20171120/speedup_tests.R | no_license | CollinErickson/DOE-code | R | false | false | 1,475 | r | source("adaptconcept2_sFFLHD_R6.R")
nruns <- 10
D <- 2
func <- banana
actual_des_func <- actual_des_func_grad_norm2_mean_banana #get_num_actual_des_func_grad_norm2_mean(Banana15)
n0 <- 3*D # 3 initial points
n_final <- 20*D # Final number of points, maybe 10D, more for lower D?
n_batches_to_run <- 1+ceiling((n_final-n0... |
data <- btc_multivariate
Y <- data[,9] #the label is the closing price (column 9)
X <- data[-9] #feature space without the label
X <- X[-1] #drop the date column
# X[i] will predict Y[i+1]
X <- X[-nrow(X),] #drop the last row of the regressors
Y = Y[-1,] # drop first row of labels
# train and test data (31 d... | /ARIMA.r | no_license | garciatorres/predictive_analytics | R | false | false | 3,617 | r | data <- btc_multivariate
Y <- data[,9] #the label is the closing price (column 9)
X <- data[-9] #feature space without the label
X <- X[-1] #drop the date column
# X[i] will predict Y[i+1]
X <- X[-nrow(X),] #drop the last row of the regressors
Y = Y[-1,] # drop first row of labels
# train and test data (31 d... |
string_to_num_with_commas <- function( string ) {
tryCatch( as.numeric( gsub( ",", "." , string ) ) , error=function(e) string )
}
get_common_dir <- function(paths, delim = "/") {
path_chunks <- strsplit(paths, delim)
i <- 1
repeat({
current_chunk <- sapply(path_chunks, function(x) x[i])
if(any(curr... | /scripts/obmigra.R | no_license | guilhermejacob/guilhermejacob.github.io | R | false | false | 12,752 | r | string_to_num_with_commas <- function( string ) {
tryCatch( as.numeric( gsub( ",", "." , string ) ) , error=function(e) string )
}
get_common_dir <- function(paths, delim = "/") {
path_chunks <- strsplit(paths, delim)
i <- 1
repeat({
current_chunk <- sapply(path_chunks, function(x) x[i])
if(any(curr... |
###############################################################################
# Functions to use the Rdonlp2 library to perform local maxima/minima search
# to refine the optimal criteria identified by brute force search.
#
# These methods take output from the functions in optimizer.R and then
# perform sequential qu... | /sandbox/localsearch.R | no_license | arturochian/PortfolioAnalytics-1 | R | false | false | 38,011 | r | ###############################################################################
# Functions to use the Rdonlp2 library to perform local maxima/minima search
# to refine the optimal criteria identified by brute force search.
#
# These methods take output from the functions in optimizer.R and then
# perform sequential qu... |
#################################################
# Factor Analysis #
#################################################
library("shiny")
#library("foreign")
shinyUI(fluidPage(
tags$head(includeScript("google_analytics.js")),
# Header:
#titlePanel("Factor analysis"),
... | /factor-analysis-shinyapp/ui.R | no_license | yogesh1612/ML | R | false | false | 5,016 | r | #################################################
# Factor Analysis #
#################################################
library("shiny")
#library("foreign")
shinyUI(fluidPage(
tags$head(includeScript("google_analytics.js")),
# Header:
#titlePanel("Factor analysis"),
... |
# draw_from_si_prob
# This function returns result for requested days. It simply calls for
# serial_interval[days_ago] but checking first the 'days_ago' are in the
# interval. Otherwise, it returns 0.
# Things to test:
## In tests
# - that the function return the proper result
# - that the result is of the proper c... | /tests/testthat/test_draw_from_si_prob.R | permissive | tuxette/EpiSoon | R | false | false | 686 | r | # draw_from_si_prob
# This function returns result for requested days. It simply calls for
# serial_interval[days_ago] but checking first the 'days_ago' are in the
# interval. Otherwise, it returns 0.
# Things to test:
## In tests
# - that the function return the proper result
# - that the result is of the proper c... |
#' Returns plot of Zip's law regression
#'
#' @param data data set
#' @param var variable name string
#' @param name lable observation
#' @param namevar name string to equation
#' @param sepa higher numbers reduce the frequency at which observation names apper
#' @param color text color
#' @param width figure w... | /R/zipfslaw.r | no_license | marangoisa/RegressionVisuals | R | false | false | 2,605 | r | #' Returns plot of Zip's law regression
#'
#' @param data data set
#' @param var variable name string
#' @param name lable observation
#' @param namevar name string to equation
#' @param sepa higher numbers reduce the frequency at which observation names apper
#' @param color text color
#' @param width figure w... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/english.R
\name{translate_old_english}
\alias{translate_old_english}
\title{Old English translator}
\usage{
translate_old_english(text)
}
\arguments{
\item{text}{Text to be converted.}
}
\description{
Convert from modern English to old Englis... | /man/translate_old_english.Rd | permissive | rsquaredacademy/funtranslater | R | false | true | 399 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/english.R
\name{translate_old_english}
\alias{translate_old_english}
\title{Old English translator}
\usage{
translate_old_english(text)
}
\arguments{
\item{text}{Text to be converted.}
}
\description{
Convert from modern English to old Englis... |
## This script contains the code for obtaining, merging, and cleaning two datasets, X_test.txt and X_train.txt.
## The original source of these datasets is:
## "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
## The zipped files were extracted and saved locally prior to loadin... | /run_analysis.R | no_license | lctseghers/Course-3-HW | R | false | false | 4,785 | r | ## This script contains the code for obtaining, merging, and cleaning two datasets, X_test.txt and X_train.txt.
## The original source of these datasets is:
## "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
## The zipped files were extracted and saved locally prior to loadin... |
setwd("d:/UTSA/Fall2020/DataMining/Project/stat-learning") # set working directory
df = read.csv('FinalDF.csv') # read in raw csv data
df$Age14_19 = as.factor(df$Age14_19)
df$Age20_24 = as.factor(df$Age20_24)
df$Age25_29 = as.factor(df$Age25_29)
df$Age30_34 = as.factor(df$Age30_34)
df$Age35_39 = as.factor(df$Age35_3... | /ModelAnalysis.R | no_license | Rmcortez12/stat-learning | R | false | false | 4,801 | r |
setwd("d:/UTSA/Fall2020/DataMining/Project/stat-learning") # set working directory
df = read.csv('FinalDF.csv') # read in raw csv data
df$Age14_19 = as.factor(df$Age14_19)
df$Age20_24 = as.factor(df$Age20_24)
df$Age25_29 = as.factor(df$Age25_29)
df$Age30_34 = as.factor(df$Age30_34)
df$Age35_39 = as.factor(df$Age35_3... |
##Example 7.2.1 Pg.222
##Test for mean when population variances are known (two sided)
mu = 30 ; xbar = 27 ; var = 20 ; n=10
z = (xbar-mu)/sqrt(var/n)
z
z_critical = qnorm(0.05/2,0,1)
z_critical
pvalue = 2*pnorm(z,0,1)
pvalue
##Z > z_critical or pvalue<0.05 , hence significant
| /Biostatistics:_Basic_Concepts_And_Methodology_For_The_Health_Sciences_by_Daniel_W._Wayne,_Chad_L._Cross/CH7/EX7.2.1/Ex7_2_1.R | permissive | FOSSEE/R_TBC_Uploads | R | false | false | 294 | r | ##Example 7.2.1 Pg.222
##Test for mean when population variances are known (two sided)
mu = 30 ; xbar = 27 ; var = 20 ; n=10
z = (xbar-mu)/sqrt(var/n)
z
z_critical = qnorm(0.05/2,0,1)
z_critical
pvalue = 2*pnorm(z,0,1)
pvalue
##Z > z_critical or pvalue<0.05 , hence significant
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-datatypes.R
\name{sf_format_datetime}
\alias{sf_format_datetime}
\title{Format Datetimes for Create and Update operations}
\usage{
sf_format_datetime(x)
}
\arguments{
\item{x}{an object, potentially, representing a datetime that should ... | /man/sf_format_datetime.Rd | permissive | StevenMMortimer/salesforcer | R | false | true | 825 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils-datatypes.R
\name{sf_format_datetime}
\alias{sf_format_datetime}
\title{Format Datetimes for Create and Update operations}
\usage{
sf_format_datetime(x)
}
\arguments{
\item{x}{an object, potentially, representing a datetime that should ... |
#!/home/genesky/software/r/4.0.3/bin/Rscript
library(docopt)
"Usage: corr_heatmap.r --table_file <file> --sample_group <file> --case <string> --control <string> --output_dir <pdf file> [--stop_cluster_rows --stop_cluster_columns --method <string> --width <int> --height <int> --heatmap_proportion <float> --rlib <dir... | /multiomics/corr_heatmap/corr_heatmap.r | no_license | ccoo22/personal_tools | R | false | false | 13,148 | r | #!/home/genesky/software/r/4.0.3/bin/Rscript
library(docopt)
"Usage: corr_heatmap.r --table_file <file> --sample_group <file> --case <string> --control <string> --output_dir <pdf file> [--stop_cluster_rows --stop_cluster_columns --method <string> --width <int> --height <int> --heatmap_proportion <float> --rlib <dir... |
# Steigerwald
# install packages
install.packages("RCurl")
library("RCurl")
# import data direclty from github
df<-read.csv("https://raw.githubusercontent.com/wegmann/R_data/master/Steigerwald_sample_points_all_data_subset_withNames.csv")
write.table(df,file = "Steigerwald_tab.xls") # just a half-baked try, doesn't... | /Steigerwald_points.R | no_license | ronjalappe/R_programming_class | R | false | false | 1,598 | r | # Steigerwald
# install packages
install.packages("RCurl")
library("RCurl")
# import data direclty from github
df<-read.csv("https://raw.githubusercontent.com/wegmann/R_data/master/Steigerwald_sample_points_all_data_subset_withNames.csv")
write.table(df,file = "Steigerwald_tab.xls") # just a half-baked try, doesn't... |
# some more test-code
testExportCode <- function(){
pw <- ""
#sqlServerServer <- "myserver"
#sqlServerresultsDatabaseSchema <- "scratch"
#schema <- "cdm4_sim"
sqlServerServer <- "myserver"
sqlServerresultsDatabaseSchema <- "cdm_truven_ccae_6k.dbo"
schema <- "cdm_truven_ccae_6k.dbo"
cd... | /Achilles/R/TestExportCode.R | permissive | amazon-archives/aws-ohdsi-automated-deployment | R | false | false | 2,922 | r | # some more test-code
testExportCode <- function(){
pw <- ""
#sqlServerServer <- "myserver"
#sqlServerresultsDatabaseSchema <- "scratch"
#schema <- "cdm4_sim"
sqlServerServer <- "myserver"
sqlServerresultsDatabaseSchema <- "cdm_truven_ccae_6k.dbo"
schema <- "cdm_truven_ccae_6k.dbo"
cd... |
#' Append columns of enzyme class and active site information to the pairwise_LFQ output
#' @seealso \code{\link{pairwise_LFQ}}
#' @param LFQ_table a dataframe saved as the pairwise_LFQ() output
#' @param quantitation_level a string, must be either "peptide" or "protein", must be match the pairwise_LFQ argument
#'... | /R/appendinfo.R | permissive | devradiumking/maxabpp | R | false | false | 6,077 | r | #' Append columns of enzyme class and active site information to the pairwise_LFQ output
#' @seealso \code{\link{pairwise_LFQ}}
#' @param LFQ_table a dataframe saved as the pairwise_LFQ() output
#' @param quantitation_level a string, must be either "peptide" or "protein", must be match the pairwise_LFQ argument
#'... |
Beta <- function(link="logit"){
linktemp <- substitute(link)
if (!is.character(linktemp)) {
linktemp <- deparse(linktemp)
if (linktemp == "link") {
warning("use of beta(link=link) is deprecated\n",
domain = NA)
linktemp <- eval(link)
if (!is.character(linkte... | /R/Beta.R | no_license | cran/spaMM | R | false | false | 1,499 | r | Beta <- function(link="logit"){
linktemp <- substitute(link)
if (!is.character(linktemp)) {
linktemp <- deparse(linktemp)
if (linktemp == "link") {
warning("use of beta(link=link) is deprecated\n",
domain = NA)
linktemp <- eval(link)
if (!is.character(linkte... |
library(tidyverse)
# Check for duplication issues between archive, newly coded results and puddle before loading newly coded results to Archive
# Read in newly coded data (non Archive data)
newCoded <- read.csv("data/20190927WQCodedResultsTestV3.csv", stringsAsFactors = FALSE)
# Read in Archive Data
archiveData <- re... | /R/WQCoderDuplicateChecks.R | permissive | hawkes-bay-rc/HBRCWQCoder | R | false | false | 2,207 | r | library(tidyverse)
# Check for duplication issues between archive, newly coded results and puddle before loading newly coded results to Archive
# Read in newly coded data (non Archive data)
newCoded <- read.csv("data/20190927WQCodedResultsTestV3.csv", stringsAsFactors = FALSE)
# Read in Archive Data
archiveData <- re... |
best <- function(state, outcome) {
## Read outcome data
data <- read.csv("outcome-of-care-measures.csv", colClasses = "character", na.strings="Not Available")
## Check that state and outcome are valid
if(!(state %in% data[,'State'])) {
stop("invalid state")
}
if (!(outcome %in% c("heart attack", "hea... | /r-programming/assignment3/rprog-data-ProgAssignment3-data/Untitled.R | no_license | athensholloway/datasciencecoursera | R | false | false | 980 | r | best <- function(state, outcome) {
## Read outcome data
data <- read.csv("outcome-of-care-measures.csv", colClasses = "character", na.strings="Not Available")
## Check that state and outcome are valid
if(!(state %in% data[,'State'])) {
stop("invalid state")
}
if (!(outcome %in% c("heart attack", "hea... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.