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 |
|---|---|---|---|---|---|---|---|---|---|
# worker script designed to mimic a process that can't be guaranteed to complete
# successfully every time. this script runs only those jobs assigned to this
# particular process.
# find the jobs assigned to this process
jobsTable <- read.csv('status.csv', header=TRUE, stringsAsFactors=FALSE)
# filter to just those ... | /slurm_make_example/run_jobs_unreliably.R | permissive | govtmirror/slurm-examples | R | false | false | 1,273 | r | # worker script designed to mimic a process that can't be guaranteed to complete
# successfully every time. this script runs only those jobs assigned to this
# particular process.
# find the jobs assigned to this process
jobsTable <- read.csv('status.csv', header=TRUE, stringsAsFactors=FALSE)
# filter to just those ... |
\name{ni}
\alias{ni}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Converts column indices to names or names to indices
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
ni(df, Vector, what)
}
%- maybe also 'usage' for other objects documented her... | /jap/man/ni.Rd | no_license | jakosz/jap | R | false | false | 1,708 | rd | \name{ni}
\alias{ni}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Converts column indices to names or names to indices
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
ni(df, Vector, what)
}
%- maybe also 'usage' for other objects documented her... |
#check for file in current directory.
if (!"load_data.R" %in% list.files()) {
setwd("~/Desktop/Exploratory Data Analysis")
}
source("load_data.R")
png(file = "plot2.png",
width = 480, height = 480,
units = "px", bg = "transparent")
plot(DateTime, Global_active_power,
type = "l",
xlab = "",
... | /plot2.R | no_license | sehough/ExData_Plotting1 | R | false | false | 374 | r | #check for file in current directory.
if (!"load_data.R" %in% list.files()) {
setwd("~/Desktop/Exploratory Data Analysis")
}
source("load_data.R")
png(file = "plot2.png",
width = 480, height = 480,
units = "px", bg = "transparent")
plot(DateTime, Global_active_power,
type = "l",
xlab = "",
... |
7387cc9fa685b882f66584c613e51122 p20-1.pddl_planlen=26.qdimacs 2814 10896 | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1+A1/Database/Kronegger-Pfandler-Pichler/bomb/p20-1.pddl_planlen=26/p20-1.pddl_planlen=26.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 73 | r | 7387cc9fa685b882f66584c613e51122 p20-1.pddl_planlen=26.qdimacs 2814 10896 |
# Map walks
library(dplyr)
library(purrr)
library(furrr)
source("utils/mapping.R")
source("utils/config.R")
future::plan(future::multiprocess())
here <- here::here
km_per_mile <- 1.60934
all_flat <- get_all_activities() %>%
filter(`Activity Name` == "Pasadena Running",
`Distance (km)` %>%
betw... | /1_utility_scripts/map_runs.R | no_license | snowdj/clean_and_dry | R | false | false | 982 | r | # Map walks
library(dplyr)
library(purrr)
library(furrr)
source("utils/mapping.R")
source("utils/config.R")
future::plan(future::multiprocess())
here <- here::here
km_per_mile <- 1.60934
all_flat <- get_all_activities() %>%
filter(`Activity Name` == "Pasadena Running",
`Distance (km)` %>%
betw... |
#loading in the data and converting to time series
#the directory needs to be set before running the program so that the data can be loaded.
install.packages("car")
library(car)
#installing SSA packages
install.packages("Rssa")
library(Rssa)
install.packages("nortest")
library(nortest)
WH.unemp <- read.csv("... | /whatcom_unemployment/WH_unemp_code.R | no_license | olsonre/whatcom_unemployed | R | false | false | 6,928 | r | #loading in the data and converting to time series
#the directory needs to be set before running the program so that the data can be loaded.
install.packages("car")
library(car)
#installing SSA packages
install.packages("Rssa")
library(Rssa)
install.packages("nortest")
library(nortest)
WH.unemp <- read.csv("... |
install.packages("C:/Users/bloh356/Downloads/gdxrrw_0.4.0.zip", repos = NULL)
require(gdxrrw)
# The code below generates an node-branch incidence matrix for a complete network with n vertices. For more information see the Appendix C of
# Complementarity Modelling of Energy Markets
# The number of vertices
n = 3
# The... | /src/R/node_incidence.R | no_license | andymd26/vigilant-enigma | R | false | false | 1,914 | r | install.packages("C:/Users/bloh356/Downloads/gdxrrw_0.4.0.zip", repos = NULL)
require(gdxrrw)
# The code below generates an node-branch incidence matrix for a complete network with n vertices. For more information see the Appendix C of
# Complementarity Modelling of Energy Markets
# The number of vertices
n = 3
# The... |
test_that("ifelse. works with true = NA", {
df <- tidytable(x = 1:4)
df <- df %>%
mutate.(new_col = ifelse.(x > 2L, NA, x - 1L))
expect_equal(df$new_col, c(0,1,NA,NA))
})
test_that("ifelse. works with false = NA", {
df <- tidytable(x = 1:4)
df <- df %>%
mutate.(new_col = ifelse.(x > 2L, x - 1L, ... | /tests/testthat/test-ifelse.R | permissive | mjkarlsen/tidytable | R | false | false | 370 | r | test_that("ifelse. works with true = NA", {
df <- tidytable(x = 1:4)
df <- df %>%
mutate.(new_col = ifelse.(x > 2L, NA, x - 1L))
expect_equal(df$new_col, c(0,1,NA,NA))
})
test_that("ifelse. works with false = NA", {
df <- tidytable(x = 1:4)
df <- df %>%
mutate.(new_col = ifelse.(x > 2L, x - 1L, ... |
library(caTools)
library(ggplot2)
dataset = read.csv('Salary_Data.csv')
set.seed(123)
split = sample.split(dataset$Salary, SplitRatio = 0.2)
training_set = subset(dataset, split == TRUE)
test_set = subset(dataset, split == FALSE)
regressor = lm(formula = Salary ~ YearsExperience,
data = training_set)
y... | /linear_regression/r.R | no_license | alinagrishchuk/machine_learning | R | false | false | 1,055 | r | library(caTools)
library(ggplot2)
dataset = read.csv('Salary_Data.csv')
set.seed(123)
split = sample.split(dataset$Salary, SplitRatio = 0.2)
training_set = subset(dataset, split == TRUE)
test_set = subset(dataset, split == FALSE)
regressor = lm(formula = Salary ~ YearsExperience,
data = training_set)
y... |
library(shiny)
# Define server logic required to draw a histogram
shinyServer(function(input, output) {
# Expression that generates a histogram. The expression is
# wrapped in a call to renderPlot to indicate that:
#
# 1) It is "reactive" and therefore should re-execute automatically
# when inputs ch... | /app1/server.R | no_license | aniversarioperu/encuestas | R | false | false | 1,012 | r | library(shiny)
# Define server logic required to draw a histogram
shinyServer(function(input, output) {
# Expression that generates a histogram. The expression is
# wrapped in a call to renderPlot to indicate that:
#
# 1) It is "reactive" and therefore should re-execute automatically
# when inputs ch... |
library(GA)
f <- function(x) abs(x) + cos(x)
min <- -20; max <- +20
curve(f, min, max)
fitness <- function(x) - f(x)
#-----------------------------------Observe iterations--------------------------------------
monitor <- function(obj) {
curve(f, min, max, main = paste("iteration =", obj@iter), font.main = 1)
poi... | /GA_MinimizeMonitor.R | no_license | dalilareis/R-genetic-alg | R | false | false | 632 | r | library(GA)
f <- function(x) abs(x) + cos(x)
min <- -20; max <- +20
curve(f, min, max)
fitness <- function(x) - f(x)
#-----------------------------------Observe iterations--------------------------------------
monitor <- function(obj) {
curve(f, min, max, main = paste("iteration =", obj@iter), font.main = 1)
poi... |
#' Fit an integer adjusted exponential or gamma distribution
#'
#'
#' @param delays Numeric vector of reporting delays
#' @param samples Numeric, number of samples to take
#' @param dist Character string, which distribution to fit. Defaults to exponential (`"exp"`) but
#' gamma is also supported (`"gamma"`).
#' @return... | /R/dist_fit.R | permissive | laasousa/EpiNow | R | false | false | 1,226 | r | #' Fit an integer adjusted exponential or gamma distribution
#'
#'
#' @param delays Numeric vector of reporting delays
#' @param samples Numeric, number of samples to take
#' @param dist Character string, which distribution to fit. Defaults to exponential (`"exp"`) but
#' gamma is also supported (`"gamma"`).
#' @return... |
library(gdistance)
library(dplyr)
#----Load data----
teldata <- readRDS("output/model_data/teldata_raw.RData") # colnames? # fine
spatdata_old <- readRDS("output/model_data/cost_data.RData") # colnames? # fine
landscape <- readRDS("output/model_data/landscape.RData") # colnames?
y <- readRDS("output/model... | /R/archive/1_fit.R | no_license | chrissuthy/telemetry-informed-cost | R | false | false | 3,134 | r | library(gdistance)
library(dplyr)
#----Load data----
teldata <- readRDS("output/model_data/teldata_raw.RData") # colnames? # fine
spatdata_old <- readRDS("output/model_data/cost_data.RData") # colnames? # fine
landscape <- readRDS("output/model_data/landscape.RData") # colnames?
y <- readRDS("output/model... |
region <- c('north', 'south')
metro <- c('urban', 'suburban', 'rural')
sample_size <- 1e3
intercept <- 0
b1 <- 1.5
tbl <- tibble(
x1 = base::sample(1:10, size = sample_size, replace = TRUE)
, a1 = base::sample(region, size = sample_size, replace = TRUE) %>% as_factor()
, a2 = base::sample(metro, size = sample_... | /grouped_data.R | no_license | PirateGrunt/sparsity_blues | R | false | false | 648 | r | region <- c('north', 'south')
metro <- c('urban', 'suburban', 'rural')
sample_size <- 1e3
intercept <- 0
b1 <- 1.5
tbl <- tibble(
x1 = base::sample(1:10, size = sample_size, replace = TRUE)
, a1 = base::sample(region, size = sample_size, replace = TRUE) %>% as_factor()
, a2 = base::sample(metro, size = sample_... |
y6 <- subset(agg_2016, Yearly.Patient.Spend < 25000)
y7 <- subset(agg_2017, Yearly.Patient.Spend < 25000)
l <- list(y6$Yearly.Patient.Spend, y7$Yearly.Patient.Spend)
names(l) <- c("2016", "2017")
boxplot(l, horizontal = T, col = c("light blue", "grey")) | /playpen.R | no_license | curryhilton/aco | R | false | false | 255 | r | y6 <- subset(agg_2016, Yearly.Patient.Spend < 25000)
y7 <- subset(agg_2017, Yearly.Patient.Spend < 25000)
l <- list(y6$Yearly.Patient.Spend, y7$Yearly.Patient.Spend)
names(l) <- c("2016", "2017")
boxplot(l, horizontal = T, col = c("light blue", "grey")) |
library(tidyverse)
library(rvest)
library(stringr)
library(readr)
topdir <- getwd()
datadir <- paste0(topdir, "/data/")
## set contest caption limit and daily cartoon page limit
captionNumbers <- 1:572
dailyPageNums <- 1:88
## Use rvest to scrape pages for captions -------------------
getContestCaps <- function(con... | /get_captions.R | no_license | ngbb/nycc | R | false | false | 4,187 | r | library(tidyverse)
library(rvest)
library(stringr)
library(readr)
topdir <- getwd()
datadir <- paste0(topdir, "/data/")
## set contest caption limit and daily cartoon page limit
captionNumbers <- 1:572
dailyPageNums <- 1:88
## Use rvest to scrape pages for captions -------------------
getContestCaps <- function(con... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/phasingImpute4.R
\name{.imputedByImpute4}
\alias{.imputedByImpute4}
\title{Impute genotypes using IMPUTE4}
\usage{
.imputedByImpute4(
impute4,
chrs,
prefixChunk,
phaseDIR,
referencePanel,
impRefDIR,
imputedDIR,
prefix4eachChr,... | /man/dot-imputedByImpute4.Rd | no_license | transbioZI/Gimpute | R | false | true | 1,569 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/phasingImpute4.R
\name{.imputedByImpute4}
\alias{.imputedByImpute4}
\title{Impute genotypes using IMPUTE4}
\usage{
.imputedByImpute4(
impute4,
chrs,
prefixChunk,
phaseDIR,
referencePanel,
impRefDIR,
imputedDIR,
prefix4eachChr,... |
# 迷你小案例 --------------------------------------------------------------
# Data Import -------------------------------------------------------------
library(readr)
cjb_url <-
"https://github.com/byaxb/RDataAnalytics/raw/master/data/cjb.csv"
cjb <- read_csv(cjb_url,
locale = locale(encoding = "CP9... | /00_迷你小案例.R | permissive | zeji0923/RDataAnalytics | R | false | false | 1,739 | r |
# 迷你小案例 --------------------------------------------------------------
# Data Import -------------------------------------------------------------
library(readr)
cjb_url <-
"https://github.com/byaxb/RDataAnalytics/raw/master/data/cjb.csv"
cjb <- read_csv(cjb_url,
locale = locale(encoding = "CP9... |
setwd("~/Desktop/R")
subdata <- file("household_power_consumption.txt")
plot1 <- read.table(text = grep("^[1,2]/2/2007", readLines(subdata), value = TRUE), col.names = c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_3"), ... | /plot3.R | no_license | Muhsuan/ExData_Plotting1 | R | false | false | 871 | r | setwd("~/Desktop/R")
subdata <- file("household_power_consumption.txt")
plot1 <- read.table(text = grep("^[1,2]/2/2007", readLines(subdata), value = TRUE), col.names = c("Date", "Time", "Global_active_power", "Global_reactive_power", "Voltage", "Global_intensity", "Sub_metering_1", "Sub_metering_2", "Sub_metering_3"), ... |
## import dataset
blood_test <- read.table(file="/mnt/c/Users/Nnamdi/Desktop/Bioinformatics/Univariate_data_modelling/Exercises/DATASETS/BLOOD.txt", header = T, sep=",")
head(blood_test)
### Exploratory data analysis
summary(blood_test)
hist(blood_test$testost)
# remove the missing data
blood.df <- subset(blo... | /logistic_regression/breast_cancer.R | no_license | asouzujoseph/Univariate-statistical-data-analysis | R | false | false | 1,607 | r | ## import dataset
blood_test <- read.table(file="/mnt/c/Users/Nnamdi/Desktop/Bioinformatics/Univariate_data_modelling/Exercises/DATASETS/BLOOD.txt", header = T, sep=",")
head(blood_test)
### Exploratory data analysis
summary(blood_test)
hist(blood_test$testost)
# remove the missing data
blood.df <- subset(blo... |
#' Dataset merger function
#'
#' This function allows you to merge two data.frames by their overlapping rownames.
#' @param DF1 the first data.frame
#' @param DF2 the second data.frame
#' @param main which data.frame should be used as the main? Choose the larger one if working with large datasets. Default to using neit... | /old/old.R | permissive | Deleetdk/kirkegaard | R | false | false | 8,834 | r | #' Dataset merger function
#'
#' This function allows you to merge two data.frames by their overlapping rownames.
#' @param DF1 the first data.frame
#' @param DF2 the second data.frame
#' @param main which data.frame should be used as the main? Choose the larger one if working with large datasets. Default to using neit... |
#' Explanation Level Uncertainty of Sequential Variable Attribution
#'
#' The `break_down_uncertainty()` calles `B` times the break down algorithm for random orderings.
#' Then it calculated distribution of attributions for these different orderings.
#' Note that the `shap()` function is just a simplified interface to ... | /R/break_down_uncertainty.R | no_license | sztach/iBreakDown | R | false | false | 7,257 | r | #' Explanation Level Uncertainty of Sequential Variable Attribution
#'
#' The `break_down_uncertainty()` calles `B` times the break down algorithm for random orderings.
#' Then it calculated distribution of attributions for these different orderings.
#' Note that the `shap()` function is just a simplified interface to ... |
#' rstore
#'
#' A persistent storage framework for R
#'
#' @name rstore
#' @docType package
#' @import stringr
NULL
| /R/rstore.R | no_license | hskksk/rstore | R | false | false | 116 | r | #' rstore
#'
#' A persistent storage framework for R
#'
#' @name rstore
#' @docType package
#' @import stringr
NULL
|
#detach(package:plyr)
library(dplyr)
library(ggplot2)
library(tidyverse)
#library(plyr)
library(readr)
library(tikzDevice)
library(ggrepel)
library(directlabels)
#detach(package:plyr)
data_all <- list.files(path = ".", # Identify all csv files in folder
pattern = "temp.csv", full.names... | /NYUThesisThisDirIsGarbage/PlotAssembly.R | no_license | orebas/GyroAveraging | R | false | false | 4,879 | r | #detach(package:plyr)
library(dplyr)
library(ggplot2)
library(tidyverse)
#library(plyr)
library(readr)
library(tikzDevice)
library(ggrepel)
library(directlabels)
#detach(package:plyr)
data_all <- list.files(path = ".", # Identify all csv files in folder
pattern = "temp.csv", full.names... |
function(input, output, session){
# Interactive map ---------------------------------------------------------
zips <- reactive({
zipdata[zipdata$state == input$State,]
})
zip_state <- reactive({
if(input$State == "AB"){
zipdata_AB
}else if(input$State == "AZ"){
... | /Shiny/Yelp_data_analysis/server.R | no_license | zli873/STAT-628-Module3 | R | false | false | 43,233 | r | function(input, output, session){
# Interactive map ---------------------------------------------------------
zips <- reactive({
zipdata[zipdata$state == input$State,]
})
zip_state <- reactive({
if(input$State == "AB"){
zipdata_AB
}else if(input$State == "AZ"){
... |
#SVM
#0.31
rm(list = ls())
setwd('E:\\Batch46 - R\\Cute03\\Again')
library(tidyverse)
library(caret)
library(DMwR)
test.id <- readRDS('test_id.rds')
bank <- read.csv('train_new.csv', na.strings = '')
test <- read.csv('test_new.csv', na.strings = '')
str(bank)
bank$transaction_id <- NULL
test$transaction_id <- NULL... | /Predict_Fradulent_Transactions_Classification/Code/Smoat with 9_1/SVM.R | no_license | pranakum/DSProjects | R | false | false | 2,555 | r | #SVM
#0.31
rm(list = ls())
setwd('E:\\Batch46 - R\\Cute03\\Again')
library(tidyverse)
library(caret)
library(DMwR)
test.id <- readRDS('test_id.rds')
bank <- read.csv('train_new.csv', na.strings = '')
test <- read.csv('test_new.csv', na.strings = '')
str(bank)
bank$transaction_id <- NULL
test$transaction_id <- NULL... |
# plot3.R
# Of the four types of sources indicated by the type (point, nonpoint, onroad, nonroad)
# variable, which of these four sources have seen decreases in emissions from 1999-2008 for
# Baltimore City? Which have seen increases in emissions from 1999-2008? Use the ggplot2
# plotting system to make a plot a... | /plot3.R | no_license | paragsengupta/Exploratory_Analysis_Week4_Project2 | R | false | false | 2,513 | r | # plot3.R
# Of the four types of sources indicated by the type (point, nonpoint, onroad, nonroad)
# variable, which of these four sources have seen decreases in emissions from 1999-2008 for
# Baltimore City? Which have seen increases in emissions from 1999-2008? Use the ggplot2
# plotting system to make a plot a... |
context("slowrake")
data("dog_pubs")
test_that("slowrake works for non-atomic, non-empty char vectors", {
out <- slowrake(dog_pubs$abstract[1:10])
expect_equal(length(out), 10)
})
test_that("slowrake returns a score when there is only one word in txt", {
out <- slowrake("dog")
expect_true(is.numeric(out[[1]]... | /tests/testthat/test-slowrake.R | no_license | Rmadillo/slowraker | R | false | false | 1,323 | r | context("slowrake")
data("dog_pubs")
test_that("slowrake works for non-atomic, non-empty char vectors", {
out <- slowrake(dog_pubs$abstract[1:10])
expect_equal(length(out), 10)
})
test_that("slowrake returns a score when there is only one word in txt", {
out <- slowrake("dog")
expect_true(is.numeric(out[[1]]... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tictoc.R
\name{tic}
\alias{tic}
\alias{toc}
\alias{resettictoc}
\title{Stopwatch to measure R Timings}
\usage{
tic(id = 1, quiet = TRUE)
toc(id = 1, msg = "Elapsed time:", units = TRUE, signif = 3, quiet = FALSE)
resettictoc(which = "both")... | /man/tic.Rd | no_license | vahidnouri/lares | R | false | true | 2,098 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tictoc.R
\name{tic}
\alias{tic}
\alias{toc}
\alias{resettictoc}
\title{Stopwatch to measure R Timings}
\usage{
tic(id = 1, quiet = TRUE)
toc(id = 1, msg = "Elapsed time:", units = TRUE, signif = 3, quiet = FALSE)
resettictoc(which = "both")... |
# DreamTK App
#v0.8.3
# BER updates
# GenTox updates
# Preliminary loading -----------------------------------------------------
source("./_setup_.R");
#source("./__test_environment.R");
# Main App - R Shiny ------------------------------------------------------
# Support functions ---------------------------------... | /app.R | no_license | NongCT230/DREAMTK.0.8.3 | R | false | false | 703 | r | # DreamTK App
#v0.8.3
# BER updates
# GenTox updates
# Preliminary loading -----------------------------------------------------
source("./_setup_.R");
#source("./__test_environment.R");
# Main App - R Shiny ------------------------------------------------------
# Support functions ---------------------------------... |
library(tidyverse)
library(lme4)
library(lattice)
library(emmeans)
# if (!requireNamespace("BiocManager", quietly = TRUE))
# install.packages("BiocManager")
# # BiocManager::install("ComplexHeatmap")
library(ComplexHeatmap)
# BiocManager::install("optimx")
library(optimx)
# Set output_dir as ~working_dir/outputs/
ou... | /lme_counts.R | permissive | SongXiaoYi/vanMaldegem_Valand_2021 | R | false | false | 8,141 | r | library(tidyverse)
library(lme4)
library(lattice)
library(emmeans)
# if (!requireNamespace("BiocManager", quietly = TRUE))
# install.packages("BiocManager")
# # BiocManager::install("ComplexHeatmap")
library(ComplexHeatmap)
# BiocManager::install("optimx")
library(optimx)
# Set output_dir as ~working_dir/outputs/
ou... |
# barplot of nations that have won the world cup
library(dplyr)
library(htmltab)
url2<-"https://en.wikipedia.org/wiki/List_of_FIFA_World_Cup_winners"
champs<-htmltab(url2, which=1, rm_nodata_cols=F)
champs
barplot(as.numeric(champs$Titles), main = "FIFA Winners",xlab = "Country", ylab = "No. of Wins", names = champ... | /DataScraping/fifa.r | no_license | rebeccasoren/R | R | false | false | 352 | r | # barplot of nations that have won the world cup
library(dplyr)
library(htmltab)
url2<-"https://en.wikipedia.org/wiki/List_of_FIFA_World_Cup_winners"
champs<-htmltab(url2, which=1, rm_nodata_cols=F)
champs
barplot(as.numeric(champs$Titles), main = "FIFA Winners",xlab = "Country", ylab = "No. of Wins", names = champ... |
#' Deprecated functions
#'
#' These functions have been renamed and deprecated in \pkg{afex}:
#' \code{aov.car()} (use \code{\link{aov_car}()}),
#' \code{ez.glm()} (use \code{\link{aov_ez}()}),
#' \code{aov4()} (use \code{\link{aov_4}()}).
#' @rdname deprecated
#' @keywords internal
#' @aliases afex-deprecated
#' @par... | /R/deprecated.R | no_license | jonathon-love/afex | R | false | false | 1,072 | r | #' Deprecated functions
#'
#' These functions have been renamed and deprecated in \pkg{afex}:
#' \code{aov.car()} (use \code{\link{aov_car}()}),
#' \code{ez.glm()} (use \code{\link{aov_ez}()}),
#' \code{aov4()} (use \code{\link{aov_4}()}).
#' @rdname deprecated
#' @keywords internal
#' @aliases afex-deprecated
#' @par... |
context("mungepiece reference class")
test_that("it correctly initializes without prediction arguments", {
mb <- mungebit(function(x) x)
expect_equal(as.character(class(mungepiece(mb, list()))), "mungepiece")
})
test_that("it correctly initializes with prediction arguments", {
mb <- mungebit(function(x) x)
ex... | /tests/testthat/test-mungepiece.r | permissive | robertzk/mungebits | R | false | false | 831 | r | context("mungepiece reference class")
test_that("it correctly initializes without prediction arguments", {
mb <- mungebit(function(x) x)
expect_equal(as.character(class(mungepiece(mb, list()))), "mungepiece")
})
test_that("it correctly initializes with prediction arguments", {
mb <- mungebit(function(x) x)
ex... |
#shortest path
ShortestPath <- function(traffic,N,target_x,target_y){
shortest_path = matrix(N*N*10,N,N)
shortest_path[target_x,target_y]=0
identical_count = 100
while(identical_count>0){
shortest_path_temp = shortest_path
for(x in 1:N){
for(y in 1:N){
if(x==target_x & y==target... | /q_learning.R | no_license | aytek-mutlu/q_learning | R | false | false | 9,128 | r | #shortest path
ShortestPath <- function(traffic,N,target_x,target_y){
shortest_path = matrix(N*N*10,N,N)
shortest_path[target_x,target_y]=0
identical_count = 100
while(identical_count>0){
shortest_path_temp = shortest_path
for(x in 1:N){
for(y in 1:N){
if(x==target_x & y==target... |
LoadDataSet <- function(path) {
wd <- getwd()
dataPath <- paste(path, "coeffgrabber New/Data", sep="")
setwd(dataPath)
files = list.files(path = dataPath, pattern="*.csv")
egbPath = paste(dataPath, "!EGB.csv", sep="/")
EGB <- read.csv(egbPath, header = FALSE, stringsAsFactors=FALSE)
for (i in 1:(length... | /R-BradleyT/helpers/LoadData.R | no_license | Michael-karn-ivanov/dota | R | false | false | 1,259 | r | LoadDataSet <- function(path) {
wd <- getwd()
dataPath <- paste(path, "coeffgrabber New/Data", sep="")
setwd(dataPath)
files = list.files(path = dataPath, pattern="*.csv")
egbPath = paste(dataPath, "!EGB.csv", sep="/")
EGB <- read.csv(egbPath, header = FALSE, stringsAsFactors=FALSE)
for (i in 1:(length... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rticles-package.R
\docType{package}
\name{rticles-package}
\alias{rticles}
\alias{rticles-package}
\title{rticles: Article Formats for R Markdown}
\description{
\if{html}{\figure{logo.png}{options: style='float: right' alt='logo' widt... | /man/rticles-package.Rd | no_license | cran/rticles | R | false | true | 5,394 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/rticles-package.R
\docType{package}
\name{rticles-package}
\alias{rticles}
\alias{rticles-package}
\title{rticles: Article Formats for R Markdown}
\description{
\if{html}{\figure{logo.png}{options: style='float: right' alt='logo' widt... |
#####
# Verify that the biglasso outputs are identical when using
# multithreading (via 'ncores' argument)
#
#
####
#=======================================#
#====== DATA GENERATING MECHANISM ======#
#=======================================#
sim.surv.weib <- function(n, lambda=0.01, rho=1, beta, rate.cens=0.001) {
# ... | /tests/test-cv/compare-parallelism.R | no_license | dfleis/biglasso | R | false | false | 3,503 | r | #####
# Verify that the biglasso outputs are identical when using
# multithreading (via 'ncores' argument)
#
#
####
#=======================================#
#====== DATA GENERATING MECHANISM ======#
#=======================================#
sim.surv.weib <- function(n, lambda=0.01, rho=1, beta, rate.cens=0.001) {
# ... |
x <- matrix(nrow=3,ncol=3)
x[2:3,2:3] <- cbind(4:5,2:3)
x | /Matrix-1.r | no_license | RKViswanadha/Datasciencecoursera | R | false | false | 57 | r | x <- matrix(nrow=3,ncol=3)
x[2:3,2:3] <- cbind(4:5,2:3)
x |
primo <- function(n) {
if (n == 1 || n == 2) {
return(TRUE)
}
if (n %% 2 == 0) {
return(FALSE)
}
for (i in seq(3, max(3, ceiling(sqrt(n))), 2)) {
if ((n %% i) == 0) {
return(FALSE)
}
}
return(TRUE)
}
desde <- 10
hasta <- 30
orig... | /p3/primo4.R | no_license | PabloChavez94/Simulacion | R | false | false | 934 | r | primo <- function(n) {
if (n == 1 || n == 2) {
return(TRUE)
}
if (n %% 2 == 0) {
return(FALSE)
}
for (i in seq(3, max(3, ceiling(sqrt(n))), 2)) {
if ((n %% i) == 0) {
return(FALSE)
}
}
return(TRUE)
}
desde <- 10
hasta <- 30
orig... |
library(glmnet)
mydata = read.table("./TrainingSet/RF/NSCLC.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.6,family="gaussian",standardize=TRUE)
sink('./Model/EN/Classifier/NSCLC/NSCLC_065.txt',append=TRUE)
pri... | /Model/EN/Classifier/NSCLC/NSCLC_065.R | no_license | leon1003/QSMART | R | false | false | 346 | r | library(glmnet)
mydata = read.table("./TrainingSet/RF/NSCLC.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.6,family="gaussian",standardize=TRUE)
sink('./Model/EN/Classifier/NSCLC/NSCLC_065.txt',append=TRUE)
pri... |
library( "ape" )
library( "geiger" )
library( "expm" )
library( "nloptr" )
source( "masternegloglikeeps1.R" )
source( "Qmatrixwoodherb2.R" )
source("Pruning2.R")
sim.tree<-read.tree("tree50time63.txt")
sim.chrom<-read.table("chrom50time63.txt", header=FALSE)
last.state=50
x.0<- log(c(0.12, 0.001, 0.25, 0.002,0.036, ... | /Simulations tree height/50 my/optim50tree63.R | no_license | roszenil/Bichromdryad | R | false | false | 821 | r | library( "ape" )
library( "geiger" )
library( "expm" )
library( "nloptr" )
source( "masternegloglikeeps1.R" )
source( "Qmatrixwoodherb2.R" )
source("Pruning2.R")
sim.tree<-read.tree("tree50time63.txt")
sim.chrom<-read.table("chrom50time63.txt", header=FALSE)
last.state=50
x.0<- log(c(0.12, 0.001, 0.25, 0.002,0.036, ... |
# -------------------------
# 01_Temperature_data_B_TS
# -------------------------
# A script for analysis of temperature data for the bleaching thermal stress experiment:
# a) Read in rda files for each tank
# b) Calculate averages
# c) Plot data
# d) Calculate degree heating week (DHW) accumulation for ea... | /01_Temperature_data_B_TS.R | no_license | CharlotteEPage/Flow_effects_thermal_stress_A.aspera | R | false | false | 11,067 | r | # -------------------------
# 01_Temperature_data_B_TS
# -------------------------
# A script for analysis of temperature data for the bleaching thermal stress experiment:
# a) Read in rda files for each tank
# b) Calculate averages
# c) Plot data
# d) Calculate degree heating week (DHW) accumulation for ea... |
setwd("C:/Users//Ruicheng//Desktop//dmc-2015/")
build <- read.csv("SEM_DAILY_BUILD.csv", header = T)
test <- read.csv("SEM_DAILY_VALIDATION.csv", header = T)
CLICKS <- build$CLICKS
ENGN_ID.f. <- as.factor(build$ENGN_ID) # Binary
LANG_ID.f. <- as.factor(build$LANG_ID) # Binary
MTCH_TYPE_... | /DMC.R | no_license | r54liu/InfiniticsDMC2015 | R | false | false | 1,597 | r | setwd("C:/Users//Ruicheng//Desktop//dmc-2015/")
build <- read.csv("SEM_DAILY_BUILD.csv", header = T)
test <- read.csv("SEM_DAILY_VALIDATION.csv", header = T)
CLICKS <- build$CLICKS
ENGN_ID.f. <- as.factor(build$ENGN_ID) # Binary
LANG_ID.f. <- as.factor(build$LANG_ID) # Binary
MTCH_TYPE_... |
## convenience function for interfacing
## HCL colors as implemented in colorspace
hcl2hex <- function(h = 0, c = 35, l = 85, fixup = TRUE)
{
colorspace::hex(polarLUV(l, c, h), fixup = fixup)
}
## shading-generating functions should take at least the arguments
## observed, residuals, expected, df
## and return a f... | /R/shadings.R | no_license | cran/vcd | R | false | false | 10,584 | r | ## convenience function for interfacing
## HCL colors as implemented in colorspace
hcl2hex <- function(h = 0, c = 35, l = 85, fixup = TRUE)
{
colorspace::hex(polarLUV(l, c, h), fixup = fixup)
}
## shading-generating functions should take at least the arguments
## observed, residuals, expected, df
## and return a f... |
#' Produce fibre configuration files for a givne set of DOCats
#'
#' @description This is the highlevel main TAZ function for running running the Tiler software
#' to gnerate fibre configuration files. Users must provide DOcats for targets, sky, standards and guides.
#'
#' @param configdir Directory path location of ... | /DEVILSTAZ/R/runTiler.R | no_license | ICRAR/DEVILS-TAZ | R | false | false | 24,908 | r | #' Produce fibre configuration files for a givne set of DOCats
#'
#' @description This is the highlevel main TAZ function for running running the Tiler software
#' to gnerate fibre configuration files. Users must provide DOcats for targets, sky, standards and guides.
#'
#' @param configdir Directory path location of ... |
##install.packages("igraph")
library(igraph)
# your data
mat <- as.matrix(read.table(text=
"node X1 X2 X3 X4 X5 X6
1 0 3 7 4 NA NA
2 3 0 2 NA NA 9
3 7 2 0 1 3 6
4 4 NA 1 0 3 NA
5 NA NA 3 3 0 3
6 NA 9 6 NA 3 0", header=T))
# prepare data for graph functions - set NA to ... | /dijkstra_shortest_path.R | no_license | Squiercg/recologia | R | false | false | 1,124 | r | ##install.packages("igraph")
library(igraph)
# your data
mat <- as.matrix(read.table(text=
"node X1 X2 X3 X4 X5 X6
1 0 3 7 4 NA NA
2 3 0 2 NA NA 9
3 7 2 0 1 3 6
4 4 NA 1 0 3 NA
5 NA NA 3 3 0 3
6 NA 9 6 NA 3 0", header=T))
# prepare data for graph functions - set NA to ... |
keggMap <- function(pairID, fcTable){
print(paste0("pairID: ", pairID))
#Map the gene lists and fold change values to KEGG using the M. musculus kegg set from gageData
library(pathview)
library(gage)
library(gageData)
library(org.Mm.eg.db)
egMap <- as.list(org.Mm.egENSEMBL2EG)
exp.fc <- c()
for(gNameInd... | /counts/diffPath.R | no_license | ploverso/R-analysis-scripts | R | false | false | 2,168 | r |
keggMap <- function(pairID, fcTable){
print(paste0("pairID: ", pairID))
#Map the gene lists and fold change values to KEGG using the M. musculus kegg set from gageData
library(pathview)
library(gage)
library(gageData)
library(org.Mm.eg.db)
egMap <- as.list(org.Mm.egENSEMBL2EG)
exp.fc <- c()
for(gNameInd... |
#' Bootstrap Equating Error
#'
#' These functions return bootstrap standard errors, bias, and RMSE of
#' equating. A summary method estimates mean and weighted mean errors over the
#' score scale.
#'
#' Samples are drawn of size \code{xn} and \code{yn}, with replacement, from
#' each score distribution. Form Y equiv... | /R/bootstrap.R | no_license | Yage66/equate | R | false | false | 9,805 | r | #' Bootstrap Equating Error
#'
#' These functions return bootstrap standard errors, bias, and RMSE of
#' equating. A summary method estimates mean and weighted mean errors over the
#' score scale.
#'
#' Samples are drawn of size \code{xn} and \code{yn}, with replacement, from
#' each score distribution. Form Y equiv... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stb_fb-data.R
\docType{data}
\name{stb_fb}
\alias{stb_fb}
\title{Stickleback Fish Body Shape}
\format{
data.frame
}
\source{
TBA
}
\usage{
data(stb_fb)
}
\description{
Example Shapes of the fishbody (fb) of a few sticklebacks (stb)
}
\example... | /man/stb_fb.Rd | permissive | SvenGastauer/KRMr | R | false | true | 543 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stb_fb-data.R
\docType{data}
\name{stb_fb}
\alias{stb_fb}
\title{Stickleback Fish Body Shape}
\format{
data.frame
}
\source{
TBA
}
\usage{
data(stb_fb)
}
\description{
Example Shapes of the fishbody (fb) of a few sticklebacks (stb)
}
\example... |
###############################################################################
# Bag of Words
# author: khmelkoff
###############################################################################
# Загружаем библиотеки, готовим обучающую выборку #############################
library(tm)
library(SnowballC)
library(e107... | /BagofWords_1.R | no_license | Sandy4321/BagOfWords | R | false | false | 5,675 | r | ###############################################################################
# Bag of Words
# author: khmelkoff
###############################################################################
# Загружаем библиотеки, готовим обучающую выборку #############################
library(tm)
library(SnowballC)
library(e107... |
library(lubridate)
setwd("/Users/jacobwynne/Dropbox/sunapee_ensemble")
mantemptime <- read_csv("mantemptime.csv")
newtemp <- read_csv("new_temp.csv")
newtemp <- na.omit(newtemp)
mantemptime$source <- "manual"
newtemp$source <- "buoy"
bound_newtemp <- full_join(newtemp, mantemptime, all.x = TRUE)
dups <- bound_n... | /scripts/wrangling_inputs/boundtemps_filtering_manual.R | no_license | jacob8776/sunapee_LER_projections | R | false | false | 971 | r | library(lubridate)
setwd("/Users/jacobwynne/Dropbox/sunapee_ensemble")
mantemptime <- read_csv("mantemptime.csv")
newtemp <- read_csv("new_temp.csv")
newtemp <- na.omit(newtemp)
mantemptime$source <- "manual"
newtemp$source <- "buoy"
bound_newtemp <- full_join(newtemp, mantemptime, all.x = TRUE)
dups <- bound_n... |
#'This a general retryfromJSOM function with a wrapper with try() and trycatch().
#'In general cases this functions is to be used with rjson::fromJSON.
#'
#'
#'@param .FUN is a function which is going to be executed.
#'@param raw.data is a function which is going to be executed.
#'
#'@return it returns API content ... | /R/retryfromJSON.R | no_license | aritrab/YouTubeR | R | false | false | 990 | r | #'This a general retryfromJSOM function with a wrapper with try() and trycatch().
#'In general cases this functions is to be used with rjson::fromJSON.
#'
#'
#'@param .FUN is a function which is going to be executed.
#'@param raw.data is a function which is going to be executed.
#'
#'@return it returns API content ... |
#loading libraries
library(tidyverse)
library(car)
library(MASS)
#reading the data
#as per the data dictionaries, there are only numeric variables and categorical variables.
#We can assume that all strings are categorical. So, stringsAsFactors can be TRUE.
data <- read.csv("CarPrice_Assignment.csv", stringsA... | /Solutions.R | no_license | DeepanshKhurana/linear-regression-predicting-car-prices | R | false | false | 39,416 | r | #loading libraries
library(tidyverse)
library(car)
library(MASS)
#reading the data
#as per the data dictionaries, there are only numeric variables and categorical variables.
#We can assume that all strings are categorical. So, stringsAsFactors can be TRUE.
data <- read.csv("CarPrice_Assignment.csv", stringsA... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/project_methods.R
\name{mizerMort}
\alias{mizerMort}
\title{Get total mortality rate needed to project standard mizer model}
\usage{
mizerMort(params, n, n_pp, n_other, t, f_mort, pred_mort, ...)
}
\arguments{
\item{params}{A \linkS4class{Miz... | /man/mizerMort.Rd | no_license | sizespectrum/mizer | R | false | true | 2,623 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/project_methods.R
\name{mizerMort}
\alias{mizerMort}
\title{Get total mortality rate needed to project standard mizer model}
\usage{
mizerMort(params, n, n_pp, n_other, t, f_mort, pred_mort, ...)
}
\arguments{
\item{params}{A \linkS4class{Miz... |
## Gather columns into Rows.
## gather(columnName, value(or what to do with the values already there), which columns?)
gather(date, count, 2:9)
| /R/reshaping/gather.r | no_license | mitchelllisle/code_snippets | R | false | false | 145 | r | ## Gather columns into Rows.
## gather(columnName, value(or what to do with the values already there), which columns?)
gather(date, count, 2:9)
|
wdir = homedir
# make sure there is a directory homedir
if (!dir.exists(wdir)){
dir.create(wdir)
}
# make sure there is a directory tempdir
if (!dir.exists(tempdir)){
dir.create(tempdir)
}
setwd(dir=wdir)
mydir <- "/my/dir"
{
if (home.home){
auth.token.filename <- file.path(mydir, "api/authtoken.txt... | /api/fileinfo/setdefs.R | no_license | ericff/auxiliary-code-sMACHETE | R | false | false | 37,849 | r |
wdir = homedir
# make sure there is a directory homedir
if (!dir.exists(wdir)){
dir.create(wdir)
}
# make sure there is a directory tempdir
if (!dir.exists(tempdir)){
dir.create(tempdir)
}
setwd(dir=wdir)
mydir <- "/my/dir"
{
if (home.home){
auth.token.filename <- file.path(mydir, "api/authtoken.txt... |
#=================================================================================*
# ---- setup ----
#=================================================================================*
# Load libraries:
library(RCurl)
library(lubridate)
# Load a source script:
script <-
getURL(
"https://raw.githubusercontent... | /old_education_content/smbc_r_workshop/lesson7_code_junkyard.R | no_license | SMBC-NZP/smbc-nzp.github.io | R | false | false | 22,523 | r | #=================================================================================*
# ---- setup ----
#=================================================================================*
# Load libraries:
library(RCurl)
library(lubridate)
# Load a source script:
script <-
getURL(
"https://raw.githubusercontent... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pbpkUtils.R
\name{getVariabilitySetChoices}
\alias{getVariabilitySetChoices}
\title{Get all variability sets}
\usage{
getVariabilitySetChoices(var_type = "physio")
}
\arguments{
\item{var_type}{type of Variability set to return, can ... | /man/getVariabilitySetChoices.Rd | no_license | cran/plethem | R | false | true | 607 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/pbpkUtils.R
\name{getVariabilitySetChoices}
\alias{getVariabilitySetChoices}
\title{Get all variability sets}
\usage{
getVariabilitySetChoices(var_type = "physio")
}
\arguments{
\item{var_type}{type of Variability set to return, can ... |
#' Data preparator for LightGBM datasets with rules (numeric)
#'
#' Attempts to prepare a clean dataset to prepare to put in a \code{lgb.Dataset}.
#' Factors and characters are converted to numeric. In addition, keeps rules created
#' so you can convert other datasets using this converter.
#'
#' @param data A data.fram... | /R-package/R/lgb.prepare_rules.R | permissive | skyjiao/LightGBM | R | false | false | 5,298 | r | #' Data preparator for LightGBM datasets with rules (numeric)
#'
#' Attempts to prepare a clean dataset to prepare to put in a \code{lgb.Dataset}.
#' Factors and characters are converted to numeric. In addition, keeps rules created
#' so you can convert other datasets using this converter.
#'
#' @param data A data.fram... |
#' Create qtleffects object
#'
#' Creates an object needed to plot effect sizes of QTL from r/qtl.
#'
#' @param chr a numeric vector listing which chromosomes are to be plotted.
#' @param marker_locations A data.frame listing marker positions on each chromosome.
#' Should include a column labelled 'Position' and anothe... | /R/qtleffects.R | permissive | ellisztamas/qtltools | R | false | false | 1,648 | r | #' Create qtleffects object
#'
#' Creates an object needed to plot effect sizes of QTL from r/qtl.
#'
#' @param chr a numeric vector listing which chromosomes are to be plotted.
#' @param marker_locations A data.frame listing marker positions on each chromosome.
#' Should include a column labelled 'Position' and anothe... |
library(shiny)
ui <- fluidPage(
pageWithSidebar(
# Application title
headerPanel("Shiny App Project - Target Heart Rate Calculator"),
sidebarPanel(
numericInput('age', 'Enter your age in years', 25) ,
submitButton('Calculate Target Heart Rate')
),
mainPanel(
p('Y... | /app.R | no_license | AmandaAffolter/Data-Products---Application | R | false | false | 1,354 | r | library(shiny)
ui <- fluidPage(
pageWithSidebar(
# Application title
headerPanel("Shiny App Project - Target Heart Rate Calculator"),
sidebarPanel(
numericInput('age', 'Enter your age in years', 25) ,
submitButton('Calculate Target Heart Rate')
),
mainPanel(
p('Y... |
#' Plot SpatialRD output
#'
#'Produces plot of GRDDseries and optionally of a map that visualises every point estimate in space.
#'
#' @param SpatialRDoutput spatial obkect that is produced by an estimation with \code{\link{spatialrd}}
#' @param map T/F depending on whether mapplot is desired (make sure to set \code... | /R/plotspatialrd.R | no_license | axlehner/SpatialRDD | R | false | false | 3,789 | r |
#' Plot SpatialRD output
#'
#'Produces plot of GRDDseries and optionally of a map that visualises every point estimate in space.
#'
#' @param SpatialRDoutput spatial obkect that is produced by an estimation with \code{\link{spatialrd}}
#' @param map T/F depending on whether mapplot is desired (make sure to set \code... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gg-plots.R
\name{ggally_ratio}
\alias{ggally_ratio}
\title{Plots a mosaic plot}
\usage{
ggally_ratio(data, mapping = do.call(ggplot2::aes_string,
as.list(colnames(data)[1:2])), ..., floor = 0, ceiling = NULL)
}
\arguments{
\item{data}{data ... | /man/ggally_ratio.Rd | no_license | cpsievert/ggally | R | false | true | 1,157 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gg-plots.R
\name{ggally_ratio}
\alias{ggally_ratio}
\title{Plots a mosaic plot}
\usage{
ggally_ratio(data, mapping = do.call(ggplot2::aes_string,
as.list(colnames(data)[1:2])), ..., floor = 0, ceiling = NULL)
}
\arguments{
\item{data}{data ... |
## Copied from RcppR6
read_file <- function(filename, ...) {
assert_file_exists(filename)
paste(readLines(filename), collapse="\n")
}
## https://github.com/viking/r-yaml/issues/5#issuecomment-16464325
yaml_load <- function(string) {
## More restrictive true/false handling. Only accept if it maps to
## full tr... | /R/utils.R | no_license | tjmahr/remake | R | false | false | 11,068 | r | ## Copied from RcppR6
read_file <- function(filename, ...) {
assert_file_exists(filename)
paste(readLines(filename), collapse="\n")
}
## https://github.com/viking/r-yaml/issues/5#issuecomment-16464325
yaml_load <- function(string) {
## More restrictive true/false handling. Only accept if it maps to
## full tr... |
# Data Type : 저장된 데이터의 성격(numeric, character, logical)
# Data Structure : 변수에 저장된 데이터의 메모리 구조.
# R이 제공하는 자료구조
# 6개 기억하시면 되요!!
# 2개의 분류로 나누어져요!
# 같은 데이터 타입인가 아닌가
# vector : 1차원, 같은 data type
# matrix : 2차원, 같은 data type
# Array : 3차원, 같은 data type
# List : 1차원, 다른 data type
# 중첩 자료구조
# Data Frame : 2차원, 다... | /서비스-산업-데이터를-활용한-머신러닝-분석/전반기(문성훈 강사님)/R/06_vector.R | no_license | FASLADODO/Lecture-Multicampus | R | false | false | 4,764 | r | # Data Type : 저장된 데이터의 성격(numeric, character, logical)
# Data Structure : 변수에 저장된 데이터의 메모리 구조.
# R이 제공하는 자료구조
# 6개 기억하시면 되요!!
# 2개의 분류로 나누어져요!
# 같은 데이터 타입인가 아닌가
# vector : 1차원, 같은 data type
# matrix : 2차원, 같은 data type
# Array : 3차원, 같은 data type
# List : 1차원, 다른 data type
# 중첩 자료구조
# Data Frame : 2차원, 다... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dplyr_verbs.r
\name{chunk_summarize}
\alias{chunk_summarize}
\alias{chunk_summarise}
\alias{chunk_group_by}
\alias{chunk_ungroup}
\title{Group by within each disk.frame}
\usage{
chunk_summarize(.data, ...)
chunk_summarise(.data, .... | /fuzzedpackages/disk.frame/man/chunk_group_by.Rd | no_license | akhikolla/testpackages | R | false | true | 801 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dplyr_verbs.r
\name{chunk_summarize}
\alias{chunk_summarize}
\alias{chunk_summarise}
\alias{chunk_group_by}
\alias{chunk_ungroup}
\title{Group by within each disk.frame}
\usage{
chunk_summarize(.data, ...)
chunk_summarise(.data, .... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/docxtractr-package.r
\docType{package}
\name{docxtractr}
\alias{docxtractr}
\alias{docxtractr-package}
\title{docxtractr is an R package for extracting tables and comments out of Word documents (docx)}
\description{
Microsoft Word docx files ... | /man/docxtractr.Rd | no_license | bdilday/docxtractr | R | false | true | 700 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/docxtractr-package.r
\docType{package}
\name{docxtractr}
\alias{docxtractr}
\alias{docxtractr-package}
\title{docxtractr is an R package for extracting tables and comments out of Word documents (docx)}
\description{
Microsoft Word docx files ... |
\name{estimateDensity2D}
\alias{estimateDensity2D}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
estimateDensity2D
}
\description{
Estimates densities for two-dimensional data with the given estimation type
}
\usage{
estimateDensity2D(X, Y, DensityEstimation = "SDH",
SampleSize, na.rm = FALSE,... | /man/estimateDensity2D.Rd | no_license | Mthrun/DataVisualizations | R | false | false | 1,898 | rd | \name{estimateDensity2D}
\alias{estimateDensity2D}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
estimateDensity2D
}
\description{
Estimates densities for two-dimensional data with the given estimation type
}
\usage{
estimateDensity2D(X, Y, DensityEstimation = "SDH",
SampleSize, na.rm = FALSE,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Individual.R
\name{individual}
\alias{individual}
\title{Return individual average raw data and plotted waveforms (optional) for all loaded conditions}
\usage{
individual(data, electrodes, plots = "n")
}
\arguments{
\item{data}{A data frame i... | /man/individual.Rd | no_license | mooretm/erp.easy | R | false | true | 1,998 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Individual.R
\name{individual}
\alias{individual}
\title{Return individual average raw data and plotted waveforms (optional) for all loaded conditions}
\usage{
individual(data, electrodes, plots = "n")
}
\arguments{
\item{data}{A data frame i... |
#' Function to add names to network for the user.
#'@param grn a GRN object from KBoost.
#'@param gen_names a vector with the gene names.
#'@export
#'@return grn a GRN object with elements with user-defined gene names.
#'@examples
#' data(D4_multi_1)
#' Net = kboost(D4_multi_1)
#' g_names = matrix("... | /R/add_names.R | no_license | ghimirey/KBoost | R | false | false | 945 | r | #' Function to add names to network for the user.
#'@param grn a GRN object from KBoost.
#'@param gen_names a vector with the gene names.
#'@export
#'@return grn a GRN object with elements with user-defined gene names.
#'@examples
#' data(D4_multi_1)
#' Net = kboost(D4_multi_1)
#' g_names = matrix("... |
#helper function for word_list/trans.cloud
freqTab2words <-
function(word.list){
if(is.data.frame(word.list)){
rep(word.list[, 1], word.list[, 2])
} else {
lapply(word.list, function(x) rep(x[, 1], x[, 2]))
}
}
| /R/freqTab2words.R | no_license | abresler/qdap | R | false | false | 239 | r | #helper function for word_list/trans.cloud
freqTab2words <-
function(word.list){
if(is.data.frame(word.list)){
rep(word.list[, 1], word.list[, 2])
} else {
lapply(word.list, function(x) rep(x[, 1], x[, 2]))
}
}
|
performance_rating_UI <- function(id) {
#user interface section
ns <- NS(id)
tagList(
sidebarLayout(
absolutePanel(id = "controls", class = "panel panel-default", fixed = TRUE,
draggable = TRUE, top = 250, left = "auto", right = 17, bottom = "auto",
width = 33... | /modules/performance_rating.R | no_license | Nybre/fiverr_proj_6 | R | false | false | 38,017 | r | performance_rating_UI <- function(id) {
#user interface section
ns <- NS(id)
tagList(
sidebarLayout(
absolutePanel(id = "controls", class = "panel panel-default", fixed = TRUE,
draggable = TRUE, top = 250, left = "auto", right = 17, bottom = "auto",
width = 33... |
#relativt mått på kullar
library(dplyr)
library(tidyr)
library(readxl)
library(writexl)
library(lubridate)
kullar <- read_xlsx(path = "Lyor, kullar, gps-punkter, yta och avstånd/ALLA VALPLYOR HELAGS KORREKT 2000-2018.xlsx")
kullar<- as.data.frame(kullar)
head(kullar)
tot_kullar <- kullar %>%
group_by(Namn) %>%
... | /Relativt mått på kullar.R | no_license | torhanssonfrank/Den-selection | R | false | false | 3,478 | r | #relativt mått på kullar
library(dplyr)
library(tidyr)
library(readxl)
library(writexl)
library(lubridate)
kullar <- read_xlsx(path = "Lyor, kullar, gps-punkter, yta och avstånd/ALLA VALPLYOR HELAGS KORREKT 2000-2018.xlsx")
kullar<- as.data.frame(kullar)
head(kullar)
tot_kullar <- kullar %>%
group_by(Namn) %>%
... |
# this script makes the plots showing cumulative curves for pulmonary complications
# and 30-day mortality for several countries. A table is also generated giving cumulative quantiles
# for 1 and 2 year periods.
load("Computations") # loads output generated from "sim_model.R"
library(ggplot2)
library(gridExtra)
qs <-... | /combined_cumulative_plots_ggplot.R | no_license | jtkgithub/COVID19_surgery_risk | R | false | false | 6,113 | r | # this script makes the plots showing cumulative curves for pulmonary complications
# and 30-day mortality for several countries. A table is also generated giving cumulative quantiles
# for 1 and 2 year periods.
load("Computations") # loads output generated from "sim_model.R"
library(ggplot2)
library(gridExtra)
qs <-... |
testlist <- list(data = structure(c(4.73918917419577e-308, 5.88117562384501e-308, 4.58688053922028e-257, 9.53282412436824e-130, 9.53282412436824e-130, 9.53282412436824e-130, 9.53282412436824e-130, 9.53282412435301e-130, 9.53282385942128e-130, 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... | /biwavelet/inst/testfiles/rcpp_row_quantile/libFuzzer_rcpp_row_quantile/rcpp_row_quantile_valgrind_files/1610556487-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 529 | r | testlist <- list(data = structure(c(4.73918917419577e-308, 5.88117562384501e-308, 4.58688053922028e-257, 9.53282412436824e-130, 9.53282412436824e-130, 9.53282412436824e-130, 9.53282412436824e-130, 9.53282412435301e-130, 9.53282385942128e-130, 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... |
# test the input, output, and errors of my_t.test()
# load the penguins and gapminder data sets
my_data <- stats::na.omit(project3part1package::my_penguins)
my_data2 <- stats::na.omit(project3part1package::my_gapminder)
test_that("Equal outputs, two.sided", {
expect_equal(my_t.test(x = my_data$bill_depth_mm, alter... | /tests/testthat/test-my_t.R | no_license | thomson3uw/project3part1package | R | false | false | 5,740 | r | # test the input, output, and errors of my_t.test()
# load the penguins and gapminder data sets
my_data <- stats::na.omit(project3part1package::my_penguins)
my_data2 <- stats::na.omit(project3part1package::my_gapminder)
test_that("Equal outputs, two.sided", {
expect_equal(my_t.test(x = my_data$bill_depth_mm, alter... |
#*** zzz.R ***/
##
## AUTHOR: Arnost Komarek (my name in TeX: Arno\v{s}t Kom\'arek)
## arnost.komarek[AT]mff.cuni.cz
##
#* ********************************************************************************* */
.onAttach <- function(libname, pkgname)
#.First.lib <- function(libname, pkgname)
{
##libr... | /R/zzz.R | no_license | cran/mixAK | R | false | false | 996 | r | #*** zzz.R ***/
##
## AUTHOR: Arnost Komarek (my name in TeX: Arno\v{s}t Kom\'arek)
## arnost.komarek[AT]mff.cuni.cz
##
#* ********************************************************************************* */
.onAttach <- function(libname, pkgname)
#.First.lib <- function(libname, pkgname)
{
##libr... |
library(plotrix)
library(Cairo)
library(RSvgDevice)
source("extract_polyploid_clades.R")
source("reading_trees_polyploid_nodes.R")
source("analyse_results_tp.R")
return_diversification_function <- function(model, name){
print(name)
model <- model[[name]]
print(model$lamb_par)
print(model$mu_par)
if (name ... | /analyse_results_rpanda.R | no_license | sachalau/teleost-radiation | R | false | false | 4,325 | r |
library(plotrix)
library(Cairo)
library(RSvgDevice)
source("extract_polyploid_clades.R")
source("reading_trees_polyploid_nodes.R")
source("analyse_results_tp.R")
return_diversification_function <- function(model, name){
print(name)
model <- model[[name]]
print(model$lamb_par)
print(model$mu_par)
if (name ... |
summary.Binary.Logistic.Biplot <- function(object, Normal=TRUE, Latex=FALSE, Kable=FALSE, ...){
print("BINARY LOGISTIC BIPLOT")
print(paste("Type of Biplot : ", object$Type))
print(paste("Initial Configuration : ", object$InitialConfig))
print(paste("Method : ", object$Method))
print(paste("Rotation : ", o... | /R/summary.Binary.Logistic.Biplot.R | no_license | villardon/MultBiplotR | R | false | false | 1,400 | r | summary.Binary.Logistic.Biplot <- function(object, Normal=TRUE, Latex=FALSE, Kable=FALSE, ...){
print("BINARY LOGISTIC BIPLOT")
print(paste("Type of Biplot : ", object$Type))
print(paste("Initial Configuration : ", object$InitialConfig))
print(paste("Method : ", object$Method))
print(paste("Rotation : ", o... |
# Create a vector m of integers that starts at 32 and ends at 99.
m <- 32:99
# Determine the length of object m.
length(m)
# Create a vector x of integers that starts at 12 and ends at 73.
x <- 12:73
# Determine the length of object x.
length(x)
| /Chapter 3/Exercice6.r | no_license | Mifaou/Datacamp-HarvardX-PH125.1x | R | false | false | 250 | r | # Create a vector m of integers that starts at 32 and ends at 99.
m <- 32:99
# Determine the length of object m.
length(m)
# Create a vector x of integers that starts at 12 and ends at 73.
x <- 12:73
# Determine the length of object x.
length(x)
|
library(mixtools)
#setup parallel processing
library(doParallel)
cl<-makeCluster(8,outfile="");
registerDoParallel(cl)
features<-read.csv("scriptFFeaturesTrimmed1.csv")
features<-features[features$f0>0,]
features<-sample(features)
n<-nrow(features)
features.train<-features[1:floor(0.6*n),]
features.cv<-features[(floo... | /AnalysisAndModel/ranalysis/cvselectGMMdesignv.r | no_license | herwinvw/VisualProsody | R | false | false | 1,932 | r | library(mixtools)
#setup parallel processing
library(doParallel)
cl<-makeCluster(8,outfile="");
registerDoParallel(cl)
features<-read.csv("scriptFFeaturesTrimmed1.csv")
features<-features[features$f0>0,]
features<-sample(features)
n<-nrow(features)
features.train<-features[1:floor(0.6*n),]
features.cv<-features[(floo... |
library("umap")
library("ggpubr")
library("stringr")
library("reshape2")
library("ggplot2")
library("dplyr")
library("grid")
meta_info_maptor = read.table("~/MAPTor_NET/Misc/Meta_information.tsv",sep = "\t",header = T,stringsAsFactors = F)
rownames(meta_info_maptor) = meta_info_maptor$Sample
colnames(meta_info_maptor)... | /Scripts/Publication_plots.R | no_license | RaikOtto/Deko_Projekt | R | false | false | 10,819 | r | library("umap")
library("ggpubr")
library("stringr")
library("reshape2")
library("ggplot2")
library("dplyr")
library("grid")
meta_info_maptor = read.table("~/MAPTor_NET/Misc/Meta_information.tsv",sep = "\t",header = T,stringsAsFactors = F)
rownames(meta_info_maptor) = meta_info_maptor$Sample
colnames(meta_info_maptor)... |
x =arima.sim(n = 63, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488)),
sd = sqrt(0.1796))
plot(x)
fit = lm(x ~ 1)
ACF = acf(x)
ACF$acf
VAR = var(x)
T = length(x)
L = round(0.75 * T^(1/3))
var=var(x)
lol <- embed(x,L+1)
cov=numeric(3)
for(h in 1:L){
cov[h]=cov(lol[,4],lol[,4-h])
}
Sigmaxv=var+2*(... | /R/lollololoololl.R | no_license | andreaslillevangbech/M2-project | R | false | false | 567 | r | x =arima.sim(n = 63, list(ar = c(0.8897, -0.4858), ma = c(-0.2279, 0.2488)),
sd = sqrt(0.1796))
plot(x)
fit = lm(x ~ 1)
ACF = acf(x)
ACF$acf
VAR = var(x)
T = length(x)
L = round(0.75 * T^(1/3))
var=var(x)
lol <- embed(x,L+1)
cov=numeric(3)
for(h in 1:L){
cov[h]=cov(lol[,4],lol[,4-h])
}
Sigmaxv=var+2*(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/import.R
\name{import_module}
\alias{import_module}
\alias{\%digests\%}
\alias{\%imports\%}
\title{Import a Module.}
\usage{
import_module(name, url, ..., digest = NULL, force = FALSE)
}
\arguments{
\item{name}{A string (character vector of l... | /man/import_module.Rd | permissive | aclemen1/modulr | R | false | true | 2,764 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/import.R
\name{import_module}
\alias{import_module}
\alias{\%digests\%}
\alias{\%imports\%}
\title{Import a Module.}
\usage{
import_module(name, url, ..., digest = NULL, force = FALSE)
}
\arguments{
\item{name}{A string (character vector of l... |
# Course : CS 513
# First Name : Sowmya
# Last Name : Vijayakumar
# CWId: 10421665
#Naive Bayes Classifier for young people survey data
rm(list=ls())
#Read the input data file
response<-read.csv("/Users/sowmyav/Desktop/Fall2017/KDD/YoungPeopleSurveyProject/young-people-survey/responses_remove_categorical.csv... | /naive_bayes_with_correlation_matrix.R | no_license | dhavalaM/Data-analysis-and-classification-using-R | R | false | false | 2,396 | r | # Course : CS 513
# First Name : Sowmya
# Last Name : Vijayakumar
# CWId: 10421665
#Naive Bayes Classifier for young people survey data
rm(list=ls())
#Read the input data file
response<-read.csv("/Users/sowmyav/Desktop/Fall2017/KDD/YoungPeopleSurveyProject/young-people-survey/responses_remove_categorical.csv... |
library(tidyverse)
timings <- read_csv("timings.csv",
col_names=c("filtration","n_simplices","creation","reduction"),
skip=1)
timings
ggplot(timings, aes(x=n_simplices, y=reduction)) +
#geom_line(aes(x=n_simplices, y=creation)) +
geom_line() + geom_point() +
ggsave(... | /timings.R | no_license | dlozeve/topological-persistence | R | false | false | 357 | r | library(tidyverse)
timings <- read_csv("timings.csv",
col_names=c("filtration","n_simplices","creation","reduction"),
skip=1)
timings
ggplot(timings, aes(x=n_simplices, y=reduction)) +
#geom_line(aes(x=n_simplices, y=creation)) +
geom_line() + geom_point() +
ggsave(... |
#' Drop unused factor levels
#'
#' Function to drop empty factor levels in test data
#' (\href{https://stackoverflow.com/a/39495480/4185785}{source}).
#'
#' @param fit Model fit of class "glm".
#' @param test_data Data frame containing the test data.
#' @export
rm_lvls <- function(fit, test_data) {
test_data %>%
... | /R/utils.R | permissive | henckr/maidrr | R | false | false | 1,390 | r | #' Drop unused factor levels
#'
#' Function to drop empty factor levels in test data
#' (\href{https://stackoverflow.com/a/39495480/4185785}{source}).
#'
#' @param fit Model fit of class "glm".
#' @param test_data Data frame containing the test data.
#' @export
rm_lvls <- function(fit, test_data) {
test_data %>%
... |
#Volvamos al béisbol.
#En un ejemplo anterior, estimamos las líneas de regresión para predecir carrerass por bases por bolas y diferentes estratos de jonrones.
#Primero construimos un marco de datos similar a esto.
library(dslabs)
library(tidyverse)
library(Lahman)
data("Teams")
dat <- Teams %>% filter(yearID %in%... | /HC_Advanced_dplyr.R | no_license | wparedesgt/Regresiones | R | false | false | 3,161 | r | #Volvamos al béisbol.
#En un ejemplo anterior, estimamos las líneas de regresión para predecir carrerass por bases por bolas y diferentes estratos de jonrones.
#Primero construimos un marco de datos similar a esto.
library(dslabs)
library(tidyverse)
library(Lahman)
data("Teams")
dat <- Teams %>% filter(yearID %in%... |
## Set working directory to folder with the excel sheet
setwd("C:/Users/Pardis/OneDrive - Danmarks Tekniske Universitet/DTU/Bachelorprojekt/2) AS16 + S26 experiments/Cultures on solid medium/Co-culture picture with bars (day 2)/Final_pyphe_analysis/pyphe_quant")
## Import data from Pyphe .csv file
library("readxl"... | /R_pyphe_CIRCULARITY.R | no_license | PardisSarafraz/Bachelor-Thesis-2021 | R | false | false | 16,686 | r | ## Set working directory to folder with the excel sheet
setwd("C:/Users/Pardis/OneDrive - Danmarks Tekniske Universitet/DTU/Bachelorprojekt/2) AS16 + S26 experiments/Cultures on solid medium/Co-culture picture with bars (day 2)/Final_pyphe_analysis/pyphe_quant")
## Import data from Pyphe .csv file
library("readxl"... |
td <- tempdir()
tf <- tempfile(tmpdir=td,fileext=".zip")
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl, tf)
dateDownloaded <- date()
powerdata<-unzip(tf)
powerdata2<-read.table(powerdata,skip=66638,nrows=2879,sep=";",na.strings="?",col.names=c("... | /plot3.r | no_license | bendkasia/ExData_Plotting1 | R | false | false | 1,099 | r | td <- tempdir()
tf <- tempfile(tmpdir=td,fileext=".zip")
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(fileUrl, tf)
dateDownloaded <- date()
powerdata<-unzip(tf)
powerdata2<-read.table(powerdata,skip=66638,nrows=2879,sep=";",na.strings="?",col.names=c("... |
library(shiny)
shinyUI(fluidPage(
# Application title
titlePanel("Which is the Good Preictor of Fertility"),
sidebarLayout(
sidebarPanel(
helpText("Have a look at swiss data using '?swiss' on Rstudio Console"),
helpText("Here we are looking for the best pre... | /ui.R | no_license | nuttyboy/DevelopingDataProducts | R | false | false | 924 | r |
library(shiny)
shinyUI(fluidPage(
# Application title
titlePanel("Which is the Good Preictor of Fertility"),
sidebarLayout(
sidebarPanel(
helpText("Have a look at swiss data using '?swiss' on Rstudio Console"),
helpText("Here we are looking for the best pre... |
data1 <- data.frame()
data2 <- data.frame()
# data1 = read.csv("CSVdata_journal/example2.csv", sep=",", header=TRUE)
# data2 = read.csv("CSVdata_journal/example1.csv", sep=",", header=TRUE)
data1 = read.csv("CSVdata_journal/Qt2.csv", sep=",", header=TRUE)
data2 = read.csv("CSVdata_journal/expertiseLevel_qt.csv", sep=",... | /R_program/mergeCSV.R | no_license | Ikuyadeu/comment_research | R | false | false | 629 | r | data1 <- data.frame()
data2 <- data.frame()
# data1 = read.csv("CSVdata_journal/example2.csv", sep=",", header=TRUE)
# data2 = read.csv("CSVdata_journal/example1.csv", sep=",", header=TRUE)
data1 = read.csv("CSVdata_journal/Qt2.csv", sep=",", header=TRUE)
data2 = read.csv("CSVdata_journal/expertiseLevel_qt.csv", sep=",... |
##
# Infant_Age_Weight_Dist.R
#
# Learning to use R Syntax.
# Examples referenced from R IN ACTION by Robert I. Kabacoff
#
# Distribution of 10 infant weights and their relationship to age.
# Initialize Age and Weight Vectors
age <- c(1, 3, 5, 2, 11, 9, 3, 9, 12, 3)
weight <- c(4.4, 5.3, 7.2, 5.2, 8.5, 7.3, 6.0, 10.4... | /Practice/Infant_Age_Weight_Dist.R | no_license | Ehizeme/DataAnalysis | R | false | false | 522 | r | ##
# Infant_Age_Weight_Dist.R
#
# Learning to use R Syntax.
# Examples referenced from R IN ACTION by Robert I. Kabacoff
#
# Distribution of 10 infant weights and their relationship to age.
# Initialize Age and Weight Vectors
age <- c(1, 3, 5, 2, 11, 9, 3, 9, 12, 3)
weight <- c(4.4, 5.3, 7.2, 5.2, 8.5, 7.3, 6.0, 10.4... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/fortify_cluster.R
\name{fortify.kmeans}
\alias{fortify.kmeans}
\title{Convert cluster instances to \code{data.frame}}
\usage{
\method{fortify}{kmeans}(model, data = NULL, ...)
}
\arguments{
\item{model}{Clustered instance}
\item{data... | /man/fortify.kmeans.Rd | no_license | LionelGeo/ggfortify | R | false | false | 705 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/fortify_cluster.R
\name{fortify.kmeans}
\alias{fortify.kmeans}
\title{Convert cluster instances to \code{data.frame}}
\usage{
\method{fortify}{kmeans}(model, data = NULL, ...)
}
\arguments{
\item{model}{Clustered instance}
\item{data... |
corr <- function(directory, threshold = 0) {
corr_data <- numeric(0)
for (i in 1:332) {
file_csv <- ''
if (i < 10) {
file_csv <- '00'
} else if (i < 100) {
file_csv <- '0'
}
file_csv <- paste(file_csv, as.character(i), s... | /Week_02/corr.R | no_license | stevanradanovic/coursera__r_programming | R | false | false | 719 | r | corr <- function(directory, threshold = 0) {
corr_data <- numeric(0)
for (i in 1:332) {
file_csv <- ''
if (i < 10) {
file_csv <- '00'
} else if (i < 100) {
file_csv <- '0'
}
file_csv <- paste(file_csv, as.character(i), s... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{xlsx_write_sheet}
\alias{xlsx_write_sheet}
\title{Samantha Rhoads's function to write a dataframe as an Excel sheet to currently existing Excel file (uses `XLConnect` package but not putting in dependencies or referencing it... | /man/xlsx_write_sheet.Rd | no_license | srhoads/srhoads | R | false | true | 782 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/functions.R
\name{xlsx_write_sheet}
\alias{xlsx_write_sheet}
\title{Samantha Rhoads's function to write a dataframe as an Excel sheet to currently existing Excel file (uses `XLConnect` package but not putting in dependencies or referencing it... |
## Read data from file
setAs("character","myDate", function(from) as.Date(from, format="%d/%m/%Y"))
powercons <- read.csv("./data/household_power_consumption.txt", sep = ";", stringsAsFactors=F,
na.strings = "?",
colClasses = c("myDate", "character", rep("numeric",7)))
##... | /plot3.R | no_license | mariaruiz124/ExData_Plotting1 | R | false | false | 1,203 | r | ## Read data from file
setAs("character","myDate", function(from) as.Date(from, format="%d/%m/%Y"))
powercons <- read.csv("./data/household_power_consumption.txt", sep = ";", stringsAsFactors=F,
na.strings = "?",
colClasses = c("myDate", "character", rep("numeric",7)))
##... |
## These functions work together to handle a special "matrix" ## (similar to a
## new class that has a inverted matrix attribute). makeCacheMatrix creates the
## matrix with its functions (get,set,getinv and setinv) and cacheSolve is used
## for calculate and save in the cache the inverse of the matrix.
makeCacheMa... | /cachematrix.R | no_license | ferchaure/ProgrammingAssignment2 | R | false | false | 1,152 | r | ## These functions work together to handle a special "matrix" ## (similar to a
## new class that has a inverted matrix attribute). makeCacheMatrix creates the
## matrix with its functions (get,set,getinv and setinv) and cacheSolve is used
## for calculate and save in the cache the inverse of the matrix.
makeCacheMa... |
testlist <- list(Beta = 0, CVLinf = -2.43245449513939e-196, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = 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), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615827884-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 487 | r | testlist <- list(Beta = 0, CVLinf = -2.43245449513939e-196, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = 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), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.9794... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.