content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
library(tidyverse)
library(acid)
library(microbenchmark)
library(forcats)
# Peter's Stats Stuff miscellaneous stuff package, install with:
devtools::install_github("ellisp/pssmisc-r-package/pkg")
library(pssmisc)
StatsGini <- function(x, w = rep(1, length(x))){
# x and w are vectors
# w can be left blank when ... | /_working/0106-statsnz-gini.R | no_license | ellisp/blog-source | R | false | false | 5,845 | r | library(tidyverse)
library(acid)
library(microbenchmark)
library(forcats)
# Peter's Stats Stuff miscellaneous stuff package, install with:
devtools::install_github("ellisp/pssmisc-r-package/pkg")
library(pssmisc)
StatsGini <- function(x, w = rep(1, length(x))){
# x and w are vectors
# w can be left blank when ... |
library(caret)
timestamp <- format(Sys.time(), "%Y_%m_%d_%H_%M")
model <- "sddaQDA"
#########################################################################
set.seed(2)
training <- twoClassSim(50, linearVars = 2)
testing <- twoClassSim(500, linearVars = 2)
trainX <- training[, -ncol(training)]
trainY <- training$Cl... | /RegressionTests/Code/sddaQDA.R | no_license | Ragyi/caret | R | false | false | 2,801 | r | library(caret)
timestamp <- format(Sys.time(), "%Y_%m_%d_%H_%M")
model <- "sddaQDA"
#########################################################################
set.seed(2)
training <- twoClassSim(50, linearVars = 2)
testing <- twoClassSim(500, linearVars = 2)
trainX <- training[, -ncol(training)]
trainY <- training$Cl... |
## The objective of the functions in this file is to store inverted matrix in a cache
## provided the matrix does not exists in the cache. If it exists, the function would
## return cached matrix otherwise it will create a new matrix, invert it and cache it.
## makeCacheMatrix will accept matrix object as an argumen... | /cachematrix.R | no_license | mgujra/ProgrammingAssignment2 | R | false | false | 1,595 | r | ## The objective of the functions in this file is to store inverted matrix in a cache
## provided the matrix does not exists in the cache. If it exists, the function would
## return cached matrix otherwise it will create a new matrix, invert it and cache it.
## makeCacheMatrix will accept matrix object as an argumen... |
# Trim
glmmGSParser.Trim = function(string)
{
# Trim trailing white characters
return(gsub("(^ +)|( +$)", "", string));
}
# Find
glmmGSParser.Find = function(string, pattern, start)
{
pos = -1;
match_len = 0;
positions = gregexpr(pattern, string)[[1]];
indices = which(positions >= start);
n = leng... | /glmmGS/R/glmmGSParser.R | no_license | ingted/R-Examples | R | false | false | 2,893 | r | # Trim
glmmGSParser.Trim = function(string)
{
# Trim trailing white characters
return(gsub("(^ +)|( +$)", "", string));
}
# Find
glmmGSParser.Find = function(string, pattern, start)
{
pos = -1;
match_len = 0;
positions = gregexpr(pattern, string)[[1]];
indices = which(positions >= start);
n = leng... |
library(ape)
testtree <- read.tree("5472_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="5472_0_unrooted.txt") | /codeml_files/newick_trees_processed/5472_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("5472_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="5472_0_unrooted.txt") |
##' @name prepare_pools
##' @title prepare_pools
##' @description Calculates pools from given initial condition values, deriving complements where necessary/possible if given TotLivBiomass
##' @export
##'
##' @param nc.path path to netcdf file containing standard dimensions and variables; currently supports these varia... | /modules/data.land/R/prepare_pools.R | permissive | dlebauer/pecan | R | false | false | 7,983 | r | ##' @name prepare_pools
##' @title prepare_pools
##' @description Calculates pools from given initial condition values, deriving complements where necessary/possible if given TotLivBiomass
##' @export
##'
##' @param nc.path path to netcdf file containing standard dimensions and variables; currently supports these varia... |
# ==========================================================================
# aggregator: a simple aggregator (R. Gentleman, 2001)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Data are aggregated in the environment env if they are not there then the
# get assigned with initfun, if they... | /R/DataClasses.R | no_license | turaganitesh/testbiocpackage1234 | R | false | false | 9,461 | r | # ==========================================================================
# aggregator: a simple aggregator (R. Gentleman, 2001)
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
# Data are aggregated in the environment env if they are not there then the
# get assigned with initfun, if they... |
#!/usr/bin/env R
args <- commandArgs(trailingOnly=T)
library(Seurat)
library(amap)
library(ComplexHeatmap)
library(circlize)
combined <- readRDS(args[1])
embeddings <- Embeddings(combined,reduction="pca")[,1:20]
calc_meanPC <- function(x) {
cells <- WhichCells(object = combined, idents = x)
if (length(cells) == ... | /scRNA-Seq/script/Final_Figure/SupFigs/FigS4G.R | no_license | TheSatoLab/Multi_omics_analysis_HIV1-infected_mice | R | false | false | 961 | r | #!/usr/bin/env R
args <- commandArgs(trailingOnly=T)
library(Seurat)
library(amap)
library(ComplexHeatmap)
library(circlize)
combined <- readRDS(args[1])
embeddings <- Embeddings(combined,reduction="pca")[,1:20]
calc_meanPC <- function(x) {
cells <- WhichCells(object = combined, idents = x)
if (length(cells) == ... |
stock <- read.csv("http://tiny.cc/isqs6350_stockReturn")
mydata<-stock*100
head(mydata)
#A) Perform confirmatory factor analysis based on two factors: manufacturing and service.
efa <- factanal(mydata, 2)
print(efa$loadings, cut = 0.5)
# We go with 2 factors: manufacturing and service.
#For CFA, we first need a mod... | /Multivariate7.Rd | no_license | KDR777/code | R | false | false | 1,752 | rd | stock <- read.csv("http://tiny.cc/isqs6350_stockReturn")
mydata<-stock*100
head(mydata)
#A) Perform confirmatory factor analysis based on two factors: manufacturing and service.
efa <- factanal(mydata, 2)
print(efa$loadings, cut = 0.5)
# We go with 2 factors: manufacturing and service.
#For CFA, we first need a mod... |
testlist <- list(x1 = 0, x2 = numeric(0), y1 = c(2.12199579047121e-314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), y2 = numeric(0))
result <- do.call(palm:::euc_distances,testlist)
str(result) | /palm/inst/testfiles/euc_distances/libFuzzer_euc_distances/euc_distances_valgrind_files/1612969104-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 309 | r | testlist <- list(x1 = 0, x2 = numeric(0), y1 = c(2.12199579047121e-314, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), y2 = numeric(0))
result <- do.call(palm:::euc_distances,testlist)
str(result) |
# combat melting for anova working with com2
require(plyr)
require(reshape2)
library(qdapRegex)
melted <- melt(com2, measure.vars = names(com2))
#no missing values version
com3 <- na.omit(com2)
melted <- melt(com3, measure.vars = names(com3))
#identify individual name and add it to the table
matches <- gregexpr("[... | /R/Comparative/combat anova.R | no_license | bengalengel/Comparative | R | false | false | 9,063 | r | # combat melting for anova working with com2
require(plyr)
require(reshape2)
library(qdapRegex)
melted <- melt(com2, measure.vars = names(com2))
#no missing values version
com3 <- na.omit(com2)
melted <- melt(com3, measure.vars = names(com3))
#identify individual name and add it to the table
matches <- gregexpr("[... |
source("clean_data.R")
png("plot2.png", width = 480, height = 480)
plot(consumption$DateTime, consumption$Global_active_power,
xlab = "", ylab = "Global Active Power (kilowatts)", type = "l")
dev.off() | /plot2.R | no_license | hyunshen/ExData_Plotting1 | R | false | false | 207 | r | source("clean_data.R")
png("plot2.png", width = 480, height = 480)
plot(consumption$DateTime, consumption$Global_active_power,
xlab = "", ylab = "Global Active Power (kilowatts)", type = "l")
dev.off() |
#' Estimate selection error based an index
#'
#' for a single trial, compute a selection index using
#' available traits BLUPs
#' Compute the correlation, reg r-squared and MSE
#' \eqn{SELIND GETGV ~ SELIND BLUPs_trial}
#'
#' @param TrialData data.frame trial data
#' @param CompleteBlocks T/F
#' @param IncompleteBloc... | /code/estimateSelectionError.R | no_license | wolfemd/IITA_2021GS | R | false | false | 4,697 | r |
#' Estimate selection error based an index
#'
#' for a single trial, compute a selection index using
#' available traits BLUPs
#' Compute the correlation, reg r-squared and MSE
#' \eqn{SELIND GETGV ~ SELIND BLUPs_trial}
#'
#' @param TrialData data.frame trial data
#' @param CompleteBlocks T/F
#' @param IncompleteBloc... |
#
# EMSE-2014.R, 18 May 18
# Data from:
# How the {Apache} Community Upgrades Dependencies: {An} Evolutionary Study?
# Gabriele Bavota and Gerardo Canfora and Massimiliano {Di Penta} and Rocco Oliveto and Sebastiano Panichella
# Kindly provided by Panichella
#
# Example from:
# Evidence-based Software Engineering: base... | /projects/EMSE-2014.R | no_license | Derek-Jones/ESEUR-code-data | R | false | false | 1,022 | r | #
# EMSE-2014.R, 18 May 18
# Data from:
# How the {Apache} Community Upgrades Dependencies: {An} Evolutionary Study?
# Gabriele Bavota and Gerardo Canfora and Massimiliano {Di Penta} and Rocco Oliveto and Sebastiano Panichella
# Kindly provided by Panichella
#
# Example from:
# Evidence-based Software Engineering: base... |
extract.spiketimes <- function(voltage, sampling.freq, graphics=0, limite=0, dvdt.th=5){
# Given a voltage trace 'voltage', detect the spiketimes with the upward
# zero crossing cirterion and set spiketimes to the maximum value
# following the zero-crossing in a 1 ms windows
# limite: threshold for spike ... | /Utils/Extract_spiketimes.R | no_license | bbujfalussy/hGLM | R | false | false | 4,572 | r |
extract.spiketimes <- function(voltage, sampling.freq, graphics=0, limite=0, dvdt.th=5){
# Given a voltage trace 'voltage', detect the spiketimes with the upward
# zero crossing cirterion and set spiketimes to the maximum value
# following the zero-crossing in a 1 ms windows
# limite: threshold for spike ... |
library(reshape2)
F <- flights
F
# cast
# acast for vector/matrix/array
# dcast for df output
airquality
names(airquality)
names(airquality) <- tolower(names(airquality))
aqm <- melt(airquality, id = c("month", "day"), na.rm = TRUE)
acast(aqm, day ~ month ~ variable) # x~y~z
acast(aqm, month ~ variable, me... | /Myscripts/Reshape2.R | no_license | kanishkd4/R_learning_code | R | false | false | 2,620 | r | library(reshape2)
F <- flights
F
# cast
# acast for vector/matrix/array
# dcast for df output
airquality
names(airquality)
names(airquality) <- tolower(names(airquality))
aqm <- melt(airquality, id = c("month", "day"), na.rm = TRUE)
acast(aqm, day ~ month ~ variable) # x~y~z
acast(aqm, month ~ variable, me... |
#############################################################################
#
# XLConnect
# Copyright (C) 2010-2018 Mirai Solutions GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, eithe... | /inst/unitTests/runit.workbook.getReferenceCoordinatesForTable.R | no_license | gnbrganchan/xlconnect | R | false | false | 1,538 | r | #############################################################################
#
# XLConnect
# Copyright (C) 2010-2018 Mirai Solutions GmbH
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, eithe... |
#Blackjack
blackjack <- function(input1, input2)
{
if((input1 > 21) & (input2 > 21)){
return(0)
} else if(input1 > 21){
return(input2)
} else if(input2 > 21){
return(input1)
} else if(input1 > input2){
return(input1)
} else if(input2 > input1){
return(input2)
} else {
return(0)
}
... | /intermediate.r | no_license | scott1541/QA_R | R | false | false | 1,458 | r | #Blackjack
blackjack <- function(input1, input2)
{
if((input1 > 21) & (input2 > 21)){
return(0)
} else if(input1 > 21){
return(input2)
} else if(input2 > 21){
return(input1)
} else if(input1 > input2){
return(input1)
} else if(input2 > input1){
return(input2)
} else {
return(0)
}
... |
# Exercise 4: complex Shiny UI layouts
# Load libraries so they are available
library("shiny")
# Use source() to execute the `app_ui.R` and `app_server.R` files. These will
# define the UI value and server function respectively.
source("app_ui.R")
source("app_server.R")
# You will need to fill in the `app_ui.R` file... | /chapter-19-exercises/exercise-4/app.R | permissive | bullom3/book-exercises | R | false | false | 485 | r | # Exercise 4: complex Shiny UI layouts
# Load libraries so they are available
library("shiny")
# Use source() to execute the `app_ui.R` and `app_server.R` files. These will
# define the UI value and server function respectively.
source("app_ui.R")
source("app_server.R")
# You will need to fill in the `app_ui.R` file... |
#' @param map_fp string pointing to the path of the map file.
#' @return data.frame containing the metadata
#' @author Gregory Ditzler
#' @title Load a map file in tab-delimited format
load_metadata <- function(map_fp) {
df <- read.delim(map_fp, sep="\t")
return(df)
} | /R/load_metadata.R | no_license | gditzler/MicrobiomeInformation | R | false | false | 272 | r | #' @param map_fp string pointing to the path of the map file.
#' @return data.frame containing the metadata
#' @author Gregory Ditzler
#' @title Load a map file in tab-delimited format
load_metadata <- function(map_fp) {
df <- read.delim(map_fp, sep="\t")
return(df)
} |
source("./dplyr/1-data.R")
hourly_delay <- filter(
summarise(
group_by(
filter(flights, !is.na(dep_delay)),
date, hour),
delay = mean(dep_delay),
n = n()),
n > 10
)
hourly_delay <- flights %>%
filter(!is.na(dep_delay)) %>%
group_by(date, hour) %>%
summarise(
delay = mean(dep... | /R Prep/RBasics/dplyr/3-pipelines.R | no_license | amkustagi/InterviewPrep | R | false | false | 1,262 | r | source("./dplyr/1-data.R")
hourly_delay <- filter(
summarise(
group_by(
filter(flights, !is.na(dep_delay)),
date, hour),
delay = mean(dep_delay),
n = n()),
n > 10
)
hourly_delay <- flights %>%
filter(!is.na(dep_delay)) %>%
group_by(date, hour) %>%
summarise(
delay = mean(dep... |
library(httr)
library(XML)
library(RCurl)
# Function to get kegg database, obtained from Ideom
IDEOM<-function(url="https://gist.github.com/dgrapov/5548790/raw/399f0958306c1018a6be846f58fd076ae83f1b78/IDEOM+small+list"){
options(warn=-1)
if(require(RCurl)==FALSE){
install.packages("RCurl");library(RCurl)
}
else... | /R/PathwayQueries.R | no_license | Jennifer2013/MetabToPath | R | false | false | 6,163 | r | library(httr)
library(XML)
library(RCurl)
# Function to get kegg database, obtained from Ideom
IDEOM<-function(url="https://gist.github.com/dgrapov/5548790/raw/399f0958306c1018a6be846f58fd076ae83f1b78/IDEOM+small+list"){
options(warn=-1)
if(require(RCurl)==FALSE){
install.packages("RCurl");library(RCurl)
}
else... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DropMapAndRollupTables.R
\name{DropMapAndRollupTables}
\alias{DropMapAndRollupTables}
\title{Drop Vocabulary Mapping And Visit Rollup Tables.}
\usage{
DropMapAndRollupTables (connectionDetails, cdmDatabaseSchema)
}
\arguments{
\item{connectio... | /man/DropMapAndRollupTables.Rd | permissive | thehyve/OHDSI-ETL-Synthea | R | false | true | 1,011 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DropMapAndRollupTables.R
\name{DropMapAndRollupTables}
\alias{DropMapAndRollupTables}
\title{Drop Vocabulary Mapping And Visit Rollup Tables.}
\usage{
DropMapAndRollupTables (connectionDetails, cdmDatabaseSchema)
}
\arguments{
\item{connectio... |
#' @importFrom magrittr %>%
#' @importFrom rlang !!
#' @keywords internal
#' @name ace_procs
module_boxed <- function(df) {
gen = proc_generic_module(df)
gen$score = (((gen$rt_mean.conjunction_12 - gen$rt_mean.conjunction_4) / gen$rt_mean.conjunction_4) * 100) + 100
rcs = proc_by_condition(df, c(COL_CORRECT_BUT... | /R/module-modules-ace.R | permissive | earoy/aceR | R | false | false | 11,003 | r |
#' @importFrom magrittr %>%
#' @importFrom rlang !!
#' @keywords internal
#' @name ace_procs
module_boxed <- function(df) {
gen = proc_generic_module(df)
gen$score = (((gen$rt_mean.conjunction_12 - gen$rt_mean.conjunction_4) / gen$rt_mean.conjunction_4) * 100) + 100
rcs = proc_by_condition(df, c(COL_CORRECT_BUT... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{ta27.09}
\alias{ta27.09}
\title{Data from Table 27.09}
\format{\Sexpr[results=rd]{bps5data:::doc_data("ta27.09") }}
\source{
\url{ http://bcs.whfreeman.com/bps5e/content/cat_030/PC-Text.zip }
}
\usage{
data... | /man/ta27.09.Rd | no_license | jrnold/bps5data | R | false | false | 1,114 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{ta27.09}
\alias{ta27.09}
\title{Data from Table 27.09}
\format{\Sexpr[results=rd]{bps5data:::doc_data("ta27.09") }}
\source{
\url{ http://bcs.whfreeman.com/bps5e/content/cat_030/PC-Text.zip }
}
\usage{
data... |
#from textfile in csv to sentimental features
library(syuzhet)
#temp=read_excel("news0216-0228.xlsx",col_names = FALSE)
#temp=read_excel("news050116-022817.xlsx",col_names = FALSE)
temp <- read_excel("~/Downloads/Tutorial2/doc/news data-2.xlsx", sheet = "HL", col_names = FALSE)
colnames(temp)=c("date","fullte... | /lib/sentimental.r | no_license | JasonLi-TMT/Earnings-Release-Premium | R | false | false | 2,396 | r | #from textfile in csv to sentimental features
library(syuzhet)
#temp=read_excel("news0216-0228.xlsx",col_names = FALSE)
#temp=read_excel("news050116-022817.xlsx",col_names = FALSE)
temp <- read_excel("~/Downloads/Tutorial2/doc/news data-2.xlsx", sheet = "HL", col_names = FALSE)
colnames(temp)=c("date","fullte... |
# Plot 3 PNG #
#STEP1 : Reading data
data0 <- read.table("household_power_consumption.txt",comment.char = "#",header = TRUE,sep = ";",na.strings = "?")
#STEP2 : Data Manipulation
# Converting Date & Time data into Date & POSIXct format
date0 <- data0$Date
str(date0)
date0 <- as.Date(as.character(date0), "%d/... | /Plot3.R | no_license | Crbon14/Assignment4_1 | R | false | false | 1,083 | r | # Plot 3 PNG #
#STEP1 : Reading data
data0 <- read.table("household_power_consumption.txt",comment.char = "#",header = TRUE,sep = ";",na.strings = "?")
#STEP2 : Data Manipulation
# Converting Date & Time data into Date & POSIXct format
date0 <- data0$Date
str(date0)
date0 <- as.Date(as.character(date0), "%d/... |
## Finding the inverse of a matrix can be computationally expensive, below are two functions which
## use a special type of 'matrix' which can store its own inverse once it has been found in order
## to avoid computing it again.
## This function makeCacheMatrix creates a special "matrix", which is really a list conta... | /cachematrix.R | no_license | Dylanb1299/ProgrammingAssignment2 | R | false | false | 1,426 | r | ## Finding the inverse of a matrix can be computationally expensive, below are two functions which
## use a special type of 'matrix' which can store its own inverse once it has been found in order
## to avoid computing it again.
## This function makeCacheMatrix creates a special "matrix", which is really a list conta... |
# libraries
library(sf)
library(tmap)
library(tidyverse)
library(rmapshaper)
# data
basin <- st_read('Drainage Basins/drainage-basins.shp') %>% st_transform(crs = 3112)
# remove island basins
basin.noisle <- ms_filter_islands(basin, min_area = 10000000000)
# dissolve basins and buffer
basin.diss... | /coastal-buffers-qld.R | no_license | cabuelow/coastal-buffers | R | false | false | 2,346 | r | # libraries
library(sf)
library(tmap)
library(tidyverse)
library(rmapshaper)
# data
basin <- st_read('Drainage Basins/drainage-basins.shp') %>% st_transform(crs = 3112)
# remove island basins
basin.noisle <- ms_filter_islands(basin, min_area = 10000000000)
# dissolve basins and buffer
basin.diss... |
library(tidyverse)
files <- list.files("data/original/latam", full.names = TRUE)
countries <- tools::file_path_sans_ext(basename(files))
vars <- c("awards/suppliers/name", "buyer/name", "contracts/description",
"contracts/period/startDate", "contracts/value/amount", "tender/procurementMethod",
"... | /scripts/2019-08-leche/latam_2_clean_data.R | no_license | datasketch/red-palta | R | false | false | 774 | r | library(tidyverse)
files <- list.files("data/original/latam", full.names = TRUE)
countries <- tools::file_path_sans_ext(basename(files))
vars <- c("awards/suppliers/name", "buyer/name", "contracts/description",
"contracts/period/startDate", "contracts/value/amount", "tender/procurementMethod",
"... |
# Author: Shrikant Pawar, Forecasting program with dimension reductionality.
setwd("C:/Users/Bio-user/Desktop/ITISE_2019")
MyData <- read.csv(file="Year_Data.csv", header=TRUE, sep=",")
MyData[is.na(MyData)] <- 0
Data1 <- as.numeric(unlist(MyData[,2:48]))
# Plot raw data
dotchart(Data1,cex=.7,
main="Dot p... | /Forecasting.R | no_license | spawar2/Forcasting-pipelines | R | false | false | 990 | r | # Author: Shrikant Pawar, Forecasting program with dimension reductionality.
setwd("C:/Users/Bio-user/Desktop/ITISE_2019")
MyData <- read.csv(file="Year_Data.csv", header=TRUE, sep=",")
MyData[is.na(MyData)] <- 0
Data1 <- as.numeric(unlist(MyData[,2:48]))
# Plot raw data
dotchart(Data1,cex=.7,
main="Dot p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s.GBM.R
\name{s.GBM}
\alias{s.GBM}
\title{Gradient Boosting Machine [C, R, S]}
\usage{
s.GBM(
x,
y = NULL,
x.test = NULL,
y.test = NULL,
weights = NULL,
ipw = TRUE,
ipw.type = 2,
upsample = FALSE,
downsample = FALSE,
resam... | /man/s.GBM.Rd | no_license | tlarzg/rtemis | R | false | true | 8,161 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/s.GBM.R
\name{s.GBM}
\alias{s.GBM}
\title{Gradient Boosting Machine [C, R, S]}
\usage{
s.GBM(
x,
y = NULL,
x.test = NULL,
y.test = NULL,
weights = NULL,
ipw = TRUE,
ipw.type = 2,
upsample = FALSE,
downsample = FALSE,
resam... |
library(ggplot2)
library(gridExtra)
library(grid)
library(ggthemes)
library(ggsci)
source("../../theme.R")
plotUSF2 = function(print.plot=F)
{
#UUU
a = read.table("Data/UUU/diagramC_g2.8_mu0.10_SF.txt",header=T)
data = data.frame(gamma=a$gamma,beta=a$beta,id="sU12")
#DUD
a = read.table("Data/DUD/diagramC_g2.8_mu... | /Chapter3/Redes/zcript_Fig5B.R | permissive | aaleta/thesis_plots | R | false | false | 3,384 | r | library(ggplot2)
library(gridExtra)
library(grid)
library(ggthemes)
library(ggsci)
source("../../theme.R")
plotUSF2 = function(print.plot=F)
{
#UUU
a = read.table("Data/UUU/diagramC_g2.8_mu0.10_SF.txt",header=T)
data = data.frame(gamma=a$gamma,beta=a$beta,id="sU12")
#DUD
a = read.table("Data/DUD/diagramC_g2.8_mu... |
87c527f2f183ceccf33c93a446b1cd0e stmt41_198_385.qdimacs 4221 14170 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Database/Basler/terminator/stmt41_198_385/stmt41_198_385.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 66 | r | 87c527f2f183ceccf33c93a446b1cd0e stmt41_198_385.qdimacs 4221 14170 |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ucr_arrest.R
\name{get_arrest_count}
\alias{get_arrest_count}
\title{Get arrest data from the UCR's Arrests by Age, Sex, and Race data set.}
\usage{
get_arrest_count(
ori = NULL,
state_abb = NULL,
region = NULL,
monthly = FALSE,
key... | /man/get_arrest_count.Rd | permissive | jacobkap/fbi | R | false | true | 1,266 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ucr_arrest.R
\name{get_arrest_count}
\alias{get_arrest_count}
\title{Get arrest data from the UCR's Arrests by Age, Sex, and Race data set.}
\usage{
get_arrest_count(
ori = NULL,
state_abb = NULL,
region = NULL,
monthly = FALSE,
key... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/04_regression_all.R
\name{fitter_nn}
\alias{fitter_nn}
\title{Wrapper to Neural Network training. Defined separetely to avoid passing too many objects in parLapplyLB}
\usage{
fitter_nn(x, params)
}
\arguments{
\item{x}{passed from fit_regress... | /man/fitter_nn.Rd | no_license | juyeongkim/infinityFlow | R | false | true | 617 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/04_regression_all.R
\name{fitter_nn}
\alias{fitter_nn}
\title{Wrapper to Neural Network training. Defined separetely to avoid passing too many objects in parLapplyLB}
\usage{
fitter_nn(x, params)
}
\arguments{
\item{x}{passed from fit_regress... |
#' @include AllChecks.R
#' @importClassesFrom HDF5Array HDF5Matrix
#' @importClassesFrom DelayedArray DelayedMatrix
setOldClass("dendrogram")
setClassUnion("matrixOrMissing",members=c("matrix", "missing"))
setClassUnion("dendrogramOrNULL",members=c("dendrogram", "NULL"))
setClassUnion("matrixOrNULL",members=c("matrix"... | /R/AllClasses.R | no_license | AswinSSoman/clusterExperiment | R | false | false | 27,213 | r | #' @include AllChecks.R
#' @importClassesFrom HDF5Array HDF5Matrix
#' @importClassesFrom DelayedArray DelayedMatrix
setOldClass("dendrogram")
setClassUnion("matrixOrMissing",members=c("matrix", "missing"))
setClassUnion("dendrogramOrNULL",members=c("dendrogram", "NULL"))
setClassUnion("matrixOrNULL",members=c("matrix"... |
## R Programming: Week 3
## Assignment: Caching the Inverse of a Matrix
## This function 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
setinv <- function(invr) i <<- in... | /cachematrix.R | no_license | dbekel/ProgrammingAssignment2 | R | false | false | 986 | r | ## R Programming: Week 3
## Assignment: Caching the Inverse of a Matrix
## This function 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
setinv <- function(invr) i <<- in... |
#' radiomics: A texture analysis toolbox for image classification
#'
#' radiomics provides a several new classes of matrices: GLCM (grey level co-occurrence matrix),
#' GLRLM (grey level run-length matrix), GLSZM (grey level size-zone matrix), and the MGLSZM
#' (multiple GLSZM).
#'
#'
#' To learn more about radiomics... | /R/radiomics.R | no_license | cran/radiomics | R | false | false | 468 | r | #' radiomics: A texture analysis toolbox for image classification
#'
#' radiomics provides a several new classes of matrices: GLCM (grey level co-occurrence matrix),
#' GLRLM (grey level run-length matrix), GLSZM (grey level size-zone matrix), and the MGLSZM
#' (multiple GLSZM).
#'
#'
#' To learn more about radiomics... |
#' Set feature data
#'
#' Set feature data into ExpressionSet object. Additionaly, it is possible to remove promiscuous probes that
#' map to different ids.
#'
#' @param eset ExpressionSet object. Usually the result of the normalization process
#' @param fdata A dataframe. Feature data containing at least two columns: ... | /R/set_fdata.R | no_license | iaradsouza1/MicroarrayMethods | R | false | false | 3,045 | r | #' Set feature data
#'
#' Set feature data into ExpressionSet object. Additionaly, it is possible to remove promiscuous probes that
#' map to different ids.
#'
#' @param eset ExpressionSet object. Usually the result of the normalization process
#' @param fdata A dataframe. Feature data containing at least two columns: ... |
### environmental stuff -----
## required packages
# devtools::install_github("MatMatt/MODIS", ref = "develop")
lib <- c("MODIS", "rgdal")
jnk <- sapply(lib, function(x) library(x, character.only = TRUE))
## modis options
MODISoptions(localArcPath = "/media/fdetsch/XChange/MODIS_ARC",
outDirPath = "/med... | /R/burnedarea.R | no_license | environmentalinformatics-marburg/bafire | R | false | false | 2,131 | r | ### environmental stuff -----
## required packages
# devtools::install_github("MatMatt/MODIS", ref = "develop")
lib <- c("MODIS", "rgdal")
jnk <- sapply(lib, function(x) library(x, character.only = TRUE))
## modis options
MODISoptions(localArcPath = "/media/fdetsch/XChange/MODIS_ARC",
outDirPath = "/med... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/partial_surface_data.R
\docType{data}
\name{partial_surface_data}
\alias{partial_Boston_surf}
\alias{partial_pbc_surf}
\alias{partial_pbc_time}
\alias{partial_surface_data}
\title{Cached \code{\link[randomForestSRC]{plot.variable}} objects fo... | /Methodology/Survival Model Research/ggRandomForests/ggRandomForests-master/man/partial_surface_data.Rd | no_license | ryerex/Research_and_Methods | R | false | true | 6,438 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/partial_surface_data.R
\docType{data}
\name{partial_surface_data}
\alias{partial_Boston_surf}
\alias{partial_pbc_surf}
\alias{partial_pbc_time}
\alias{partial_surface_data}
\title{Cached \code{\link[randomForestSRC]{plot.variable}} objects fo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/select_seasons.R
\name{select_seasons}
\alias{select_seasons}
\title{Select the number of mortality seasons}
\usage{
select_seasons(x, max.season = 4, lrt = FALSE, print = TRUE)
}
\arguments{
\item{x}{\code{\link{create_cycloSurv}} object}
... | /man/select_seasons.Rd | no_license | EliGurarie/cyclomort | R | false | true | 1,314 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/select_seasons.R
\name{select_seasons}
\alias{select_seasons}
\title{Select the number of mortality seasons}
\usage{
select_seasons(x, max.season = 4, lrt = FALSE, print = TRUE)
}
\arguments{
\item{x}{\code{\link{create_cycloSurv}} object}
... |
#' Are the main var columns of the expected class?
#'
#' \code{var_cl_main_ok} checks that the main columns of a variant file
#' are as expected.
#'
#' @param vars The data frame of vars.
#' @return A logical vector of length one.
#' @seealso \code{\link[plyr]{mapvalues}}
#' @examples
#' \dontrun{
#' var_cl_main_ok(var... | /R/check_columns.R | no_license | pdiakumis/varpr | R | false | false | 3,624 | r | #' Are the main var columns of the expected class?
#'
#' \code{var_cl_main_ok} checks that the main columns of a variant file
#' are as expected.
#'
#' @param vars The data frame of vars.
#' @return A logical vector of length one.
#' @seealso \code{\link[plyr]{mapvalues}}
#' @examples
#' \dontrun{
#' var_cl_main_ok(var... |
## ----, echo = FALSE, message = FALSE-------------------------------------
knitr::opts_chunk$set(collapse = T, comment = "#>")
options(dplyr.print_min = 4L, dplyr.print_max = 4L)
library(dplyr)
## ------------------------------------------------------------------------
# NSE version:
summarise(mtcars, mean(mpg))
# S... | /R/win-library/3.1/dplyr/doc/nse.R | no_license | apexdevelop/working_dir | R | false | false | 1,736 | r | ## ----, echo = FALSE, message = FALSE-------------------------------------
knitr::opts_chunk$set(collapse = T, comment = "#>")
options(dplyr.print_min = 4L, dplyr.print_max = 4L)
library(dplyr)
## ------------------------------------------------------------------------
# NSE version:
summarise(mtcars, mean(mpg))
# S... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/globalMakeWindows.R
\name{globalMakeWindows}
\alias{globalMakeWindows}
\title{globalMakeWindows}
\usage{
globalMakeWindows(seqs, motifList, seqfile, PWMset, PWMsubsetname,
max_width, nmotifs = 6, PWMsubset = NULL)
}
\arguments{
\item{seqs}{... | /w18/man/globalMakeWindows.Rd | no_license | CarlosMoraMartinez/worm19 | R | false | true | 1,484 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/globalMakeWindows.R
\name{globalMakeWindows}
\alias{globalMakeWindows}
\title{globalMakeWindows}
\usage{
globalMakeWindows(seqs, motifList, seqfile, PWMset, PWMsubsetname,
max_width, nmotifs = 6, PWMsubset = NULL)
}
\arguments{
\item{seqs}{... |
library(ape)
testtree <- read.tree("1551_3.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="1551_3_unrooted.txt") | /codeml_files/newick_trees_processed/1551_3/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("1551_3.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="1551_3_unrooted.txt") |
library(intRegGOF)
### Name: plot
### Title: Integrated Regression Goodness of Fit graphical output
### Aliases: plotAsIntRegGOF pointsAsIntRegGOF linesAsIntRegGOF
### Keywords: models regression nonlinear goodnes of fit
### ** Examples
n <- 50
d <- data.frame( X1=runif(n),X2=runif(n))
d$Y <- 1 + 2*d$X1 + rno... | /data/genthat_extracted_code/intRegGOF/examples/plotAsIntRegGOF.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 552 | r | library(intRegGOF)
### Name: plot
### Title: Integrated Regression Goodness of Fit graphical output
### Aliases: plotAsIntRegGOF pointsAsIntRegGOF linesAsIntRegGOF
### Keywords: models regression nonlinear goodnes of fit
### ** Examples
n <- 50
d <- data.frame( X1=runif(n),X2=runif(n))
d$Y <- 1 + 2*d$X1 + rno... |
library(ggplot2)
library(cowplot)
## define variables
infile_pop0="../data/HomSap_OutOfAfricaArchaicAdmixture_5R19_pop0_sizes.txt"
infile_pop1="../data/HomSap_OutOfAfricaArchaicAdmixture_5R19_pop1_sizes.txt"
infile_pop2="../data/HomSap_OutOfAfricaArchaicAdmixture_5R19_pop2_sizes.txt"
outfile="../display_items/HomSap_O... | /src/plot_HomSap_OutOfAfricaArchaicAdmixture_5R19_census_vs_IRC.R | no_license | asiepel/manuscript | R | false | false | 3,222 | r | library(ggplot2)
library(cowplot)
## define variables
infile_pop0="../data/HomSap_OutOfAfricaArchaicAdmixture_5R19_pop0_sizes.txt"
infile_pop1="../data/HomSap_OutOfAfricaArchaicAdmixture_5R19_pop1_sizes.txt"
infile_pop2="../data/HomSap_OutOfAfricaArchaicAdmixture_5R19_pop2_sizes.txt"
outfile="../display_items/HomSap_O... |
DATA <- read.csv("charakteristiky.csv", header=TRUE)
print("maximalni vykony pro max E:")
print(max(DATA$U_1 * DATA$I_1))
print(max(DATA$U_2 * DATA$I_2))
print(max(DATA$U_3 * DATA$I_3, na.rm=TRUE))
P <- data.frame(P1=DATA$U_1 * DATA$I_1,
P2=DATA$U_2 * DATA$I_2,
P3=DATA$U_3 * DATA$I_3... | /lab3/charakteristika.R | no_license | burtgulash/fav2011-fya2 | R | false | false | 1,687 | r | DATA <- read.csv("charakteristiky.csv", header=TRUE)
print("maximalni vykony pro max E:")
print(max(DATA$U_1 * DATA$I_1))
print(max(DATA$U_2 * DATA$I_2))
print(max(DATA$U_3 * DATA$I_3, na.rm=TRUE))
P <- data.frame(P1=DATA$U_1 * DATA$I_1,
P2=DATA$U_2 * DATA$I_2,
P3=DATA$U_3 * DATA$I_3... |
% Generated by roxygen2 (4.0.0): do not edit by hand
\name{tmMCMC}
\alias{tmMCMC}
\title{Transmission Modeling MCMC}
\usage{
tmMCMC(N, patients, tests, transmission = 0.001, importation = 0.1,
fp = 0, fn = 0.2, prop.sigma = 0.1, max = FALSE,
with.object = FALSE)
}
\arguments{
\item{N}{The number of iterations to ru... | /man/tmMCMC.Rd | no_license | cran/transmission | R | false | false | 1,136 | rd | % Generated by roxygen2 (4.0.0): do not edit by hand
\name{tmMCMC}
\alias{tmMCMC}
\title{Transmission Modeling MCMC}
\usage{
tmMCMC(N, patients, tests, transmission = 0.001, importation = 0.1,
fp = 0, fn = 0.2, prop.sigma = 0.1, max = FALSE,
with.object = FALSE)
}
\arguments{
\item{N}{The number of iterations to ru... |
library(shiny)
library(plotly)
source("Scripts/filter.R")
my.ui <- navbarPage(
# Application title
"Gender Inequality Statistics",
#Writing the report
tabPanel("Report",
#Adding information about morocco.
strong(h2("Morocco"),
p("Primary enrollment has improved.Female ... | /GenderInequality/Scripts/ui.R | permissive | nalin97/GenderInequalityStatistics | R | false | false | 9,909 | r | library(shiny)
library(plotly)
source("Scripts/filter.R")
my.ui <- navbarPage(
# Application title
"Gender Inequality Statistics",
#Writing the report
tabPanel("Report",
#Adding information about morocco.
strong(h2("Morocco"),
p("Primary enrollment has improved.Female ... |
# final project
#preparing the data set
setwd("/media/parth/CE02917E02916BE9/R")
input=read.csv(("world_bank.csv"))
nrow(input)
#11723 rows
ncol(input)
# 5cols
# there are 217 different countries in the list
# first row contains the name of the attribute
# and there is data for 15 years
# I need to extract the data pre... | /last_work.r | no_license | Simrankashyap/Project-on-World-Bank-Analysis | R | false | false | 7,396 | r | # final project
#preparing the data set
setwd("/media/parth/CE02917E02916BE9/R")
input=read.csv(("world_bank.csv"))
nrow(input)
#11723 rows
ncol(input)
# 5cols
# there are 217 different countries in the list
# first row contains the name of the attribute
# and there is data for 15 years
# I need to extract the data pre... |
library("ggplot2")
library("dplyr")
#setwd("/Users/addytan/Desktop/data/")
#data manipulation
election<-read.csv("election.csv",header = FALSE)
election<-election[-57:-60,]
election<-election[-1:-5,]
election<-election[,-8:-9]
colnames(election)<-c("STATE","ELECTORAL_VOTE","POPULAR_VOTE","OBAMA","ROMNEY","OTHERS","TOTA... | /Election_2012/Election.R | no_license | Adelingtan/Data_Viz | R | false | false | 2,018 | r | library("ggplot2")
library("dplyr")
#setwd("/Users/addytan/Desktop/data/")
#data manipulation
election<-read.csv("election.csv",header = FALSE)
election<-election[-57:-60,]
election<-election[-1:-5,]
election<-election[,-8:-9]
colnames(election)<-c("STATE","ELECTORAL_VOTE","POPULAR_VOTE","OBAMA","ROMNEY","OTHERS","TOTA... |
\name{candidate_genes}
\alias{candidate_genes}
\title{
Chosing candidate genes.
}
\description{
Chosing genes in top ranked modules as candidate genes for outcomes. Further prioritized candidate genes can be chosen based on percentages selected by top ranked modules selected if prioritizing = T.
}
\usage{
candidate_ge... | /The Main Papers/Ya Wang/Previous Study/NEpiC/man/candidate_genes.Rd | no_license | FangWang27/Archive_JamesStewartProject | R | false | false | 1,009 | rd | \name{candidate_genes}
\alias{candidate_genes}
\title{
Chosing candidate genes.
}
\description{
Chosing genes in top ranked modules as candidate genes for outcomes. Further prioritized candidate genes can be chosen based on percentages selected by top ranked modules selected if prioritizing = T.
}
\usage{
candidate_ge... |
\name{epil.bugs}
\alias{epil.bugs}
\title{Results of a Clinical trial of Progadine}
\description{The dataset describes the results of the pre-crossover
phase of a crossover trial of the effects of
progadine, an anti-epileptic drug.
Patients were assigned blindly and
at random to receive either the drug or a pla... | /man/epil.bugs.Rd | no_license | cran/GLMMGibbs | R | false | false | 1,657 | rd | \name{epil.bugs}
\alias{epil.bugs}
\title{Results of a Clinical trial of Progadine}
\description{The dataset describes the results of the pre-crossover
phase of a crossover trial of the effects of
progadine, an anti-epileptic drug.
Patients were assigned blindly and
at random to receive either the drug or a pla... |
#' Detect allele-specific methylation from a bam file
#'
#' The function takes a bam (from bismark) and vcf file for each sample. For
#' each SNP contained in the vcfile it calculates the proportion of methylated
#' reads for each CpG site at each allele. At the end it returns (saves to
#' working directory) a GRanges... | /R/split_bams.R | permissive | JianpingQuan/DAMEfinder | R | false | false | 11,001 | r |
#' Detect allele-specific methylation from a bam file
#'
#' The function takes a bam (from bismark) and vcf file for each sample. For
#' each SNP contained in the vcfile it calculates the proportion of methylated
#' reads for each CpG site at each allele. At the end it returns (saves to
#' working directory) a GRanges... |
NEI <- readRDS("summarySCC_PM25.rds"); SSC <- readRDS("Source_Classification_Code.rds")
library(dplyr)
#Separating and Adding the total Emission of the Baltimore per year
totalYrBal <- summarise(group_by(filter(NEI, fips == "24510"), year), Emissions = sum(Emissions))
#plotting on the GrDevice PNG
png(filename... | /plot2.R | no_license | alkgautam/Exploratory-Data-Analysis-Course-Project-2 | R | false | false | 819 | r | NEI <- readRDS("summarySCC_PM25.rds"); SSC <- readRDS("Source_Classification_Code.rds")
library(dplyr)
#Separating and Adding the total Emission of the Baltimore per year
totalYrBal <- summarise(group_by(filter(NEI, fips == "24510"), year), Emissions = sum(Emissions))
#plotting on the GrDevice PNG
png(filename... |
## Tokenize to produce N-grams ##
library(RWeka)
library(tm)
require(SnowballC)
## Establish connections to files containing en_US corpora trainint sets ##
con <- list(".\\Coursera-SwiftKey\\final\\en_US\\en_US.twitter-training.txt",
".\\Coursera-SwiftKey\\final\\en_US\\en_US.blogs-training.txt",
... | /Ngram.R | no_license | JohnBeal/Capstone | R | false | false | 2,427 | r | ## Tokenize to produce N-grams ##
library(RWeka)
library(tm)
require(SnowballC)
## Establish connections to files containing en_US corpora trainint sets ##
con <- list(".\\Coursera-SwiftKey\\final\\en_US\\en_US.twitter-training.txt",
".\\Coursera-SwiftKey\\final\\en_US\\en_US.blogs-training.txt",
... |
## Save the code file to working directory
## Load the required packages
library(shiny)
library(ggplot2)
library(plotly) # for plotly graphs
library(webshot) # for export function to work. If not installed, will throw an error saying webshot package needed
# webshot package can be installed as follows
# install.packag... | /save_plotly_plot/server.R | no_license | kumar-sameer/R-Shinyapp-Tutorial | R | false | false | 3,573 | r | ## Save the code file to working directory
## Load the required packages
library(shiny)
library(ggplot2)
library(plotly) # for plotly graphs
library(webshot) # for export function to work. If not installed, will throw an error saying webshot package needed
# webshot package can be installed as follows
# install.packag... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vivid_crit.R
\name{vivid_crit}
\alias{vivid_crit}
\title{Change the information criteria used in VIVID}
\usage{
vivid_crit(vividObj, x, y, metric, lambda = "lambda.1se")
}
\arguments{
\item{vividObj}{An object passed from the vivid() funciton... | /man/vivid_crit.Rd | no_license | binfnstats/Vivid_code | R | false | true | 648 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vivid_crit.R
\name{vivid_crit}
\alias{vivid_crit}
\title{Change the information criteria used in VIVID}
\usage{
vivid_crit(vividObj, x, y, metric, lambda = "lambda.1se")
}
\arguments{
\item{vividObj}{An object passed from the vivid() funciton... |
#문제 2
m1<-matrix(data=seq(10,38,2),nrow = 3,ncol = 5);m1
m2<-m1+100;m2
m_max_v<-max(m1);m_max_v
m_min_v<-min(m1);m_min_v
row_max<-cbind(max(m1[1,]),max(m1[2,]),max(m1[3,]))
col_max<-cbind(max(m1[,1]),max(m1[,2]),max(m1[,3]))
#문제 6
n1<-c(1,2,3)
n2<-c(4,5,6)
n3<-c(7,8,9)
m1<-cbind(n1,n2,n3)
#문제 7
num<-c(1:10)
m2<-... | /practice/190809/lab_02.R | no_license | dj9308/R | R | false | false | 630 | r | #문제 2
m1<-matrix(data=seq(10,38,2),nrow = 3,ncol = 5);m1
m2<-m1+100;m2
m_max_v<-max(m1);m_max_v
m_min_v<-min(m1);m_min_v
row_max<-cbind(max(m1[1,]),max(m1[2,]),max(m1[3,]))
col_max<-cbind(max(m1[,1]),max(m1[,2]),max(m1[,3]))
#문제 6
n1<-c(1,2,3)
n2<-c(4,5,6)
n3<-c(7,8,9)
m1<-cbind(n1,n2,n3)
#문제 7
num<-c(1:10)
m2<-... |
# data mining - zadanie domowe nr 4 - MARTA SOMMER BSMAD
library("KernSmooth")
# stworzenie modelu:
n <- 500
x <- runif(n,min=0,max=4)
eps <- rnorm(n,0,0.1)
f1 <- function(x){
4.26*(exp(-x)-4*exp(-2*x)+3*exp(-3*x))
}
f2 <- function(x){sin(3*x)}
f3 <- function(x){
(x>0 & x<=1)*x + (x>1 & x<=2)*(-x+2) + (x>... | /magisterskie/4_rok/Data Mining/pd4/pd4.R | no_license | sommermarta/studia | R | false | false | 7,744 | r | # data mining - zadanie domowe nr 4 - MARTA SOMMER BSMAD
library("KernSmooth")
# stworzenie modelu:
n <- 500
x <- runif(n,min=0,max=4)
eps <- rnorm(n,0,0.1)
f1 <- function(x){
4.26*(exp(-x)-4*exp(-2*x)+3*exp(-3*x))
}
f2 <- function(x){sin(3*x)}
f3 <- function(x){
(x>0 & x<=1)*x + (x>1 & x<=2)*(-x+2) + (x>... |
library(timeSeries)
source("common.R")
monthly <- toTimeSeries(loadMonthly())
sp.returns <- na.omit(fapply(monthly[,"S.PCOMP.RI."], FUN=returns))
ind <- factor(rep(1:4, each=length(sp.returns)/4), labels="Column")
# ds <- data.frame(series(sp.returns), ind)
group.vars <- aggregate(series(sp.returns), by=list(ind), FU... | /q44.R | no_license | agamat/portanalysis-approblems | R | false | false | 841 | r | library(timeSeries)
source("common.R")
monthly <- toTimeSeries(loadMonthly())
sp.returns <- na.omit(fapply(monthly[,"S.PCOMP.RI."], FUN=returns))
ind <- factor(rep(1:4, each=length(sp.returns)/4), labels="Column")
# ds <- data.frame(series(sp.returns), ind)
group.vars <- aggregate(series(sp.returns), by=list(ind), FU... |
#' Update Schedule Section References
#'
#' Note that the parametric file is set up to run multiple schedules.
#' For now, we are not going to go there. In "02_Schedules.idf" there are
#' calls to the parametric file using the code "$8760File". Rather than a
#' parametric run, this script replaces the file with the app... | /R/update_schedule_section_references.R | no_license | 07engineer/residential_loadshapes | R | false | false | 1,659 | r | #' Update Schedule Section References
#'
#' Note that the parametric file is set up to run multiple schedules.
#' For now, we are not going to go there. In "02_Schedules.idf" there are
#' calls to the parametric file using the code "$8760File". Rather than a
#' parametric run, this script replaces the file with the app... |
rw2d1 =
function(n = 100) {
xpos = ypos = numeric(n)
for(i in 2:n) {
# Decide whether we are moving horizontally or vertically.
delta = if(runif(1) > .5) 1 else -1
if (runif(1) > .5) {
xpos[i] = xpos[i-1] + delta
ypos[i] = ypos[i-1]
}
else {
xpos[i] = x... | /B_analysts_sources_github/duncantl/RllvmTimings/rw2d.R | no_license | Irbis3/crantasticScrapper | R | false | false | 4,503 | r |
rw2d1 =
function(n = 100) {
xpos = ypos = numeric(n)
for(i in 2:n) {
# Decide whether we are moving horizontally or vertically.
delta = if(runif(1) > .5) 1 else -1
if (runif(1) > .5) {
xpos[i] = xpos[i-1] + delta
ypos[i] = ypos[i-1]
}
else {
xpos[i] = x... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/launch-celltracer.R
\name{launchCellTracer}
\alias{launchCellTracer}
\title{Access interactive application}
\usage{
launchCellTracer(object = NULL)
}
\arguments{
\item{object}{A valid cell tracer object.}
}
\description{
Opens an interactive ... | /man/launchCellTracer.Rd | no_license | kueckelj/celltracer | R | false | true | 400 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/launch-celltracer.R
\name{launchCellTracer}
\alias{launchCellTracer}
\title{Access interactive application}
\usage{
launchCellTracer(object = NULL)
}
\arguments{
\item{object}{A valid cell tracer object.}
}
\description{
Opens an interactive ... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/kpis.R
\name{kpiMissionsInTimeDelta}
\alias{kpiMissionsInTimeDelta}
\title{kpiMissionsInTimeDelta: Calculates the delta of the percentage of the missions
in time between two sets of simMissions. Rounded to 1 decimalplace.}
\usage{
kpi... | /man/kpiMissionsInTimeDelta.Rd | no_license | symbolrush/plot11R | R | false | false | 675 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/kpis.R
\name{kpiMissionsInTimeDelta}
\alias{kpiMissionsInTimeDelta}
\title{kpiMissionsInTimeDelta: Calculates the delta of the percentage of the missions
in time between two sets of simMissions. Rounded to 1 decimalplace.}
\usage{
kpi... |
# Produce plots of the likelihood function, with the MLE and its error
# bounds marked where possible.
# This is commented out because we will often already have this loaded.
# load("brooks_data_ode.RData")
source("ode_based_helpers.r")
integration.data <- load.integration.data()
# These are default values:
bin.size... | /ode_based_likelihood_plots.r | no_license | cfe-lab/ReservoirModelling | R | false | false | 2,073 | r | # Produce plots of the likelihood function, with the MLE and its error
# bounds marked where possible.
# This is commented out because we will often already have this loaded.
# load("brooks_data_ode.RData")
source("ode_based_helpers.r")
integration.data <- load.integration.data()
# These are default values:
bin.size... |
library(tibble)
library(ggvis)
# Learn about tibbles
vignette("tibble")
# Corollation between sepal length and petal length? Seems like yes!
as_tibble(iris) %>%
ggvis(~Sepal.Length, ~Petal.Length) %>%
layer_points()
# Creating a tibble
tibble(
x = 1:5,
y = 1,
z = x^2+y
)
# Bad column names
tibble(
`:)` ... | /r4ds/r4ds-10.R | no_license | dkmiller/data-science | R | false | false | 1,215 | r | library(tibble)
library(ggvis)
# Learn about tibbles
vignette("tibble")
# Corollation between sepal length and petal length? Seems like yes!
as_tibble(iris) %>%
ggvis(~Sepal.Length, ~Petal.Length) %>%
layer_points()
# Creating a tibble
tibble(
x = 1:5,
y = 1,
z = x^2+y
)
# Bad column names
tibble(
`:)` ... |
#' Generates an sf vector object of the US. Copied from jsta::usa_sf
#'
usa_sf <- function(crs){
res <- sf::st_as_sf(maps::map("state", plot = FALSE, fill = TRUE))
state_key <- data.frame(state = datasets::state.abb,
ID = tolower(datasets::state.name),
stringsAsF... | /scripts/99_utils.R | no_license | abah01/realsat | R | false | false | 2,315 | r |
#' Generates an sf vector object of the US. Copied from jsta::usa_sf
#'
usa_sf <- function(crs){
res <- sf::st_as_sf(maps::map("state", plot = FALSE, fill = TRUE))
state_key <- data.frame(state = datasets::state.abb,
ID = tolower(datasets::state.name),
stringsAsF... |
#A function to load a raster into memory and assign the dates as the object names
load_brick = function(ras, dates){
#load the dates-- and assume length 1 character vector is a file path
if(class(dates) == 'character' & length(dates)==1){
ddd = read.delim(dates, stringsAsFactors = F,header = F)[,1]
}else{
... | /bfast_functions.R | no_license | dahcase/earth_engine | R | false | false | 2,079 | r | #A function to load a raster into memory and assign the dates as the object names
load_brick = function(ras, dates){
#load the dates-- and assume length 1 character vector is a file path
if(class(dates) == 'character' & length(dates)==1){
ddd = read.delim(dates, stringsAsFactors = F,header = F)[,1]
}else{
... |
#' @title Plot ExWAS results
#'
#' @description Two different plots for the results of \code{\link{ds.exwas}}.
#'
#' @param exwas \code{list} Output of \code{\link{ds.exwas}}
#' @param type \code{character} Type of plot \code{"manhattan"} for a manhattan plot (p-values),
#' \code{"effect"} for a plot of the exposures ... | /R/ds.plotExwas.R | permissive | isglobal-brge/dsExposomeClient | R | false | false | 4,409 | r | #' @title Plot ExWAS results
#'
#' @description Two different plots for the results of \code{\link{ds.exwas}}.
#'
#' @param exwas \code{list} Output of \code{\link{ds.exwas}}
#' @param type \code{character} Type of plot \code{"manhattan"} for a manhattan plot (p-values),
#' \code{"effect"} for a plot of the exposures ... |
# PMML (Predictive Model Markup Language) Transformations
#
# Copyright (c) 2017 Zementis, Inc.
#
# This file is part of the pmmlTransformations package
#
# The pmmlTransformations package is free: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Fre... | /R/RenameVar.R | no_license | cran/pmmlTransformations | R | false | false | 3,160 | r | # PMML (Predictive Model Markup Language) Transformations
#
# Copyright (c) 2017 Zementis, Inc.
#
# This file is part of the pmmlTransformations package
#
# The pmmlTransformations package is free: you can redistribute it and/or
# modify it under the terms of the GNU General Public License as published
# by the Fre... |
test_that("multiseq gives sensible answer for effect in simple settings",{
set.seed(100)
lambda = c(1,10,100)
effect = c(2,4,8)
for(i in 1:length(lambda)){
xx = rbind(rpois(1024,rep(lambda[i],1024)),rpois(1024,rep(lambda[i],1024)),rpois(1024,rep(lambda[i],1024)))
yy = rbind(rpois(1024,rep(effect[i]*lam... | /package/multiseq/tests/testthat/test_effect_simple.R | no_license | stephenslab/multiseq | R | false | false | 560 | r | test_that("multiseq gives sensible answer for effect in simple settings",{
set.seed(100)
lambda = c(1,10,100)
effect = c(2,4,8)
for(i in 1:length(lambda)){
xx = rbind(rpois(1024,rep(lambda[i],1024)),rpois(1024,rep(lambda[i],1024)),rpois(1024,rep(lambda[i],1024)))
yy = rbind(rpois(1024,rep(effect[i]*lam... |
# newick_parser.R
# Phylogenetic tree reader of newick format file.
# Assumptions: (1) there are no quotation marks (labels),
# (2) all edges have length
# (3) file is a single line (no "\n")
# Author: Juan J. Garcia Mesa
suppressMessages(library(stringr)) # string operations
read_newick... | /newick_parse.R | no_license | jgarciamesa/newick-parser | R | false | false | 3,741 | r | # newick_parser.R
# Phylogenetic tree reader of newick format file.
# Assumptions: (1) there are no quotation marks (labels),
# (2) all edges have length
# (3) file is a single line (no "\n")
# Author: Juan J. Garcia Mesa
suppressMessages(library(stringr)) # string operations
read_newick... |
#' Count patients and eyes
#' @name eyes
#' @description Counts number of subjects and right and left eyes. Columns are
#' guessed.
#' @param x required. (data frame)
#' @param id_col Subject identifying column, passed as (quoted) character
#' Can also be abbreviated to "id" as per partial matching
#' @param eye_... | /R/eyes.R | no_license | cran/eye | R | false | false | 7,985 | r | #' Count patients and eyes
#' @name eyes
#' @description Counts number of subjects and right and left eyes. Columns are
#' guessed.
#' @param x required. (data frame)
#' @param id_col Subject identifying column, passed as (quoted) character
#' Can also be abbreviated to "id" as per partial matching
#' @param eye_... |
testlist <- list(ExpressionSet = structure(c(5.48612249810713e+303, 1.23181983389617e+58, 1.52478221747831e+245, 6.36967296041789e+178, 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)), Phylostratum = numeric(0))
result <- do.call(myTAI:::cpp_TAI,testlis... | /myTAI/inst/testfiles/cpp_TAI/AFL_cpp_TAI/cpp_TAI_valgrind_files/1615763035-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 334 | r | testlist <- list(ExpressionSet = structure(c(5.48612249810713e+303, 1.23181983389617e+58, 1.52478221747831e+245, 6.36967296041789e+178, 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)), Phylostratum = numeric(0))
result <- do.call(myTAI:::cpp_TAI,testlis... |
###Hierarchical model using Stan for estimating ratios of pilots flying to destination j from elodea infested lakes
## Note: If you want to replicate, change all path references in code below.
## Plots generated by this code use the Figure# shown in Chapter2 of dissertation
## Code by Tobias Schwoerer, 09/30/2016
## U... | /STAN/pilot_regional_model 092016/stan_code092016.R | no_license | toschw/floatplane | R | false | false | 8,407 | r | ###Hierarchical model using Stan for estimating ratios of pilots flying to destination j from elodea infested lakes
## Note: If you want to replicate, change all path references in code below.
## Plots generated by this code use the Figure# shown in Chapter2 of dissertation
## Code by Tobias Schwoerer, 09/30/2016
## U... |
setwd("/Users/Warren.Sink/github/facial-polyphenism/CSVs")
#Needs phenotype data from
library(tidyverse)
library(readr)
load("/Users/Warren.Sink/Desktop/OneDrive-Van-Andel-Institute/msu_dist-ratio_matrices.Rdata")
msu_cf = read_csv(file = "msu_cf_nonredundant.csv")
msu_cf_negctrl = read_csv(file = "msu_cf_redundan... | /R-scripts/msu_density.R | no_license | WarrenSink/facial-polyphenism | R | false | false | 8,822 | r | setwd("/Users/Warren.Sink/github/facial-polyphenism/CSVs")
#Needs phenotype data from
library(tidyverse)
library(readr)
load("/Users/Warren.Sink/Desktop/OneDrive-Van-Andel-Institute/msu_dist-ratio_matrices.Rdata")
msu_cf = read_csv(file = "msu_cf_nonredundant.csv")
msu_cf_negctrl = read_csv(file = "msu_cf_redundan... |
#'
#' @title a test of an object being of type 'character'
#' @description this function is similar to R function \code{is.character}
#' @param datasources a list of opal object(s) obtained after login in to opal servers;
#' these objects hold also the data assign to R, as \code{dataframe}, from opal datasources.
#' @... | /R/ji.ds.is.character.R | no_license | datashield/ji.dev.cl | R | false | false | 1,556 | r | #'
#' @title a test of an object being of type 'character'
#' @description this function is similar to R function \code{is.character}
#' @param datasources a list of opal object(s) obtained after login in to opal servers;
#' these objects hold also the data assign to R, as \code{dataframe}, from opal datasources.
#' @... |
#' The main constructor call for all `module entities`
#'
#' @description
#' Parses language objects from `module entities`.
#'
#' @param x a list storing module entities.
#'
#' @noRd
entity_constructor <- function(x) {
stopifnot(is_supreme_module_entities(x))
res <- list()
for (i in seq_along(x)) {
entit... | /R/constructor.R | permissive | strboul/supreme | R | false | false | 2,244 | r |
#' The main constructor call for all `module entities`
#'
#' @description
#' Parses language objects from `module entities`.
#'
#' @param x a list storing module entities.
#'
#' @noRd
entity_constructor <- function(x) {
stopifnot(is_supreme_module_entities(x))
res <- list()
for (i in seq_along(x)) {
entit... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ddpcrPlate.R
\name{elementType,SimpleList-method}
\alias{elementType,SimpleList-method}
\title{Check the types of the elements in a \code{SimpleList}.}
\usage{
\S4method{elementType}{SimpleList}(x)
}
\arguments{
\item{x}{An object.}
}
\value{... | /man/elementType-SimpleList-method.Rd | no_license | CRUKMI-ComputationalBiology/twoddpcr | R | false | true | 449 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ddpcrPlate.R
\name{elementType,SimpleList-method}
\alias{elementType,SimpleList-method}
\title{Check the types of the elements in a \code{SimpleList}.}
\usage{
\S4method{elementType}{SimpleList}(x)
}
\arguments{
\item{x}{An object.}
}
\value{... |
`repLGS`<- function(offspring= NULL, scenario= NULL, off.by.scen= TRUE, nsim= 1,
map=NULL, fix.before.sel=FALSE, ...){
if(off.by.scen==TRUE){ ## Generate all the combinations of offspring by scenario if required
noff<- rep(rep(offspring, length(scenario)), each=nsim)
nscen<- rep(rep(scenario, each=length(o... | /R/repLGS.R | no_license | cran/LGS | R | false | false | 1,863 | r | `repLGS`<- function(offspring= NULL, scenario= NULL, off.by.scen= TRUE, nsim= 1,
map=NULL, fix.before.sel=FALSE, ...){
if(off.by.scen==TRUE){ ## Generate all the combinations of offspring by scenario if required
noff<- rep(rep(offspring, length(scenario)), each=nsim)
nscen<- rep(rep(scenario, each=length(o... |
#UI
library(shiny)
shinyUI(
fluidPage(
titlePanel("Proof of Central Limit Theorem"),
sidebarLayout(
sidebarPanel(
sliderInput("n", h5("sample size:"), min = 10, max = 1000, value = 20,
... | /UI.R | no_license | berrykim/courseproject | R | false | false | 1,892 | r | #UI
library(shiny)
shinyUI(
fluidPage(
titlePanel("Proof of Central Limit Theorem"),
sidebarLayout(
sidebarPanel(
sliderInput("n", h5("sample size:"), min = 10, max = 1000, value = 20,
... |
validate_model =
function(X_i, y_i, yhat_i, ep_i){
plot_data =
X_i %>%
mutate(residual = ep_i,
fitted = yhat_i,
scale_fitted = order(fitted)/n(),
observed = y_i,
scale_observed = order(y_i)/n())
obs_pred =
ggplot(dat... | /00-R/model_validation.R | no_license | danfosterfire/moonlight_ijwf2020 | R | false | false | 2,460 | r | validate_model =
function(X_i, y_i, yhat_i, ep_i){
plot_data =
X_i %>%
mutate(residual = ep_i,
fitted = yhat_i,
scale_fitted = order(fitted)/n(),
observed = y_i,
scale_observed = order(y_i)/n())
obs_pred =
ggplot(dat... |
#' get corpus
#'
#' Calling \code{corpus()} will return the corpora available. If object
#' is a partition or partitionBundle-object, the corpus the respective
#' object is derived from is returned.
#' @param object the object
#' @exportMethod corpus
#' @rdname corpus-method
setGeneric("corpus", function(object) stan... | /R/corpus_method.R | no_license | anhnguyendepocen/polmineR | R | false | false | 907 | r | #' get corpus
#'
#' Calling \code{corpus()} will return the corpora available. If object
#' is a partition or partitionBundle-object, the corpus the respective
#' object is derived from is returned.
#' @param object the object
#' @exportMethod corpus
#' @rdname corpus-method
setGeneric("corpus", function(object) stan... |
#' Check foreign key reference
#'
#' Is a table of a [`dm`] referenced by another table?
#'
#' @inheritParams dm_add_pk
#'
#' @return `TRUE` if at least one foreign key exists that points to the primary
#' key of the `table` argument, `FALSE` otherwise.
#'
#' @family functions utilizing foreign key relations
#'
#' @exp... | /R/graph.R | permissive | lorenzwalthert/dm | R | false | false | 1,845 | r | #' Check foreign key reference
#'
#' Is a table of a [`dm`] referenced by another table?
#'
#' @inheritParams dm_add_pk
#'
#' @return `TRUE` if at least one foreign key exists that points to the primary
#' key of the `table` argument, `FALSE` otherwise.
#'
#' @family functions utilizing foreign key relations
#'
#' @exp... |
#Install packages
install.packages(c('spatstat','sp', 'rgeos', 'maptools', 'GISTools'))
install.packages(c('rgdal'))
#load library
library(spatstat)
library(sp)
library(rgeos)
library(maptools)
library(GISTools)
#Set working directory
setwd("C:/Users/Claire/Documents/University/Spatial Data Capture, Storage and Analy... | /Data/PricePaidData/London_pp_visualise.R | no_license | duccioa/LondonGentrification | R | false | false | 1,209 | r | #Install packages
install.packages(c('spatstat','sp', 'rgeos', 'maptools', 'GISTools'))
install.packages(c('rgdal'))
#load library
library(spatstat)
library(sp)
library(rgeos)
library(maptools)
library(GISTools)
#Set working directory
setwd("C:/Users/Claire/Documents/University/Spatial Data Capture, Storage and Analy... |
testlist <- list(phi = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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), x = c(1.36656528938164e-311, -1.657912... | /dcurver/inst/testfiles/ddc/AFL_ddc/ddc_valgrind_files/1609868386-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 831 | r | testlist <- list(phi = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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), x = c(1.36656528938164e-311, -1.657912... |
makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
x <<- y
i <<- NULL
}
get <- function() x
setinverse <- function(inverse) i <<- inverse
getinverse <- function() i
list(set = set,
get = get,
setinverse = setinverse,
getinverse = getinverse)
}
cacheSo... | /cachematrix.R | no_license | ryanamit/ProgrammingAssignment2 | R | false | false | 508 | r | makeCacheMatrix <- function(x = matrix()) {
i <- NULL
set <- function(y) {
x <<- y
i <<- NULL
}
get <- function() x
setinverse <- function(inverse) i <<- inverse
getinverse <- function() i
list(set = set,
get = get,
setinverse = setinverse,
getinverse = getinverse)
}
cacheSo... |
######## Tutorial on Implementing Decision Tree in R
# https://www.datacamp.com/community/tutorials/decision-trees-R
# install.packages(#'ISLR', 'tidyverse',
# 'dplyr')
library(ISLR)
library(dplyr)
library(rpart)
data(package = "ISLR")
carseats <- Carseats
#require(tree), tree ... | /DecisionTree_Tutorial.R | no_license | rimzbravz/Review_on_Tree-Based_modelling_in_R | R | false | false | 7,835 | r |
######## Tutorial on Implementing Decision Tree in R
# https://www.datacamp.com/community/tutorials/decision-trees-R
# install.packages(#'ISLR', 'tidyverse',
# 'dplyr')
library(ISLR)
library(dplyr)
library(rpart)
data(package = "ISLR")
carseats <- Carseats
#require(tree), tree ... |
# Exercise 4: DPLYR and flights data
# Install the nycflights13 package and read it in. Require the dplyr package
# install.packagesdd
install.packages("nycflights13")
library(nycflights13)
library(dplyr)
# The data.frame flights should now be accessible to you. View it,
# and get some basic information about the... | /exercise-4/exercise.R | permissive | baylesa/m9-dplyr | R | false | false | 1,758 | r | # Exercise 4: DPLYR and flights data
# Install the nycflights13 package and read it in. Require the dplyr package
# install.packagesdd
install.packages("nycflights13")
library(nycflights13)
library(dplyr)
# The data.frame flights should now be accessible to you. View it,
# and get some basic information about the... |
# iml week 2
# 1 a
Sigma <- matrix(c(2.0, -1.837, -1.837, 3.0), nrow=2, ncol=2)
dist <- mvrnorm(200, mu=c(0,0), Sigma)
cov(dist[,1], dist[,1])
cov(dist[,1], dist[,2])
cov(dist[,2], dist[,1])
cov(dist[,2], dist[,2])
cor(dist[,1], dist[,2])
# 1 b
plot(dist[,1], dist[,2])
kde <- kde2d(dist[,1], dist[,2])
contour(kde)
... | /iml_week2.R | no_license | hillaf/iml2018 | R | false | false | 1,282 | r | # iml week 2
# 1 a
Sigma <- matrix(c(2.0, -1.837, -1.837, 3.0), nrow=2, ncol=2)
dist <- mvrnorm(200, mu=c(0,0), Sigma)
cov(dist[,1], dist[,1])
cov(dist[,1], dist[,2])
cov(dist[,2], dist[,1])
cov(dist[,2], dist[,2])
cor(dist[,1], dist[,2])
# 1 b
plot(dist[,1], dist[,2])
kde <- kde2d(dist[,1], dist[,2])
contour(kde)
... |
find_parser <- function(coop_wants, parser_filehash) {
parser_files <- yaml::yaml.load_file(parser_filehash) %>% names()
parser_env <- new.env()
sapply(parser_files, source, parser_env)
parser_fxns <- ls(envir = parser_env)
parsers <- c()
for (i in 1:length(coop_wants)) {
if (grepl('manualentry', ... | /7a_temp_coop_munge/src/parsing_task_fxns.R | no_license | vitensek/lake-temperature-model-prep | R | false | false | 4,176 | r | find_parser <- function(coop_wants, parser_filehash) {
parser_files <- yaml::yaml.load_file(parser_filehash) %>% names()
parser_env <- new.env()
sapply(parser_files, source, parser_env)
parser_fxns <- ls(envir = parser_env)
parsers <- c()
for (i in 1:length(coop_wants)) {
if (grepl('manualentry', ... |
r<-seq(-pi,pi,length=100)
u1<-seq(-1,1,length=100)
IFmean<-function(r,u1){
return(sin(r)*u1)
}
z<-outer(r,u1,IFmean)
persp(r,u1,z,theta=45,phi=60)
| /Misc Code/TwoDIF.R | no_license | stanfill/rotationsC | R | false | false | 152 | r | r<-seq(-pi,pi,length=100)
u1<-seq(-1,1,length=100)
IFmean<-function(r,u1){
return(sin(r)*u1)
}
z<-outer(r,u1,IFmean)
persp(r,u1,z,theta=45,phi=60)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/error_measures.R
\name{RMSE}
\alias{RMSE}
\title{RMSE}
\usage{
RMSE(y_true, y_pred)
}
\description{
Returns the RMSE, given true and predicted values.
}
\details{
NOT tested yet!
}
| /Filips ML package/Filips.ML.package/man/RMSE.Rd | no_license | Filco306/ML-Implementations | R | false | true | 259 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/error_measures.R
\name{RMSE}
\alias{RMSE}
\title{RMSE}
\usage{
RMSE(y_true, y_pred)
}
\description{
Returns the RMSE, given true and predicted values.
}
\details{
NOT tested yet!
}
|
\encoding{UTF-8}
\name{spwb_maximumTranspirationRatioPlot}
\alias{spwb_maximumTranspirationRatioPlot}
\title{
Maximum transpiration vs. LAI
}
\description{
Builds a curve of maximum transpiration (Tmax) over potential evapotranspiration (ETP) for increasing leaf area index (LAI) values.
}
\usage{
spwb_maximumTranspirat... | /man/spwb_maximumTranspirationRatioPlot.Rd | no_license | mdekauwe/medfate | R | false | false | 1,974 | rd | \encoding{UTF-8}
\name{spwb_maximumTranspirationRatioPlot}
\alias{spwb_maximumTranspirationRatioPlot}
\title{
Maximum transpiration vs. LAI
}
\description{
Builds a curve of maximum transpiration (Tmax) over potential evapotranspiration (ETP) for increasing leaf area index (LAI) values.
}
\usage{
spwb_maximumTranspirat... |
allf <- sub('.rds','',list.files('/home-4/whou10@jhu.edu/scratch/Wenpin/rna_imputation/result/impute/10xcellline/screcover'))
res <- lapply(allf, function(f){
sexpr = read.csv(paste0('/home-4/whou10@jhu.edu/scratch/Wenpin/rna_imputation/result/impute/10xcellline/screcover/',f, '/scRecover+scImpute.csv'), as.is = T, r... | /code/procimpute/10xcellline/screcover.R | no_license | wangdi2016/imputationBenchmark | R | false | false | 878 | r | allf <- sub('.rds','',list.files('/home-4/whou10@jhu.edu/scratch/Wenpin/rna_imputation/result/impute/10xcellline/screcover'))
res <- lapply(allf, function(f){
sexpr = read.csv(paste0('/home-4/whou10@jhu.edu/scratch/Wenpin/rna_imputation/result/impute/10xcellline/screcover/',f, '/scRecover+scImpute.csv'), as.is = T, r... |
library(volesti)
P = gen_rand_hpoly(10, 50, generator = list(constants = "sphere"))
volm = volume(P)
print(volm)
| /easy.R | no_license | noobscript69/GeomScale-Tests-2 | R | false | false | 117 | r | library(volesti)
P = gen_rand_hpoly(10, 50, generator = list(constants = "sphere"))
volm = volume(P)
print(volm)
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.