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 |
|---|---|---|---|---|---|---|---|---|---|
###Assignment 2###
# Author: Paul DellaGrotte
library(ggplot2) # Charts
library(pastecs) # descriptive statistics
library(rpart) # decision tree
library(rpart.plot)
library(randomForest)
library(MASS)
library(reshape2)
library(lattice)
library(leaps)
library(glmnet)
library(plyr)
###################################... | /diamonds_analysis.R | no_license | pdellagrotte/diamonds | R | false | false | 10,967 | r | ###Assignment 2###
# Author: Paul DellaGrotte
library(ggplot2) # Charts
library(pastecs) # descriptive statistics
library(rpart) # decision tree
library(rpart.plot)
library(randomForest)
library(MASS)
library(reshape2)
library(lattice)
library(leaps)
library(glmnet)
library(plyr)
###################################... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/02_Romics_Base_Functions.R
\name{romicsUpdateSteps}
\alias{romicsUpdateSteps}
\title{stepUpdater()}
\usage{
romicsUpdateSteps(romics_object, arguments)
}
\arguments{
\item{romics_object}{A romics_object created using romicsCreateObject()}
\i... | /man/romicsUpdateSteps.Rd | permissive | asalt/RomicsProcessor | R | false | true | 1,668 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/02_Romics_Base_Functions.R
\name{romicsUpdateSteps}
\alias{romicsUpdateSteps}
\title{stepUpdater()}
\usage{
romicsUpdateSteps(romics_object, arguments)
}
\arguments{
\item{romics_object}{A romics_object created using romicsCreateObject()}
\i... |
filename <- "./household_power_consumption.txt"
##Opens the file and sets the class of each column
data <- read.table(filename,header = TRUE,sep = ";",colClasses = c("character", "character", rep("numeric",7)),na = "?")
##Subsets the data according to the two days we are looking to plot
data <- data[data$Date == "1/... | /plot2.R | no_license | Bissingb/ExData_Plotting1 | R | false | false | 725 | r | filename <- "./household_power_consumption.txt"
##Opens the file and sets the class of each column
data <- read.table(filename,header = TRUE,sep = ";",colClasses = c("character", "character", rep("numeric",7)),na = "?")
##Subsets the data according to the two days we are looking to plot
data <- data[data$Date == "1/... |
#' Get all templates imported on the server
#'
#' \code{get_qx} returns a data frame with all the questionnaires that are currently
#' imported on the server
#'
#' @param server Prefix for the survey server. It is whatever comes before
#' mysurvey.solutions: [prefix].mysurvey.solutions.
#' @param user Username for the ... | /R/get_qx.R | permissive | l2nguyen/susoapir | R | false | false | 3,142 | r | #' Get all templates imported on the server
#'
#' \code{get_qx} returns a data frame with all the questionnaires that are currently
#' imported on the server
#'
#' @param server Prefix for the survey server. It is whatever comes before
#' mysurvey.solutions: [prefix].mysurvey.solutions.
#' @param user Username for the ... |
context("Check xrefs")
test_that("Check case-sensitivity", {
expect_error(check_xrefs("./check-xrefs/case-sensitive.tex", permitted.case = "upper"))
expect_error(check_xrefs("./check-xrefs/case-sensitive-C.tex", permitted.case = "upper"))
expect_error(check_xrefs("./check-xrefs/case-sensitive-lower.tex", permitt... | /tests/testthat/test_check_xrefs.R | no_license | HughParsonage/TeXCheckR | R | false | false | 996 | r | context("Check xrefs")
test_that("Check case-sensitivity", {
expect_error(check_xrefs("./check-xrefs/case-sensitive.tex", permitted.case = "upper"))
expect_error(check_xrefs("./check-xrefs/case-sensitive-C.tex", permitted.case = "upper"))
expect_error(check_xrefs("./check-xrefs/case-sensitive-lower.tex", permitt... |
library(tidyverse)
library(economiccomplexity)
data_yrpc <- dir("data/country/", full.names = TRUE) %>%
map_df(readRDS)
# data_yrpc <- data_yrpc %>%
# mutate_if(is.numeric, replace_na, 0)
data_yrpc %>%
filter(is.na(community_name))
data_yrpc <- data_yrpc %>%
filter(!is.na(community_name))
data_yrpc %>%
... | /R/01-process-data.R | no_license | yuster0/trd-sttstcs | R | false | false | 2,214 | r | library(tidyverse)
library(economiccomplexity)
data_yrpc <- dir("data/country/", full.names = TRUE) %>%
map_df(readRDS)
# data_yrpc <- data_yrpc %>%
# mutate_if(is.numeric, replace_na, 0)
data_yrpc %>%
filter(is.na(community_name))
data_yrpc <- data_yrpc %>%
filter(!is.na(community_name))
data_yrpc %>%
... |
library(tidyverse)
library(synapser)
library(random)
synLogin()
dr_zip <- synGet("syn21036458")$path
dr_files <- unzip(dr_zip, list = T)$Name
dr_files <- dr_files[grep("dose-responses/[A-Za-z0-9-]+.csv",dr_files)]
dr_paths <- unzip(dr_zip, files = dr_files)
dr <- purrr::map(dr_paths, readr::read_csv)
cmpd_ids <- s... | /infra/R/data_gen/rename_dose_response_data.R | permissive | Sage-Bionetworks-Challenges/CTD2-Panacea-Challenge | R | false | false | 1,022 | r | library(tidyverse)
library(synapser)
library(random)
synLogin()
dr_zip <- synGet("syn21036458")$path
dr_files <- unzip(dr_zip, list = T)$Name
dr_files <- dr_files[grep("dose-responses/[A-Za-z0-9-]+.csv",dr_files)]
dr_paths <- unzip(dr_zip, files = dr_files)
dr <- purrr::map(dr_paths, readr::read_csv)
cmpd_ids <- s... |
\name{NEWS}
\title{News for Package 'Rcpp'}
\newcommand{\cpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
\section{Changes in [unreleased] Rcpp version 0.10.7 (2013-11-30)}{
\itemize{
\item Changes in Rcpp API:
\itemize{
\item New class \code{StretchyList} for pair lists with fast addition ... | /inst/NEWS.Rd | no_license | murraystokely/Rcpp | R | false | false | 75,678 | rd | \name{NEWS}
\title{News for Package 'Rcpp'}
\newcommand{\cpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
\section{Changes in [unreleased] Rcpp version 0.10.7 (2013-11-30)}{
\itemize{
\item Changes in Rcpp API:
\itemize{
\item New class \code{StretchyList} for pair lists with fast addition ... |
# Stolen from statebins
geom_rtile <- function(mapping = NULL, data = NULL,
stat = "identity", position = "identity",
radius = grid::unit(6, "pt"),
...,
na.rm = FALSE,
show.legend = NA,
... | /R/geom_rtile.R | no_license | delabj/AfricaCountryBins | R | false | false | 1,691 | r | # Stolen from statebins
geom_rtile <- function(mapping = NULL, data = NULL,
stat = "identity", position = "identity",
radius = grid::unit(6, "pt"),
...,
na.rm = FALSE,
show.legend = NA,
... |
#########################################################################
#
# Rasterize vector data for European protected areas
#
# Samantha Franks
# 24 Dec 2013
#
#########################################################################
rm(list=ls())
### LOAD PACKAGES
library(sp)
library(raster)
library(rgdal)
libr... | /rasterize_protected_areas_shapefile.R | no_license | guzhongru/cuckoo_habitatuse_scripts | R | false | false | 7,349 | r | #########################################################################
#
# Rasterize vector data for European protected areas
#
# Samantha Franks
# 24 Dec 2013
#
#########################################################################
rm(list=ls())
### LOAD PACKAGES
library(sp)
library(raster)
library(rgdal)
libr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{prox}
\alias{prox}
\title{Perform proximal mapping of rho tau}
\usage{
prox(xi, alpha, tau)
}
\arguments{
\item{xi}{a single number}
\item{alpha}{a number}
\item{tau}{a number between 0 and 1, the quantile of interest}
}... | /man/prox.Rd | permissive | fboehm/openFHDQR | R | false | true | 425 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{prox}
\alias{prox}
\title{Perform proximal mapping of rho tau}
\usage{
prox(xi, alpha, tau)
}
\arguments{
\item{xi}{a single number}
\item{alpha}{a number}
\item{tau}{a number between 0 and 1, the quantile of interest}
}... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bonsai_error_functions.R
\name{CV_Mean_Error}
\alias{CV_Mean_Error}
\title{Error functions}
\usage{
CV_Mean_Error(y = NULL, error)
}
\arguments{
\item{y}{A time series}
\item{error}{the error created by some cross-validation method}
\item{h... | /man/CV_Mean_Error.Rd | no_license | brunocarlin/forecast.bonsai | R | false | true | 478 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bonsai_error_functions.R
\name{CV_Mean_Error}
\alias{CV_Mean_Error}
\title{Error functions}
\usage{
CV_Mean_Error(y = NULL, error)
}
\arguments{
\item{y}{A time series}
\item{error}{the error created by some cross-validation method}
\item{h... |
library(TCGAbiolinks)
library(SummarizedExperiment)
library(tidyverse)
#------------------------------------
# 获取 DNA 同时检测甲基化和表达的样本
#------------------------------------
# 结肠和直肠数据
lgg.samples <- matchedMetExp("TCGA-LGG", n = 10)
gbm.samples <- matchedMetExp("TCGA-GBM", n = 10)
samples <- c(lgg.samples,gbm.samples)
#-... | /R/TCGA/TCGA_methy_motif.R | no_license | CuncanDeng/learn | R | false | false | 3,808 | r | library(TCGAbiolinks)
library(SummarizedExperiment)
library(tidyverse)
#------------------------------------
# 获取 DNA 同时检测甲基化和表达的样本
#------------------------------------
# 结肠和直肠数据
lgg.samples <- matchedMetExp("TCGA-LGG", n = 10)
gbm.samples <- matchedMetExp("TCGA-GBM", n = 10)
samples <- c(lgg.samples,gbm.samples)
#-... |
#This is a modified copy of the file CART.R in the git repository https://github.com/atrisarkar/ces
#
# Author: Atri
###############################################################################
# rpart() function is a built in R library fuction for Recursive Partitioning and Regression Trees
# CART: building a bina... | /ces_modified/CART.R | no_license | yoola/Cross_ML | R | false | false | 10,130 | r | #This is a modified copy of the file CART.R in the git repository https://github.com/atrisarkar/ces
#
# Author: Atri
###############################################################################
# rpart() function is a built in R library fuction for Recursive Partitioning and Regression Trees
# CART: building a bina... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/resourcegroupstaggingapi_service.R
\name{resourcegroupstaggingapi}
\alias{resourcegroupstaggingapi}
\title{AWS Resource Groups Tagging API}
\usage{
resourcegroupstaggingapi(config = list())
}
\arguments{
\item{config}{Optional configuration o... | /cran/paws.management/man/resourcegroupstaggingapi.Rd | permissive | jcheng5/paws | R | false | true | 6,333 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/resourcegroupstaggingapi_service.R
\name{resourcegroupstaggingapi}
\alias{resourcegroupstaggingapi}
\title{AWS Resource Groups Tagging API}
\usage{
resourcegroupstaggingapi(config = list())
}
\arguments{
\item{config}{Optional configuration o... |
.libPaths(c("Q:/Variablenexport/variableMetadataPreparation/library", .libPaths()))
parse_cli_arguments <- function() {
option_list <- list(
optparse::make_option(c("-e", "--excel-directory"),
type = "character", action = "store", default = NA,
help = paste0(
"Path to the directory containing... | /bin/parse_cli_arguments.R | permissive | dzhw/variableMetadataPreparation | R | false | false | 2,761 | r | .libPaths(c("Q:/Variablenexport/variableMetadataPreparation/library", .libPaths()))
parse_cli_arguments <- function() {
option_list <- list(
optparse::make_option(c("-e", "--excel-directory"),
type = "character", action = "store", default = NA,
help = paste0(
"Path to the directory containing... |
power.mean <-
function(values, order = 1, weights = rep(1, length(values)))
{
## Normalise weights to sum to 1 (as per Rényi)
proportions <- weights / sum(weights)
## Check that the number of 'values' is equal to the number of 'weights'
if (length(values) != length(weights)) stop('The number of values does n... | /R/power.mean.R | permissive | ljallen/RDiversity | R | false | false | 1,462 | r | power.mean <-
function(values, order = 1, weights = rep(1, length(values)))
{
## Normalise weights to sum to 1 (as per Rényi)
proportions <- weights / sum(weights)
## Check that the number of 'values' is equal to the number of 'weights'
if (length(values) != length(weights)) stop('The number of values does n... |
\name{states}
\alias{states}
\docType{data}
\title{
data: states
}
\description{
Spatial Polygon Data Frame of lower 48 U.S. states
}
\usage{data("states")
}
\format{
SpatialPolygonsDataFrame
}
\examples{
library(sp)
data("states")
plot(states)
}
| /man/states.Rd | no_license | AdaChornelia/assignR | R | false | false | 255 | rd | \name{states}
\alias{states}
\docType{data}
\title{
data: states
}
\description{
Spatial Polygon Data Frame of lower 48 U.S. states
}
\usage{data("states")
}
\format{
SpatialPolygonsDataFrame
}
\examples{
library(sp)
data("states")
plot(states)
}
|
test_that("Test readtext:::get_temp function for test dirs", {
filename <- readtext:::get_temp()
filename2 <- readtext:::get_temp()
expect_false(filename == filename2)
# test directory parameter
dirname <- readtext:::get_temp(directory = TRUE)
expect_true(dir.exists(dirname))
# test pr... | /tests/testthat/test-utils.R | no_license | quanteda/readtext | R | false | false | 2,471 | r | test_that("Test readtext:::get_temp function for test dirs", {
filename <- readtext:::get_temp()
filename2 <- readtext:::get_temp()
expect_false(filename == filename2)
# test directory parameter
dirname <- readtext:::get_temp(directory = TRUE)
expect_true(dir.exists(dirname))
# test pr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/concave-penalties.R
\name{Fig3.1}
\alias{Fig3.1}
\title{Reproduce Figure 3.1}
\usage{
Fig3.1(
range = c(-4, 4),
col = c("#FF4E37FF", "#00B500FF", "#008DFFFF"),
parlist = list(mfrow = c(1, 3), mar = c(5, 5, 5, 0.5), xpd = 1)
)
}
\argumen... | /man/Fig3.1.Rd | no_license | pbreheny/hdrm | R | false | true | 635 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/concave-penalties.R
\name{Fig3.1}
\alias{Fig3.1}
\title{Reproduce Figure 3.1}
\usage{
Fig3.1(
range = c(-4, 4),
col = c("#FF4E37FF", "#00B500FF", "#008DFFFF"),
parlist = list(mfrow = c(1, 3), mar = c(5, 5, 5, 0.5), xpd = 1)
)
}
\argumen... |
# plot info about fits from 3 sources
"model2d_3_plots" <- function(fitsum, L) {
fsr <- fitsum
corr_1_3 <- fsr[grep("corrSigma_d\\[.*.,1,3\\]", rownames(fsr)),]
corr_2_3 <- fsr[grep("corrSigma_d\\[.*.,2,3\\]", rownames(fsr)),]
# plot correlation vs time
pdf(paste0("pdf/2d_3/corr_L",L,".pdf"))
par(bty="l")
pl... | /R/plot_2d_3.R | no_license | MariaMcCrann/climate | R | false | false | 3,944 | r | # plot info about fits from 3 sources
"model2d_3_plots" <- function(fitsum, L) {
fsr <- fitsum
corr_1_3 <- fsr[grep("corrSigma_d\\[.*.,1,3\\]", rownames(fsr)),]
corr_2_3 <- fsr[grep("corrSigma_d\\[.*.,2,3\\]", rownames(fsr)),]
# plot correlation vs time
pdf(paste0("pdf/2d_3/corr_L",L,".pdf"))
par(bty="l")
pl... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/search_coha.R
\name{search_coha}
\alias{search_coha}
\title{Search the Corpus of Historical American English (COHA)}
\usage{
search_coha(search_terms, section = "fict", max_type = 10,
max_per_term = 100, max_total_result = 1000)
}
\argument... | /man/search_coha.Rd | no_license | ekbrown/byucorpora | R | false | true | 1,908 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/search_coha.R
\name{search_coha}
\alias{search_coha}
\title{Search the Corpus of Historical American English (COHA)}
\usage{
search_coha(search_terms, section = "fict", max_type = 10,
max_per_term = 100, max_total_result = 1000)
}
\argument... |
local({
# the requested version of renv
version <- "0.9.1"
# avoid recursion
if (!is.na(Sys.getenv("RENV_R_INITIALIZING", unset = NA)))
return(invisible(TRUE))
# signal that we're loading renv during R startup
Sys.setenv("RENV_R_INITIALIZING" = "true")
on.exit(Sys.unsetenv("RENV_R_INITIALIZING"), ... | /renv/activate.R | no_license | DmytroRybalko/AnalyticsEdge | R | false | false | 6,401 | r |
local({
# the requested version of renv
version <- "0.9.1"
# avoid recursion
if (!is.na(Sys.getenv("RENV_R_INITIALIZING", unset = NA)))
return(invisible(TRUE))
# signal that we're loading renv during R startup
Sys.setenv("RENV_R_INITIALIZING" = "true")
on.exit(Sys.unsetenv("RENV_R_INITIALIZING"), ... |
#plot3.R
#Loads data and creates plot3 from Projec Assignment 1 of
#Coursera's "Exploratory Data Analysis"
#(Aug 2014 session).
#
#script assumes that code file load_data.R is in the
#working directory.
#
#png graphics file is written to working directory
source("load_data.R")
writeLines("creating plot3.png...")
pn... | /plot3.R | no_license | dkgonda/ExData_Plotting1 | R | false | false | 962 | r | #plot3.R
#Loads data and creates plot3 from Projec Assignment 1 of
#Coursera's "Exploratory Data Analysis"
#(Aug 2014 session).
#
#script assumes that code file load_data.R is in the
#working directory.
#
#png graphics file is written to working directory
source("load_data.R")
writeLines("creating plot3.png...")
pn... |
complete <- function(directory, id = 1:332) {
final.data <- data.frame()
for (i in id)
{
file.Path <- paste(getwd(), "/", directory, "/",formatC(i, width = 3, flag= "0" ), ".csv" ,sep="")
rawData <- read.csv(file.Path)
... | /Data Science/Coursera/R Programming Language/Week 2/complete.R | no_license | JoseMFdez-Econ/Work-Files | R | false | false | 846 | r | complete <- function(directory, id = 1:332) {
final.data <- data.frame()
for (i in id)
{
file.Path <- paste(getwd(), "/", directory, "/",formatC(i, width = 3, flag= "0" ), ".csv" ,sep="")
rawData <- read.csv(file.Path)
... |
## Vaccine Analysis Codes
library(data.table)
library(foreign)
library(fastmatch)
library(readstata13)
library(ggplot2)
library(scales)
library(lubridate)
library(zoo)
rm(list=ls())
setwd("/Users/ziao/Desktop/ALP301/Data")
data = as.data.table(read.csv("Academic_Survey_Research_in_Africa_2021_05_04_15_55_42.csv",
... | /Vaccine_analysis_data_summary.R | no_license | alexjuziao/ALP301-spr21-project1-1 | R | false | false | 6,328 | r | ## Vaccine Analysis Codes
library(data.table)
library(foreign)
library(fastmatch)
library(readstata13)
library(ggplot2)
library(scales)
library(lubridate)
library(zoo)
rm(list=ls())
setwd("/Users/ziao/Desktop/ALP301/Data")
data = as.data.table(read.csv("Academic_Survey_Research_in_Africa_2021_05_04_15_55_42.csv",
... |
# Making sure that making covariance functions into Rcpp functions
# still gives correct results.
# Exponential kernel
set.seed(0)
n <- 20
x <- matrix(seq(0,1,length.out = n), ncol=1)
f <- Vectorize(function(x) {sin(2*pi*x) + .5*sin(4*pi*x) +rnorm(1,0,.3)})
y <- f(x) #sin(2*pi*x) #+ rnorm(n,0,1e-1)
system.time(gp <-... | /scratch/scratch_kernels_rcpp.R | no_license | CollinErickson/GauPro | R | false | false | 4,158 | r | # Making sure that making covariance functions into Rcpp functions
# still gives correct results.
# Exponential kernel
set.seed(0)
n <- 20
x <- matrix(seq(0,1,length.out = n), ncol=1)
f <- Vectorize(function(x) {sin(2*pi*x) + .5*sin(4*pi*x) +rnorm(1,0,.3)})
y <- f(x) #sin(2*pi*x) #+ rnorm(n,0,1e-1)
system.time(gp <-... |
###################################
#Continuous Uniform Distribution
uniform.summary=function(a,b,plotpdf=TRUE,plotcdf=TRUE)
{
if(a>=b){return("a must be smaller than b")}
if(a==-Inf |b==Inf|a==Inf|b==-Inf){return("a and b must be finite")}
mu=(a+b)/2
sigma2=(b-a)^2/12
sigma=sqrt(sigma2)
if(plotpdf==TRUE &... | /R/Continuous.R | no_license | bgrose/StatEngine | R | false | false | 12,062 | r | ###################################
#Continuous Uniform Distribution
uniform.summary=function(a,b,plotpdf=TRUE,plotcdf=TRUE)
{
if(a>=b){return("a must be smaller than b")}
if(a==-Inf |b==Inf|a==Inf|b==-Inf){return("a and b must be finite")}
mu=(a+b)/2
sigma2=(b-a)^2/12
sigma=sqrt(sigma2)
if(plotpdf==TRUE &... |
library(shiny)
library(rqog)
library(dplyr)
library(tidyr)
library(shinycssloaders)
library(bslib)
library(metathis)
library(shinyWidgets)
library(glue)
valid_years <- 2016:as.integer(substr(Sys.Date(), 1, 4))
## get the names of all the data sets
dsets <- data(package = "rqog")$result[, c("Title", "Item")] %>% as_tib... | /inst/extras/rqog_app/app.R | permissive | rOpenGov/rqog | R | false | false | 10,298 | r | library(shiny)
library(rqog)
library(dplyr)
library(tidyr)
library(shinycssloaders)
library(bslib)
library(metathis)
library(shinyWidgets)
library(glue)
valid_years <- 2016:as.integer(substr(Sys.Date(), 1, 4))
## get the names of all the data sets
dsets <- data(package = "rqog")$result[, c("Title", "Item")] %>% as_tib... |
# Add any project specific configuration here.
add.config(
threads=6
)
| /lib/globals.R | no_license | joshbiology/pan-meyers-et-al | R | false | false | 80 | r | # Add any project specific configuration here.
add.config(
threads=6
)
|
################################################################################
### BIO 410/510 ###
### TRANSFORM: Rearranging data ###
#############################################################################... | /06_dplyr/rearrange_code-abbrev.R | no_license | laurenmh/bio-data-course-2018 | R | false | false | 10,788 | r | ################################################################################
### BIO 410/510 ###
### TRANSFORM: Rearranging data ###
#############################################################################... |
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# READ DATA
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setwd(DD)
# select random samples from the whole training set
#--------------------------------------------------------... | /SCRIPTS/read.data.r | no_license | davan690/SDM-comparison | R | false | false | 6,072 | r | #~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# READ DATA
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
setwd(DD)
# select random samples from the whole training set
#--------------------------------------------------------... |
# The script ./mhg_code/'!MoralizingGods.R' is a cleaned version of code from:
#
# https://github.com/pesavage/moralizing-gods
#
# The script outputs the text file MoralisingGodsStatus.txt at the point where
# the relevant Nature analysis occurs.
#
# To check the code in ./mhg_code, the data used to generate Extended D... | /mhg_code/check_moralising_gods_status.R | permissive | jaewshin/Holocene | R | false | false | 2,454 | r | # The script ./mhg_code/'!MoralizingGods.R' is a cleaned version of code from:
#
# https://github.com/pesavage/moralizing-gods
#
# The script outputs the text file MoralisingGodsStatus.txt at the point where
# the relevant Nature analysis occurs.
#
# To check the code in ./mhg_code, the data used to generate Extended D... |
library(kknn)
all_data <- read.table('data/pima-indians-diabetes.data', sep = ',')
all_data$V9 <- as.factor(all_data$V9)
train_knn <- function(distance) {
model <- train.kknn(V9 ~ ., data = all_data, kmax = 50,
kernel = c("biweight", "triangular", "triweight", "cos", "inv", "gaussian",
... | /final/knn_cl.R | no_license | iliaKyzmin/Machine-Learning | R | false | false | 1,187 | r | library(kknn)
all_data <- read.table('data/pima-indians-diabetes.data', sep = ',')
all_data$V9 <- as.factor(all_data$V9)
train_knn <- function(distance) {
model <- train.kknn(V9 ~ ., data = all_data, kmax = 50,
kernel = c("biweight", "triangular", "triweight", "cos", "inv", "gaussian",
... |
# This is my first r script | /first r script.R | no_license | ppleeuw/introtoBDA | R | false | false | 27 | r | # This is my first r script |
### Jinliang Yang
### use impute_parent in CJ data
###########
write_subgeno <- function(geno, ped, ksize=10, outfile="out"){
ped[, 1:3] <- apply(ped[, 1:3], 2, as.character)
tot <- ceiling(nrow(ped)/10)
#for(i in 1:tot){
tem <- lapply(1:tot, function(i){
message(sprintf("###>>> start to write... | /profiling/8.Luis_data/8.D.0_ik_update_geno.R | no_license | yangjl/phasing | R | false | false | 1,682 | r | ### Jinliang Yang
### use impute_parent in CJ data
###########
write_subgeno <- function(geno, ped, ksize=10, outfile="out"){
ped[, 1:3] <- apply(ped[, 1:3], 2, as.character)
tot <- ceiling(nrow(ped)/10)
#for(i in 1:tot){
tem <- lapply(1:tot, function(i){
message(sprintf("###>>> start to write... |
#####################################
##### Get followers with rtweet #####
#####################################
library(rtweet)
# Get bassnectar info
lorin_info <- lookup_users("bassnectar")
######################### Fetch User IDs #######################################
# retreive initial user ids
basshead_IDs <... | /Get Follower info - rtweet.R | no_license | Dmunslow/BassnectarProject | R | false | false | 2,343 | r | #####################################
##### Get followers with rtweet #####
#####################################
library(rtweet)
# Get bassnectar info
lorin_info <- lookup_users("bassnectar")
######################### Fetch User IDs #######################################
# retreive initial user ids
basshead_IDs <... |
library(dplyr)
## Initial set-up - DO NOT RERUN
# hkdc %>%
# mutate(Code = substr(ConstituencyCode, start = 1, stop = 1)) %>%
# select(Code, District_EN, District_ZH, Region_ZH, Region_ZH) %>%
# group_by_all() %>%
# summarise(n = n()) %>%
# writexl::write_xlsx(here::here(".dev", "data", "hkdistrictsummary.xl... | /.dev/script/hkdistrictsummary - preparation.R | permissive | Hong-Kong-Districts-Info/hkdatasets | R | false | false | 490 | r | library(dplyr)
## Initial set-up - DO NOT RERUN
# hkdc %>%
# mutate(Code = substr(ConstituencyCode, start = 1, stop = 1)) %>%
# select(Code, District_EN, District_ZH, Region_ZH, Region_ZH) %>%
# group_by_all() %>%
# summarise(n = n()) %>%
# writexl::write_xlsx(here::here(".dev", "data", "hkdistrictsummary.xl... |
library(ebirdst)
library(rnaturalearth)
library(ggplot2)
library(viridisLite)
library(dplyr)
library(tidyverse)
library(raster)
library(sf)
library(readr)
#Select The species you want to plot here. In this example, I am using Green Winged Teal "gnwtea".
## For Mallard use "mallar3" and for Pintail use "norpin"
sp_p... | /ABD_Maps.R | no_license | OrinRobinson/Ducks_and_eBird | R | false | false | 3,700 | r | library(ebirdst)
library(rnaturalearth)
library(ggplot2)
library(viridisLite)
library(dplyr)
library(tidyverse)
library(raster)
library(sf)
library(readr)
#Select The species you want to plot here. In this example, I am using Green Winged Teal "gnwtea".
## For Mallard use "mallar3" and for Pintail use "norpin"
sp_p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/strvalidator-package.r
\docType{data}
\name{set2}
\alias{set2}
\title{SGMPlus example data}
\format{A data frame with 32 rows and 5 variables}
\usage{
data(set2)
}
\description{
A slimmed dataset containing SGM Plus genotyping result for 2 re... | /man/set2.Rd | no_license | sctyner/strvalidator | R | false | true | 364 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/strvalidator-package.r
\docType{data}
\name{set2}
\alias{set2}
\title{SGMPlus example data}
\format{A data frame with 32 rows and 5 variables}
\usage{
data(set2)
}
\description{
A slimmed dataset containing SGM Plus genotyping result for 2 re... |
#!/usr/bin/env Rscript
rm(list = ls())
# Rscript scripts/generateMissingVariantCountStackBarChartParallel.R \
# --cores 3 \
# --inputs /scratch/yenc/projects/VisualVariants/data/Nebraska.Chr01.txt \
# --inputs /scratch/yenc/projects/VisualVariants/data/Nebraska.Chr02.txt \
# --inputs /scratch/yenc/projects/VisualVari... | /scripts/generateMissingVariantCountStackBarChartParallel.R | permissive | yenon118/VisualVariants | R | false | false | 2,110 | r | #!/usr/bin/env Rscript
rm(list = ls())
# Rscript scripts/generateMissingVariantCountStackBarChartParallel.R \
# --cores 3 \
# --inputs /scratch/yenc/projects/VisualVariants/data/Nebraska.Chr01.txt \
# --inputs /scratch/yenc/projects/VisualVariants/data/Nebraska.Chr02.txt \
# --inputs /scratch/yenc/projects/VisualVari... |
llData <- read.table("./household_power_consumption.txt", sep = ";", header = TRUE)
dataOfInterest <- allData [allData$Date=="1/2/2007" | allData$Date=="2/2/2007",]
dataOfInterest$Global_active_power <- as.numeric(levels(dataOfInterest$Global_active_power))[dataOfInterest$Global_active_power]
dataOfInterest$Time = strp... | /plot4.R | no_license | aepag/ExData_Plotting1 | R | false | false | 2,617 | r | llData <- read.table("./household_power_consumption.txt", sep = ";", header = TRUE)
dataOfInterest <- allData [allData$Date=="1/2/2007" | allData$Date=="2/2/2007",]
dataOfInterest$Global_active_power <- as.numeric(levels(dataOfInterest$Global_active_power))[dataOfInterest$Global_active_power]
dataOfInterest$Time = strp... |
library(data.table);library(magrittr);library(DT);library(jstable);library(dplyr);library(stats)
#setwd("~/ShinyApps/jihyunbaek/lithium")
lithium <- readRDS("lithium.RDS")
# CKD-EPI----------------------------------------
CKDEPI<-function(scr,age,sex){
if(sex=="F"){ k<-0.7; alpha<-(-0.329); const<-1.018 }
else{ ... | /shiny/global.R | permissive | zarathucorp/lithium-smcpsy | R | false | false | 18,905 | r | library(data.table);library(magrittr);library(DT);library(jstable);library(dplyr);library(stats)
#setwd("~/ShinyApps/jihyunbaek/lithium")
lithium <- readRDS("lithium.RDS")
# CKD-EPI----------------------------------------
CKDEPI<-function(scr,age,sex){
if(sex=="F"){ k<-0.7; alpha<-(-0.329); const<-1.018 }
else{ ... |
library(tidyverse)
library(glmnet)
library(parallel)
# Prepare the data --------------------------------------------------------
data <- read_rds("data/phenotype/yield_blue_env.rds") %>%
filter(!str_detect(Site, "2017$"))
# Response
y <- data$BLUE
# Sites for LOO evaluation
sites <- data$Site
site_levels <- uniqu... | /03.variable_selection/old/04b.lasso.R | no_license | amkusmec/genomes2fields | R | false | false | 3,721 | r | library(tidyverse)
library(glmnet)
library(parallel)
# Prepare the data --------------------------------------------------------
data <- read_rds("data/phenotype/yield_blue_env.rds") %>%
filter(!str_detect(Site, "2017$"))
# Response
y <- data$BLUE
# Sites for LOO evaluation
sites <- data$Site
site_levels <- uniqu... |
# Stage1Functions_.R
# Helper functions for Stage 1: estimating the community-level outcomes & getting covariate data
#
# Laura B. Balzer, PhD MPhil
# lbalzer@umass.edu
# Lead Statistician for SEARCH
get.subgroup <- function(data, subgroup, time=0){
subgroup <- as.character(subgroup)
this.subgroup <- rep(F, nr... | /Stage1_Functions.R | permissive | LauraBalzer/SEARCH_Analysis_Adults | R | false | false | 8,891 | r | # Stage1Functions_.R
# Helper functions for Stage 1: estimating the community-level outcomes & getting covariate data
#
# Laura B. Balzer, PhD MPhil
# lbalzer@umass.edu
# Lead Statistician for SEARCH
get.subgroup <- function(data, subgroup, time=0){
subgroup <- as.character(subgroup)
this.subgroup <- rep(F, nr... |
#Full length 16S Analysis using DADA2
#EM Sogin
#Update March 2020
#Description: Analysis of pacbio data with dada2 package
#Set up working space
rm(list=ls())
#libraries
library(ggplot2)
library(ape)
library(dada2)
library(phyloseq)
library(ShortRead)
library(Biostrings)
#Others
path<-"/home/maggie/Documents/Projec... | /scripts/metagenomic/pac_bio_16S.R | no_license | esogin/sweet_spots_in_the_sea | R | false | false | 4,340 | r | #Full length 16S Analysis using DADA2
#EM Sogin
#Update March 2020
#Description: Analysis of pacbio data with dada2 package
#Set up working space
rm(list=ls())
#libraries
library(ggplot2)
library(ape)
library(dada2)
library(phyloseq)
library(ShortRead)
library(Biostrings)
#Others
path<-"/home/maggie/Documents/Projec... |
library(geozoning)
### Name: testInterSpeZ1
### Title: testInterSpeZ1
### Aliases: testInterSpeZ1
### Keywords: internal
### ** Examples
## No test:
data(mapTest)
qProb=c(0.2,0.5)
ZK = initialZoning(qProb, mapTest)
K=ZK$resZ
Z=K$zonePolygone
plotZ(Z)
Z58=rgeos::gConvexHull(rgeos::gUnion(Z[[8]],Z[[5]]))
Z[[length(Z... | /data/genthat_extracted_code/geozoning/examples/testInterSpeZ1.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 423 | r | library(geozoning)
### Name: testInterSpeZ1
### Title: testInterSpeZ1
### Aliases: testInterSpeZ1
### Keywords: internal
### ** Examples
## No test:
data(mapTest)
qProb=c(0.2,0.5)
ZK = initialZoning(qProb, mapTest)
K=ZK$resZ
Z=K$zonePolygone
plotZ(Z)
Z58=rgeos::gConvexHull(rgeos::gUnion(Z[[8]],Z[[5]]))
Z[[length(Z... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatial.R
\name{UTM30}
\alias{UTM30}
\title{UTM30}
\usage{
UTM30(x)
}
\arguments{
\item{x}{}
}
\description{
UTM30
}
| /man/UTM30.Rd | no_license | davesteps/randomFuns | R | false | true | 196 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatial.R
\name{UTM30}
\alias{UTM30}
\title{UTM30}
\usage{
UTM30(x)
}
\arguments{
\item{x}{}
}
\description{
UTM30
}
|
library(magick)
library(hexSticker)
ua <- image_read("img/ua_white_noname.png")
#raven <- image_flop(raven) # flying away
#raven <- image_background(raven, "none")
print(sticker(ua,
package = "maranR",
#p_family = "Lato",
p_size = 6,
p_y = 1.5,
... | /maranr_gen.R | no_license | LizLeki/hexSticker_generation | R | false | false | 575 | r | library(magick)
library(hexSticker)
ua <- image_read("img/ua_white_noname.png")
#raven <- image_flop(raven) # flying away
#raven <- image_background(raven, "none")
print(sticker(ua,
package = "maranR",
#p_family = "Lato",
p_size = 6,
p_y = 1.5,
... |
# Loading data
file_path <- c('states/geo1_ar1970_2010/geo1_ar1970_2010.shp',
'states/geo1_bo1976_2001/geo1_bo1976_2001.shp',
'states/geo1_cl1982_2002/geo1_cl1982_2002.shp',
'states/geo1_co1964_2005/geo1_co1964_2005.shp',
'states/geo1_cr1963_2011/geo1_cr1963... | /scripts/data_prep_state_level.R | no_license | sebastianellingsen/ports_ml | R | false | false | 5,865 | r |
# Loading data
file_path <- c('states/geo1_ar1970_2010/geo1_ar1970_2010.shp',
'states/geo1_bo1976_2001/geo1_bo1976_2001.shp',
'states/geo1_cl1982_2002/geo1_cl1982_2002.shp',
'states/geo1_co1964_2005/geo1_co1964_2005.shp',
'states/geo1_cr1963_2011/geo1_cr1963... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Lock5withR-package.R
\docType{data}
\name{RandomP50N200}
\alias{RandomP50N200}
\title{Simulated proportions}
\format{A data frame with 5000 observations on the following 2 variables.
\itemize{
\item{\code{Count}} {Number of simulated "yes... | /man/RandomP50N200.Rd | no_license | klaassenj/Lock5withR | R | false | true | 710 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Lock5withR-package.R
\docType{data}
\name{RandomP50N200}
\alias{RandomP50N200}
\title{Simulated proportions}
\format{A data frame with 5000 observations on the following 2 variables.
\itemize{
\item{\code{Count}} {Number of simulated "yes... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.R
\name{human_equilibrium_no_het}
\alias{human_equilibrium_no_het}
\title{Equilibrium solution without biting heterogeneity}
\usage{
human_equilibrium_no_het(EIR, ft, p, age)
}
\arguments{
\item{EIR}{EIR for adults, in units of infectiou... | /man/human_equilibrium_no_het.Rd | permissive | mrc-ide/malariaEquilibrium | R | false | true | 1,145 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/main.R
\name{human_equilibrium_no_het}
\alias{human_equilibrium_no_het}
\title{Equilibrium solution without biting heterogeneity}
\usage{
human_equilibrium_no_het(EIR, ft, p, age)
}
\arguments{
\item{EIR}{EIR for adults, in units of infectiou... |
## These are some of the core functions used in the analyses
## Some initial setup
library(RColorBrewer)
palette(brewer.pal(8,"Dark2"))
library("rootSolve")
library("deSolve")
library(xtable)
library(fields)
############################
## The model ###
###########################
##' Single age class mod... | /Code/ACF-base.R | no_license | scottyaz/CostOfActiveCaseFinding | R | false | false | 91,397 | r | ## These are some of the core functions used in the analyses
## Some initial setup
library(RColorBrewer)
palette(brewer.pal(8,"Dark2"))
library("rootSolve")
library("deSolve")
library(xtable)
library(fields)
############################
## The model ###
###########################
##' Single age class mod... |
.refit <- function(object, fitting.method = "quadratic", jackknife.estimation = "quadratic",
asymptotic = TRUE, allowed.fitting = c("quad", "line", "nonl", "logl",
"log2"), allowed.jackknife = c("quad", "line", "nonl", "logl",
... | /R/simex-internal.R | no_license | cran/simex | R | false | false | 14,350 | r | .refit <- function(object, fitting.method = "quadratic", jackknife.estimation = "quadratic",
asymptotic = TRUE, allowed.fitting = c("quad", "line", "nonl", "logl",
"log2"), allowed.jackknife = c("quad", "line", "nonl", "logl",
... |
\docType{package}
\name{ruca-package}
\alias{ruca}
\alias{ruca-package}
\title{Rural-Urban Commuting Area Codes}
\description{
Rural-Urban Commuting Area Codes
}
\details{
Given a postal code, will determine the urbanicity of
that region based upon Rural Health Research Center's
Rural-Urban Commuting Area Codes... | /man/ruca-package.Rd | no_license | Eemaa26/ruca | R | false | false | 426 | rd | \docType{package}
\name{ruca-package}
\alias{ruca}
\alias{ruca-package}
\title{Rural-Urban Commuting Area Codes}
\description{
Rural-Urban Commuting Area Codes
}
\details{
Given a postal code, will determine the urbanicity of
that region based upon Rural Health Research Center's
Rural-Urban Commuting Area Codes... |
# Exercise 1: working with data frames (review)
# Install devtools package: allows installations from GitHub
install.packages("devtools")
install.packages("dplyr")
library("dplyr")
# Install "fueleconomy" dataset from GitHub
devtools::install_github("hadley/fueleconomy")
# Use the `libary()` function to load the "fu... | /chapter-11-exercises/exercise-1/exercise.R | permissive | ElsaZhong/book-exercises | R | false | false | 2,137 | r | # Exercise 1: working with data frames (review)
# Install devtools package: allows installations from GitHub
install.packages("devtools")
install.packages("dplyr")
library("dplyr")
# Install "fueleconomy" dataset from GitHub
devtools::install_github("hadley/fueleconomy")
# Use the `libary()` function to load the "fu... |
testlist <- list(a = 753170038L, b = 1981501696L, x = integer(0))
result <- do.call(grattan:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610056516-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 126 | r | testlist <- list(a = 753170038L, b = 1981501696L, x = integer(0))
result <- do.call(grattan:::anyOutside,testlist)
str(result) |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{diagnostic.plots}
\alias{diagnostic.plots}
\title{R function plotting histograms and scatter plots of data, residuals and Z-scores}
\usage{
diagnostic.plots(data, plot.options = c("matrix", "singles", "none"))
}
\arguments{
\item{data}{is a dataframe with aggre... | /man/diagnostic.plots.Rd | no_license | thl-mjv/euromomo | R | false | false | 543 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{diagnostic.plots}
\alias{diagnostic.plots}
\title{R function plotting histograms and scatter plots of data, residuals and Z-scores}
\usage{
diagnostic.plots(data, plot.options = c("matrix", "singles", "none"))
}
\arguments{
\item{data}{is a dataframe with aggre... |
\name{hc_polygon-dispatch}
\alias{hc_polygon}
\title{
Method dispatch page for hc_polygon
}
\description{
Method dispatch page for \code{hc_polygon}.
}
\section{Dispatch}{
\code{hc_polygon} can be dispatched on following classes:
\itemize{
\item \code{\link{hc_polygon,GenomicHilbertCurve-method}}, \code{\link{GenomicH... | /man/hc_polygon-dispatch.rd | permissive | jokergoo/HilbertCurve | R | false | false | 488 | rd | \name{hc_polygon-dispatch}
\alias{hc_polygon}
\title{
Method dispatch page for hc_polygon
}
\description{
Method dispatch page for \code{hc_polygon}.
}
\section{Dispatch}{
\code{hc_polygon} can be dispatched on following classes:
\itemize{
\item \code{\link{hc_polygon,GenomicHilbertCurve-method}}, \code{\link{GenomicH... |
\name{mediator}
\alias{mediator}
\title{Simple mediator analysis and graph}
\description{
A function that conducts a simple mediation analysis and makes the figure
shown in Wright and London (2009). }
\usage{
mediator(x, y, m, ...)
}
\arguments{
\item{x}{ The predictor variable }
\item{y}{ The respon... | /man/mediator.Rd | no_license | cran/mrt | R | false | false | 877 | rd | \name{mediator}
\alias{mediator}
\title{Simple mediator analysis and graph}
\description{
A function that conducts a simple mediation analysis and makes the figure
shown in Wright and London (2009). }
\usage{
mediator(x, y, m, ...)
}
\arguments{
\item{x}{ The predictor variable }
\item{y}{ The respon... |
allIdentical <- function(...) {
x <- list(...)
if(length(x)==1) x <- x[[1L]]
stopifnot(length(x)>=2L)
res <- identical(x[[1]], x[[2]])
if(length(x)>2) {
for(i in 3:length(x)) {
res <- identical(x[[i]], x[[i-1]]) && res
if(!res) return(FALSE)
}
}
return(res)
}
| /ribiosUtils/R/allIdentical.R | no_license | RCBiczok/ribios | R | false | false | 294 | r | allIdentical <- function(...) {
x <- list(...)
if(length(x)==1) x <- x[[1L]]
stopifnot(length(x)>=2L)
res <- identical(x[[1]], x[[2]])
if(length(x)>2) {
for(i in 3:length(x)) {
res <- identical(x[[i]], x[[i-1]]) && res
if(!res) return(FALSE)
}
}
return(res)
}
|
test_that("fix_windows_url works properly", {
testthat::skip_if_not(is_windows())
# Should add file:/// to file paths
expect_equal(
suppressWarnings(fix_windows_url("c:/path/file.html")),
"file:///c:/path/file.html"
)
expect_equal(
suppressWarnings(fix_windows_url("c:\\path\\file.html")),
"fi... | /tests/testthat/test-url.R | no_license | wch/webshot | R | false | false | 930 | r | test_that("fix_windows_url works properly", {
testthat::skip_if_not(is_windows())
# Should add file:/// to file paths
expect_equal(
suppressWarnings(fix_windows_url("c:/path/file.html")),
"file:///c:/path/file.html"
)
expect_equal(
suppressWarnings(fix_windows_url("c:\\path\\file.html")),
"fi... |
## Array Metadata interface from R
##
## Fundamentally we have two access methods, one 'simple' just stating
## a URI (so repeated and/or remote access is more costly) and one
## 'direct' using an external pointer. The wrappers here switch
## accordingly
setup <- function(tmp, verbose=FALSE) {
if (verbose) cat("Us... | /inst/examples/ex_metadata_2.R | permissive | aaronwolen/TileDB-R | R | false | false | 4,276 | r |
## Array Metadata interface from R
##
## Fundamentally we have two access methods, one 'simple' just stating
## a URI (so repeated and/or remote access is more costly) and one
## 'direct' using an external pointer. The wrappers here switch
## accordingly
setup <- function(tmp, verbose=FALSE) {
if (verbose) cat("Us... |
pop_size_female <- read.csv('pop_size_corrected.txt') %>%
filter(Age==0) %>% .[,"Female"]
pop_size_male <- read.csv('pop_size_corrected.txt') %>%
filter(Age==0) %>% .[,"Male"]
plot(pop_size_female/pop_size_male)
mean((pop_size_female/pop_size_male)[30:57])
# female_to_male_ratio=0.9489044
| /female_to_male_ratio.R | no_license | mkhlgrv/olg | R | false | false | 297 | r | pop_size_female <- read.csv('pop_size_corrected.txt') %>%
filter(Age==0) %>% .[,"Female"]
pop_size_male <- read.csv('pop_size_corrected.txt') %>%
filter(Age==0) %>% .[,"Male"]
plot(pop_size_female/pop_size_male)
mean((pop_size_female/pop_size_male)[30:57])
# female_to_male_ratio=0.9489044
|
\name{supplc}
\alias{supplc}
\title{
Supplementary Columns in Correspondence Analysis
}
\description{
Using the results of a correspondence analysis, project new columns into the
factor space.
}
\usage{
supplc(a, ca.res)
}
\arguments{
\item{a}{
data matrix to be projected. Must have same number of rows as matrix w... | /man/supplc.Rd | no_license | cran/multiv | R | false | false | 1,502 | rd | \name{supplc}
\alias{supplc}
\title{
Supplementary Columns in Correspondence Analysis
}
\description{
Using the results of a correspondence analysis, project new columns into the
factor space.
}
\usage{
supplc(a, ca.res)
}
\arguments{
\item{a}{
data matrix to be projected. Must have same number of rows as matrix w... |
# loading data
source('download_data_and_clean.R')
# opening graphics device
png(filename='plot1.png',width=480,height=480,units='px')
# plotting the data
hist(powerconsumed$GlobalActivePower,main='Global Active Power',xlab='Global Active Power (kilowatts)',col='red')
# closing the graphics device
x<-dev.o... | /plot1.R | no_license | akshaylike/ExData_Plotting1 | R | false | false | 324 | r | # loading data
source('download_data_and_clean.R')
# opening graphics device
png(filename='plot1.png',width=480,height=480,units='px')
# plotting the data
hist(powerconsumed$GlobalActivePower,main='Global Active Power',xlab='Global Active Power (kilowatts)',col='red')
# closing the graphics device
x<-dev.o... |
function(input, output) {
output$plot <- renderPlotly({
p1 <- ggplot(data = zeitdat, aes(x = Station, y = wartezeit)) + geom_boxplot() +
labs(x = "Station", y = "Waiting time in hours") + ggtitle("Distribution waiting time per department") +
theme(plot.margin=unit(c(1.5,1.5,1.5,1.5),"cm")) +
... | /Analyse/shinyApp/server.R | no_license | maximizeIT/dhc18 | R | false | false | 691 | r |
function(input, output) {
output$plot <- renderPlotly({
p1 <- ggplot(data = zeitdat, aes(x = Station, y = wartezeit)) + geom_boxplot() +
labs(x = "Station", y = "Waiting time in hours") + ggtitle("Distribution waiting time per department") +
theme(plot.margin=unit(c(1.5,1.5,1.5,1.5),"cm")) +
... |
plot.evouniparam <-
function(x, legend = TRUE, legendposi = "topright", axisLABEL = "Tree-based uniqueness", type="b", col = if(is.numeric(x)) NULL else sample(colors(distinct = TRUE), nrow(x$uni)), lty = if(is.numeric(x)) NULL else rep(1, nrow(x$uni)), pch = if(is.numeric(x)) NULL else rep(19, nrow(x$uni)), ...)
{
... | /R/plot.evouniparam.R | no_license | cran/adiv | R | false | false | 978 | r | plot.evouniparam <-
function(x, legend = TRUE, legendposi = "topright", axisLABEL = "Tree-based uniqueness", type="b", col = if(is.numeric(x)) NULL else sample(colors(distinct = TRUE), nrow(x$uni)), lty = if(is.numeric(x)) NULL else rep(1, nrow(x$uni)), pch = if(is.numeric(x)) NULL else rep(19, nrow(x$uni)), ...)
{
... |
#
#
#
setwd("~/Desktop/Coursera - Exploratory data analysis")
hh_power <- read.csv("household_power_consumption.txt", sep=";",na.strings=c("NA","?"))
x<-hh_power$Date=="1/2/2007" | hh_power$Date=="2/2/2007"
hhpwc<-hh_power[x,]
rm(hh_power)
rm(x)
hhpwc$dt<-as.POSIXct(paste(as.character(hhpwc$Date),as.character(hhpwc$Ti... | /Plot4.R | no_license | Harrykoch/ExData_Plotting1 | R | false | false | 1,383 | r | #
#
#
setwd("~/Desktop/Coursera - Exploratory data analysis")
hh_power <- read.csv("household_power_consumption.txt", sep=";",na.strings=c("NA","?"))
x<-hh_power$Date=="1/2/2007" | hh_power$Date=="2/2/2007"
hhpwc<-hh_power[x,]
rm(hh_power)
rm(x)
hhpwc$dt<-as.POSIXct(paste(as.character(hhpwc$Date),as.character(hhpwc$Ti... |
seq1 = read.table(paste0(dir, "/xci_paper_data/phylo_seqs/beast1/sequence1_align.txt"), sep="\n")
seq1 = as.character(seq1$V1[-grep("\\*", seq1$V1)])
seq1 = gsub(" +", " ", seq1)
seq1 = data.frame(do.call("rbind", strsplit(as.character(seq1), " |\t", seq1)))
colnames(seq1) = c("CC", "seq","n")
if(length(which(seq1... | /old_versions/beast_files.R | no_license | kathiesun/TReC_matnut | R | false | false | 1,446 | r | seq1 = read.table(paste0(dir, "/xci_paper_data/phylo_seqs/beast1/sequence1_align.txt"), sep="\n")
seq1 = as.character(seq1$V1[-grep("\\*", seq1$V1)])
seq1 = gsub(" +", " ", seq1)
seq1 = data.frame(do.call("rbind", strsplit(as.character(seq1), " |\t", seq1)))
colnames(seq1) = c("CC", "seq","n")
if(length(which(seq1... |
ss.aipe.cv.sensitivity <- function(True.C.of.V=NULL, Estimated.C.of.V=NULL, width=NULL, degree.of.certainty=NULL, assurance=NULL, certainty=NULL, mean=100, Specified.N=NULL, conf.level=.95, G=1000, print.iter=TRUE)
{
if(!is.null(certainty)& is.null(degree.of.certainty)&is.null(assurance)) degree.of.certainty<-certain... | /MBESS/R/ss.aipe.cv.sensitivity.R | no_license | ingted/R-Examples | R | false | false | 3,384 | r | ss.aipe.cv.sensitivity <- function(True.C.of.V=NULL, Estimated.C.of.V=NULL, width=NULL, degree.of.certainty=NULL, assurance=NULL, certainty=NULL, mean=100, Specified.N=NULL, conf.level=.95, G=1000, print.iter=TRUE)
{
if(!is.null(certainty)& is.null(degree.of.certainty)&is.null(assurance)) degree.of.certainty<-certain... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scenarios.R
\name{plotROC}
\alias{plotROC}
\title{Plots the ROC curve for a result or model}
\usage{
plotROC(x, correct, posValue = NULL, xlim = 0:1, ylim = 0:1,
asp = 1, type = NULL, pch = "x", add = FALSE, ...)
}
\arguments{
\item{x}{eith... | /man/plotROC.Rd | no_license | cran/liquidSVM | R | false | true | 1,433 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/scenarios.R
\name{plotROC}
\alias{plotROC}
\title{Plots the ROC curve for a result or model}
\usage{
plotROC(x, correct, posValue = NULL, xlim = 0:1, ylim = 0:1,
asp = 1, type = NULL, pch = "x", add = FALSE, ...)
}
\arguments{
\item{x}{eith... |
library(shiny)
library(plyr)
library(tidyverse)
library(googlesheets)
library(shinythemes)
library(plotly)
# Define UI for application that draws a histogram
ui <- fluidPage(theme = shinytheme("paper"),
navbarPage("SLCo PFS: REACH Data Dashboard",
tabPanel("Dashboard",
... | /exampleapp.R | no_license | Sorenson-Impact/SLCO_Dashboard | R | false | false | 21,401 | r | library(shiny)
library(plyr)
library(tidyverse)
library(googlesheets)
library(shinythemes)
library(plotly)
# Define UI for application that draws a histogram
ui <- fluidPage(theme = shinytheme("paper"),
navbarPage("SLCo PFS: REACH Data Dashboard",
tabPanel("Dashboard",
... |
library(ape)
testtree <- read.tree("12652_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="12652_0_unrooted.txt") | /codeml_files/newick_trees_processed_and_cleaned/12652_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("12652_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="12652_0_unrooted.txt") |
## Clear-all
rm(list = ls()) # Clear variables
graphics.off() # Clear plots
cat("\014") # Clear console
## Choose motorway
mX <- "m25"
##################################################################################
# Discard Links with 10% or more missing data in speed, travel_time or flow #
####... | /01_Data_Preprocessing/1_M25_Import_Interpolation.R | no_license | ACabrejas/NTIS_Profiles | R | false | false | 3,777 | r | ## Clear-all
rm(list = ls()) # Clear variables
graphics.off() # Clear plots
cat("\014") # Clear console
## Choose motorway
mX <- "m25"
##################################################################################
# Discard Links with 10% or more missing data in speed, travel_time or flow #
####... |
# Load in data
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
# Require ggplot2
library(ggplot2)
# Subset to only the on-road sources in Baltimore, MD
baltimore.LA.cars <- subset(NEI, fips == "24510" | fips == "06037" & type == 'ON-ROAD')
# Aggregate
cars.by.Year <- aggregate... | /4 - Exploratory Data Analysis/Week 4/plot6.R | no_license | sawyerWeld/DataScience-Coursera | R | false | false | 904 | r | # Load in data
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
# Require ggplot2
library(ggplot2)
# Subset to only the on-road sources in Baltimore, MD
baltimore.LA.cars <- subset(NEI, fips == "24510" | fips == "06037" & type == 'ON-ROAD')
# Aggregate
cars.by.Year <- aggregate... |
## the list of functions created by makeCacheMatrix are:
## set puts the input matrix into the global envt
## get provides a way of retrieving the matrix on demand
## setinv computes the inverse of the input matrix and stores it in the global envt
## getinv retrieves the calculated inverse
##
## makeCacheMatri... | /cachematrix.R | no_license | FishTales4967/ProgrammingAssignment2 | R | false | false | 1,595 | r | ## the list of functions created by makeCacheMatrix are:
## set puts the input matrix into the global envt
## get provides a way of retrieving the matrix on demand
## setinv computes the inverse of the input matrix and stores it in the global envt
## getinv retrieves the calculated inverse
##
## makeCacheMatri... |
###Script to clean and summarise climate sation data into ClimateBC type variables
###Kiri Daust, 2018
library(reshape2)
library(dplyr)
library(magrittr)
library(ggplot2)
library(foreach)
library(tcltk)
library(rgdal)
library(sp)
library(sf)
library(raster)
library(rgeos)
library(maptools)
###Set months for each vari... | /Prism Station Data/StationClean.R | no_license | FLNRO-Smithers-Research/BGC-Climate-Summaries | R | false | false | 10,332 | r | ###Script to clean and summarise climate sation data into ClimateBC type variables
###Kiri Daust, 2018
library(reshape2)
library(dplyr)
library(magrittr)
library(ggplot2)
library(foreach)
library(tcltk)
library(rgdal)
library(sp)
library(sf)
library(raster)
library(rgeos)
library(maptools)
###Set months for each vari... |
<?xml version="1.0" encoding="iso-8859-1"?>
<resource schema="cycle0fits">
<meta name="title">ALMA Cycle 0 FITS</meta>
<meta name="creationDate">2015-03-19T18:01:00Z</meta>
<meta name="description" format="plain">
This resource contains the fits files generated by the ALMA pipeline
for Cycle 0. Only publi... | /inputs/cycle0fits/q.rd | no_license | paramire/LIRAE-DaCHS | R | false | false | 3,422 | rd | <?xml version="1.0" encoding="iso-8859-1"?>
<resource schema="cycle0fits">
<meta name="title">ALMA Cycle 0 FITS</meta>
<meta name="creationDate">2015-03-19T18:01:00Z</meta>
<meta name="description" format="plain">
This resource contains the fits files generated by the ALMA pipeline
for Cycle 0. Only publi... |
# install.packages('keras')
# install.packages('purrr')
# install.packages('functional')
library(MASS)
library(caret)
library(fGarch)
library(fitdistrplus)
library(pracma)
library(BBmisc)
library(functional)
library(dplyr)
library(keras)
library(lubridate)
library(tensorflow)
Sys.sleep(5)
install_tensorflow(restart_se... | /concept_drift_code/lp10k_100_late.R | no_license | paai-lab/Online-Anomaly-Detection-Extension-2021 | R | false | false | 14,760 | r | # install.packages('keras')
# install.packages('purrr')
# install.packages('functional')
library(MASS)
library(caret)
library(fGarch)
library(fitdistrplus)
library(pracma)
library(BBmisc)
library(functional)
library(dplyr)
library(keras)
library(lubridate)
library(tensorflow)
Sys.sleep(5)
install_tensorflow(restart_se... |
#probhat: Multivariate Generalized Kernel Smoothing and Related Statistical Methods
#Copyright (C), Abby Spurdle, 2019 to 2021
#This program is distributed without any warranty.
#This program is free software.
#You can modify it and/or redistribute it, under the terms of:
#The GNU General Public License, versi... | /R/ph_cks_eval1.r | no_license | cran/probhat | R | false | false | 4,109 | r | #probhat: Multivariate Generalized Kernel Smoothing and Related Statistical Methods
#Copyright (C), Abby Spurdle, 2019 to 2021
#This program is distributed without any warranty.
#This program is free software.
#You can modify it and/or redistribute it, under the terms of:
#The GNU General Public License, versi... |
#' Is an object an expression?
#'
#' @description
#'
#' `is_expression()` tests for expressions, the set of objects that can be
#' obtained from parsing R code. An expression can be one of two
#' things: either a symbolic object (for which `is_symbolic()` returns
#' `TRUE`), or a syntactic literal (testable with
#' `is... | /R/expr.R | no_license | COMODr/rlang | R | false | false | 11,253 | r | #' Is an object an expression?
#'
#' @description
#'
#' `is_expression()` tests for expressions, the set of objects that can be
#' obtained from parsing R code. An expression can be one of two
#' things: either a symbolic object (for which `is_symbolic()` returns
#' `TRUE`), or a syntactic literal (testable with
#' `is... |
### ------------------------------------------------------
### WEBSCRAPPING DONNEES ELECTORALES MINISTERE INTERIEUR (2017)
### RESULTATS PAR COMMUNES EN IDF
### ------------------------------------------------------
library(xml2)
library(rvest)
# Liens des pages à lire
site <- "http://elections.interieur.gouv.fr/pre... | /VoteJLM/Extract_Presidentielles_comidf_jlm2017.R | no_license | neocarto/ReproducibleCartography | R | false | false | 2,436 | r | ### ------------------------------------------------------
### WEBSCRAPPING DONNEES ELECTORALES MINISTERE INTERIEUR (2017)
### RESULTATS PAR COMMUNES EN IDF
### ------------------------------------------------------
library(xml2)
library(rvest)
# Liens des pages à lire
site <- "http://elections.interieur.gouv.fr/pre... |
## https://github.com/lme4/lme4/issues/59
library(lme4)
dat <- read.csv(system.file("testdata","dat20101314.csv",package="lme4"))
NMcopy <- lme4:::Nelder_Mead
cc <- capture.output(lmer(y ~ (1|Operator)+(1|Part)+(1|Part:Operator), data=dat,
control=
lmerControl("NMcop... | /tests/testOptControl.R | no_license | jknowles/lme4 | R | false | false | 586 | r | ## https://github.com/lme4/lme4/issues/59
library(lme4)
dat <- read.csv(system.file("testdata","dat20101314.csv",package="lme4"))
NMcopy <- lme4:::Nelder_Mead
cc <- capture.output(lmer(y ~ (1|Operator)+(1|Part)+(1|Part:Operator), data=dat,
control=
lmerControl("NMcop... |
library('shiny')
library('shinyWidgets')
ui <- fluidPage(
tags$head(
tags$style(HTML("
body {
background-color: white;
}"))),
align='center',
prettyRadioButtons(inputId="plot_type", label="What do you want to represent?", choices=c("Avg time to find Parking vs Length of stay","Avg dist... | /Vis_ParkingLOS/ui.R | no_license | juangordyn/Jamsnot_Vis | R | false | false | 458 | r | library('shiny')
library('shinyWidgets')
ui <- fluidPage(
tags$head(
tags$style(HTML("
body {
background-color: white;
}"))),
align='center',
prettyRadioButtons(inputId="plot_type", label="What do you want to represent?", choices=c("Avg time to find Parking vs Length of stay","Avg dist... |
#' @import dplyr
NULL
#' Connect to any database with a JDBC driver.
#'
#' Use \code{src_JDBC} to connect to an existing database with a JDBC driver,
#' and \code{tbl} to connect to tables within that database.
#' If you are running a local database, leave all parameters set as
#' their defaults to connect. If you're ... | /R/src-JDBC.r | permissive | jimhester/dplyrJDBC | R | false | false | 4,653 | r | #' @import dplyr
NULL
#' Connect to any database with a JDBC driver.
#'
#' Use \code{src_JDBC} to connect to an existing database with a JDBC driver,
#' and \code{tbl} to connect to tables within that database.
#' If you are running a local database, leave all parameters set as
#' their defaults to connect. If you're ... |
library(HH)
### Name: position
### Title: Find or assign the implied position for graphing the levels of a
### factor. A new class "positioned", which inherits from "ordered" and
### "factor", is defined.
### Aliases: position position<- is.numeric.positioned
### as.numeric.positioned as.position [.positioned ... | /data/genthat_extracted_code/HH/examples/position.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 3,719 | r | library(HH)
### Name: position
### Title: Find or assign the implied position for graphing the levels of a
### factor. A new class "positioned", which inherits from "ordered" and
### "factor", is defined.
### Aliases: position position<- is.numeric.positioned
### as.numeric.positioned as.position [.positioned ... |
#Assignment 2.
## These functions cache and return the inverse of a matrix, using the '<<-' operator.
## The first function returns a list that does four things:
# 1. set the value of a matrix
# 2. get the value of a matrix
# 3. set the value of its inverse
# 4. get the value of its inverse
makeCacheMatrix <- funct... | /cachematrix.R | no_license | SammyShaw/ProgrammingAssignment2 | R | false | false | 1,627 | r | #Assignment 2.
## These functions cache and return the inverse of a matrix, using the '<<-' operator.
## The first function returns a list that does four things:
# 1. set the value of a matrix
# 2. get the value of a matrix
# 3. set the value of its inverse
# 4. get the value of its inverse
makeCacheMatrix <- funct... |
## ---------------------------------------------------- ##
## gen_data.R ----------------------------------------- ##
## Purpose: simulate data under a random slope, ------- ##
## random intercept model with normal errors ---------- ##
## Author: Peter Norwood, NCSU, Janssen --------------- ##
## ----------------------... | /simulation_code/gen_data.R | no_license | peterpnorwood/MultivariateLongitudinal | R | false | false | 3,242 | r | ## ---------------------------------------------------- ##
## gen_data.R ----------------------------------------- ##
## Purpose: simulate data under a random slope, ------- ##
## random intercept model with normal errors ---------- ##
## Author: Peter Norwood, NCSU, Janssen --------------- ##
## ----------------------... |
## These functions will cache the inverse of a matrix
## creates a special "matrix" object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
x <<- y
i <<- NULL
}
get <- function() x
setinverse <- function(inverse) i <<- inverse
getinverse <- function() i
... | /cachematrix.R | no_license | sgussen969/ProgrammingAssignment2 | R | false | false | 784 | r | ## These functions will cache the inverse of a matrix
## creates a special "matrix" object that can cache its inverse
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
x <<- y
i <<- NULL
}
get <- function() x
setinverse <- function(inverse) i <<- inverse
getinverse <- function() i
... |
library(tidyverse)
library(nycflights13)
head(flights)
print(flights, n = 10, width = Inf)
help("flights")
flights %>%
filter(arr_delay >= 120) %>%
count()
flights %>%
filter(dest == "IAH" | dest == "HOU")
flights %>%
filter(dest %in% c("IAH","HOU"))
airlines
flights %>%
filter(carrier %in% c("U... | /R 2nd data analysis.R | no_license | Lekangi/R | R | false | false | 685 | r | library(tidyverse)
library(nycflights13)
head(flights)
print(flights, n = 10, width = Inf)
help("flights")
flights %>%
filter(arr_delay >= 120) %>%
count()
flights %>%
filter(dest == "IAH" | dest == "HOU")
flights %>%
filter(dest %in% c("IAH","HOU"))
airlines
flights %>%
filter(carrier %in% c("U... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geog_dat.R
\docType{data}
\name{sa32016}
\alias{sa32016}
\title{Statistical Area 3, 2016}
\format{An \code{sf} object with 12 variables:
#' \describe{
\item{\code{sa3_code_2016}}{The full 5 digit SA3 code numeric}
\item{\code{sa3_name_2016}}{... | /man/sa32016.Rd | no_license | srepho/absmapsdata | R | false | true | 1,025 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geog_dat.R
\docType{data}
\name{sa32016}
\alias{sa32016}
\title{Statistical Area 3, 2016}
\format{An \code{sf} object with 12 variables:
#' \describe{
\item{\code{sa3_code_2016}}{The full 5 digit SA3 code numeric}
\item{\code{sa3_name_2016}}{... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\docType{data}
\name{data-phenotypes}
\alias{data-phenotypes}
\title{Raw phenotype data used in thesis}
\usage{
phenotypes
}
\description{
Raw phenotype data used in thesis
}
\details{
The data comes from a field trial that is part of a cotton
breeding program. The t... | /man/data-phenotypes.Rd | no_license | digiYozhik/msc_thesis | R | false | false | 1,866 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\docType{data}
\name{data-phenotypes}
\alias{data-phenotypes}
\title{Raw phenotype data used in thesis}
\usage{
phenotypes
}
\description{
Raw phenotype data used in thesis
}
\details{
The data comes from a field trial that is part of a cotton
breeding program. The t... |
# required libraries ------------------------------------------------------
library(data.table)
library(magrittr)
library(shiny)
library(leaflet)
library(leaflet.extras)
library(emojifont)
library(shinybusy)
library(RCurl)
# read geolocalized data --------------------------------------------------
d <- readRDS("shiny... | /app.R | permissive | nicolasboattini/escuelas | R | false | false | 4,513 | r | # required libraries ------------------------------------------------------
library(data.table)
library(magrittr)
library(shiny)
library(leaflet)
library(leaflet.extras)
library(emojifont)
library(shinybusy)
library(RCurl)
# read geolocalized data --------------------------------------------------
d <- readRDS("shiny... |
#' fit.curves
#'
#' Fit dose-response curves using MLE
#'
#' @param X concentrations
#' @param Y response values
#' @param Fname filename for saving figures
#' @param Figname Title to appear on figures
#' @param FigDir Directory where figures will be saved
#' @param Ylab Ylabel for figures
#' @param Xlab Xlabel for fig... | /R/fit.curves.R | permissive | jwilsonwhite/DRcurves | R | false | false | 9,647 | r | #' fit.curves
#'
#' Fit dose-response curves using MLE
#'
#' @param X concentrations
#' @param Y response values
#' @param Fname filename for saving figures
#' @param Figname Title to appear on figures
#' @param FigDir Directory where figures will be saved
#' @param Ylab Ylabel for figures
#' @param Xlab Xlabel for fig... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/myfunc.R
\name{myfunc}
\alias{myfunc}
\title{Function designed purely to show unit testing}
\usage{
myfunc(a = 1, b = 2, c = "blah")
}
\arguments{
\item{a}{numeric}
\item{b}{numeric}
\item{c}{character}
}
\description{
Function designed pur... | /man/myfunc.Rd | no_license | jchenpku/Rtraining | R | false | true | 348 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/myfunc.R
\name{myfunc}
\alias{myfunc}
\title{Function designed purely to show unit testing}
\usage{
myfunc(a = 1, b = 2, c = "blah")
}
\arguments{
\item{a}{numeric}
\item{b}{numeric}
\item{c}{character}
}
\description{
Function designed pur... |
#
# icpe13_datamill_xy.R, 8 Jan 16
#
# Data from:
# DataMill: Rigorous Performance Evaluation Made Easy
# Augusto Born de Oliveira and Jean-Christophe Petkovich and Thomas Reidemeister and Sebastian Fischmeister
#
# Example from:
# Empirical Software Engineering using R
# Derek M. Jones
source("ESEUR_config.r")
lib... | /benchmark/icpe13_datamill_xy.R | no_license | alanponce/ESEUR-code-data | R | false | false | 1,641 | r | #
# icpe13_datamill_xy.R, 8 Jan 16
#
# Data from:
# DataMill: Rigorous Performance Evaluation Made Easy
# Augusto Born de Oliveira and Jean-Christophe Petkovich and Thomas Reidemeister and Sebastian Fischmeister
#
# Example from:
# Empirical Software Engineering using R
# Derek M. Jones
source("ESEUR_config.r")
lib... |
\name{survfitJM}
\alias{survfitJM}
\alias{survfitJM.JMbayes}
\title{Prediction in Joint Models}
\description{
This function computes the conditional probability of surviving later times than the last observed time for which a
longitudinal measurement was available.
}
\usage{
survfitJM(object, newdata, \dots)
... | /man/survfitJM.Rd | no_license | TobiasPolak/JMbayes | R | false | false | 8,160 | rd | \name{survfitJM}
\alias{survfitJM}
\alias{survfitJM.JMbayes}
\title{Prediction in Joint Models}
\description{
This function computes the conditional probability of surviving later times than the last observed time for which a
longitudinal measurement was available.
}
\usage{
survfitJM(object, newdata, \dots)
... |
##' Split the org file by nodes.
##'
##' \code{split_orgfile} splits the org file by the index of the
##' headlines.
##' @param x org object as character vector.
##' @return the nodes of an org file as a character list.
split_orgfile <-
function(x) {
headline_ids <-
x %>%
extract... | /R/split_orgfile.r | no_license | lwjohnst86/orgclockr | R | false | false | 746 | r | ##' Split the org file by nodes.
##'
##' \code{split_orgfile} splits the org file by the index of the
##' headlines.
##' @param x org object as character vector.
##' @return the nodes of an org file as a character list.
split_orgfile <-
function(x) {
headline_ids <-
x %>%
extract... |
# Import the dataframe
df<- read.csv("Salary_simple_linear_regression.csv")
head(df)
# Splitting the data in training and test
# Install the "caTools" library
#install.packages("caTools")
library(caTools)
set.seed(123)
# adiciona somente o Y e escolhe a porcentagem de TREINO
split = sample.split(df$Salary, SplitRa... | /linear-regression-simple.R | no_license | MathAugusto/R-estudos-machine-learning | R | false | false | 1,503 | r |
# Import the dataframe
df<- read.csv("Salary_simple_linear_regression.csv")
head(df)
# Splitting the data in training and test
# Install the "caTools" library
#install.packages("caTools")
library(caTools)
set.seed(123)
# adiciona somente o Y e escolhe a porcentagem de TREINO
split = sample.split(df$Salary, SplitRa... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.