content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
library(magrittr)
library(tidyverse)
url <- "http://lib.stat.cmu.edu/datasets/wseries"
series <- scan( url,skip = 35,nlines = 23,what = list(year = integer(0),
pattern = character(0)))
#Permutation ordering the columns
perm <- order(series$year)
series <- list(ye... | /Data Munging Training.R | no_license | elikplim25/R---Codes | R | false | false | 1,130 | r | library(magrittr)
library(tidyverse)
url <- "http://lib.stat.cmu.edu/datasets/wseries"
series <- scan( url,skip = 35,nlines = 23,what = list(year = integer(0),
pattern = character(0)))
#Permutation ordering the columns
perm <- order(series$year)
series <- list(ye... |
\name{NISTcaratSItOkg}
\alias{NISTcaratSItOkg}
\title{Convert carat, metric to kilogram }
\usage{NISTcaratSItOkg(caratSI)}
\description{\code{NISTcaratSItOkg} converts from carat, metric to kilogram (kg) }
\arguments{
\item{caratSI}{carat, metric }
}
\value{kilogram (kg) }
\source{
National Institute of Standards and... | /man/NISTcaratSItOkg.Rd | no_license | cran/NISTunits | R | false | false | 737 | rd | \name{NISTcaratSItOkg}
\alias{NISTcaratSItOkg}
\title{Convert carat, metric to kilogram }
\usage{NISTcaratSItOkg(caratSI)}
\description{\code{NISTcaratSItOkg} converts from carat, metric to kilogram (kg) }
\arguments{
\item{caratSI}{carat, metric }
}
\value{kilogram (kg) }
\source{
National Institute of Standards and... |
# calls WSM, for testing WSM interactively outside of server
# set working directory only if it exists
has_wd <- tryCatch({
workdir <- "~/Beatrice2/R_ELF/R_NEST/MCDA_App_Shiny/MCDA_06262019/src/dams_mcda"
setwd(workdir)
message("set Working Directory: ", workdir)
}, error=function(e){
message("Working Directory do... | /src/dams_mcda/WSM_graphs_test.R | no_license | dams-mcda/Dams-MCDA | R | false | false | 30,324 | r | # calls WSM, for testing WSM interactively outside of server
# set working directory only if it exists
has_wd <- tryCatch({
workdir <- "~/Beatrice2/R_ELF/R_NEST/MCDA_App_Shiny/MCDA_06262019/src/dams_mcda"
setwd(workdir)
message("set Working Directory: ", workdir)
}, error=function(e){
message("Working Directory do... |
## 12 Sept 2017 - Cat
# Duration of Vegetativ Risk: Experiment data
# Aim: To see if chlorophyll measures are different with experimental groups
# Clear workspace
rm(list=ls()) # remove everything currently held in the R memory
options(stringsAsFactors=FALSE)
graphics.off()
# Load libraries
library(dplyr)
library(tid... | /analyses/scripts/Chlorophyll.R | no_license | cchambe12/freezingexperiment | R | false | false | 2,992 | r | ## 12 Sept 2017 - Cat
# Duration of Vegetativ Risk: Experiment data
# Aim: To see if chlorophyll measures are different with experimental groups
# Clear workspace
rm(list=ls()) # remove everything currently held in the R memory
options(stringsAsFactors=FALSE)
graphics.off()
# Load libraries
library(dplyr)
library(tid... |
#rstudioapi::openProject("/home/rstudio/equity_analysis/")
folder_number <- readline(prompt=paste("What is the name of this folder?", sep=" "))
trials_path <- file.path(folder_number, "trials/")
parameters_path <- file.path(folder_number, "parameters.R")
file.copy(parameters_path, "scripts/", overwrite=T)
dir.create("t... | /backtests/04/deploy.R | no_license | riazarbi/equity_analysis_trials | R | false | false | 504 | r | #rstudioapi::openProject("/home/rstudio/equity_analysis/")
folder_number <- readline(prompt=paste("What is the name of this folder?", sep=" "))
trials_path <- file.path(folder_number, "trials/")
parameters_path <- file.path(folder_number, "parameters.R")
file.copy(parameters_path, "scripts/", overwrite=T)
dir.create("t... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/pls.R
\name{selectCompNum.pls}
\alias{selectCompNum.pls}
\title{Select optimal number of components for PLS model}
\usage{
\method{selectCompNum}{pls}(model, ncomp = NULL)
}
\arguments{
\item{model}{PLS model (object of class \code{pl... | /man/selectCompNum.pls.Rd | no_license | zeehio/mdatools | R | false | false | 654 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/pls.R
\name{selectCompNum.pls}
\alias{selectCompNum.pls}
\title{Select optimal number of components for PLS model}
\usage{
\method{selectCompNum}{pls}(model, ncomp = NULL)
}
\arguments{
\item{model}{PLS model (object of class \code{pl... |
#' @title List Remote Packages
#'
#' @description
#' List remote packages in `renv.lock` file.
#'
#' @export
remote_packages = function(lock_file = "book/renv.lock") {
packages = jsonlite::read_json(lock_file)[["Packages"]]
packages = mlr3misc::discard(packages, function(x) !is.null(x$Repository) && x$Repository ==... | /R/remote_packages.R | permissive | mlr-org/mlr3book | R | false | false | 349 | r | #' @title List Remote Packages
#'
#' @description
#' List remote packages in `renv.lock` file.
#'
#' @export
remote_packages = function(lock_file = "book/renv.lock") {
packages = jsonlite::read_json(lock_file)[["Packages"]]
packages = mlr3misc::discard(packages, function(x) !is.null(x$Repository) && x$Repository ==... |
#' @title validMCMC
#' @author Oyvind Bleka <Oyvind.Bleka.at.fhi.no>
#' @description Validates aposteriori samples from MCMC method
#' @details This function takes samples from the MCMC as given in a matrix and shows the aposterior functions.
#' @param mcmcfit A object returned by contLikMCMC
#' @param trace Boolean fo... | /euroformix_0.5.0/R/validMCMC.R | no_license | oyvble/euroformixArchive | R | false | false | 1,350 | r | #' @title validMCMC
#' @author Oyvind Bleka <Oyvind.Bleka.at.fhi.no>
#' @description Validates aposteriori samples from MCMC method
#' @details This function takes samples from the MCMC as given in a matrix and shows the aposterior functions.
#' @param mcmcfit A object returned by contLikMCMC
#' @param trace Boolean fo... |
library(moments)
library(Metrics)
errMeasure1 <- function (vPred, vTarget)
{
a = cbind(vPred,vTarget);
ret = apply(a,MARGIN=1,function(x) {v=unlist(strsplit(unlist(x[1]),split=" ")); ix = which(v==trimws(x[2]));r=0; if(length(ix) != 0 && ix<=12) r=1/(ix); return(r)});
#return(list(mean(ret),ret))
return(mean(r... | /R/futil.R | no_license | tudor-m/Kaggle-OutbrainClick | R | false | false | 335 | r | library(moments)
library(Metrics)
errMeasure1 <- function (vPred, vTarget)
{
a = cbind(vPred,vTarget);
ret = apply(a,MARGIN=1,function(x) {v=unlist(strsplit(unlist(x[1]),split=" ")); ix = which(v==trimws(x[2]));r=0; if(length(ix) != 0 && ix<=12) r=1/(ix); return(r)});
#return(list(mean(ret),ret))
return(mean(r... |
\name{beard}
\alias{dbeard}
\alias{pbeard}
\alias{varbeard}
\alias{esbeard}
\title{Beard distribution}
\description{Computes the pdf, cdf, value at risk and expected shortfall for the Beard distribution due to Beard (1959) given by
\deqn{\begin{array}{ll}
&\displaystyle
f(x) = \frac {\displaystyle a \exp (b x)... | /man/beard.Rd | no_license | cran/VaRES | R | false | false | 2,547 | rd | \name{beard}
\alias{dbeard}
\alias{pbeard}
\alias{varbeard}
\alias{esbeard}
\title{Beard distribution}
\description{Computes the pdf, cdf, value at risk and expected shortfall for the Beard distribution due to Beard (1959) given by
\deqn{\begin{array}{ll}
&\displaystyle
f(x) = \frac {\displaystyle a \exp (b x)... |
#'Add percent in column
#'
#' @description
#' col2percent transform columns to percent.
#'
#' @param x a dataframe
#' @param start number of start column
#' @param end number of last column (default=last)
#' @param mult100 multiply by 100 if the number is a decimal fraction(T or F)(default=F)
#'
#' @return Return a dat... | /R/col2percent.R | no_license | jvg0mes/metools | R | false | false | 838 | r | #'Add percent in column
#'
#' @description
#' col2percent transform columns to percent.
#'
#' @param x a dataframe
#' @param start number of start column
#' @param end number of last column (default=last)
#' @param mult100 multiply by 100 if the number is a decimal fraction(T or F)(default=F)
#'
#' @return Return a dat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataset_functions.R
\name{makeGRangesBRG}
\alias{makeGRangesBRG}
\alias{isBRG}
\title{Constructing and checking for base-pair resolution GRanges objects}
\usage{
makeGRangesBRG(dataset.gr, ncores = getOption("mc.cores", 2L))
isBRG(x)
}
\argu... | /man/makeGRangesBRG.Rd | no_license | mdeber/BRGenomics | R | false | true | 4,578 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataset_functions.R
\name{makeGRangesBRG}
\alias{makeGRangesBRG}
\alias{isBRG}
\title{Constructing and checking for base-pair resolution GRanges objects}
\usage{
makeGRangesBRG(dataset.gr, ncores = getOption("mc.cores", 2L))
isBRG(x)
}
\argu... |
#!/usr/bin/Rscript
# Setting Help
'usage: addNCBIamr2Gff.R [--input=<file> --gff=<file> --out=<chr> --database=<chr> --type=<chr>]
options:
-g, --gff=<file> GFF file to add NCBI AMR Annotations into
-i, --input=<file> AMRFinder output
-o, --out=<chr> Output file name [default: out.gff]
-t, --type=<chr> ... | /addNCBIamr2Gff.R | no_license | fmalmeida/rscripts | R | false | false | 3,740 | r | #!/usr/bin/Rscript
# Setting Help
'usage: addNCBIamr2Gff.R [--input=<file> --gff=<file> --out=<chr> --database=<chr> --type=<chr>]
options:
-g, --gff=<file> GFF file to add NCBI AMR Annotations into
-i, --input=<file> AMRFinder output
-o, --out=<chr> Output file name [default: out.gff]
-t, --type=<chr> ... |
# R_code_snow.r
setwd("C:/lab/")
install.packages("ncdf4")
library(ncdf4)
library(raster)
snowmay <- raster("c_gls_SCE500_202005180000_CEURO_MODIS_V1.0.1.nc") # il warning message è normale
cl <- colorRampPalette(c('darkblue','blue','light blue'))(100)
# esercizio: plot snow cover with the cl palette
plot(snowmay, ... | /R_code_snow.r | no_license | Giorgia-M/ecologia_del_paesaggio | R | false | false | 1,126 | r | # R_code_snow.r
setwd("C:/lab/")
install.packages("ncdf4")
library(ncdf4)
library(raster)
snowmay <- raster("c_gls_SCE500_202005180000_CEURO_MODIS_V1.0.1.nc") # il warning message è normale
cl <- colorRampPalette(c('darkblue','blue','light blue'))(100)
# esercizio: plot snow cover with the cl palette
plot(snowmay, ... |
attach(dat)
library(ggplot2)
library(reshape2)
ggplot(Pilot, aes(x=Subj1Score)) + geom_freqpoly()
shapeddat <- melt(Pilot,id.vars='Item', measure.vars=c('Subj1Score','Subj2Score'))
ggplot(shapeddat, aes(x=value, color=variable)) + geom_density(adjust=1/4)
ggplot(shapeddat, aes(x=value, color=variable)) + stat_ecdf(... | /BehavioralScreening/pilot.R | no_license | TDaltonC/fMRI-Scripts | R | false | false | 322 | r | attach(dat)
library(ggplot2)
library(reshape2)
ggplot(Pilot, aes(x=Subj1Score)) + geom_freqpoly()
shapeddat <- melt(Pilot,id.vars='Item', measure.vars=c('Subj1Score','Subj2Score'))
ggplot(shapeddat, aes(x=value, color=variable)) + geom_density(adjust=1/4)
ggplot(shapeddat, aes(x=value, color=variable)) + stat_ecdf(... |
final<-read.csv("household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors = FALSE, skip=66636, nrows = 2880)
colnames(final)<-names(d1)
final$Date<-as.Date(final$Date, "%d/%m/%Y")
final <- final[complete.cases(final),]
datetime<-paste(final$Date, final$Time)
dateTime <- setNames(dateTime, "DateTime")
fi... | /plot2.R | no_license | rkaamya95/ExData_Plotting1 | R | false | false | 550 | r | final<-read.csv("household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors = FALSE, skip=66636, nrows = 2880)
colnames(final)<-names(d1)
final$Date<-as.Date(final$Date, "%d/%m/%Y")
final <- final[complete.cases(final),]
datetime<-paste(final$Date, final$Time)
dateTime <- setNames(dateTime, "DateTime")
fi... |
library(opalr)
### Name: dsadmin.get_options
### Title: Get the DataSHIELD options
### Aliases: dsadmin.get_options
### ** Examples
## No test:
o <- opal.login('administrator','password','https://opal-demo.obiba.org')
dsadmin.get_options(o)
opal.logout(o)
## End(No test)
| /data/genthat_extracted_code/opalr/examples/dsadmin.get_options.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 280 | r | library(opalr)
### Name: dsadmin.get_options
### Title: Get the DataSHIELD options
### Aliases: dsadmin.get_options
### ** Examples
## No test:
o <- opal.login('administrator','password','https://opal-demo.obiba.org')
dsadmin.get_options(o)
opal.logout(o)
## End(No test)
|
#' @importFrom dplyr bind_rows
#' @importFrom dplyr data_frame
#' @importFrom dplyr select_
#' @importFrom htmltools htmlPreserve
#' @importFrom knitr asis_output
#' @importFrom tidyr spread_
#'
print_dust_html <- function(x, ..., asis=TRUE,
linebreak_at_end = getOption("pixie_html_linebr... | /R/print_dust_html.R | no_license | rpietro/pixiedust | R | false | false | 8,898 | r | #' @importFrom dplyr bind_rows
#' @importFrom dplyr data_frame
#' @importFrom dplyr select_
#' @importFrom htmltools htmlPreserve
#' @importFrom knitr asis_output
#' @importFrom tidyr spread_
#'
print_dust_html <- function(x, ..., asis=TRUE,
linebreak_at_end = getOption("pixie_html_linebr... |
#' Runs multiple Fisher scoring steps
#'
#' @param x float-like, matrix-shaped Tensor where each row represents a sample's
#' features.
#' @param ... other arguments passed to specific methods.
#'
#' @seealso [glm_fit.tensorflow.tensor()]
#'
#' @export
glm_fit <- function(x, ...) {
UseMethod("glm_fit")
}
#' Runs on... | /R/glm.R | permissive | jeffreypullin/tfprobability | R | false | false | 7,783 | r | #' Runs multiple Fisher scoring steps
#'
#' @param x float-like, matrix-shaped Tensor where each row represents a sample's
#' features.
#' @param ... other arguments passed to specific methods.
#'
#' @seealso [glm_fit.tensorflow.tensor()]
#'
#' @export
glm_fit <- function(x, ...) {
UseMethod("glm_fit")
}
#' Runs on... |
# Ready to summarize all our data
# PLEASE! Remember to source the data, questionnaire, choices, and weights from preliminary_weighted_analysis.R
source("code/data_merge_prep.R")
dm_file <- dm_data %>%
summarize(age_hoh = weighted_median(age_hoh, .),
male_hoh = percent_response(sex_hoh, ., "male"),
... | /code/backup/data_merge.R | no_license | hedibmustapha/lby_msna2019 | R | false | false | 183,267 | r | # Ready to summarize all our data
# PLEASE! Remember to source the data, questionnaire, choices, and weights from preliminary_weighted_analysis.R
source("code/data_merge_prep.R")
dm_file <- dm_data %>%
summarize(age_hoh = weighted_median(age_hoh, .),
male_hoh = percent_response(sex_hoh, ., "male"),
... |
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=
# Article:
# Integrative meta-analysis of epigenome-wide association studies
# identifies genomic and
# epigenomics differences in the brain and the blood in Alzheimer’s disease
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-... | /code/MethReg/Blood_MethReg_cpg.R | no_license | TransBioInfoLab/AD-meta-analysis-blood | R | false | false | 12,996 | r | #-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-=-=-=-=-=-=-=-=-=-=
# Article:
# Integrative meta-analysis of epigenome-wide association studies
# identifies genomic and
# epigenomics differences in the brain and the blood in Alzheimer’s disease
#-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-==-=-=-=-... |
library(emdi)
data(eusilcA_smp)
data(eusilcA_pop)
# Get weighted direct estimates and the corresponding variance
direct_estim <- direct("eqIncome", smp_data = eusilcA_smp, smp_domains = "district",
weights = "weight", var = TRUE)
# Reduce the data set to mean and headcount ratio
eusilcA_smpAgg <- direct_esti... | /Spielplatz/get_aggregated_data.R | no_license | akreutzmann/fayherriot | R | false | false | 2,732 | r | library(emdi)
data(eusilcA_smp)
data(eusilcA_pop)
# Get weighted direct estimates and the corresponding variance
direct_estim <- direct("eqIncome", smp_data = eusilcA_smp, smp_domains = "district",
weights = "weight", var = TRUE)
# Reduce the data set to mean and headcount ratio
eusilcA_smpAgg <- direct_esti... |
##########################################################################
# Copyright (c) 2014 Andrew Yates
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including witho... | /gsplom.Rcheck/00_pkg_src/gsplom/R/util.R | permissive | andrewdyates/gsplom.rpackage | R | false | false | 3,826 | r | ##########################################################################
# Copyright (c) 2014 Andrew Yates
#
# Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including witho... |
\name{lmer}
\alias{lmer}
\title{Fit Linear Mixed-Effects Models}
\usage{
lmer(formula, data = NULL, REML = TRUE, sparseX = FALSE,
control = list(), start = NULL, verbose = 0L, subset,
weights, na.action, offset, contrasts = NULL,
devFunOnly = FALSE, optimizer = "Nelder_Mead", ...)
}
\arguments{
\item{fo... | /man/lmer.Rd | no_license | stevencarlislewalker/lme4 | R | false | false | 7,050 | rd | \name{lmer}
\alias{lmer}
\title{Fit Linear Mixed-Effects Models}
\usage{
lmer(formula, data = NULL, REML = TRUE, sparseX = FALSE,
control = list(), start = NULL, verbose = 0L, subset,
weights, na.action, offset, contrasts = NULL,
devFunOnly = FALSE, optimizer = "Nelder_Mead", ...)
}
\arguments{
\item{fo... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/AvgRank/central_nervous_system.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.95,family="gaussian",standardize=TRUE)
sink('./central_nervous_... | /Model/EN/AvgRank/central_nervous_system/central_nervous_system_093.R | no_license | esbgkannan/QSMART | R | false | false | 378 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/AvgRank/central_nervous_system.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.95,family="gaussian",standardize=TRUE)
sink('./central_nervous_... |
# Load the bayes net functions
source("BayesianNetworks-template.r")
# Risk factors collected in the survey
cdc_survey_variables = list("income", "exercise", "smoke", "bmi", "bp", "cholesterol", "angina",
"stroke", "attack", "diabetes")
survey_variables_states = c(8, 2, 2, 4, 4, 2, 2, 2, 2... | /BRFSS Bayes Net.R | no_license | gopalmenon/Bayesian-Networks | R | false | false | 18,393 | r | # Load the bayes net functions
source("BayesianNetworks-template.r")
# Risk factors collected in the survey
cdc_survey_variables = list("income", "exercise", "smoke", "bmi", "bp", "cholesterol", "angina",
"stroke", "attack", "diabetes")
survey_variables_states = c(8, 2, 2, 4, 4, 2, 2, 2, 2... |
#"File Name: HW03.r
# Student: Yeuh-Jung Tsou
# Date: 03, 09, 2017
rm(list=ls())
# Using R
# Load the following CSV file to your R environment:
# http://www.math.smith.edu/sasr/datasets/help.csv
file<-read.csv("http://www.math.smith.edu/sasr/datasets/help.csv")
attach(file)
# Create a dataframe of: id, pcs... | /HW03.R | no_license | heeroshinn/Data-Mining | R | false | false | 915 | r | #"File Name: HW03.r
# Student: Yeuh-Jung Tsou
# Date: 03, 09, 2017
rm(list=ls())
# Using R
# Load the following CSV file to your R environment:
# http://www.math.smith.edu/sasr/datasets/help.csv
file<-read.csv("http://www.math.smith.edu/sasr/datasets/help.csv")
attach(file)
# Create a dataframe of: id, pcs... |
#' Example data for a meta-analysis of dichotomous outcomes: Exercise-based cardiac rehabilitation
#'
#' A dataset consisting of 14 empirical studies used for a meta-analysis in
#' Anderson et al. (2016). The outcome of interest was risk of hospital admission of patients
#' with coronary heart disease within follow up ... | /R/exrehab.R | no_license | Mkossmeier/metaviz | R | false | false | 2,175 | r | #' Example data for a meta-analysis of dichotomous outcomes: Exercise-based cardiac rehabilitation
#'
#' A dataset consisting of 14 empirical studies used for a meta-analysis in
#' Anderson et al. (2016). The outcome of interest was risk of hospital admission of patients
#' with coronary heart disease within follow up ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect_inbo_dbase.R
\name{connect_inbo_dbase-defunct}
\alias{connect_inbo_dbase-defunct}
\title{Connect to an INBO database}
\usage{
connect_inbo_dbase(database_name)
}
\arguments{
\item{database_name}{char Name of the INBO database you want... | /man/connect_inbo_dbase-defunct.Rd | permissive | kdmulligan/inborutils | R | false | true | 991 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connect_inbo_dbase.R
\name{connect_inbo_dbase-defunct}
\alias{connect_inbo_dbase-defunct}
\title{Connect to an INBO database}
\usage{
connect_inbo_dbase(database_name)
}
\arguments{
\item{database_name}{char Name of the INBO database you want... |
#Part 1
#Write a function named 'pollutantmean' that calculates the mean of a pollutant
#(sulfate or nitrate) across a specified list of monitors.
#The function 'pollutantmean' takes three arguments: 'directory', 'pollutant', and 'id'.
#Given a vector monitor ID numbers, 'pollutantmean' reads that monitors'
#partic... | /Part1.R | no_license | mguevara1986/Scripts_R_Programming | R | false | false | 898 | r | #Part 1
#Write a function named 'pollutantmean' that calculates the mean of a pollutant
#(sulfate or nitrate) across a specified list of monitors.
#The function 'pollutantmean' takes three arguments: 'directory', 'pollutant', and 'id'.
#Given a vector monitor ID numbers, 'pollutantmean' reads that monitors'
#partic... |
library(readr)
library("dplyr")
rating_data = read.delim("C:/Users/User/Documents/GitHub/ml-100k/u.data", sep="\t", header=FALSE)
rating_data = rating_data[,-4]
colnames(rating_data)=c("user_id", "item_id", "rating")
user_data = read.delim("C:/Users/User/Documents/GitHub/ml-100k/u.user", sep="|", header=FALSE)... | /t_test.R | no_license | sylvansecrets/signal-coursework | R | false | false | 2,153 | r | library(readr)
library("dplyr")
rating_data = read.delim("C:/Users/User/Documents/GitHub/ml-100k/u.data", sep="\t", header=FALSE)
rating_data = rating_data[,-4]
colnames(rating_data)=c("user_id", "item_id", "rating")
user_data = read.delim("C:/Users/User/Documents/GitHub/ml-100k/u.user", sep="|", header=FALSE)... |
## Extract chlorophyll
library(raster)
library(lubridate)
library(ggplot2)
library(mgcv)
setwd("D:/UCSC/Analysis/sasiHumpbacks/")
# Source the function to get chlorophyll file
source("./scripts/99_build_chlorophyll_dataset.R")
# Get fitted data
dat <- readRDS("./output/fitted_tracks_w_env_02.RDS")
#---------------... | /scripts/04_extractEnvars_Chlorophyll.R | no_license | ryanreisinger/sasiHumpbacks | R | false | false | 3,530 | r | ## Extract chlorophyll
library(raster)
library(lubridate)
library(ggplot2)
library(mgcv)
setwd("D:/UCSC/Analysis/sasiHumpbacks/")
# Source the function to get chlorophyll file
source("./scripts/99_build_chlorophyll_dataset.R")
# Get fitted data
dat <- readRDS("./output/fitted_tracks_w_env_02.RDS")
#---------------... |
# Import libraries
library(shiny)
library(shinythemes)
library(data.table)
library(RCurl)
library(randomForest)
# Read data
weather <- read.csv("D:\\Other Documents\\R language Autodidacticism\\4_Web apps in R\\Data-Driven Web Application in R\\weather-weka.csv", stringsAsFactors = T )
# Build model
model <- randomFo... | /4_Web apps in R/Data-Driven Web Application in R/Data-Driven Web Application in R.R | no_license | Rodhanp/R-language-Autodidacticism | R | false | false | 3,596 | r | # Import libraries
library(shiny)
library(shinythemes)
library(data.table)
library(RCurl)
library(randomForest)
# Read data
weather <- read.csv("D:\\Other Documents\\R language Autodidacticism\\4_Web apps in R\\Data-Driven Web Application in R\\weather-weka.csv", stringsAsFactors = T )
# Build model
model <- randomFo... |
# Type of variables
# Quantitative
x <- 3 # Constant - [0.. inf )
y <- 1.33 # Continuous
z <- -1 # Interval - Numbers(-,+)
# Qualitative
person <- 'Girl' # or Boy - Nominal
trust_level <- 'low' # middle or high - Ordinal | /02-Variables/01-variables.R | no_license | TheGlitchCat/probability-and-statistics-R | R | false | false | 226 | r | # Type of variables
# Quantitative
x <- 3 # Constant - [0.. inf )
y <- 1.33 # Continuous
z <- -1 # Interval - Numbers(-,+)
# Qualitative
person <- 'Girl' # or Boy - Nominal
trust_level <- 'low' # middle or high - Ordinal |
##############################################################
# Prediction of shedding scores using random forest regression
##############################################################
# Set seed
set.seed(4957936)
# Load required libraries
source("scr/functions/general/load_abs_install_pkg.R")
load_abs_insta... | /4_RF_regression_model.R | no_license | AlexanderUm/WBVR_MAP_Microbiota | R | false | false | 8,502 | r | ##############################################################
# Prediction of shedding scores using random forest regression
##############################################################
# Set seed
set.seed(4957936)
# Load required libraries
source("scr/functions/general/load_abs_install_pkg.R")
load_abs_insta... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dummy_rows.R
\name{dummy_rows}
\alias{dummy_rows}
\title{Fast creation of dummy rows}
\usage{
dummy_rows(.data, select_columns = NULL, dummy_value = NA,
dummy_indicator = FALSE)
}
\arguments{
\item{.data}{An object with the data set you wan... | /man/dummy_rows.Rd | permissive | mlamias/fastDummies | R | false | true | 1,879 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dummy_rows.R
\name{dummy_rows}
\alias{dummy_rows}
\title{Fast creation of dummy rows}
\usage{
dummy_rows(.data, select_columns = NULL, dummy_value = NA,
dummy_indicator = FALSE)
}
\arguments{
\item{.data}{An object with the data set you wan... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/attcpo.R
\name{attcpo}
\alias{attcpo}
\title{attcpo}
\usage{
attcpo(formla, t, tmin1, tmin2, tname, data, idname, Y0tqteobj, h = NULL,
yseq = NULL, yseqlen = 100, se = TRUE, iters = 100,
method = "level")
}
\arguments{
\item{formla}{e.g. ... | /man/attcpo.Rd | no_license | u200915986/csabounds | R | false | true | 2,016 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/attcpo.R
\name{attcpo}
\alias{attcpo}
\title{attcpo}
\usage{
attcpo(formla, t, tmin1, tmin2, tname, data, idname, Y0tqteobj, h = NULL,
yseq = NULL, yseqlen = 100, se = TRUE, iters = 100,
method = "level")
}
\arguments{
\item{formla}{e.g. ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vm_sev_complete_unstd_fit.ols.R
\name{vm_sev_fit.ols_simulation_summary}
\alias{vm_sev_fit.ols_simulation_summary}
\title{Fit Simple Mediation Model
for Data Generated Using the Vale and Maurelli (1983) Approach (Skewness = 3, Kurtosis = 21) ... | /man/vm_sev_fit.ols_simulation_summary.Rd | permissive | jeksterslabds/jeksterslabRmedsimple | R | false | true | 8,291 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vm_sev_complete_unstd_fit.ols.R
\name{vm_sev_fit.ols_simulation_summary}
\alias{vm_sev_fit.ols_simulation_summary}
\title{Fit Simple Mediation Model
for Data Generated Using the Vale and Maurelli (1983) Approach (Skewness = 3, Kurtosis = 21) ... |
#Loading activities from activity_labels.txt
activities = read.table("activity_labels.txt",sep = " ",header = F)[,2]
#Loading features from features.txt
features = read.table("features.txt",sep = " ",header = F)[,2]
#relevant features
requiredFeatures = grepl("mean\\(\\)|std\\(\\)", features)
#Loading test data
X_te... | /run_analysis.R | no_license | rsharma155/Getting-and-Cleaning-Data-Course-Assignment | R | false | false | 1,687 | r | #Loading activities from activity_labels.txt
activities = read.table("activity_labels.txt",sep = " ",header = F)[,2]
#Loading features from features.txt
features = read.table("features.txt",sep = " ",header = F)[,2]
#relevant features
requiredFeatures = grepl("mean\\(\\)|std\\(\\)", features)
#Loading test data
X_te... |
library(DESeq2)
library(ggplot2)
#Preparing data----------------------------------
finalcount = read.table("lab/rawdata/finalcountGithubGenesALL.txt",
header=TRUE, sep='\t')
col = colnames(finalcount)
ZT2 <- rep("ZT2", 14) #Create conditions for each timepoint
ZT4 <- rep("ZT4", 14)
ZT6 <- rep... | /Created_code/DESeq2/DESeq2Code.R | no_license | Kfalash/CVP-Testing | R | false | false | 1,099 | r | library(DESeq2)
library(ggplot2)
#Preparing data----------------------------------
finalcount = read.table("lab/rawdata/finalcountGithubGenesALL.txt",
header=TRUE, sep='\t')
col = colnames(finalcount)
ZT2 <- rep("ZT2", 14) #Create conditions for each timepoint
ZT4 <- rep("ZT4", 14)
ZT6 <- rep... |
testlist <- list(x = c(-8.34183228774499e-183, 1.69469457180006e-319, NaN, 3.23785921002061e-319, 0, NA, 1.390671161567e-308, 6.7198402955055e-304, -Inf, 0, 3.95252516672997e-323, 0, 1.42740904212728e+181, -1.01810330038712e+80, -6.67115915940654e+306, -5.82900682309329e+303, -1.08193841662861e+307, 6.4061029490275... | /blorr/inst/testfiles/blr_pairs_cpp/libFuzzer_blr_pairs_cpp/blr_pairs_cpp_valgrind_files/1609955543-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 1,005 | r | testlist <- list(x = c(-8.34183228774499e-183, 1.69469457180006e-319, NaN, 3.23785921002061e-319, 0, NA, 1.390671161567e-308, 6.7198402955055e-304, -Inf, 0, 3.95252516672997e-323, 0, 1.42740904212728e+181, -1.01810330038712e+80, -6.67115915940654e+306, -5.82900682309329e+303, -1.08193841662861e+307, 6.4061029490275... |
extract.rank<-function(df,rank=6,sep="."){
select.drv<-strsplit(x = row.names(df),split = sep,fixed = TRUE,useBytes = FALSE)
select.drv<-sapply(1:length(select.drv),function(x){
if(length(select.drv[[x]])==rank){
return(TRUE)
}else{
return(FALSE)
}
})
return(df[select.drv,,FALSE])
}
... | /R/extract.rank.R | no_license | axrt/HMPTreesExtend | R | false | false | 697 | r | extract.rank<-function(df,rank=6,sep="."){
select.drv<-strsplit(x = row.names(df),split = sep,fixed = TRUE,useBytes = FALSE)
select.drv<-sapply(1:length(select.drv),function(x){
if(length(select.drv[[x]])==rank){
return(TRUE)
}else{
return(FALSE)
}
})
return(df[select.drv,,FALSE])
}
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_swath}
\alias{get_swath}
\title{parse the swath}
\usage{
get_swath(paths)
}
\description{
parse the swath
}
| /man/get_swath.Rd | no_license | MaThRk/soilmoistr | R | false | true | 204 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_swath}
\alias{get_swath}
\title{parse the swath}
\usage{
get_swath(paths)
}
\description{
parse the swath
}
|
#IST 687
#Latika Mahesh Wadhwa
#Homework 6
#Assignment Due Date - October 11, 2018
#Submission Date - october 09,2018
#__________________________________________________________________________________________#
# Step A: Load and Merge datasets #
#______... | /IST 687 Homework 6 - Latika Mahesh Wadhwa.R | no_license | latika-wadhwa/IST-687-Introduction-to-Data-Science- | R | false | false | 7,023 | r | #IST 687
#Latika Mahesh Wadhwa
#Homework 6
#Assignment Due Date - October 11, 2018
#Submission Date - october 09,2018
#__________________________________________________________________________________________#
# Step A: Load and Merge datasets #
#______... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Lasso/pancreas.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.85,family="gaussian",standardize=FALSE)
sink('./pancreas_088.txt',append=TRUE)
... | /Model/EN/Lasso/pancreas/pancreas_088.R | no_license | esbgkannan/QSMART | R | false | false | 349 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/Lasso/pancreas.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.85,family="gaussian",standardize=FALSE)
sink('./pancreas_088.txt',append=TRUE)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkPredict.R
\name{checkPredict}
\alias{checkPredict}
\title{Prevention of numerical instability for a new observation}
\usage{
checkPredict(x, model, threshold = 1e-04, distance = "covdist", type = "UK")
}
\arguments{
\item{x}{a v... | /man/checkPredict.Rd | no_license | ProgramMonkey-soso/DiceOptim | R | false | true | 1,667 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checkPredict.R
\name{checkPredict}
\alias{checkPredict}
\title{Prevention of numerical instability for a new observation}
\usage{
checkPredict(x, model, threshold = 1e-04, distance = "covdist", type = "UK")
}
\arguments{
\item{x}{a v... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wd.R
\name{cd}
\alias{cd}
\title{Change (Working) Directory}
\usage{
cd(loc)
}
\arguments{
\item{loc}{where you want to set the working directory}
}
\description{
This function allows setwd() and getwd() in one step.
}
\examples{
cd("~/Files"... | /man/cd.Rd | no_license | chrisvacc/R.Toolshed | R | false | true | 376 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/wd.R
\name{cd}
\alias{cd}
\title{Change (Working) Directory}
\usage{
cd(loc)
}
\arguments{
\item{loc}{where you want to set the working directory}
}
\description{
This function allows setwd() and getwd() in one step.
}
\examples{
cd("~/Files"... |
# Cargamos librería arules que contiene algoritmo apriori
library("arules")
# Establecemos directorio activo
directorio <- dirname(parent.frame(2)$ofile)
setwd(directorio)
# Cargamos matriz
matriz_datos<-Matrix(c(1,1,0,1,1,1,1,1,1,0,1,1,0,1,0,1,0,1,1,0,1,1,0,0,0,0,0,0,1,0)
,6,5,byrow=T,dimnames=list(c("suces... | /Laboratorio/PECL2 FCD/Apartado 1.r | no_license | Marcos-Barranquero/FCD-UAH | R | false | false | 804 | r | # Cargamos librería arules que contiene algoritmo apriori
library("arules")
# Establecemos directorio activo
directorio <- dirname(parent.frame(2)$ofile)
setwd(directorio)
# Cargamos matriz
matriz_datos<-Matrix(c(1,1,0,1,1,1,1,1,1,0,1,1,0,1,0,1,0,1,1,0,1,1,0,0,0,0,0,0,1,0)
,6,5,byrow=T,dimnames=list(c("suces... |
jchem.binary.lf <- function(line) {
molid <- strsplit(line, "\t")[[1]][1]
bitpos <- .Call("parse_jchem_binary", as.character(line), as.integer(nchar(line)) )
if (is.null(bitpos)) return(NULL)
list(molid, bitpos+1, list()) ## we add 1, since C does bit positions from 0
}
fps.lf <- function(line) {
toks <- s... | /fingerprint/R/read.R | no_license | allaway/cdkr | R | false | false | 3,686 | r | jchem.binary.lf <- function(line) {
molid <- strsplit(line, "\t")[[1]][1]
bitpos <- .Call("parse_jchem_binary", as.character(line), as.integer(nchar(line)) )
if (is.null(bitpos)) return(NULL)
list(molid, bitpos+1, list()) ## we add 1, since C does bit positions from 0
}
fps.lf <- function(line) {
toks <- s... |
# 1) Have total emissions from PM2.5 decreased in the United States from 1999 to 2008?
# Using the base plotting system, make a plot showing the total PM2.5 emission from all
# sources for each of the years 1999, 2002, 2005, and 2008.
# set working directory
setwd('~/Dropbox/Personal/Coursera/e_exploratory_data/On_g... | /Project2/Plot1.R | no_license | martingascon/Exploratory_Data_Analysis | R | false | false | 953 | r | # 1) Have total emissions from PM2.5 decreased in the United States from 1999 to 2008?
# Using the base plotting system, make a plot showing the total PM2.5 emission from all
# sources for each of the years 1999, 2002, 2005, and 2008.
# set working directory
setwd('~/Dropbox/Personal/Coursera/e_exploratory_data/On_g... |
#data = read.csv("/juice/scr/mhahn/reinforce-logs-both-short/full-logs-tsv-perItem/collect12_NormJudg_Short_Cond_W_GPT2_ByTrial.py.tsv", sep="\t")
data = read.csv("/juice/scr/mhahn/reinforce-logs-both-short/full-logs-tsv-perItem/char-lm-ud-stationary_12_SuperLong_WithAutoencoder_WithEx_Samples_Short_Combination_Subseq_... | /initial/lm/trainAttention/analyze_byItem/analyze_M.R | no_license | m-hahn/forgetting-model | R | false | false | 44,209 | r | #data = read.csv("/juice/scr/mhahn/reinforce-logs-both-short/full-logs-tsv-perItem/collect12_NormJudg_Short_Cond_W_GPT2_ByTrial.py.tsv", sep="\t")
data = read.csv("/juice/scr/mhahn/reinforce-logs-both-short/full-logs-tsv-perItem/char-lm-ud-stationary_12_SuperLong_WithAutoencoder_WithEx_Samples_Short_Combination_Subseq_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FC_corr_graphs.function.R
\name{strain.spec.gene.func}
\alias{strain.spec.gene.func}
\title{Function to compute a strain specific gene expression Fold-Change barplot}
\usage{
strain.spec.gene.func(dPhno.interest = NULL, gene.probe = "",
plo... | /fcCor1/man/strain.spec.gene.func.Rd | no_license | alexisdimanche/AD.REU2019 | R | false | true | 1,068 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FC_corr_graphs.function.R
\name{strain.spec.gene.func}
\alias{strain.spec.gene.func}
\title{Function to compute a strain specific gene expression Fold-Change barplot}
\usage{
strain.spec.gene.func(dPhno.interest = NULL, gene.probe = "",
plo... |
library(Biocomb)
### Name: leukemia_miss
### Title: desease data
### Aliases: leukemia_miss
### Keywords: datasets
### ** Examples
# load the dataset
data(leukemia_miss)
# X95735_at
with(leukemia_miss, by(X95735_at,Class,mean,na.rm=TRUE))
# M27891_at
with(leukemia_miss,tapply(M27891_at, Class, FUN = mean,na.rm=TRU... | /data/genthat_extracted_code/Biocomb/examples/leukemia_miss.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 327 | r | library(Biocomb)
### Name: leukemia_miss
### Title: desease data
### Aliases: leukemia_miss
### Keywords: datasets
### ** Examples
# load the dataset
data(leukemia_miss)
# X95735_at
with(leukemia_miss, by(X95735_at,Class,mean,na.rm=TRUE))
# M27891_at
with(leukemia_miss,tapply(M27891_at, Class, FUN = mean,na.rm=TRU... |
######################################################
###
### Project: Getting and Cleaning Data - Course Project
### Date: 5/12/2019
### Goal: Show ability to read data, manipulate it,
### and export it with R.
###
#######################################################
# Since the Test and Training data ar... | /run_analysis.R | no_license | fryejw/Getting-and-Cleaning-Data-Course-Project | R | false | false | 5,071 | r | ######################################################
###
### Project: Getting and Cleaning Data - Course Project
### Date: 5/12/2019
### Goal: Show ability to read data, manipulate it,
### and export it with R.
###
#######################################################
# Since the Test and Training data ar... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/permute.R
\name{permu_CI_pearson}
\alias{permu_CI_pearson}
\title{Confidence interval for the correlation between residuals and treatment}
\usage{
permu_CI_pearson(prediction, response, treatment, iters, alpha = 0.05,
side = "both",... | /ModelMatch/man/permu_CI_pearson.Rd | no_license | Sandy4321/ModelMatch | R | false | false | 977 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/permute.R
\name{permu_CI_pearson}
\alias{permu_CI_pearson}
\title{Confidence interval for the correlation between residuals and treatment}
\usage{
permu_CI_pearson(prediction, response, treatment, iters, alpha = 0.05,
side = "both",... |
# Wisconsin 2016 Fraud Analysis
# George Elliott Mmrris | TheCrosstab.com
# Please give credit where credit is due.
# *NOTE: You should run the "County Maps.R" file in the root directory to gather all the data and dependencies.
###############
# Regressions #
###############
sample_data <- Difference %>% filter(a... | /WI_Fraud_Analysis.R | no_license | markpanny/Election-Results-Analysis-2016 | R | false | false | 4,793 | r | # Wisconsin 2016 Fraud Analysis
# George Elliott Mmrris | TheCrosstab.com
# Please give credit where credit is due.
# *NOTE: You should run the "County Maps.R" file in the root directory to gather all the data and dependencies.
###############
# Regressions #
###############
sample_data <- Difference %>% filter(a... |
library(shiny)
install.packages("shinythemes")
library(shinythemes)
ui <- navbarPage("App Title", theme = shinytheme("united"),
tabPanel("Plot"),
navbarMenu("More",
tabPanel("summary"),
"----------",
"... | /s21~30/s_test26_menu.R | no_license | bjh1646/R_data | R | false | false | 479 | r | library(shiny)
install.packages("shinythemes")
library(shinythemes)
ui <- navbarPage("App Title", theme = shinytheme("united"),
tabPanel("Plot"),
navbarMenu("More",
tabPanel("summary"),
"----------",
"... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scenario_QALYloss.R
\name{scenario_QALYloss}
\alias{scenario_QALYloss}
\title{scenario_QALYloss}
\usage{
scenario_QALYloss(prop_avoided, endpoint, cohort)
}
\arguments{
\item{prop_avoided}{proportion LTBI cured via screening}
\item{endpoint}... | /man/scenario_QALYloss.Rd | no_license | n8thangreen/ltbiScreenLite | R | false | true | 711 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scenario_QALYloss.R
\name{scenario_QALYloss}
\alias{scenario_QALYloss}
\title{scenario_QALYloss}
\usage{
scenario_QALYloss(prop_avoided, endpoint, cohort)
}
\arguments{
\item{prop_avoided}{proportion LTBI cured via screening}
\item{endpoint}... |
library(boot)
source('Estimators.R')
source('utils.R')
source('partial_LTMLE.R')
source('Magic_estimator.R')
MAGIC_new_bootstrap_LTMLE <- function(D, Q_hat, V_hat, gamma, evaluation_action_matrix, force_PD=T){
n <- dim(D)[1]
horizon <- dim(D)[2]
# # Get g^(j)s
n_ids <- 10
alphas <- c(rep(0, n_ids/2), seq(... | /R/Magic_full_bootstrap.R | no_license | aurelienbibaut2/LTMLE_OPE | R | false | false | 4,480 | r | library(boot)
source('Estimators.R')
source('utils.R')
source('partial_LTMLE.R')
source('Magic_estimator.R')
MAGIC_new_bootstrap_LTMLE <- function(D, Q_hat, V_hat, gamma, evaluation_action_matrix, force_PD=T){
n <- dim(D)[1]
horizon <- dim(D)[2]
# # Get g^(j)s
n_ids <- 10
alphas <- c(rep(0, n_ids/2), seq(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/load_genelist.r
\name{load_genelist}
\alias{load_genelist}
\title{load_genelist}
\usage{
load_genelist(list_path, lookuptable, speciesWanted = "human")
}
\arguments{
\item{list_path}{Folder where it is stored}
\item{lookuptable}{Dataframe co... | /man/load_genelist.Rd | no_license | NathanSkene/DendriticEnrichmentPackage | R | false | true | 696 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/load_genelist.r
\name{load_genelist}
\alias{load_genelist}
\title{load_genelist}
\usage{
load_genelist(list_path, lookuptable, speciesWanted = "human")
}
\arguments{
\item{list_path}{Folder where it is stored}
\item{lookuptable}{Dataframe co... |
#install.packages("httr", dependencies = TRUE)
#install.packages("xml2", dependencies = TRUE)
#install.packages("urltools", dependencies = TRUE)
#install.packages("jsonlite", dependencies = TRUE)
#install.packages("anytime", dependencies = TRUE)
library(httr)
library(xml2)
library(urltools)
library(jsonlite)
library(an... | /FunctionsStackOverflowApi.R | no_license | ppeerttu/TrendMining | R | false | false | 4,317 | r | #install.packages("httr", dependencies = TRUE)
#install.packages("xml2", dependencies = TRUE)
#install.packages("urltools", dependencies = TRUE)
#install.packages("jsonlite", dependencies = TRUE)
#install.packages("anytime", dependencies = TRUE)
library(httr)
library(xml2)
library(urltools)
library(jsonlite)
library(an... |
#### Gui Russo e Gabi Campos
### Invalid Votes for Senator- Error in the Ballot
## Matching neighboring cities by presidential votes
# October 22, 2018
# Clearing
rm(list=ls())
# Loading the neighbors data #------------------------------------------------------
#setwd("/Users/robertaazzi1/Desktop/Nulo_Senador/") # Ch... | /PLV_2010.R | no_license | Gabiscampos/nulo_senador | R | false | false | 10,689 | r | #### Gui Russo e Gabi Campos
### Invalid Votes for Senator- Error in the Ballot
## Matching neighboring cities by presidential votes
# October 22, 2018
# Clearing
rm(list=ls())
# Loading the neighbors data #------------------------------------------------------
#setwd("/Users/robertaazzi1/Desktop/Nulo_Senador/") # Ch... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/get_enroll.R
\name{get_enroll}
\alias{get_enroll}
\title{get_enroll()}
\usage{
get_enroll(enroll_data, eto_programs = NULL, min_enroll = 8)
}
\arguments{
\item{enroll_data}{dataframe: a dataframe containing enrollment data."[Admin] ra... | /man/get_enroll.Rd | no_license | thelayc/laycEnrollment | R | false | false | 998 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/get_enroll.R
\name{get_enroll}
\alias{get_enroll}
\title{get_enroll()}
\usage{
get_enroll(enroll_data, eto_programs = NULL, min_enroll = 8)
}
\arguments{
\item{enroll_data}{dataframe: a dataframe containing enrollment data."[Admin] ra... |
elnormAltSinglyCensored.qmvue <-
function (x, censored, N, T1, n.cen, censoring.side, ci, ci.method = c("delta",
"cox"), ci.type, conf.level, ci.sample.size = En, pivot.statistic = c("z",
"t"))
{
pivot.statistic <- match.arg(pivot.statistic)
enorm.list <- enormSinglyCensored.mle(x = log(x), cen... | /R/elnormAltSinglyCensored.qmvue.R | no_license | alexkowa/EnvStats | R | false | false | 2,441 | r | elnormAltSinglyCensored.qmvue <-
function (x, censored, N, T1, n.cen, censoring.side, ci, ci.method = c("delta",
"cox"), ci.type, conf.level, ci.sample.size = En, pivot.statistic = c("z",
"t"))
{
pivot.statistic <- match.arg(pivot.statistic)
enorm.list <- enormSinglyCensored.mle(x = log(x), cen... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FFTrees.R
\name{FFTrees}
\alias{FFTrees}
\title{Creates a Fast and Frugal Trees (FFTrees) object.}
\usage{
FFTrees(formula = NULL, data = NULL, data.test = NULL, train.p = 1,
rank.method = "m", hr.weight = 0.5, verbose = FALSE, max.levels =... | /man/FFTrees.Rd | no_license | JackStat/FFTrees | R | false | true | 2,237 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FFTrees.R
\name{FFTrees}
\alias{FFTrees}
\title{Creates a Fast and Frugal Trees (FFTrees) object.}
\usage{
FFTrees(formula = NULL, data = NULL, data.test = NULL, train.p = 1,
rank.method = "m", hr.weight = 0.5, verbose = FALSE, max.levels =... |
create_minimal_activity_log <- function(eventlog) {
eDT <- data.table::data.table(eventlog)
data.table::setorderv(eDT, cols = c(case_id(eventlog), timestamp(eventlog), ".order"))
dplyr::as_tibble(unique(eDT, by = c(case_id(eventlog), activity_instance_id(eventlog), activity_id(eventlog))))
}
| /R/create_minimal_activity_log.R | no_license | cran/edeaR | R | false | false | 307 | r |
create_minimal_activity_log <- function(eventlog) {
eDT <- data.table::data.table(eventlog)
data.table::setorderv(eDT, cols = c(case_id(eventlog), timestamp(eventlog), ".order"))
dplyr::as_tibble(unique(eDT, by = c(case_id(eventlog), activity_instance_id(eventlog), activity_id(eventlog))))
}
|
#' Metadata for the NMR spectra.
#'
#' A data frame containing acquisition and processing data pertaining to the NMR spectrum.
#'
#' @format a data frame with 363 variables for two observations
#' \describe{
#' \item{DS}{Dummy scans performed prior to acquisition}
#' \item{NS}{Number of scans performed during t... | /R/meta.R | permissive | kbario/concentr8r | R | false | false | 631 | r | #' Metadata for the NMR spectra.
#'
#' A data frame containing acquisition and processing data pertaining to the NMR spectrum.
#'
#' @format a data frame with 363 variables for two observations
#' \describe{
#' \item{DS}{Dummy scans performed prior to acquisition}
#' \item{NS}{Number of scans performed during t... |
BAYSTAR<-function(x,lagp1,lagp2,Iteration,Burnin,constant,d0,step.thv,thresVar,mu01,v01,mu02,v02,v0,lambda0,refresh,tplot) {
##Time.initial<-Sys.time()
## Initialize
if (missing(constant)){
constant<- 1}
else{
if (!is.vector(constant) || length(constant) != 1)
stop ("'constant' must be a scalar")
if (constant!=0 ... | /output/sources/authors/1105/BAYSTAR/BAYSTAR.R | no_license | Irbis3/crantasticScrapper | R | false | false | 10,622 | r | BAYSTAR<-function(x,lagp1,lagp2,Iteration,Burnin,constant,d0,step.thv,thresVar,mu01,v01,mu02,v02,v0,lambda0,refresh,tplot) {
##Time.initial<-Sys.time()
## Initialize
if (missing(constant)){
constant<- 1}
else{
if (!is.vector(constant) || length(constant) != 1)
stop ("'constant' must be a scalar")
if (constant!=0 ... |
### collectResults.R ##########################################################
# function to concatenate the results from patients 1, 2, and 3 into a large file
# Inputs:
# - outputPath = path to where the results are saved (both the separate set
# results, and where the concatenated file will be output)
# - file... | /clean-code/collectResults.R | no_license | canghel/kaggle-seizure-prediction | R | false | false | 1,308 | r | ### collectResults.R ##########################################################
# function to concatenate the results from patients 1, 2, and 3 into a large file
# Inputs:
# - outputPath = path to where the results are saved (both the separate set
# results, and where the concatenated file will be output)
# - file... |
##### 키보드 입력 #####
# scan() : 벡터 입력 - 콘솔에 입력
# edit() : 데이터 프레임을 입력 받을 때
a <- scan() #숫자를 입력(엔터). 그만 입력할 경우 빈칸에 엔터
a
b<- scan(what=character())
b
df<- data.frame()
df<-edit(df)
df
##### 파일 입력 ######
# read.csv()
# read.table() #,로 구분된 파일을 제외한 모든 파일
# read.xlsx()
student<-read.table("../data/student.txt")
stude... | /R/BasicProject/2-InputOutput.R | no_license | JeonBW/Portfolio | R | false | false | 2,633 | r | ##### 키보드 입력 #####
# scan() : 벡터 입력 - 콘솔에 입력
# edit() : 데이터 프레임을 입력 받을 때
a <- scan() #숫자를 입력(엔터). 그만 입력할 경우 빈칸에 엔터
a
b<- scan(what=character())
b
df<- data.frame()
df<-edit(df)
df
##### 파일 입력 ######
# read.csv()
# read.table() #,로 구분된 파일을 제외한 모든 파일
# read.xlsx()
student<-read.table("../data/student.txt")
stude... |
library(lmom)
### Name: cdfgno
### Title: Generalized normal distribution
### Aliases: cdfgno quagno
### Keywords: distribution
### ** Examples
# Random sample from the generalized normal distribution
# with parameters xi=0, alpha=1, k=-0.5.
quagno(runif(100), c(0,1,-0.5))
# The generalized normal distribution wit... | /data/genthat_extracted_code/lmom/examples/cdfgno.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 513 | r | library(lmom)
### Name: cdfgno
### Title: Generalized normal distribution
### Aliases: cdfgno quagno
### Keywords: distribution
### ** Examples
# Random sample from the generalized normal distribution
# with parameters xi=0, alpha=1, k=-0.5.
quagno(runif(100), c(0,1,-0.5))
# The generalized normal distribution wit... |
rankhospital <- function(state, outcome, num = "best") {
## Read outcome data
# "Hospital.30.Day.Death..Mortality..Rates.from.Pneumonia"
# "Hospital.30.Day.Death..Mortality..Rates.from.Heart.Attack"
# "Hospital.30.Day.Death..Mortality..Rates.from.Heart.Failure"
outcomeData <- read.csv("outcome-of-care-mea... | /rankhospital.R | no_license | sreeser/ProgrammingAssignment3 | R | false | false | 1,507 | r | rankhospital <- function(state, outcome, num = "best") {
## Read outcome data
# "Hospital.30.Day.Death..Mortality..Rates.from.Pneumonia"
# "Hospital.30.Day.Death..Mortality..Rates.from.Heart.Attack"
# "Hospital.30.Day.Death..Mortality..Rates.from.Heart.Failure"
outcomeData <- read.csv("outcome-of-care-mea... |
require(MASS)
require(fBasics)
dyn.load("bin/r-scripts/utils_C.so")
#symbol.C("convert_event_table")
## mysql utils
mysqlSetTimeVariables=function(con, table, experimentID, expIntervalMin){
dbGetQuery(con,"SET @expStartTimeNs=0");
dbGetQuery(con,"SET @expIntervalStartNs=0");
dbGetQuery(con,"SET @expIntervalStopNs=0");... | /r-scripts/util.R | permissive | SLAsticSPE/slastic | R | false | false | 28,265 | r | require(MASS)
require(fBasics)
dyn.load("bin/r-scripts/utils_C.so")
#symbol.C("convert_event_table")
## mysql utils
mysqlSetTimeVariables=function(con, table, experimentID, expIntervalMin){
dbGetQuery(con,"SET @expStartTimeNs=0");
dbGetQuery(con,"SET @expIntervalStartNs=0");
dbGetQuery(con,"SET @expIntervalStopNs=0");... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/14-interpolate_indicators.R
\name{interpolate_indicators}
\alias{interpolate_indicators}
\title{Function to interpolate indicators from the Liberia Coverage Survey}
\usage{
interpolate_indicators(
indicator = c("ifaDF", "iycfDF", "mnpDF", "... | /man/interpolate_indicators.Rd | no_license | validmeasures/liberiaData | R | false | true | 1,382 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/14-interpolate_indicators.R
\name{interpolate_indicators}
\alias{interpolate_indicators}
\title{Function to interpolate indicators from the Liberia Coverage Survey}
\usage{
interpolate_indicators(
indicator = c("ifaDF", "iycfDF", "mnpDF", "... |
library(rgdal)
library(zoom)
library(maps)
tst = readOGR('./S_USA.Activity_HazFuelTrt_LN.shp',
layer='S_USA.Activity_HazFuelTrt_LN')
ogrListLayers("./sef_lidar.gdb/gdb")
topo = readOGR('./Topography.shp', layer='Topography')
soil = readOGR('./SSURGO_Soils.shp', layer='SSURGO_Soils')
Stand = readO... | /scripts/FS_maps.R | no_license | smccau/se_veg | R | false | false | 2,822 | r | library(rgdal)
library(zoom)
library(maps)
tst = readOGR('./S_USA.Activity_HazFuelTrt_LN.shp',
layer='S_USA.Activity_HazFuelTrt_LN')
ogrListLayers("./sef_lidar.gdb/gdb")
topo = readOGR('./Topography.shp', layer='Topography')
soil = readOGR('./SSURGO_Soils.shp', layer='SSURGO_Soils')
Stand = readO... |
\encoding{latin1}
\name{kmfun}
\alias{kmfun}
\title{Multiscale second-order neighbourhood analysis of a marked spatial point pattern}
\description{
Computes estimates of the mark correlation \emph{Km}-function and associated neighbourhood functions from a marked spatial point pattern
in a simple (rectangular or c... | /man/kmfun.Rd | no_license | cran/ads | R | false | false | 5,623 | rd | \encoding{latin1}
\name{kmfun}
\alias{kmfun}
\title{Multiscale second-order neighbourhood analysis of a marked spatial point pattern}
\description{
Computes estimates of the mark correlation \emph{Km}-function and associated neighbourhood functions from a marked spatial point pattern
in a simple (rectangular or c... |
summary.WS.Corr.Mixed <- function(object, ..., Object){
if (missing(Object)){Object <- object}
x <- Object
cat("\nFunction call:\n\n")
print(Object$Call)
cat("\n\n")
if (Object$Model=="Model 1, Random intercept"){
cat(Object$Model, "\n")
cat("=========================\n\n")
cat("Fi... | /R/summary.WS.Corr.Mixed.R | no_license | cran/CorrMixed | R | false | false | 4,110 | r | summary.WS.Corr.Mixed <- function(object, ..., Object){
if (missing(Object)){Object <- object}
x <- Object
cat("\nFunction call:\n\n")
print(Object$Call)
cat("\n\n")
if (Object$Model=="Model 1, Random intercept"){
cat(Object$Model, "\n")
cat("=========================\n\n")
cat("Fi... |
library(lattice)
library(latticeExtra)
library(ggplot2)
load("/Users/explodecomputer/git/wrayvisscher/eQTL_2D/analysis/residuals.RData")
load("/Users/explodecomputer/git/wrayvisscher/eQTL_2D/analysis/allsub.RData")
load("/Users/explodecomputer/git/wrayvisscher/eQTL_2D/analysis/clean_geno_final.RData")
load("/Users/exp... | /analysis/replication_gg.R | no_license | explodecomputer/eQTL-2D | R | false | false | 5,843 | r | library(lattice)
library(latticeExtra)
library(ggplot2)
load("/Users/explodecomputer/git/wrayvisscher/eQTL_2D/analysis/residuals.RData")
load("/Users/explodecomputer/git/wrayvisscher/eQTL_2D/analysis/allsub.RData")
load("/Users/explodecomputer/git/wrayvisscher/eQTL_2D/analysis/clean_geno_final.RData")
load("/Users/exp... |
# To launch from dream-beat/src
#.libPaths("/ifs/res/papaemme/users/eb2/dream-beat/repos")
source("../../src/evaluate_SC2.R")
source("../../src/predictors_SC2.R")
source("../../src/utils_SC2.R")
source("../../src/evaluateCV_SC2_ensemble_transfer_learning.R")
mc.cores = 10
celllines_challenge <- combine_features(c("... | /analysis/sc2_ensembl/ensembl_GLM_GLM.R | no_license | yanistazi/DreamBeatAMLChallenge | R | false | false | 1,612 | r | # To launch from dream-beat/src
#.libPaths("/ifs/res/papaemme/users/eb2/dream-beat/repos")
source("../../src/evaluate_SC2.R")
source("../../src/predictors_SC2.R")
source("../../src/utils_SC2.R")
source("../../src/evaluateCV_SC2_ensemble_transfer_learning.R")
mc.cores = 10
celllines_challenge <- combine_features(c("... |
# Created: June 26, 2013
# Purpose: Auxiliary Functions Used in VI Comparisons
# Author: Anthony D'Agostino (ald2187@columbia.edu)
# Last Edit: July 1, 2013
# EDIT HISTORY
#
# July 15 (ALD) - modified URL in evi.corr.regrid to better reflect the calculation
# of masked EVI values.
lib... | /vi_functions.R | no_license | a8dx/ILO | R | false | false | 12,831 | r | # Created: June 26, 2013
# Purpose: Auxiliary Functions Used in VI Comparisons
# Author: Anthony D'Agostino (ald2187@columbia.edu)
# Last Edit: July 1, 2013
# EDIT HISTORY
#
# July 15 (ALD) - modified URL in evi.corr.regrid to better reflect the calculation
# of masked EVI values.
lib... |
library(gpclib)
library(RColorBrewer)
library(mapproj)
library(maptools)
library(rgdal)
map <- suppressWarnings(readOGR(dsn="/home/aurelius/workspace/lits/shape/countries_shp",
layer="lits_all"))
library(car)
map$NAME <- recode(map$NAME, "'United Kingdom'='Great Britain'")
map$group_general <- recode(ma... | /code/plot_map.R | permissive | muuankarski/attributions | R | false | false | 5,386 | r | library(gpclib)
library(RColorBrewer)
library(mapproj)
library(maptools)
library(rgdal)
map <- suppressWarnings(readOGR(dsn="/home/aurelius/workspace/lits/shape/countries_shp",
layer="lits_all"))
library(car)
map$NAME <- recode(map$NAME, "'United Kingdom'='Great Britain'")
map$group_general <- recode(ma... |
# Script description ----
# Explores the real datasets in order to extract calibration metrics. These are:
# media spending patterns, media budgets, etc. The real data set is compared to the
# simulated data set and relevant metrics (s.a. correlation matrices) are computed. Also,
# graphs for comparison illustrations a... | /real_data_exploration_calibration.R | no_license | dheimgartner/master-thesis-mmm | R | false | false | 8,203 | r | # Script description ----
# Explores the real datasets in order to extract calibration metrics. These are:
# media spending patterns, media budgets, etc. The real data set is compared to the
# simulated data set and relevant metrics (s.a. correlation matrices) are computed. Also,
# graphs for comparison illustrations a... |
#' chrFreqs
#'
#' Count features per chromosome
#'
#' @param gr A GenomicRanges object.
#' @param chrs A character vector of chromosome names.
#'
#' @return A named character vector indicating the number of feature
#' counts per chromosome in a GenomicRanges object. This is done by
#' running GRanges' seqnames() fu... | /R/chrFreqs.R | permissive | charles-plessy/smallCAGEqc | R | false | false | 1,131 | r | #' chrFreqs
#'
#' Count features per chromosome
#'
#' @param gr A GenomicRanges object.
#' @param chrs A character vector of chromosome names.
#'
#' @return A named character vector indicating the number of feature
#' counts per chromosome in a GenomicRanges object. This is done by
#' running GRanges' seqnames() fu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calc-sex-props.R, R/export-survey-indices.R
\name{props_surv}
\alias{props_surv}
\alias{props_surv_data_summary}
\alias{export_survey_indices}
\title{Calculate the proportions female for the survey data}
\usage{
props_surv(
surv_series = 1:... | /man/props_surv.Rd | no_license | pbs-assess/arrowtooth | R | false | true | 2,753 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calc-sex-props.R, R/export-survey-indices.R
\name{props_surv}
\alias{props_surv}
\alias{props_surv_data_summary}
\alias{export_survey_indices}
\title{Calculate the proportions female for the survey data}
\usage{
props_surv(
surv_series = 1:... |
#include "AEConfig.h"
#include "AE_EffectVers.h"
#ifndef AE_OS_WIN
#include <AE_General.r>
#endif
resource 'PiPL' (16000) {
{ /* array properties: 12 elements */
/* [1] */
Kind {
AEEffect
},
/* [2] */
Name {
"MedianFilter"
},
/* [3] */
Category {
"Abramov plugins"
},
#ifdef AE_OS_WIN
#i... | /MedianFilterPiPL.r | no_license | karvozavr/AE-median-filter-plugin | R | false | false | 935 | r | #include "AEConfig.h"
#include "AE_EffectVers.h"
#ifndef AE_OS_WIN
#include <AE_General.r>
#endif
resource 'PiPL' (16000) {
{ /* array properties: 12 elements */
/* [1] */
Kind {
AEEffect
},
/* [2] */
Name {
"MedianFilter"
},
/* [3] */
Category {
"Abramov plugins"
},
#ifdef AE_OS_WIN
#i... |
for (i in 1:nrow(key)) {
comb <- i
## recover parameters from key
pars <- key[comb, ]
meDur <- pars[["meDur"]]
reStart <- meStart + meDur
reDur <- pars[["reDur"]]
meInt <- pars[["meInt"]]
mu_me <- lambda_bg - log(1 - meInt) / meDur
reInt <- pars[["reInt"]]
lambda_re <- (log(r... | /Simulation/Tests_pipeline.R | no_license | brpetrucci/EvolProject2021 | R | false | false | 3,439 | r | for (i in 1:nrow(key)) {
comb <- i
## recover parameters from key
pars <- key[comb, ]
meDur <- pars[["meDur"]]
reStart <- meStart + meDur
reDur <- pars[["reDur"]]
meInt <- pars[["meInt"]]
mu_me <- lambda_bg - log(1 - meInt) / meDur
reInt <- pars[["reInt"]]
lambda_re <- (log(r... |
### PRELIMINARY AND UNCHECKED ###
# Clear the console
cat("\014")
# Remove every object in the environment
rm(list = ls())
#install and load packages
lib <- c("dplyr", "stringdist", "tidyr")
#sapply(lib, function(x) install.packages(x))
sapply(lib, function(x) require(x, character.only = TRUE))
# set working direct... | /Old_Analysis/NECA Analysis/01_tag_neca_services_received.R | no_license | mtejas88/esh | R | false | false | 9,497 | r | ### PRELIMINARY AND UNCHECKED ###
# Clear the console
cat("\014")
# Remove every object in the environment
rm(list = ls())
#install and load packages
lib <- c("dplyr", "stringdist", "tidyr")
#sapply(lib, function(x) install.packages(x))
sapply(lib, function(x) require(x, character.only = TRUE))
# set working direct... |
outliers <-
function(x, p = 0.99, tail = "positive", distribution = "t", var.est = "mad",
center.est = "mean") {
u <- eval(parse(text = center.est))(x[!is.na(x)])
z <- hotspots(x-u, p = p, tail = tail,
distribution = distribution, var.est = var.est)
z$u <- u
z$tail <- tail
z$x <- z$x + u
z$data <- z$data +... | /R/outliers.R | no_license | cran/hotspots | R | false | false | 535 | r | outliers <-
function(x, p = 0.99, tail = "positive", distribution = "t", var.est = "mad",
center.est = "mean") {
u <- eval(parse(text = center.est))(x[!is.na(x)])
z <- hotspots(x-u, p = p, tail = tail,
distribution = distribution, var.est = var.est)
z$u <- u
z$tail <- tail
z$x <- z$x + u
z$data <- z$data +... |
# reads data from file and filters out the measurements for the two days
get.data <- function() {
data.dir <- "data"
data.file <- "household_power_consumption.txt"
start.date <- as.Date("2007-02-01","%Y-%m-%d")
end.date <- as.Date("2007-02-02", "%Y-%m-%d")
# read all data
data.all <- read.table(file.pat... | /getData.R | no_license | erikboertjes/ExData_Plotting1 | R | false | false | 691 | r |
# reads data from file and filters out the measurements for the two days
get.data <- function() {
data.dir <- "data"
data.file <- "household_power_consumption.txt"
start.date <- as.Date("2007-02-01","%Y-%m-%d")
end.date <- as.Date("2007-02-02", "%Y-%m-%d")
# read all data
data.all <- read.table(file.pat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataset_creation_functions.R
\name{read_data}
\alias{read_data}
\title{Scrape Events of Right-Wing Violence in 2015 from Online Source.}
\usage{
read_data(page)
}
\arguments{
\item{page}{integer between 0 and n (which is the current maximum n... | /man/read_data.Rd | no_license | flinder/arvig | R | false | true | 821 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataset_creation_functions.R
\name{read_data}
\alias{read_data}
\title{Scrape Events of Right-Wing Violence in 2015 from Online Source.}
\usage{
read_data(page)
}
\arguments{
\item{page}{integer between 0 and n (which is the current maximum n... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.r
\docType{data}
\name{hair1958}
\alias{hair1958}
\title{Timber products: Production, imports, exports, and new supply of lumber in the United States, specified years, 1799-1958}
\format{A data frame with 58 observations on 23 variables:... | /man/hair1958.Rd | no_license | benjones2/WOODCARB3R | R | false | true | 1,720 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.r
\docType{data}
\name{hair1958}
\alias{hair1958}
\title{Timber products: Production, imports, exports, and new supply of lumber in the United States, specified years, 1799-1958}
\format{A data frame with 58 observations on 23 variables:... |
#------------------------------------------------------------
# Load data and packages
#------------------------------------------------------------
library('tidyverse')
library('lubridate')
AB <- read.csv(here::here("datasets","ab_data.csv"))
head(AB)
#---------------------------------------------------------------... | /labs/lab_class_9_experiments.R | no_license | cesarruy/BUS696 | R | false | false | 3,520 | r | #------------------------------------------------------------
# Load data and packages
#------------------------------------------------------------
library('tidyverse')
library('lubridate')
AB <- read.csv(here::here("datasets","ab_data.csv"))
head(AB)
#---------------------------------------------------------------... |
/R/11.1.R | no_license | njamali/CodeBase | R | false | false | 26,426 | r | ||
##Get working directory,
getwd()
#check if data file exists already, if not download
filename <- 'household_power_consumption.zip'
if (!file.exists(filename)){
file1 <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(file1, filename, method="curl")
}
if (!fi... | /plot4.R | no_license | A-Wei/ExData_Plotting1 | R | false | false | 1,921 | r | ##Get working directory,
getwd()
#check if data file exists already, if not download
filename <- 'household_power_consumption.zip'
if (!file.exists(filename)){
file1 <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(file1, filename, method="curl")
}
if (!fi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/opsworkscm_service.R
\name{opsworkscm}
\alias{opsworkscm}
\title{AWS OpsWorks CM}
\usage{
opsworkscm(config = list())
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.}
}
\value{
A client for the serv... | /cran/paws.management/man/opsworkscm.Rd | permissive | williazo/paws | R | false | true | 6,244 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/opsworkscm_service.R
\name{opsworkscm}
\alias{opsworkscm}
\title{AWS OpsWorks CM}
\usage{
opsworkscm(config = list())
}
\arguments{
\item{config}{Optional configuration of credentials, endpoint, and/or region.}
}
\value{
A client for the serv... |
#' @title Retrieve SB item
#'
#' @export
#' @template manipulate_item
#' @return An object of class \code{sbitem}
#'
#' @description
#' Retrieves an item and its metadata from ScienceBase based on its
#' unique ID. Errors if the requested item ID does not exist or
#' access is restricted due to permissions.
#'
#' ... | /R/item_get.R | permissive | PatrickEslick/sbtools | R | false | false | 1,089 | r | #' @title Retrieve SB item
#'
#' @export
#' @template manipulate_item
#' @return An object of class \code{sbitem}
#'
#' @description
#' Retrieves an item and its metadata from ScienceBase based on its
#' unique ID. Errors if the requested item ID does not exist or
#' access is restricted due to permissions.
#'
#' ... |
context("Palm")
library(flipStandardCharts)
library(flipChartBasics)
set.seed(12345)
dat1 <- matrix(1:12, 3, 4)
dat2 <- matrix(1:60, 12, 5)
dat2[3, 3] <- NA
colnames(dat2) <- c("Bayswater", "Queensway", "Hammersmith", "Holland Park", "Notting Hill")
rownames(dat2) <- LETTERS[1:12]
dat3 <- matrix(runif(100), 5, 20)
ro... | /tests/testthat/test-palm.R | no_license | Displayr/flipStandardCharts | R | false | false | 5,834 | r | context("Palm")
library(flipStandardCharts)
library(flipChartBasics)
set.seed(12345)
dat1 <- matrix(1:12, 3, 4)
dat2 <- matrix(1:60, 12, 5)
dat2[3, 3] <- NA
colnames(dat2) <- c("Bayswater", "Queensway", "Hammersmith", "Holland Park", "Notting Hill")
rownames(dat2) <- LETTERS[1:12]
dat3 <- matrix(runif(100), 5, 20)
ro... |
#Plot1
# Created by Shailesh Nair, 07 November 2015
# Coursera- Exploratory Data Analysis Course- Assignment1
# This r-Script reads in data from Local Working Directory and genrates a histogram of "Global Active Power" over a time span of 2 days
# from First Feb 2007 to 02 Feb 2007.
# Data Source : https://archive.ic... | /plot1.R | no_license | Shailf117/ExData_Plotting1 | R | false | false | 1,494 | r | #Plot1
# Created by Shailesh Nair, 07 November 2015
# Coursera- Exploratory Data Analysis Course- Assignment1
# This r-Script reads in data from Local Working Directory and genrates a histogram of "Global Active Power" over a time span of 2 days
# from First Feb 2007 to 02 Feb 2007.
# Data Source : https://archive.ic... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/creating.trait.R
\name{creating.trait}
\alias{creating.trait}
\title{Generation of genomic traits}
\usage{
creating.trait(
population,
real.bv.add = NULL,
real.bv.mult = NULL,
real.bv.dice = NULL,
bv.total = 0,
polygen... | /man/creating.trait.Rd | no_license | cran/MoBPS | R | false | true | 4,297 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/creating.trait.R
\name{creating.trait}
\alias{creating.trait}
\title{Generation of genomic traits}
\usage{
creating.trait(
population,
real.bv.add = NULL,
real.bv.mult = NULL,
real.bv.dice = NULL,
bv.total = 0,
polygen... |
source("lnviD2.R")
twostate_D <- function(dname){
dat <- get(load(paste0(dname,".rda")))
dat <- dat/10e10
lowerV <- c(-2,-2,.8,.8,0.001,-5)
upperV <- c(2,2,.999,.999,5,5)
const_mat <- matrix(0,length(lowerV),length(lowerV))
diag(const_mat) <- 1
const_mat <- rbind(const_mat,-const_mat)
const_mat <- c... | /twostate_D.R | permissive | fuadcan/dmarkovCAD | R | false | false | 1,202 | r | source("lnviD2.R")
twostate_D <- function(dname){
dat <- get(load(paste0(dname,".rda")))
dat <- dat/10e10
lowerV <- c(-2,-2,.8,.8,0.001,-5)
upperV <- c(2,2,.999,.999,5,5)
const_mat <- matrix(0,length(lowerV),length(lowerV))
diag(const_mat) <- 1
const_mat <- rbind(const_mat,-const_mat)
const_mat <- c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.