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 |
|---|---|---|---|---|---|---|---|---|---|
###################################################################################
## cMonkey - version 4, Copyright (C) David J Reiss, Institute for Systems Biology
## dreiss@systemsbiology.org
## This software is provided AS IS with no warranty expressed or implied. Neither
## the authors of th... | /cmonkey-motif.R | no_license | cplaisier/cmonkey | R | false | false | 48,189 | r | ###################################################################################
## cMonkey - version 4, Copyright (C) David J Reiss, Institute for Systems Biology
## dreiss@systemsbiology.org
## This software is provided AS IS with no warranty expressed or implied. Neither
## the authors of th... |
library(keyring)
db_user <- "Vedaste.Cyizere"
db_pass <- key_get("roster", username=db_user)
db_name <- "RosterDatawarehouse"
db_server <- "mtama.oneacrefund.org,6543" | /settings_example.R | no_license | vedastecyizere/pshops_database | R | false | false | 173 | r | library(keyring)
db_user <- "Vedaste.Cyizere"
db_pass <- key_get("roster", username=db_user)
db_name <- "RosterDatawarehouse"
db_server <- "mtama.oneacrefund.org,6543" |
# Load the RDS files into the global environment
# -----------------------------------------------
# National Emissions Inventory
assign("NEI", readRDS("summarySCC_PM25.rds"), envir = .GlobalEnv)
assign("SCC", readRDS("Source_Classification_Code.rds"), envir = .GlobalEnv)
# Set up data for plotting
# ----------------... | /dataexploration/courseproject/plot4.R | no_license | thedataferret/datasciencecoursera | R | false | false | 1,556 | r |
# Load the RDS files into the global environment
# -----------------------------------------------
# National Emissions Inventory
assign("NEI", readRDS("summarySCC_PM25.rds"), envir = .GlobalEnv)
assign("SCC", readRDS("Source_Classification_Code.rds"), envir = .GlobalEnv)
# Set up data for plotting
# ----------------... |
#' @include component-class.R output-class.R
NULL
check_metric <- function(object) {
errors <- check_component(object)
name_is_alphanumeric <- grepl("^[[:alnum:]_]+$", object@name)
if (!name_is_alphanumeric)
errors <- c(errors,
"metric name must be alphanumeric (and can have underscores).")
... | /R/metric-class.R | no_license | jacobbien/simulator | R | false | false | 2,371 | r | #' @include component-class.R output-class.R
NULL
check_metric <- function(object) {
errors <- check_component(object)
name_is_alphanumeric <- grepl("^[[:alnum:]_]+$", object@name)
if (!name_is_alphanumeric)
errors <- c(errors,
"metric name must be alphanumeric (and can have underscores).")
... |
# This file plot1.R contain function plot3 that draw the plot3 plot required in assignmet of week1
# please note that the data file "household_power_consumption.txt" should be put in the same folder
# when running this R file,or change the read data topint to the correct folder
plot3 <- function()
{
#read data
... | /plot3.R | no_license | ms2111/ExData_Plotting1 | R | false | false | 1,644 | r | # This file plot1.R contain function plot3 that draw the plot3 plot required in assignmet of week1
# please note that the data file "household_power_consumption.txt" should be put in the same folder
# when running this R file,or change the read data topint to the correct folder
plot3 <- function()
{
#read data
... |
reprex::reprex({
library(quadmesh)
library(raster)
library(sf)
library(lwgeom)
library(reproj)
library(rgdal)
xy <- coordinates(etopo)
## we want "p_?" the matrix of coordinates in LAEA
ll <- "+proj=longlat +datum=WGS84"
prj <- "+proj=laea +datum=WGS84"
mpt <- st_sfc(st_multipoint(xy), crs = ll)
pt <- st_sfc(lappl... | /inst/rationale/why_reproj.R | no_license | cran/reproj | R | false | false | 1,005 | r | reprex::reprex({
library(quadmesh)
library(raster)
library(sf)
library(lwgeom)
library(reproj)
library(rgdal)
xy <- coordinates(etopo)
## we want "p_?" the matrix of coordinates in LAEA
ll <- "+proj=longlat +datum=WGS84"
prj <- "+proj=laea +datum=WGS84"
mpt <- st_sfc(st_multipoint(xy), crs = ll)
pt <- st_sfc(lappl... |
testlist <- list(x = c(712668020L, 1936940898L, 1869966948L, 690512640L, 0L, 620756991L, -1L, -2745809L, -9474445L, -1L, -65536L, 0L, 65535L, 439353125L, -1769472L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), y = integer(0))
result <- ... | /diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609961936-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 383 | r | testlist <- list(x = c(712668020L, 1936940898L, 1869966948L, 690512640L, 0L, 620756991L, -1L, -2745809L, -9474445L, -1L, -65536L, 0L, 65535L, 439353125L, -1769472L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L), y = integer(0))
result <- ... |
# The aim of this code is to clean up the try and bien data and combine it into one useable file! There are many steps that need to be completed for this to happen:
#1. Fix typos try species names
#2. Remove columns in try that we don't need right now, there is tons of weather data and factors regarding site condition... | /analyses/traits/Rfiles/mergebientry.R | no_license | lizzieinvancouver/ospree | R | false | false | 9,229 | r | # The aim of this code is to clean up the try and bien data and combine it into one useable file! There are many steps that need to be completed for this to happen:
#1. Fix typos try species names
#2. Remove columns in try that we don't need right now, there is tons of weather data and factors regarding site condition... |
2022+9
text ="Hello Word!" | /tugas.r | no_license | Aliiyaa9/tugas_r | R | false | false | 26 | r | 2022+9
text ="Hello Word!" |
nodeMover7b=function(layout.old, g, node_number, spaceMax){
wc = walktrap.community(g)
wc$membership
names(wc$membership) <- 1:node_number
gran.length <- length(table(wc$membership)[table(wc$membership) >= 1])
gran.members <- lapply(1:gran.length, function(x) as.numeric(names(wc$membership[wc$membership == x]... | /granule-functions/nodeMover7b.R | no_license | apadr007/GranMod | R | false | false | 5,486 | r | nodeMover7b=function(layout.old, g, node_number, spaceMax){
wc = walktrap.community(g)
wc$membership
names(wc$membership) <- 1:node_number
gran.length <- length(table(wc$membership)[table(wc$membership) >= 1])
gran.members <- lapply(1:gran.length, function(x) as.numeric(names(wc$membership[wc$membership == x]... |
#' @title Project particles
#'
#' @description Method to project particles forward using state model f(xn+1|xn). Given a set of particles and
#' state model, predicts where particles may be.
#'
#' @param obj Object of pframe_1d class
#'
#' @return Object of pframe_1d class
#'
#' @details In genetic algorithms, these fu... | /R/project.R | no_license | tintinthong/pfilter | R | false | false | 1,489 | r | #' @title Project particles
#'
#' @description Method to project particles forward using state model f(xn+1|xn). Given a set of particles and
#' state model, predicts where particles may be.
#'
#' @param obj Object of pframe_1d class
#'
#' @return Object of pframe_1d class
#'
#' @details In genetic algorithms, these fu... |
library(shiny)
library(caret)
library(ggplot2)
# Read data and preprocessing
titanicDf <- read.csv("titanicTrain.csv",header = TRUE, )
dataDf <- subset(titanicDf, select = c(Survived, Pclass, Sex, Age, SibSp, Parch, Fare))
dataDf$Pclass1 <- (dataDf$Pclass == 2) * 1
dataDf$Pclass2 <- (dataDf$Pclass == 3) * 1
dataDf <-... | /server.R | no_license | BenZZerS/Developing-Data-Products-ShinyApp | R | false | false | 2,030 | r | library(shiny)
library(caret)
library(ggplot2)
# Read data and preprocessing
titanicDf <- read.csv("titanicTrain.csv",header = TRUE, )
dataDf <- subset(titanicDf, select = c(Survived, Pclass, Sex, Age, SibSp, Parch, Fare))
dataDf$Pclass1 <- (dataDf$Pclass == 2) * 1
dataDf$Pclass2 <- (dataDf$Pclass == 3) * 1
dataDf <-... |
library(testthat)
library(rsample)
library(purrr)
check_ind <- function(x, tdat) {
in_dat <- subset(tdat, Data == "Analysis")
in_check <- all(sort(in_dat$Row) == x$in_ind)
out_dat <- subset(tdat, Data == "Analysis")
out_check <- all(sort(out_dat$Row) == x$out_ind)
in_check & out_check
}
dat1 <- data.frame(a... | /tests/testthat/test_tidy.R | no_license | fbchow/rsample | R | false | false | 1,223 | r | library(testthat)
library(rsample)
library(purrr)
check_ind <- function(x, tdat) {
in_dat <- subset(tdat, Data == "Analysis")
in_check <- all(sort(in_dat$Row) == x$in_ind)
out_dat <- subset(tdat, Data == "Analysis")
out_check <- all(sort(out_dat$Row) == x$out_ind)
in_check & out_check
}
dat1 <- data.frame(a... |
# Plot 3
# Read file
data <- read.csv(file="household_power_consumption.txt", head=TRUE, sep=";", stringsAsFactors=FALSE)
# Get Subset for specified dates
plot_data <- subset(data, Date == "1/2/2007" | Date == "2/2/2007")
# Clean up and prep data
plot_data$DateTime <- strptime(paste(plot_data$Date, plot_data$Time), "... | /plot3.R | no_license | willaku/ExData_Plotting1 | R | false | false | 820 | r | # Plot 3
# Read file
data <- read.csv(file="household_power_consumption.txt", head=TRUE, sep=";", stringsAsFactors=FALSE)
# Get Subset for specified dates
plot_data <- subset(data, Date == "1/2/2007" | Date == "2/2/2007")
# Clean up and prep data
plot_data$DateTime <- strptime(paste(plot_data$Date, plot_data$Time), "... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/col_vals_not_equal.R
\name{col_vals_not_equal}
\alias{col_vals_not_equal}
\title{Verify whether numerical column data are
not equal to a specified value}
\usage{
col_vals_not_equal(agent, column, value, preconditions = NULL, brief = NULL,
w... | /man/col_vals_not_equal.Rd | permissive | eleakin/pointblank | R | false | true | 4,702 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/col_vals_not_equal.R
\name{col_vals_not_equal}
\alias{col_vals_not_equal}
\title{Verify whether numerical column data are
not equal to a specified value}
\usage{
col_vals_not_equal(agent, column, value, preconditions = NULL, brief = NULL,
w... |
#################Getting and Cleaning Data Course Project################
##Date Created: 10/25/2014
##Merge Training and Test datasets
##Extract only mean and standard deviation measurements
##Name activities in dataset using descriptive names
##Name variables in dataset using descriptive names
##Average of each varia... | /run_analysis.R | no_license | adwaitster/Getting-and-Cleaning-Data | R | false | false | 3,211 | r | #################Getting and Cleaning Data Course Project################
##Date Created: 10/25/2014
##Merge Training and Test datasets
##Extract only mean and standard deviation measurements
##Name activities in dataset using descriptive names
##Name variables in dataset using descriptive names
##Average of each varia... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cloudformation_operations.R
\name{cloudformation_describe_stacks}
\alias{cloudformation_describe_stacks}
\title{Returns the description for the specified stack; if no stack name was
specified, then it returns the description for all the stack... | /cran/paws.management/man/cloudformation_describe_stacks.Rd | permissive | sanchezvivi/paws | R | false | true | 1,195 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cloudformation_operations.R
\name{cloudformation_describe_stacks}
\alias{cloudformation_describe_stacks}
\title{Returns the description for the specified stack; if no stack name was
specified, then it returns the description for all the stack... |
library(ggvis)
library(dplyr)
library(RSQLite)
library(pitchRx)
files <- c("inning/inning_hit.xml", "players.xml", "miniscoreboard.xml")
my_db <- src_sqlite("MLB2014.sqlite3", create = TRUE)
scrape(start = "2014-03-30", end = "2014-09-30", connect = my_db$con, suffix = files)
# There is no key that allows the tables ... | /spraychart.R | no_license | digibytecore/Spray-Chart | R | false | false | 3,071 | r | library(ggvis)
library(dplyr)
library(RSQLite)
library(pitchRx)
files <- c("inning/inning_hit.xml", "players.xml", "miniscoreboard.xml")
my_db <- src_sqlite("MLB2014.sqlite3", create = TRUE)
scrape(start = "2014-03-30", end = "2014-09-30", connect = my_db$con, suffix = files)
# There is no key that allows the tables ... |
#read in the package most recent version
source("https://raw.githubusercontent.com/aliaksah/EMJMCMC2016/master/R/the_mode_jumping_package4.r")
#***********************IMPORTANT******************************************************
# if a multithreaded backend openBLAS for matrix multiplications
# is installed on your ... | /supplementaries/BGNLM/kepler and mass/kepler G2.r | no_license | aliaksah/EMJMCMC2016 | R | false | false | 9,544 | r | #read in the package most recent version
source("https://raw.githubusercontent.com/aliaksah/EMJMCMC2016/master/R/the_mode_jumping_package4.r")
#***********************IMPORTANT******************************************************
# if a multithreaded backend openBLAS for matrix multiplications
# is installed on your ... |
testlist <- list(A = structure(c(2.17107980817984e+205, 9.53818355723805e+295 ), .Dim = 1:2), B = structure(c(2.19477802979261e+294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance:::match_rows,testlist)
str(resu... | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613123520-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 323 | r | testlist <- list(A = structure(c(2.17107980817984e+205, 9.53818355723805e+295 ), .Dim = 1:2), B = structure(c(2.19477802979261e+294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance:::match_rows,testlist)
str(resu... |
library(ggplot2)
library(RColorBrewer)
library(grid)
library(gridExtra)
library(gtable)
library(plyr)
library(dplyr)
library(reshape2)
LIM.X = c(0, 0.5)
BREAKS.X = seq(0, 0.5, 0.1)
MARGINS.REALDATA.LEFT = unit(c(0, 0.1, 0.07, 0), "npc")
MARGINS.REALDATA.RIGHT = unit(c(0, 0.02, 0.07, 0.07), "npc")
LEGEND.SPACING = 5... | /results-overview.R | permissive | bikol/uncertain-classification | R | false | false | 29,714 | r | library(ggplot2)
library(RColorBrewer)
library(grid)
library(gridExtra)
library(gtable)
library(plyr)
library(dplyr)
library(reshape2)
LIM.X = c(0, 0.5)
BREAKS.X = seq(0, 0.5, 0.1)
MARGINS.REALDATA.LEFT = unit(c(0, 0.1, 0.07, 0), "npc")
MARGINS.REALDATA.RIGHT = unit(c(0, 0.02, 0.07, 0.07), "npc")
LEGEND.SPACING = 5... |
Question 1
Consider the space shuttle data ?shuttle in the MASS library.
Consider modeling the use of the autolander as the outcome (variable name use).
Fit a logistic regression model with autolander (variable auto) use (labeled as "auto" 1) versus not (0)
as predicted by wind sign (variable wind). Give the estimat... | /Regression Models/Quiz 4.R | no_license | luisedo/coursera-data-science | R | false | false | 2,954 | r | Question 1
Consider the space shuttle data ?shuttle in the MASS library.
Consider modeling the use of the autolander as the outcome (variable name use).
Fit a logistic regression model with autolander (variable auto) use (labeled as "auto" 1) versus not (0)
as predicted by wind sign (variable wind). Give the estimat... |
library(dplyr)
library(ggplot2)
Postal <- read.csv("Postal.csv")
facet_labs <- c("Women", "Men")
names(facet_labs) <- c("F", "M")
Postal %>%
filter(Year == 2020) %>%
ggplot(aes(y = Distance, x = Age_Group)) +
geom_boxplot(aes(fill = as.factor(Gender)), alpha = 0.6, position = position_dodge(1), outlier.shape =... | /Plots.R | no_license | gpilgrim2670/MastersPostal | R | false | false | 1,403 | r | library(dplyr)
library(ggplot2)
Postal <- read.csv("Postal.csv")
facet_labs <- c("Women", "Men")
names(facet_labs) <- c("F", "M")
Postal %>%
filter(Year == 2020) %>%
ggplot(aes(y = Distance, x = Age_Group)) +
geom_boxplot(aes(fill = as.factor(Gender)), alpha = 0.6, position = position_dodge(1), outlier.shape =... |
#' Simulation of a model.
#'
#' @description This function simulates the random evolution of an IBM.
#'
#' @param model Model resulting from a call to the function \code{\link{mk_model}}.
#' @param population Data frame representing the initial population.
#' @param events_bounds Named vector of events bounds, with nam... | /R/popsim.R | no_license | cran/IBMPopSim | R | false | false | 8,120 | r | #' Simulation of a model.
#'
#' @description This function simulates the random evolution of an IBM.
#'
#' @param model Model resulting from a call to the function \code{\link{mk_model}}.
#' @param population Data frame representing the initial population.
#' @param events_bounds Named vector of events bounds, with nam... |
context("preprocess_txt check structure and output")
d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools")
bboxes <- get_boundary(boxinfo = load_box(file.path(d, bgm = "VMPA_setas.bgm")))
df <- data.frame(code = letters[1:10], age1 = 1:10, age2 = 11:20, stringsAsFactors = FALSE)
te... | /tests/testthat/test-preprocess-txt.R | no_license | cran/atlantistools | R | false | false | 950 | r | context("preprocess_txt check structure and output")
d <- system.file("extdata", "setas-model-new-trunk", package = "atlantistools")
bboxes <- get_boundary(boxinfo = load_box(file.path(d, bgm = "VMPA_setas.bgm")))
df <- data.frame(code = letters[1:10], age1 = 1:10, age2 = 11:20, stringsAsFactors = FALSE)
te... |
library(foreach)
library(doParallel)
library(iterators)
library(Rcpp)
library(pracma)
# formula <- y ~ .
# data = df[c(1:8,53)]
# id <- "id"
# time_col <- "t"
# heredity = "strong"
# higher_order = FALSE
iForm_FunctionalMap <- function(formula,
data,
... | /iForm_FunctionalMapping.R | no_license | kdgosik/iFormFunctionalMapping | R | false | false | 6,539 | r | library(foreach)
library(doParallel)
library(iterators)
library(Rcpp)
library(pracma)
# formula <- y ~ .
# data = df[c(1:8,53)]
# id <- "id"
# time_col <- "t"
# heredity = "strong"
# higher_order = FALSE
iForm_FunctionalMap <- function(formula,
data,
... |
#'Plot a leaflet map of total items, per CCG, per month of a BNF section, chemical or presentations.
#'
#' @param argument An ID unique to BNF sections, chemicals or presentations.
#' @return Returns a leaflet plot (html widget) of total items, per CCG, per month of a BNF section, chemical or presentations.
#' @importF... | /R/plot2017items.R | no_license | fergustaylor/openprescribingRplots | R | false | false | 3,816 | r | #'Plot a leaflet map of total items, per CCG, per month of a BNF section, chemical or presentations.
#'
#' @param argument An ID unique to BNF sections, chemicals or presentations.
#' @return Returns a leaflet plot (html widget) of total items, per CCG, per month of a BNF section, chemical or presentations.
#' @importF... |
library(lawstat)
A <- c(1,2,2,2,2,3,3,3,3,3,3,4)
B <- c(2,3,3,3,3,3,4,4,4,5)
lawstat::brunner.munzel.test(A, B)
wilcox.test(A, B, exact = FALSE)
dif <- median(B) - median(A)
cat("Diferenca das medianas (Sim-Nao) = ",dif,sep="")
| /Aula10/Aula_Estatistica_Nao_Parametrica/WMWGeneralizado.R | no_license | yadevi/2020 | R | false | false | 235 | r | library(lawstat)
A <- c(1,2,2,2,2,3,3,3,3,3,3,4)
B <- c(2,3,3,3,3,3,4,4,4,5)
lawstat::brunner.munzel.test(A, B)
wilcox.test(A, B, exact = FALSE)
dif <- median(B) - median(A)
cat("Diferenca das medianas (Sim-Nao) = ",dif,sep="")
|
args = commandArgs(T)
input.file = args[1]
output.file = args[2]
len.cutoff = 1500000
library(plyranges, lib = "/data/cache/zhongxu/R")
gff <- read_gff(input.file)
gff.tmp <- gff %>% select(transcript_id, gene_id, gene_name)
gff.tmp <- as.data.frame(gff.tmp)
pos.min <- aggregate(start ~ transcript_id, data = gff.t... | /filterVeryLongIsoforms.R | no_license | ProfessionalFarmer/lake | R | false | false | 860 | r |
args = commandArgs(T)
input.file = args[1]
output.file = args[2]
len.cutoff = 1500000
library(plyranges, lib = "/data/cache/zhongxu/R")
gff <- read_gff(input.file)
gff.tmp <- gff %>% select(transcript_id, gene_id, gene_name)
gff.tmp <- as.data.frame(gff.tmp)
pos.min <- aggregate(start ~ transcript_id, data = gff.t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gridfun.R
\name{gridfun}
\alias{gridfun}
\title{Specifies grid for the calculation of the halfspace location depths}
\usage{
gridfun(D, grid.size, k = 4)
}
\arguments{
\item{D}{Data set with rows representing the individuals and
columns repre... | /man/gridfun.Rd | no_license | cran/RepeatedHighDim | R | false | true | 1,400 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gridfun.R
\name{gridfun}
\alias{gridfun}
\title{Specifies grid for the calculation of the halfspace location depths}
\usage{
gridfun(D, grid.size, k = 4)
}
\arguments{
\item{D}{Data set with rows representing the individuals and
columns repre... |
\name{summary.bayesm.nmix}
\alias{summary.bayesm.nmix}
\title{Summarize Draws of Normal Mixture Components}
\description{
\code{summary.bayesm.nmix} is an S3 method to display summaries of the distribution implied
by draws of Normal Mixture Components. Posterior means and variance-covariance matrices are
displayed.\... | /man/summary.bayesm.nmix.Rd | no_license | cran/bayesm | R | false | false | 1,458 | rd | \name{summary.bayesm.nmix}
\alias{summary.bayesm.nmix}
\title{Summarize Draws of Normal Mixture Components}
\description{
\code{summary.bayesm.nmix} is an S3 method to display summaries of the distribution implied
by draws of Normal Mixture Components. Posterior means and variance-covariance matrices are
displayed.\... |
# import the requested libraries
# ------------------------------
# TODO if they are not available, install them?
libs <- c('shiny', 'shinyIncubator', 'plyr', 'reshape2')
lapply(libs, require, character.only = TRUE)
# The psychometric function (function definitions)
# ------------------------------------------------... | /global.R | no_license | MatthieuDubois/shinyPsychometric | R | false | false | 5,511 | r | # import the requested libraries
# ------------------------------
# TODO if they are not available, install them?
libs <- c('shiny', 'shinyIncubator', 'plyr', 'reshape2')
lapply(libs, require, character.only = TRUE)
# The psychometric function (function definitions)
# ------------------------------------------------... |
source("inits/problem.init.R")
source("settings.R")
# Available models.
source("models/activesearch/activesearch.R")
source("models/rforest/rforest.p.R")
source("models/listnet/listnet.R")
SETTINGS <- list()
initMAB = function() {
return (list(
ActiveSearch$new(),
RForest.p$new(ntree=100),
ListNet$new(max.iter=100... | /inits/settings/legacy/config2_binary/01011.settings.init.R | no_license | karenenes/selectiveharvesting | R | false | false | 2,197 | r | source("inits/problem.init.R")
source("settings.R")
# Available models.
source("models/activesearch/activesearch.R")
source("models/rforest/rforest.p.R")
source("models/listnet/listnet.R")
SETTINGS <- list()
initMAB = function() {
return (list(
ActiveSearch$new(),
RForest.p$new(ntree=100),
ListNet$new(max.iter=100... |
testlist <- list(x = c(707406378L, 707406378L, 707406378L, -11733428L, 506068812L, -11787444L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0... | /diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609961325-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 421 | r | testlist <- list(x = c(707406378L, 707406378L, 707406378L, -11733428L, 506068812L, -11787444L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0... |
library(dplyr, warn.conflicts = F, quietly = T)
library(purrr, warn.conflicts = F, quietly = T)
library(tidyr, warn.conflicts = F, quietly = T)
library(bin2mi, warn.conflicts = F, quietly = T)
pc <- 0.65
m2 <<- 0.025
pt <- pc - m2
n_obs <- 500
do_rate <- 0.3
num_n_mi <- 10
set_n <- 13
mp_y1 <- 0.42
x1 <- parallel::... | /pgms_slurm/p2_mnar/ign/p2_mnar_ign_set_n13.R | no_license | yuliasidi/wilson_newcombe | R | false | false | 7,866 | r | library(dplyr, warn.conflicts = F, quietly = T)
library(purrr, warn.conflicts = F, quietly = T)
library(tidyr, warn.conflicts = F, quietly = T)
library(bin2mi, warn.conflicts = F, quietly = T)
pc <- 0.65
m2 <<- 0.025
pt <- pc - m2
n_obs <- 500
do_rate <- 0.3
num_n_mi <- 10
set_n <- 13
mp_y1 <- 0.42
x1 <- parallel::... |
#Lab 09
#Melinda Stueber
library(tidyverse)
getwd()
setwd("C:/Users/melin/Classes/EBIO-4420")
camData <- read.csv("Cusack_et_al_random_versus_trail_camera_trap_data_Ruaha_2013_14.csv", stringsAsFactors = F)
#look at data
str(camData)
head(camData)
#Convert DateTime into separate Date Time columns
newcamData <- tid... | /Labs/Lab09/Lab09_Stueber.R | no_license | mest1336/ComBIoLabsAndHomework | R | false | false | 885 | r | #Lab 09
#Melinda Stueber
library(tidyverse)
getwd()
setwd("C:/Users/melin/Classes/EBIO-4420")
camData <- read.csv("Cusack_et_al_random_versus_trail_camera_trap_data_Ruaha_2013_14.csv", stringsAsFactors = F)
#look at data
str(camData)
head(camData)
#Convert DateTime into separate Date Time columns
newcamData <- tid... |
# extra gaussian fits
# scientist beat sheets in 2015 and scientist visual in 2016
fitG = function(x, y, mu, sig, scale, ...){
f = function(p){
d = p[3] * dnorm(x, mean = p[1], sd = p[2])
sum((d - y) ^ 2)
}
optim(c(mu, sig, scale), f)
}
multorders <- c('LEPL', 'ORTH', 'ARAN','COLE', 'HEMI')
par(mfrow =... | /archived_scripts/Tracie_thesis/misc_395/extra_gaussian.R | no_license | hurlbertlab/caterpillars-count-analysis | R | false | false | 6,839 | r | # extra gaussian fits
# scientist beat sheets in 2015 and scientist visual in 2016
fitG = function(x, y, mu, sig, scale, ...){
f = function(p){
d = p[3] * dnorm(x, mean = p[1], sd = p[2])
sum((d - y) ^ 2)
}
optim(c(mu, sig, scale), f)
}
multorders <- c('LEPL', 'ORTH', 'ARAN','COLE', 'HEMI')
par(mfrow =... |
#' Measure a bounding box using x, y, or diagonal distance
#'
#' @description
#' - Measure distances ([sf_bbox_dist()], [sf_bbox_xdist()], [sf_bbox_ydist()],
#' and [sf_bbox_diagdist()])
#' - Convert a diag_ratio value to a distance value if a bbox and diag_ratio are
#' provided ([sf_bbox_diag_ratio_to_dist()]); return... | /R/sf_bbox_dist.R | permissive | elipousson/sfext | R | false | false | 5,466 | r | #' Measure a bounding box using x, y, or diagonal distance
#'
#' @description
#' - Measure distances ([sf_bbox_dist()], [sf_bbox_xdist()], [sf_bbox_ydist()],
#' and [sf_bbox_diagdist()])
#' - Convert a diag_ratio value to a distance value if a bbox and diag_ratio are
#' provided ([sf_bbox_diag_ratio_to_dist()]); return... |
## import pdf | /import.R | no_license | jfroeschke/outreach | R | false | false | 13 | r | ## import pdf |
#####
path = '/home/yin/R/air_pollution/proc_data/'
paths = paste(path, c('aqi_all.RData', 'aqi_day_mean.RData', 'aqi_mean.RData'), sep='')
for(i in paths) {load(i)}
#require('geoR')
#s100 = as.geodata(cbind(air_index[, 2:3], unlist(average.table[, 2])))
#####
#求某种污染物每天的均值
DayMean = function(index) {
vec = rep(NA, l... | /proc/describe.R | no_license | wumin722/air_pollution | R | false | false | 2,926 | r | #####
path = '/home/yin/R/air_pollution/proc_data/'
paths = paste(path, c('aqi_all.RData', 'aqi_day_mean.RData', 'aqi_mean.RData'), sep='')
for(i in paths) {load(i)}
#require('geoR')
#s100 = as.geodata(cbind(air_index[, 2:3], unlist(average.table[, 2])))
#####
#求某种污染物每天的均值
DayMean = function(index) {
vec = rep(NA, l... |
\name{ggfluctuation}
\alias{ggfluctuation}
\title{Create a fluctuation plot.}
\usage{
ggfluctuation(table, type = "size", floor = 0,
ceiling = max(table$freq, na.rm = TRUE))
}
\arguments{
\item{table}{a table of values, or a data frame with
three columns, the last column being frequency}
\item{type}{"size"... | /man/ggfluctuation.Rd | no_license | briandk/ggplot2 | R | false | false | 1,153 | rd | \name{ggfluctuation}
\alias{ggfluctuation}
\title{Create a fluctuation plot.}
\usage{
ggfluctuation(table, type = "size", floor = 0,
ceiling = max(table$freq, na.rm = TRUE))
}
\arguments{
\item{table}{a table of values, or a data frame with
three columns, the last column being frequency}
\item{type}{"size"... |
# check diagnostic plots for best model and full model for each species
library(tidyverse)
library(here)
trend_spp <- readRDS(here("data_files/trend_spp"))
best_model_diagnostics <- function(zspp, which_mod = "best") {
zspp_mods <- readRDS(here("fitted_models/all_spp_mods"))[zspp][[1]][[1]]
if(which_mod == "... | /code/analysis3_check_models.R | no_license | scottfjennings/Tomales_waterbird_trends_2020 | R | false | false | 4,582 | r |
# check diagnostic plots for best model and full model for each species
library(tidyverse)
library(here)
trend_spp <- readRDS(here("data_files/trend_spp"))
best_model_diagnostics <- function(zspp, which_mod = "best") {
zspp_mods <- readRDS(here("fitted_models/all_spp_mods"))[zspp][[1]][[1]]
if(which_mod == "... |
#' @name inla.rgeneric.milm.model
#' @rdname milm
#'
#' @title Multiple imputation using a linear regression.
#'
#' @description Multiple imputation using a linear regression model. The response may have missing values to be imputed, but the covariates must be fully observed.
#'
#' @param cmd Arguments used by latent e... | /R/rgeneric-LM.R | no_license | becarioprecario/MIINLA | R | false | false | 5,186 | r | #' @name inla.rgeneric.milm.model
#' @rdname milm
#'
#' @title Multiple imputation using a linear regression.
#'
#' @description Multiple imputation using a linear regression model. The response may have missing values to be imputed, but the covariates must be fully observed.
#'
#' @param cmd Arguments used by latent e... |
#prepare for reading files from sub-folder, building path, and name the varible
set <- c("test","train")
xysub <- c("X", "y", "subject")
for (i in 1:2){
for (j in 1:3){
url <- paste("./",set[i],"/",xysub[j],"_",set[i],".txt",sep="")
assign(paste(tolower(xysub[j]),"_",set[i],sep=""),read.table(url,head... | /run_analysis.R | no_license | tangsteve/Cleaning.Data_Ass3 | R | false | false | 1,806 | r | #prepare for reading files from sub-folder, building path, and name the varible
set <- c("test","train")
xysub <- c("X", "y", "subject")
for (i in 1:2){
for (j in 1:3){
url <- paste("./",set[i],"/",xysub[j],"_",set[i],".txt",sep="")
assign(paste(tolower(xysub[j]),"_",set[i],sep=""),read.table(url,head... |
# Simple case study with Boston Housing Dataset
library(mlbench)
data("BostonHousing")
fulldata <- BostonHousing
fulldata <- subset(fulldata, select = -c(chas, zn)) # Delete 2 columns(Categorical)
# previous dataset(1:200 rows of the full dataset)
prvsdata <- fulldata[1:200, ]
# Standardize all variables
for (i in 1:1... | /Algorithm-Lasso-Gradient/Comparision of Trivial Idea and Detailed Algorithm.R | no_license | Ringo-Zeyu/Liu-Chen-Project | R | false | false | 1,636 | r | # Simple case study with Boston Housing Dataset
library(mlbench)
data("BostonHousing")
fulldata <- BostonHousing
fulldata <- subset(fulldata, select = -c(chas, zn)) # Delete 2 columns(Categorical)
# previous dataset(1:200 rows of the full dataset)
prvsdata <- fulldata[1:200, ]
# Standardize all variables
for (i in 1:1... |
### Collection of different scripts
### Plot TIC overlay for all .mzXML in a folder
files <- list.files(choose.dir(), pattern='*.mzXML', ignore.case=TRUE, full.names=TRUE)
ans <- list()
for(i in 1:length(files)){
raw <- xcmsRaw(files[i])
TIC <- data.frame(Intensity=raw@tic, Time=raw@scantime, Sample=bas... | /inst/misc.R | no_license | thomasp85/pepmaps | R | false | false | 2,280 | r | ### Collection of different scripts
### Plot TIC overlay for all .mzXML in a folder
files <- list.files(choose.dir(), pattern='*.mzXML', ignore.case=TRUE, full.names=TRUE)
ans <- list()
for(i in 1:length(files)){
raw <- xcmsRaw(files[i])
TIC <- data.frame(Intensity=raw@tic, Time=raw@scantime, Sample=bas... |
`%||%` <- function(a, b) { # nolint
if (is.null(a)) b else a
}
squote <- function(x) {
sprintf("'%s'", x)
}
verify_names <- function(x, required = NULL, optional = NULL,
allow_extra = FALSE,
name = deparse(substitute(x))) {
nms <- names(x)
if (anyDuplicated(... | /R/utils.R | permissive | mrc-ide/sircovid | R | false | false | 6,005 | r | `%||%` <- function(a, b) { # nolint
if (is.null(a)) b else a
}
squote <- function(x) {
sprintf("'%s'", x)
}
verify_names <- function(x, required = NULL, optional = NULL,
allow_extra = FALSE,
name = deparse(substitute(x))) {
nms <- names(x)
if (anyDuplicated(... |
library(sidier)
### Name: simplify.network
### Title: Network showing modules as nodes
### Aliases: simplify.network
### ** Examples
inputMatrix<-matrix(c(1,1,1,1.2,2,1,0.8,1,3,2,1.2,1,4,2,2,2.2,
5,3,1.8,2,6,3,2.2,2,7,3,1.7,2.1,8,3,2.2,2.2),ncol=4,byrow=TRUE)
colnames(inputMatrix)<-c("node","module","x","y")
net... | /data/genthat_extracted_code/sidier/examples/simplify.network.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 2,199 | r | library(sidier)
### Name: simplify.network
### Title: Network showing modules as nodes
### Aliases: simplify.network
### ** Examples
inputMatrix<-matrix(c(1,1,1,1.2,2,1,0.8,1,3,2,1.2,1,4,2,2,2.2,
5,3,1.8,2,6,3,2.2,2,7,3,1.7,2.1,8,3,2.2,2.2),ncol=4,byrow=TRUE)
colnames(inputMatrix)<-c("node","module","x","y")
net... |
\name{fastlogitME}
\alias{fastlogitME}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Basic Marginal Effects for Logit Models
%% ~~function to do ... ~~
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
Calculates marginal effects based on logistic mo... | /man/fastlogitME.Rd | no_license | cran/fastlogitME | R | false | false | 5,564 | rd | \name{fastlogitME}
\alias{fastlogitME}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Basic Marginal Effects for Logit Models
%% ~~function to do ... ~~
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
Calculates marginal effects based on logistic mo... |
# Step B: Explore the Data – Understanding distributions
library(ggplot2) #use ggplot2 library by importing ggplot2
#4) Create a histogram using GGPLOT for the population and a different histogram for the murder rate
plot_population <- q... | /StepB.R | no_license | fall2018-saltz/ananth_gv_ggplot | R | false | false | 4,535 | r |
# Step B: Explore the Data – Understanding distributions
library(ggplot2) #use ggplot2 library by importing ggplot2
#4) Create a histogram using GGPLOT for the population and a different histogram for the murder rate
plot_population <- q... |
library(liger)
library(Seurat)
library(SeuratData)
library(SeuratWrappers)
path2seurat <- '/media/ag-cherrmann/cramirez/interaction_DC-pathogens/data/pass_qc_seurat/pass_qc_seurat.rds'
batch_column <- 'plate_number'
out_dir <- '/media/ag-cherrmann/cramirez/interaction_DC-pathogens/data/batch_correction/'
## Reading ... | /sc/batch_correction_liger.R | no_license | caramirezal/interaction_DC-pathogens | R | false | false | 1,242 | r | library(liger)
library(Seurat)
library(SeuratData)
library(SeuratWrappers)
path2seurat <- '/media/ag-cherrmann/cramirez/interaction_DC-pathogens/data/pass_qc_seurat/pass_qc_seurat.rds'
batch_column <- 'plate_number'
out_dir <- '/media/ag-cherrmann/cramirez/interaction_DC-pathogens/data/batch_correction/'
## Reading ... |
\name{Sensitivity.Index}
\alias{Sensitivity.Index}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Calculate the power for Sensitivity Index
}
\description{
Ho: \eqn{\mu_1 = \mu_2 }
Ha: \eqn{\mu_1} is not equal to \eqn{\mu_2}
The test is finding the treatment difference in QT int... | /man/Sensitivity.Index.Rd | no_license | cran/TrialSize | R | false | false | 1,005 | rd | \name{Sensitivity.Index}
\alias{Sensitivity.Index}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Calculate the power for Sensitivity Index
}
\description{
Ho: \eqn{\mu_1 = \mu_2 }
Ha: \eqn{\mu_1} is not equal to \eqn{\mu_2}
The test is finding the treatment difference in QT int... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Data_PTAGIS_Marsh_Steel.R
\docType{data}
\name{Data_PTAGIS_Marsh_Steel}
\alias{Data_PTAGIS_Marsh_Steel}
\title{Example juvenile Steelhead PTAGIS data, Marsh Creek, ID, 2005-2015}
\format{Data is formatted and ready for \code{MYTSBE()}.}
\usag... | /man/Data_PTAGIS_Marsh_Steel.Rd | no_license | KevinSee/MYTSBE | R | false | true | 558 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Data_PTAGIS_Marsh_Steel.R
\docType{data}
\name{Data_PTAGIS_Marsh_Steel}
\alias{Data_PTAGIS_Marsh_Steel}
\title{Example juvenile Steelhead PTAGIS data, Marsh Creek, ID, 2005-2015}
\format{Data is formatted and ready for \code{MYTSBE()}.}
\usag... |
capply <- function(str, ff, ...) {
x <- strsplit(str, NULL)
y <- lapply(x, ff, ...)
return(sapply(y, paste, collapse = ""))
} # capply
cap <- function(char) {
if (any(ind <- letters == char)) LETTERS[ind]
else char
}
.cl <- function(str, ff) {
x <- strsplit(str, NULL)
y <- unlist(x)
z <- lapply(y, ff)... | /R/caplow.R | no_license | cran/cwhmisc | R | false | false | 731 | r | capply <- function(str, ff, ...) {
x <- strsplit(str, NULL)
y <- lapply(x, ff, ...)
return(sapply(y, paste, collapse = ""))
} # capply
cap <- function(char) {
if (any(ind <- letters == char)) LETTERS[ind]
else char
}
.cl <- function(str, ff) {
x <- strsplit(str, NULL)
y <- unlist(x)
z <- lapply(y, ff)... |
#' @title Road deflection dataset.
#'
#' @description The "deflection" dataset is a sample of the road deflection data
#' monitored and collected by Main Roads Western Australia.
#'
#' @name deflection
#' @format \code{deflection}: A data frame with 1000 rows and 4 variables.
#'
#' \itemize{
#' \item id.... | /R/data.R | no_license | cran/HS | R | false | false | 1,964 | r | #' @title Road deflection dataset.
#'
#' @description The "deflection" dataset is a sample of the road deflection data
#' monitored and collected by Main Roads Western Australia.
#'
#' @name deflection
#' @format \code{deflection}: A data frame with 1000 rows and 4 variables.
#'
#' \itemize{
#' \item id.... |
# Fast data.frame constructor and indexing
# No checking, recycling etc. unless asked for
new_data_frame <- function(x = list(), n = NULL) {
if (length(x) != 0 && is.null(names(x))) {
abort("Elements must be named")
}
lengths <- vapply(x, length, integer(1))
if (is.null(n)) {
n <- if (length(x) == 0 || ... | /ggiraph/R/utils_ggplot2_performance.R | no_license | akhikolla/InformationHouse | R | false | false | 1,652 | r | # Fast data.frame constructor and indexing
# No checking, recycling etc. unless asked for
new_data_frame <- function(x = list(), n = NULL) {
if (length(x) != 0 && is.null(names(x))) {
abort("Elements must be named")
}
lengths <- vapply(x, length, integer(1))
if (is.null(n)) {
n <- if (length(x) == 0 || ... |
### Caching the inverse of a Matrix###
## We are assuming the matrix supplied is always invertible.
## makeCacheMatrix creates a Matrix,which is a list containing functions :
## 1.setM-set the value of the Matrix
## 2.getM-get the value of the Matrix
## 3.setIM-set the value of the inverse of the Matrix
## 4.getIM-get... | /cachematrix.R | no_license | zbijoux/ProgrammingAssignment2 | R | false | false | 1,697 | r | ### Caching the inverse of a Matrix###
## We are assuming the matrix supplied is always invertible.
## makeCacheMatrix creates a Matrix,which is a list containing functions :
## 1.setM-set the value of the Matrix
## 2.getM-get the value of the Matrix
## 3.setIM-set the value of the inverse of the Matrix
## 4.getIM-get... |
### script para tratar os dados do censo
if (!require("bit64")) install.packages("bit64")
library(bit64)
library(tidyverse)
library(janitor)
### carrega arquivos de label
load("labels/Label.RData")
load("labels/Label2.RData")
### lê o arquivo que foi importado do CenSup
### http://sistemascensosuperior.inep.gov.br/c... | /scripts/02_pega_dados_censo.R | permissive | robertofreitasneder88/anuario2020 | R | false | false | 4,976 | r | ### script para tratar os dados do censo
if (!require("bit64")) install.packages("bit64")
library(bit64)
library(tidyverse)
library(janitor)
### carrega arquivos de label
load("labels/Label.RData")
load("labels/Label2.RData")
### lê o arquivo que foi importado do CenSup
### http://sistemascensosuperior.inep.gov.br/c... |
get_EQ_data <- function(){
file1 <- paste(workingdir1,'/Data/SHAREver3.3.csv',sep = '')
Hist_data1 <- read.csv(file1, header=TRUE, sep=",")
#Just get the data for Turkey
Hist_data1$Long <- as.numeric(Hist_data1$Lon)
Hist_data1 <- Hist_data1[Hist_data1$Lon>23,]
Hist_data1 <- Hist_data1[Hist_dat... | /Earthquake_v4/ALL_FUNCTIONS/02_01_Get_Data_Ready.R | no_license | PeterHedley94/Earthquake_Analysis | R | false | false | 1,572 | r | get_EQ_data <- function(){
file1 <- paste(workingdir1,'/Data/SHAREver3.3.csv',sep = '')
Hist_data1 <- read.csv(file1, header=TRUE, sep=",")
#Just get the data for Turkey
Hist_data1$Long <- as.numeric(Hist_data1$Lon)
Hist_data1 <- Hist_data1[Hist_data1$Lon>23,]
Hist_data1 <- Hist_data1[Hist_dat... |
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615834098-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 2,048 | r | testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... |
# Examine the diamond data
install.packages("ggplot2")
library(ggplot2)
head(ggplot2::diamonds, 20)
# Generate a dataset containing just the columns required
setwd("E:\\Demofiles\\Mod07\\")
diamondData <- rxDataStep(inData = ggplot2::diamonds, outFile = "Diamonds.xdf", overwrite = TRUE,
tran... | /Allfiles/Demofiles/Mod07/Demo1 - partitioning.R | permissive | bistok/20773_Analyzing-Big-Data-with-Microsoft-R | R | false | false | 1,939 | r | # Examine the diamond data
install.packages("ggplot2")
library(ggplot2)
head(ggplot2::diamonds, 20)
# Generate a dataset containing just the columns required
setwd("E:\\Demofiles\\Mod07\\")
diamondData <- rxDataStep(inData = ggplot2::diamonds, outFile = "Diamonds.xdf", overwrite = TRUE,
tran... |
with(abb166f9823444beabdb1018258f23163, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/1c4fa71c-191c-4da9-8102-b247ffddc5d3';rm(list=ls())}); | /1c4fa71c-191c-4da9-8102-b247ffddc5d3/R/Temp/aYXBw8lVwF3RQ.R | no_license | ayanmanna8/test | R | false | false | 212 | r | with(abb166f9823444beabdb1018258f23163, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/1c4fa71c-191c-4da9-8102-b247ffddc5d3';rm(list=ls())}); |
tweets <- read.csv("trumpdetails.csv")
dates <- paste("2016-07",11:18,sep="") # need to go to 18th to catch tweets from 17th
for (i in 2:length(dates)) {
print(paste(dates[i-1], dates[i]))
tweets <- c(tweets, searchTwitter("DonaldTrump+USElection", since=dates[i-1], until=dates[i], n=1500))
}
# Convert the ... | /Retweets per day.R | no_license | gitDrashti/Social-Media-Analysis--United-States-Presidential-Election-2016 | R | false | false | 1,812 | r | tweets <- read.csv("trumpdetails.csv")
dates <- paste("2016-07",11:18,sep="") # need to go to 18th to catch tweets from 17th
for (i in 2:length(dates)) {
print(paste(dates[i-1], dates[i]))
tweets <- c(tweets, searchTwitter("DonaldTrump+USElection", since=dates[i-1], until=dates[i], n=1500))
}
# Convert the ... |
library(optparse)
option_list <- list(
make_option(opt_str = c("-i","--in_tenx"),
type = "character",
default = NULL,
help = "Input 10x outs/ path",
metavar = "character"),
make_option(opt_str = c("-w","--in_well"),
type = "character",
... | /stage_02/run_add_tenx_rna_metadata.R | permissive | AllenInstitute/BarWare-pipeline | R | false | false | 1,653 | r | library(optparse)
option_list <- list(
make_option(opt_str = c("-i","--in_tenx"),
type = "character",
default = NULL,
help = "Input 10x outs/ path",
metavar = "character"),
make_option(opt_str = c("-w","--in_well"),
type = "character",
... |
args <- commandArgs()
assembly <-sub('--assembly=', '', args[grep('--assembly=', args)])
bamDir <-sub('--bamDir=', '', args[grep('--bamDir=', args)])
sample <- sub('--sample=', '', args[grep('--sample=', args)])
sample <- sub('$', '.bam', sample)
multiMap <- sub('--multiMap=', '', args[grep('--multiMap=',args)])
if (... | /bin/createRNAseqTracks2.R | no_license | ebartom/NGSbartom | R | false | false | 3,403 | r | args <- commandArgs()
assembly <-sub('--assembly=', '', args[grep('--assembly=', args)])
bamDir <-sub('--bamDir=', '', args[grep('--bamDir=', args)])
sample <- sub('--sample=', '', args[grep('--sample=', args)])
sample <- sub('$', '.bam', sample)
multiMap <- sub('--multiMap=', '', args[grep('--multiMap=',args)])
if (... |
rm(list=ls())
#library("Hmisc")
#source("TE_function_kar.R")
source("kernel_CMI.R")
source("kernel_MI.R")
#source(kernel_CMI.R"TE_mean.R")
#source("TE_sd.R")
#source("MI_function_kar.R")
#source("CMI_function_kar.R")
load("../../linear2.RData")
library(doParallel)
#cl<-makeCluster(detectCores())
cl<-5
registerDoParalle... | /KERNEL/FIG2/fig2_ker.R | no_license | pothapakulapraveen/ESD | R | false | false | 2,735 | r | rm(list=ls())
#library("Hmisc")
#source("TE_function_kar.R")
source("kernel_CMI.R")
source("kernel_MI.R")
#source(kernel_CMI.R"TE_mean.R")
#source("TE_sd.R")
#source("MI_function_kar.R")
#source("CMI_function_kar.R")
load("../../linear2.RData")
library(doParallel)
#cl<-makeCluster(detectCores())
cl<-5
registerDoParalle... |
setwd("C:/Users/srimasr/Desktop/Cousera/Assignment/Exploratory_Analysis/Files")
Electric1 <- read.table("household_power_consumption.txt", sep=";",header = TRUE)
Electric1$Date <- as.Date(Electric1$Date , format= '%d/%m/%Y')
Electric2 <- subset(Electric1, Electric1$Date > "2007-01-31" & Electric1$Date < "2007-02-03"... | /Plot1.R | no_license | sksrimant/datasharing | R | false | false | 714 | r | setwd("C:/Users/srimasr/Desktop/Cousera/Assignment/Exploratory_Analysis/Files")
Electric1 <- read.table("household_power_consumption.txt", sep=";",header = TRUE)
Electric1$Date <- as.Date(Electric1$Date , format= '%d/%m/%Y')
Electric2 <- subset(Electric1, Electric1$Date > "2007-01-31" & Electric1$Date < "2007-02-03"... |
#qsub -v script=${R script name} Rsubmit_args.sh
# R/3.4.3
setwd("/projects/korstanje-lab/ytakemon/JAC_DO_Kidney/")
load("./RNAseq_data/DO188b_kidney.RData")
options(dplyr.width = Inf)
#library(qtl2)
library(tidyverse)
# parameters
diffscan_dir <- "./QTLscan/scanBestMarker_mrna/maxLODscan_Akt1_m"
gatherdf <- function(... | /QTLmapping/scanBestMarker_AgeInt/Archive/scanBestMarker_m_Akt1/Gather_scanBestMarker_m_Akt1_m.R | permissive | ytakemon/JAC_DO_Kidney | R | false | false | 2,118 | r | #qsub -v script=${R script name} Rsubmit_args.sh
# R/3.4.3
setwd("/projects/korstanje-lab/ytakemon/JAC_DO_Kidney/")
load("./RNAseq_data/DO188b_kidney.RData")
options(dplyr.width = Inf)
#library(qtl2)
library(tidyverse)
# parameters
diffscan_dir <- "./QTLscan/scanBestMarker_mrna/maxLODscan_Akt1_m"
gatherdf <- function(... |
# (1 point) Create a vector of length 1000, the first 500 values are 1 and the
# last 500 are 2. Call this vector a.
a = c(rep(1,500), rep(2,500))
# (1 point) Create a vector with values that start at -122.2 with each
# consecutive element decreasing by 1 until the last number -1.2. In other
# words, the following s... | /classwork/ex1-sol.r | no_license | jgraycar/stat133 | R | false | false | 1,758 | r | # (1 point) Create a vector of length 1000, the first 500 values are 1 and the
# last 500 are 2. Call this vector a.
a = c(rep(1,500), rep(2,500))
# (1 point) Create a vector with values that start at -122.2 with each
# consecutive element decreasing by 1 until the last number -1.2. In other
# words, the following s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connectwisdomservice_operations.R
\name{connectwisdomservice_create_content}
\alias{connectwisdomservice_create_content}
\title{Creates Wisdom content}
\usage{
connectwisdomservice_create_content(
clientToken = NULL,
knowledgeBaseId,
me... | /cran/paws.customer.engagement/man/connectwisdomservice_create_content.Rd | permissive | paws-r/paws | R | false | true | 2,274 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/connectwisdomservice_operations.R
\name{connectwisdomservice_create_content}
\alias{connectwisdomservice_create_content}
\title{Creates Wisdom content}
\usage{
connectwisdomservice_create_content(
clientToken = NULL,
knowledgeBaseId,
me... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/n1.R
\name{n1}
\alias{n1}
\title{Find the optimal stage one sample size}
\usage{
n1(parameters, lambda1, lambda2)
}
\arguments{
\item{parameters}{The parameters (alpha, power, standardized effect) whith which you want to build your d... | /man/n1.Rd | no_license | MatheMax/OptReSample | R | false | true | 490 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/n1.R
\name{n1}
\alias{n1}
\title{Find the optimal stage one sample size}
\usage{
n1(parameters, lambda1, lambda2)
}
\arguments{
\item{parameters}{The parameters (alpha, power, standardized effect) whith which you want to build your d... |
shinyUI <-
dashboardPage(
dashboardHeader
(
title = "NYC Airbnb"
),
dashboardSidebar
(
sidebarMenu
(
menuItem
(
"Listings",
tabName = "listings",
... | /ui.R | no_license | dsanco/AirBNBShinyApp | R | false | false | 7,122 | r | shinyUI <-
dashboardPage(
dashboardHeader
(
title = "NYC Airbnb"
),
dashboardSidebar
(
sidebarMenu
(
menuItem
(
"Listings",
tabName = "listings",
... |
# set.key('AIzaSyAS9BOBnYUBn0cMB1L8N__F9lwDCwQGaiA')
# item_cat_en <- map(.x = levels(item.categories$item_category_name),.f = ~translate(.x,source = 'ru',target = 'en')) %>% unlist()
# Run on AWS
# item_name_en <- map(.x = levels(items$item_name),.f = ~translate(.x,source = 'ru',target = 'en')) %>% unlist()
# shop_... | /munge/01-B-Translate.R | no_license | rsangole/413_midterm_kaggle | R | false | false | 661 | r | # set.key('AIzaSyAS9BOBnYUBn0cMB1L8N__F9lwDCwQGaiA')
# item_cat_en <- map(.x = levels(item.categories$item_category_name),.f = ~translate(.x,source = 'ru',target = 'en')) %>% unlist()
# Run on AWS
# item_name_en <- map(.x = levels(items$item_name),.f = ~translate(.x,source = 'ru',target = 'en')) %>% unlist()
# shop_... |
install.packages("gplots")
install.packages("RColorBrewer")
library("gplots")
library("RColorBrewer")
library("heatmap.plus")
library("writexl")
##########################################################################################
#AC
##############################################################################... | /R_scripts/heatmap.R | no_license | ThibaultCrouzet1/Pipeline-script-for-the-extraction-of-lncRNA-in-Acanthamoeba-castellanii | R | false | false | 6,848 | r | install.packages("gplots")
install.packages("RColorBrewer")
library("gplots")
library("RColorBrewer")
library("heatmap.plus")
library("writexl")
##########################################################################################
#AC
##############################################################################... |
options(warn=-1)
c(1,2,3) + c(4,5,6)
c(1,2,3) + c(1,1,1,1,1)
c(1,1) + c(1,2,3,4,5)
c(2) * c(1,2,3,4,5)
2 * c(1,2,3,4,5)
c(1,2,3,4,5) / c(10)
c(1,2,3,4,5) / 10
c(1,2,3,4,5,6,7,8,9) %% c(3)
c(1,2,3,4,5,6,7,8,9) %% 3
c(1,2,3,4) ^ c(2)
c(1,2,3,4) ^ 2
| /test/operator/array.r | no_license | micha-p/roq | R | false | false | 254 | r | options(warn=-1)
c(1,2,3) + c(4,5,6)
c(1,2,3) + c(1,1,1,1,1)
c(1,1) + c(1,2,3,4,5)
c(2) * c(1,2,3,4,5)
2 * c(1,2,3,4,5)
c(1,2,3,4,5) / c(10)
c(1,2,3,4,5) / 10
c(1,2,3,4,5,6,7,8,9) %% c(3)
c(1,2,3,4,5,6,7,8,9) %% 3
c(1,2,3,4) ^ c(2)
c(1,2,3,4) ^ 2
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/branching_logic.R
\name{remove_html_tags}
\alias{remove_html_tags}
\title{Remove html tags from string}
\usage{
remove_html_tags(x)
}
\arguments{
\item{x}{A string possibly with embedded html tags.}
}
\value{
A string free of html tags and el... | /man/RemoveHtmlTags.Rd | no_license | smockin/RedcapData | R | false | true | 557 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/branching_logic.R
\name{remove_html_tags}
\alias{remove_html_tags}
\title{Remove html tags from string}
\usage{
remove_html_tags(x)
}
\arguments{
\item{x}{A string possibly with embedded html tags.}
}
\value{
A string free of html tags and el... |
if (!file.exists('activity.csv')) {
unzip(zipfile = "activity.zip")
}
activityData <- read.csv(file="activity.csv", header=TRUE)
# Calculate the total steps taken per day
totalSteps <- aggregate(steps ~ date, activityData, FUN=sum)
# Make a histogram of the total number of steps taken per day
hist(totalSteps$step... | /reproducible.R | no_license | Morrissenzeyi/RepData_PeerAssessment1 | R | false | false | 3,228 | r | if (!file.exists('activity.csv')) {
unzip(zipfile = "activity.zip")
}
activityData <- read.csv(file="activity.csv", header=TRUE)
# Calculate the total steps taken per day
totalSteps <- aggregate(steps ~ date, activityData, FUN=sum)
# Make a histogram of the total number of steps taken per day
hist(totalSteps$step... |
# Building a Prod-Ready, Robust Shiny Application.
#
# README: each step of the dev files is optional, and you don't have to
# fill every dev scripts before getting started.
# 01_start.R should be filled at start.
# 02_dev.R should be used to keep track of your development during the project.
# 03_deploy.R should b... | /dev/01_start.R | no_license | antdurrant/textanalystics | R | false | false | 2,060 | r | # Building a Prod-Ready, Robust Shiny Application.
#
# README: each step of the dev files is optional, and you don't have to
# fill every dev scripts before getting started.
# 01_start.R should be filled at start.
# 02_dev.R should be used to keep track of your development during the project.
# 03_deploy.R should b... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.clustvar.R
\name{plot.clustvar}
\alias{plot.clustvar}
\title{Plot loadings in each cluster.}
\usage{
\method{plot}{clustvar}(x, ...)
}
\arguments{
\item{x}{an object of class \code{clustvar} obtained with \code{cutreevar} or \code{kmeans... | /man/plot.clustvar.Rd | no_license | statire/ClustOfVar | R | false | true | 1,380 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.clustvar.R
\name{plot.clustvar}
\alias{plot.clustvar}
\title{Plot loadings in each cluster.}
\usage{
\method{plot}{clustvar}(x, ...)
}
\arguments{
\item{x}{an object of class \code{clustvar} obtained with \code{cutreevar} or \code{kmeans... |
#' transform OD values
#'
#' internal function to transform od values. -Inf, NaN values are replaced with NA.
#'
#' @param data data
#' @param od_colnr col with OD values
#' @param time_colnr col with times
#' @param trafo which trafo to use
#' @param logBase which logbase (default: 2)
#' @section Output:
#' data.fr... | /R/accFunctions.R | no_license | dcangst/fitr | R | false | false | 1,975 | r | #' transform OD values
#'
#' internal function to transform od values. -Inf, NaN values are replaced with NA.
#'
#' @param data data
#' @param od_colnr col with OD values
#' @param time_colnr col with times
#' @param trafo which trafo to use
#' @param logBase which logbase (default: 2)
#' @section Output:
#' data.fr... |
library(mockery)
context("BinDat Pooled Continuous Outcome")
# ------------------------------------------------------------------------------------------------
# Test for pooled fitting of the bin indicators
# AN IDEA FOR TESTING pooled regression:
# USE IT TO ESTIMATE POOLED IPTW FOR LONGITUDINAL DATA WITH SEVERAL T... | /tests/testthat/test_04_PoolContinuosOutcome_2.R | permissive | osofr/condensier | R | false | false | 3,184 | r | library(mockery)
context("BinDat Pooled Continuous Outcome")
# ------------------------------------------------------------------------------------------------
# Test for pooled fitting of the bin indicators
# AN IDEA FOR TESTING pooled regression:
# USE IT TO ESTIMATE POOLED IPTW FOR LONGITUDINAL DATA WITH SEVERAL T... |
# Experimenting with the transition state matrix approach, using data from UCI
# May 6, 2017
library(ggplot2)
library(scales)
library(markovchain)
####################################################################################################
# Data from https://archive.ics.uci.edu/ml/machine-learning-databases/... | /tsm1.R | no_license | andrewcheesman/tsm | R | false | false | 6,551 | r | # Experimenting with the transition state matrix approach, using data from UCI
# May 6, 2017
library(ggplot2)
library(scales)
library(markovchain)
####################################################################################################
# Data from https://archive.ics.uci.edu/ml/machine-learning-databases/... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/update_inputs.R
\name{updateAllSelectizeInputs}
\alias{updateAllSelectizeInputs}
\title{Custom update selectize input}
\usage{
updateAllSelectizeInputs(
inputName,
choiceColumn,
selectedChoice,
data,
session
)
}
\arguments{
\item{in... | /man/updateAllSelectizeInputs.Rd | permissive | luechtian/ShinyLipids | R | false | true | 569 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/update_inputs.R
\name{updateAllSelectizeInputs}
\alias{updateAllSelectizeInputs}
\title{Custom update selectize input}
\usage{
updateAllSelectizeInputs(
inputName,
choiceColumn,
selectedChoice,
data,
session
)
}
\arguments{
\item{in... |
corr <- function(directory, threshold = 0) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
## 'threshold' is a numeric vector of length 1 indicating the
## number of completely observed observations (on all
## variables) required to... | /Assignments 01/corr.R | no_license | mutarock/R-Programming-Assignment | R | false | false | 1,305 | r | corr <- function(directory, threshold = 0) {
## 'directory' is a character vector of length 1 indicating
## the location of the CSV files
## 'threshold' is a numeric vector of length 1 indicating the
## number of completely observed observations (on all
## variables) required to... |
## ----global_options, R.options=knitr::opts_chunk$set(warning=FALSE, message=FALSE,echo=F,knitr.table.format = "latex")----
## ------------------------------------------------------------------------
# Libraries ---------------------------------------------------------------
library(kernlab)
library(AtmRay)
library... | /Lab4/LAB4_AML.R | permissive | quartermaine/Advanced-Machine-Learning | R | false | false | 14,944 | r | ## ----global_options, R.options=knitr::opts_chunk$set(warning=FALSE, message=FALSE,echo=F,knitr.table.format = "latex")----
## ------------------------------------------------------------------------
# Libraries ---------------------------------------------------------------
library(kernlab)
library(AtmRay)
library... |
# ALADYM Age length based dynamic model - version 12.3
# Authors: G. Lembo, I. Bitetto, M.T. Facchini, M.T. Spedicato 2018
# COISPA Tecnologia & Ricerca, Via dei Trulli 18/20 - (Bari), Italy
# In case of use of the model, the Authors should be cited.
# If you have any comments or suggestions please contact the follow... | /BEMTOOL-ver2.5-2018_0901/src/biol/bmtALADYM/ALADYM-ver12.3-2017_0501/gui/fishery/selectivity_extvect_age/SelectivityAge_F.add_columns.r | no_license | gresci/BEMTOOL2.5 | R | false | false | 1,954 | r | # ALADYM Age length based dynamic model - version 12.3
# Authors: G. Lembo, I. Bitetto, M.T. Facchini, M.T. Spedicato 2018
# COISPA Tecnologia & Ricerca, Via dei Trulli 18/20 - (Bari), Italy
# In case of use of the model, the Authors should be cited.
# If you have any comments or suggestions please contact the follow... |
shinyUI(
pageWithSidebar(
headerPanel("Mortgage Calculator"),
sidebarPanel(
numericInput('LoanAmount', 'Amount:', 100000),
selectInput('InterestRate', 'Interest Rate (% APR):',
choices = list(0.00, 0.25, 0.50, 0... | /ui.r | no_license | programmer8/MortgageCalculator | R | false | false | 2,245 | r |
shinyUI(
pageWithSidebar(
headerPanel("Mortgage Calculator"),
sidebarPanel(
numericInput('LoanAmount', 'Amount:', 100000),
selectInput('InterestRate', 'Interest Rate (% APR):',
choices = list(0.00, 0.25, 0.50, 0... |
context("plotBMRSummary")
test_that("BenchmarkSummary", {
lrns = list(makeLearner("classif.nnet"), makeLearner("classif.rpart"))
tasks = list(multiclass.task, binaryclass.task)
rdesc = makeResampleDesc("CV", iters = 2L)
meas = list(acc, mmce, ber, timeboth)
res = benchmark(lrns, tasks, rdesc, meas)
nTasks ... | /tests/testthat/test_base_plotBMRSummary.R | no_license | HeidiSeibold/mlr | R | false | false | 804 | r | context("plotBMRSummary")
test_that("BenchmarkSummary", {
lrns = list(makeLearner("classif.nnet"), makeLearner("classif.rpart"))
tasks = list(multiclass.task, binaryclass.task)
rdesc = makeResampleDesc("CV", iters = 2L)
meas = list(acc, mmce, ber, timeboth)
res = benchmark(lrns, tasks, rdesc, meas)
nTasks ... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "boston")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")... | /models/openml_boston/classification_binaryClass/943368e96b27dfa62ba668ffdeb067b1/code.R | no_license | lukaszbrzozowski/CaseStudies2019S | R | false | false | 739 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "boston")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")... |
library(webmockr) | /tests/testthat/setup.R | no_license | grimbough/biomaRt | R | false | false | 17 | r | library(webmockr) |
## The combination of the two functions below, can evaluate the inverse matrix
##of the matrix inputed and cache the result to save the calculation in the next
##time the matrix is inputed.
##cache and provide the result of cacheSolve function
makeCacheMatrix <- function(x = matrix()) {
m<-NULL ... | /cachematrix.R | no_license | k8godzilla/R-Programming-Assignment-W3 | R | false | false | 1,725 | r | ## The combination of the two functions below, can evaluate the inverse matrix
##of the matrix inputed and cache the result to save the calculation in the next
##time the matrix is inputed.
##cache and provide the result of cacheSolve function
makeCacheMatrix <- function(x = matrix()) {
m<-NULL ... |
# Create adjacency matrix for countries
library(dplyr)
## Johns Hopkins data -------------
x = read.csv("https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-regioni/dpc-covid19-ita-regioni.csv")
## Get average lat and long for all countries ----------
x1 <- x %>%
group_by(denominazione_regione) %>%
... | /adjacency_matricies_regione_lat-long-weight.R | no_license | lazd/ItalyCovid19 | R | false | false | 655 | r | # Create adjacency matrix for countries
library(dplyr)
## Johns Hopkins data -------------
x = read.csv("https://raw.githubusercontent.com/pcm-dpc/COVID-19/master/dati-regioni/dpc-covid19-ita-regioni.csv")
## Get average lat and long for all countries ----------
x1 <- x %>%
group_by(denominazione_regione) %>%
... |
attach(women)
str(women)
library(DAAG)
cvfit=CVlm(data=women,form.lm=lm(weight~height,data=women),m=3,plotit="Observed")
cvfit
(76.9+8.29+15.9)/15 | /Modelling/Cross-Validation.R | no_license | KSTVCHATTERJEE/R_in_Action | R | false | false | 146 | r | attach(women)
str(women)
library(DAAG)
cvfit=CVlm(data=women,form.lm=lm(weight~height,data=women),m=3,plotit="Observed")
cvfit
(76.9+8.29+15.9)/15 |
library(rCharts)
library(shiny)
source('data_to_json.R')
data_json_format <- data_to_json(iris, c('Sepal.Length', 'Sepal.Width'), c('x','y'))
server <- function(input, output){
output$plot <- renderChart2({
#apply data filters
ix <- with(iris, Sepal.Length >= input$sepal_length[1] & Sepal.Length ... | /scatter_plot.R | no_license | arturochian/rCharts-sandbox | R | false | false | 999 | r | library(rCharts)
library(shiny)
source('data_to_json.R')
data_json_format <- data_to_json(iris, c('Sepal.Length', 'Sepal.Width'), c('x','y'))
server <- function(input, output){
output$plot <- renderChart2({
#apply data filters
ix <- with(iris, Sepal.Length >= input$sepal_length[1] & Sepal.Length ... |
# Multiple Linear Regression
# Importing the dataset
dataset = read.csv('50_Startups.csv')
# Encoding categorical data
dataset$State = factor(dataset$State,
levels = c('New York','California','Florida'),
labels = c(1,2,3))
# Splitting the dataset into the Training se... | /2-Regression/2-Multiple Linear Regression/multiple_linear_regression.R | no_license | MusaCanYazicioglu/Machine-Learning-R | R | false | false | 1,904 | r | # Multiple Linear Regression
# Importing the dataset
dataset = read.csv('50_Startups.csv')
# Encoding categorical data
dataset$State = factor(dataset$State,
levels = c('New York','California','Florida'),
labels = c(1,2,3))
# Splitting the dataset into the Training se... |
#' Partial Least Squares regression
#'
#' @description
#' \code{pls} is used to calibrate, validate and use of partial least squares (PLS)
#' regression model.
#'
#' @param x
#' matrix with predictors.
#' @param y
#' matrix with responses.
#' @param ncomp
#' maximum number of components to calculate.
#' @param cen... | /R/pls.R | no_license | nurashikin/mdatools | R | false | false | 71,050 | r | #' Partial Least Squares regression
#'
#' @description
#' \code{pls} is used to calibrate, validate and use of partial least squares (PLS)
#' regression model.
#'
#' @param x
#' matrix with predictors.
#' @param y
#' matrix with responses.
#' @param ncomp
#' maximum number of components to calculate.
#' @param cen... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/optimES.R
\name{spotAlgEsGetSuccessRate}
\alias{spotAlgEsGetSuccessRate}
\title{get Success Rate}
\usage{
spotAlgEsGetSuccessRate(gen, pop)
}
\arguments{
\item{gen}{Generation number}
\item{pop}{Population to be evaluated (only the generatio... | /man/spotAlgEsGetSuccessRate.Rd | no_license | bartzbeielstein/SPOT | R | false | true | 533 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/optimES.R
\name{spotAlgEsGetSuccessRate}
\alias{spotAlgEsGetSuccessRate}
\title{get Success Rate}
\usage{
spotAlgEsGetSuccessRate(gen, pop)
}
\arguments{
\item{gen}{Generation number}
\item{pop}{Population to be evaluated (only the generatio... |
#@ https://www.datanovia.com/en/blog/types-of-clustering-methods-overview-and-quick-start-r-code/
# Compute PAM
library(cluster)
library(factoextra)
library(magrittr)
# Load and prepare the data
data("USArrests")
pam.res <- pam(my_data, 3)
# Visualize
fviz_cluster(pam.res) | /AI/R/MachineLearning/Unsupervised/Clustering/PAM.R | permissive | FedeScience/myrepo | R | false | false | 274 | r | #@ https://www.datanovia.com/en/blog/types-of-clustering-methods-overview-and-quick-start-r-code/
# Compute PAM
library(cluster)
library(factoextra)
library(magrittr)
# Load and prepare the data
data("USArrests")
pam.res <- pam(my_data, 3)
# Visualize
fviz_cluster(pam.res) |
ClassMin <- function(Data, Cls) {
# calulate minimum in each group of the Data
# INPUT
# Data(n,d) n cases, d variables
# Cls(d) Cls(i) == ClusterNumber of Data(i,:)
# OUTPUT
# UniqueClasses(AnzClass) the AnzClass unique classes in Cls
# MinPerClass(1:AnzClass,1:d) ... | /DbtTools/ClassAnalysis/R/ClassMin.R | no_license | markus-flicke/KD_Projekt_1 | R | false | false | 1,236 | r | ClassMin <- function(Data, Cls) {
# calulate minimum in each group of the Data
# INPUT
# Data(n,d) n cases, d variables
# Cls(d) Cls(i) == ClusterNumber of Data(i,:)
# OUTPUT
# UniqueClasses(AnzClass) the AnzClass unique classes in Cls
# MinPerClass(1:AnzClass,1:d) ... |
library("R.utils")
opager <- options(pager=mpager)
file <- system.file("DESCRIPTION", package="R.utils")
cat("Displaying: ", file, ":\n", sep="")
displayCode(file)
file <- system.file("NEWS", package="R.utils")
cat("Displaying: ", file, ":\n", sep="")
displayCode(file, numerate=FALSE, lines=100:110, wrap=65)
file <... | /tests/displayCode.R | no_license | muschellij2/R.utils | R | false | false | 1,019 | r | library("R.utils")
opager <- options(pager=mpager)
file <- system.file("DESCRIPTION", package="R.utils")
cat("Displaying: ", file, ":\n", sep="")
displayCode(file)
file <- system.file("NEWS", package="R.utils")
cat("Displaying: ", file, ":\n", sep="")
displayCode(file, numerate=FALSE, lines=100:110, wrap=65)
file <... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.