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 |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{plot_ss}
\alias{plot_ss}
\title{plot_ss}
\usage{
plot_ss(time, fit, add = FALSE, ...)
}
\arguments{
\item{time}{time axis values}
\item{fit}{fit_dlm output object}
\item{add}{add lines to current plot. Default is FALSE}
\item... | /man/plot_ss.Rd | permissive | EcoForecast/ecoforecastR | R | false | true | 445 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{plot_ss}
\alias{plot_ss}
\title{plot_ss}
\usage{
plot_ss(time, fit, add = FALSE, ...)
}
\arguments{
\item{time}{time axis values}
\item{fit}{fit_dlm output object}
\item{add}{add lines to current plot. Default is FALSE}
\item... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parse_files.R
\name{ApeTime}
\alias{ApeTime}
\title{Read modification time from "ape" Nexus file}
\usage{
ApeTime(filepath, format = "double")
}
\arguments{
\item{filepath}{Character string specifying path to the file.}
\item{format}{Format ... | /man/ApeTime.Rd | no_license | ms609/TreeTools | R | false | true | 866 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/parse_files.R
\name{ApeTime}
\alias{ApeTime}
\title{Read modification time from "ape" Nexus file}
\usage{
ApeTime(filepath, format = "double")
}
\arguments{
\item{filepath}{Character string specifying path to the file.}
\item{format}{Format ... |
DESeq2RawCountAnalysis <- function(path.prefix,
independent.variable,
case.group,
control.group,
DESeq2.pval,
DESeq2.log2FC) {
message("\n\u261... | /R/DE_DESeq2_analysis.R | no_license | xtmgah/RNASeqR | R | false | false | 11,601 | r | DESeq2RawCountAnalysis <- function(path.prefix,
independent.variable,
case.group,
control.group,
DESeq2.pval,
DESeq2.log2FC) {
message("\n\u261... |
### clean up raw restaurant data exported from big purple
getwd()
setwd("C:/Users/wue04/OneDrive - NYU Langone Health/tacobell")
current_warning <- getOption("warn")
options(warn = -1)
#options(warn = current_warning)
### install and load libraries ----
library(tools)
library(dplyr)
#install.packages("tidyr")
librar... | /clean-restaurant-data.R | no_license | eriliawu/tacobell | R | false | false | 29,403 | r | ### clean up raw restaurant data exported from big purple
getwd()
setwd("C:/Users/wue04/OneDrive - NYU Langone Health/tacobell")
current_warning <- getOption("warn")
options(warn = -1)
#options(warn = current_warning)
### install and load libraries ----
library(tools)
library(dplyr)
#install.packages("tidyr")
librar... |
toto=read.dna("a.fas",format="fasta")
toto=as.character(toto)
toto[,2:20] #[1] "t" "g" "t" "t" "g" "g" "g" "g" "a" "a" "a" "t" "g" "c" "t" "t" "g" "a" "c"
str(as.alignment(toto))
#List of 4
#$ nb : num [1:603] NA NA NA NA NA NA NA NA NA NA ...
#$ nam: NULL
#$ seq: NULL
#$ com: NULL
#- attr(*, "class")= chr "alignmen... | /init_toto.R | no_license | toto3/statR | R | false | false | 626 | r | toto=read.dna("a.fas",format="fasta")
toto=as.character(toto)
toto[,2:20] #[1] "t" "g" "t" "t" "g" "g" "g" "g" "a" "a" "a" "t" "g" "c" "t" "t" "g" "a" "c"
str(as.alignment(toto))
#List of 4
#$ nb : num [1:603] NA NA NA NA NA NA NA NA NA NA ...
#$ nam: NULL
#$ seq: NULL
#$ com: NULL
#- attr(*, "class")= chr "alignmen... |
cal <- function(filename, repetitions=2, spliting=1, file=TRUE, path="~/qgen/") {
if (file){
dir.create(path=path, showWarnings = FALSE, recursive = TRUE)
## which file to create
outputCAL <- paste(path, "CALfile.r", sep="")
}
## which group
group <- "group1"
if (substring(filename, first=7, last=... | /R/cal.R | no_license | cran/qgen | R | false | false | 7,951 | r | cal <- function(filename, repetitions=2, spliting=1, file=TRUE, path="~/qgen/") {
if (file){
dir.create(path=path, showWarnings = FALSE, recursive = TRUE)
## which file to create
outputCAL <- paste(path, "CALfile.r", sep="")
}
## which group
group <- "group1"
if (substring(filename, first=7, last=... |
#universal temp obs cleaning
clean_universal <- function(df, base_model_cfg, max_depth) {
cfg <- read_yaml(base_model_cfg)
df_clean <- df %>% filter(temp < cfg$max_temp & Depth < max_depth &
(DateTime > as.Date(cfg$nml_params$start) & DateTime < as.Date(cfg$nml_params$stop))) %>%
filter... | /3_regroup_data/src/regroup.R | no_license | wdwatkins/pgml_temperature_prediction | R | false | false | 2,107 | r | #universal temp obs cleaning
clean_universal <- function(df, base_model_cfg, max_depth) {
cfg <- read_yaml(base_model_cfg)
df_clean <- df %>% filter(temp < cfg$max_temp & Depth < max_depth &
(DateTime > as.Date(cfg$nml_params$start) & DateTime < as.Date(cfg$nml_params$stop))) %>%
filter... |
library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/AvgRank/soft_tissue.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.04,family="gaussian",standardize=TRUE)
sink('./soft_tissue_019.txt',append... | /Model/EN/AvgRank/soft_tissue/soft_tissue_019.R | no_license | esbgkannan/QSMART | R | false | false | 356 | r | library(glmnet)
mydata = read.table("../../../../TrainingSet/FullSet/AvgRank/soft_tissue.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.04,family="gaussian",standardize=TRUE)
sink('./soft_tissue_019.txt',append... |
# On charge la base de donnees initiale
setwd("C:/Users/Kodjo/Downloads/code/code")
donnees <- read.csv("donnees.csv", sep=";", stringsAsFactors=FALSE)
numcol <- ncol(donnees)
numrow <- nrow(donnees)
# On en fait une copie sur laquelle on va travailler
donnees1 <- donnees
# On supprime les colonnes comportant des d... | /1_pretraitement.R | no_license | raphaelgraffm/projet_stats | R | false | false | 908 | r | # On charge la base de donnees initiale
setwd("C:/Users/Kodjo/Downloads/code/code")
donnees <- read.csv("donnees.csv", sep=";", stringsAsFactors=FALSE)
numcol <- ncol(donnees)
numrow <- nrow(donnees)
# On en fait une copie sur laquelle on va travailler
donnees1 <- donnees
# On supprime les colonnes comportant des d... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/facebook.R
\name{fb_accounts}
\alias{fb_accounts}
\title{Facebook Ad Accounts}
\usage{
fb_accounts(
token,
business_id = "904189322962915",
type = c("owned", "client"),
api_version = "v3.3"
)
}
\arguments{
\item{token}{Character. This... | /man/fb_accounts.Rd | no_license | i-Developers/lares | R | false | true | 1,485 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/facebook.R
\name{fb_accounts}
\alias{fb_accounts}
\title{Facebook Ad Accounts}
\usage{
fb_accounts(
token,
business_id = "904189322962915",
type = c("owned", "client"),
api_version = "v3.3"
)
}
\arguments{
\item{token}{Character. This... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fast_extract.R
\name{fast_extract}
\alias{fast_extract}
\alias{fast_extract,Raster,SpatialLines-method}
\alias{fast_extract,Raster,SpatialPoints-method}
\alias{fast_extract,Raster,SpatialPolygons-method}
\title{Fast extract}
\usage{
\S4method... | /man/fast_extract.Rd | no_license | IsaakBM/prioritizr | R | false | true | 2,924 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fast_extract.R
\name{fast_extract}
\alias{fast_extract}
\alias{fast_extract,Raster,SpatialLines-method}
\alias{fast_extract,Raster,SpatialPoints-method}
\alias{fast_extract,Raster,SpatialPolygons-method}
\title{Fast extract}
\usage{
\S4method... |
CO2 <- read.csv(url("http://cdiac.ornl.gov/ftp/ndp030/CSV-FILES/global.1751_2011.csv"),header = FALSE, skip = 2)
names(CO2) <- c("Year","Total carbon emissions from fossil fuel consumption and cement production (million metric tons of C)", "Carbon emissions from gas fuel consumption", "Carbon emissions from liquid fue... | /CO2.R | no_license | spicykal/Climate-Change | R | false | false | 699 | r | CO2 <- read.csv(url("http://cdiac.ornl.gov/ftp/ndp030/CSV-FILES/global.1751_2011.csv"),header = FALSE, skip = 2)
names(CO2) <- c("Year","Total carbon emissions from fossil fuel consumption and cement production (million metric tons of C)", "Carbon emissions from gas fuel consumption", "Carbon emissions from liquid fue... |
#' ercotr.
#'
#' This is a package for ERCOT colors.
#'
#' @name ercotr
#' @docType package
NULL
| /R/ercotr-package.r | no_license | tonyelhabr/ercotr | R | false | false | 97 | r | #' ercotr.
#'
#' This is a package for ERCOT colors.
#'
#' @name ercotr
#' @docType package
NULL
|
require(xml2) ### XML library to write hilltop XML
require(dplyr) ### dply library to manipulate table joins on dataframes
require(RCurl)
library(parallel)
library(doParallel)
setwd("H:/ericg/16666LAWA/LAWA2021/WaterQuality")
agency='hrc'
translate=read.table("H:/ericg/16666LAWA/LAWA2021/WaterQua... | /WaterQuality/Scripts/loadHRClistSingleCore.R | no_license | lukefullard/LAWA2021 | R | false | false | 10,843 | r |
require(xml2) ### XML library to write hilltop XML
require(dplyr) ### dply library to manipulate table joins on dataframes
require(RCurl)
library(parallel)
library(doParallel)
setwd("H:/ericg/16666LAWA/LAWA2021/WaterQuality")
agency='hrc'
translate=read.table("H:/ericg/16666LAWA/LAWA2021/WaterQua... |
rm(list = ls())
# INTRO ------------------------------------------------------------------------
# __ list of required packages ====
toInstall <- c("extrafont")
# __ verify and install uninstalled packages ====
for (pkg in toInstall) {
if (!require(pkg, character.only = TRUE)) {
install.packages(pkg, re... | /code/R/fig21.R | permissive | GOAL-Robots/CNR_140618_GDHL | R | false | false | 692 | r | rm(list = ls())
# INTRO ------------------------------------------------------------------------
# __ list of required packages ====
toInstall <- c("extrafont")
# __ verify and install uninstalled packages ====
for (pkg in toInstall) {
if (!require(pkg, character.only = TRUE)) {
install.packages(pkg, re... |
library(ggplot2)
library(dplyr)
library(tidyr)
library(cowplot)
library(sportcolors)
get_quarter <- function(date){
month <- gsub("(.*) \\d{1,2}, \\d{4}", "\\1", date)
quarter <- NA
if(month %in% c("January", "February", "March")){
quarter <- 1
} else if(month %in% c("April", "May", "June")){
quarter <- 2
... | /code/build_figure1.R | permissive | aleimba/Schloss_PrePrints_mBio_2017 | R | false | false | 7,410 | r | library(ggplot2)
library(dplyr)
library(tidyr)
library(cowplot)
library(sportcolors)
get_quarter <- function(date){
month <- gsub("(.*) \\d{1,2}, \\d{4}", "\\1", date)
quarter <- NA
if(month %in% c("January", "February", "March")){
quarter <- 1
} else if(month %in% c("April", "May", "June")){
quarter <- 2
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/show_if.R
\name{show_if}
\alias{show_if}
\title{show a chunk of a report if a logical condition is met}
\usage{
show_if(x)
}
\arguments{
\item{x}{a logical value}
}
\description{
start showing a chunk of a report if a logical condition is met... | /man/show_if.Rd | no_license | lbraglia/lbmisc | R | false | true | 442 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/show_if.R
\name{show_if}
\alias{show_if}
\title{show a chunk of a report if a logical condition is met}
\usage{
show_if(x)
}
\arguments{
\item{x}{a logical value}
}
\description{
start showing a chunk of a report if a logical condition is met... |
library(ggplot2)
library(DT)
library(cluster)
library(ggdendro)
shinyServer(function(input, output) {
############################
# Output
############################
output$table <- DT::renderDataTable(ImportedData(),selection = list(target='column'))
output$plot = renderPlot({
... | /server.R | no_license | Ry87/ClusteringTool | R | false | false | 3,238 | r | library(ggplot2)
library(DT)
library(cluster)
library(ggdendro)
shinyServer(function(input, output) {
############################
# Output
############################
output$table <- DT::renderDataTable(ImportedData(),selection = list(target='column'))
output$plot = renderPlot({
... |
library("fNonlinear")
library("R.matlab")
library("tseriesChaos")
library("fractal")
library("fractaldim")
library("tseriesChaos")
library("fields")
library("FNN")
library("synchrony")
noOfNeighbors<-5
noOfSeconds <- 1
seriesNo<- 2
noOftrainingValues <-250
noOfIctalFiles <- 171
noOfInterictalFiles <-1147
frequency <- ... | /V4_analysis.R | no_license | root2891/Kaggle-EEG | R | false | false | 7,214 | r | library("fNonlinear")
library("R.matlab")
library("tseriesChaos")
library("fractal")
library("fractaldim")
library("tseriesChaos")
library("fields")
library("FNN")
library("synchrony")
noOfNeighbors<-5
noOfSeconds <- 1
seriesNo<- 2
noOftrainingValues <-250
noOfIctalFiles <- 171
noOfInterictalFiles <-1147
frequency <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/symmetry_plot.R
\name{symmetry_plot}
\alias{symmetry_plot}
\title{Function creates a ggplot2 based symmetry plot from a vector of numeric values}
\usage{
symmetry_plot(
df,
var_name,
position = position_jitter(width = 0, height = 0),
... | /man/symmetry_plot.Rd | permissive | deandevl/RplotterPkg | R | false | true | 5,920 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/symmetry_plot.R
\name{symmetry_plot}
\alias{symmetry_plot}
\title{Function creates a ggplot2 based symmetry plot from a vector of numeric values}
\usage{
symmetry_plot(
df,
var_name,
position = position_jitter(width = 0, height = 0),
... |
# Setup ----
source("setup.R")
# Controls ----
day_start = as.Date("2020-02-15")
day_data = as.Date("2020-02-16")
day_tmax = as.Date("2020-03-05")
day_quarantine = as.Date("2020-02-20")
# Population data ----
# Load surveillance data ----
data_south_korea = read.csv("data/south-korea/patient.csv",stringsAsFactors =... | /data/south-korea/data_management_south_korea.R | no_license | zhouyifan233/covid_adjusted_cfr | R | false | false | 1,613 | r | # Setup ----
source("setup.R")
# Controls ----
day_start = as.Date("2020-02-15")
day_data = as.Date("2020-02-16")
day_tmax = as.Date("2020-03-05")
day_quarantine = as.Date("2020-02-20")
# Population data ----
# Load surveillance data ----
data_south_korea = read.csv("data/south-korea/patient.csv",stringsAsFactors =... |
tts_ITRI <- function(content,
speed=0,
volume=100,
speaker="Bruce",
destfile=tempfile("Rtts", fileext = ".wav")){
# check-1:
#if the speaker argument meet the requirement
if(!speaker %in% c("Bruce", "Theresa", "Angela",
... | /Rtts/R/tts_ITRI.R | no_license | ingted/R-Examples | R | false | false | 1,986 | r | tts_ITRI <- function(content,
speed=0,
volume=100,
speaker="Bruce",
destfile=tempfile("Rtts", fileext = ".wav")){
# check-1:
#if the speaker argument meet the requirement
if(!speaker %in% c("Bruce", "Theresa", "Angela",
... |
## Please view data_preparation.R when evaluating the source for each plot*.r
## file. It contains the code used to read in and clean the data set used
## when generating these graphs
source("./data_preparation.R")
## Set up png graphics device?
png("plot1.png", width=480, height=480)
## Draw the histogram to the gr... | /plot1.R | no_license | awfuldynne/ExData_Plotting1 | R | false | false | 526 | r | ## Please view data_preparation.R when evaluating the source for each plot*.r
## file. It contains the code used to read in and clean the data set used
## when generating these graphs
source("./data_preparation.R")
## Set up png graphics device?
png("plot1.png", width=480, height=480)
## Draw the histogram to the gr... |
# libs
install.packages("htmltab", "dplyr", "ggplot2")
library(htmltab)
library(dplyr)
library(ggplot2)
library(scales)
# load dataset https://en.wikipedia.org/wiki/Deloitte_Football_Money_League
for (i in c(2,4,7,9,11,13,15)) {
temp <- paste("tbl",i,sep = "")
table <- htmltab("http://en.wikipedia.org/wiki/Deloitt... | /src/script.R | no_license | goloveparametry/moneyleague | R | false | false | 3,018 | r | # libs
install.packages("htmltab", "dplyr", "ggplot2")
library(htmltab)
library(dplyr)
library(ggplot2)
library(scales)
# load dataset https://en.wikipedia.org/wiki/Deloitte_Football_Money_League
for (i in c(2,4,7,9,11,13,15)) {
temp <- paste("tbl",i,sep = "")
table <- htmltab("http://en.wikipedia.org/wiki/Deloitt... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary.STM.R
\name{summary.STM}
\alias{print.STM}
\alias{summary.STM}
\title{Summary Function for the STM objects}
\usage{
\method{summary}{STM}(object, ...)
}
\arguments{
\item{object}{An STM object.}
\item{\dots}{Additional arguments affe... | /man/summary.STM.Rd | no_license | bryant1410/stm | R | false | true | 510 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary.STM.R
\name{summary.STM}
\alias{print.STM}
\alias{summary.STM}
\title{Summary Function for the STM objects}
\usage{
\method{summary}{STM}(object, ...)
}
\arguments{
\item{object}{An STM object.}
\item{\dots}{Additional arguments affe... |
library(XML)
library(rvest)
text <- NULL; newstitle <- NULL; newspapername <- NULL
url<- "https://news.daum.net/ranking/popular"
text <- read_html(url)
for (index in 1:50){
node <- html_node(text, paste0("#mArticle > div.rank_news > ul.list_news2 > li:nth-child(", index,") > div.cont_thumb > strong > a"))
title <... | /Rexam/lab8.R | no_license | HWANG593/R_Programming | R | false | false | 1,153 | r | library(XML)
library(rvest)
text <- NULL; newstitle <- NULL; newspapername <- NULL
url<- "https://news.daum.net/ranking/popular"
text <- read_html(url)
for (index in 1:50){
node <- html_node(text, paste0("#mArticle > div.rank_news > ul.list_news2 > li:nth-child(", index,") > div.cont_thumb > strong > a"))
title <... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convenience.R
\name{tri}
\alias{tri}
\title{Lower/Upper Triangular Matrix}
\usage{
tri(nrow, ncol = nrow, k = 0, diag = TRUE)
}
\arguments{
\item{nrow}{The desired number of rows.}
\item{ncol}{The desired number of columns.}
\item{k}{The su... | /man/tri.Rd | no_license | bgreenwell/ramify | R | false | true | 716 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convenience.R
\name{tri}
\alias{tri}
\title{Lower/Upper Triangular Matrix}
\usage{
tri(nrow, ncol = nrow, k = 0, diag = TRUE)
}
\arguments{
\item{nrow}{The desired number of rows.}
\item{ncol}{The desired number of columns.}
\item{k}{The su... |
## read data
data<-read.table("household_power_consumption.txt",header=TRUE,sep=";",na.strings='?')
## select subdata with dates 2007-02-01 and 2007-02-02
subdata<-data[data$Date=='1/2/2007'|data$Date=='2/2/2007',]
## convert to numeric data
subdata$Sub_metering_1 <- as.numeric(subdata$Sub_metering_1)
subdata$Sub_met... | /plot3.R | no_license | yinawei/ExData_Plotting1 | R | false | false | 1,086 | r | ## read data
data<-read.table("household_power_consumption.txt",header=TRUE,sep=";",na.strings='?')
## select subdata with dates 2007-02-01 and 2007-02-02
subdata<-data[data$Date=='1/2/2007'|data$Date=='2/2/2007',]
## convert to numeric data
subdata$Sub_metering_1 <- as.numeric(subdata$Sub_metering_1)
subdata$Sub_met... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tbackfit.R
\name{rescale_factors}
\alias{rescale_factors}
\title{Rescale factors so some don't get too big.}
\usage{
rescale_factors(x)
}
\arguments{
\item{x}{A list of vectors.}
}
\description{
Rescale factors so some don't get too big.
}
\a... | /man/rescale_factors.Rd | no_license | kkdey/flashr | R | false | true | 343 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tbackfit.R
\name{rescale_factors}
\alias{rescale_factors}
\title{Rescale factors so some don't get too big.}
\usage{
rescale_factors(x)
}
\arguments{
\item{x}{A list of vectors.}
}
\description{
Rescale factors so some don't get too big.
}
\a... |
### Power Analyses for Mediation Model
library(bmem) ### install.packages("bmem")
# model specification
sad_model_power <- 'phq_total ~ cp*masq_pa + start(-.16)*masq_pa
phq_total ~ cn*masq_na + start(.49)*masq_na
reminiscing ~ a1*masq_pa + start(.39)*masq_pa
... | /R/Power_Analysis.R | no_license | ikahrilas/Affectivity-Depression-Analyses | R | false | false | 2,149 | r | ### Power Analyses for Mediation Model
library(bmem) ### install.packages("bmem")
# model specification
sad_model_power <- 'phq_total ~ cp*masq_pa + start(-.16)*masq_pa
phq_total ~ cn*masq_na + start(.49)*masq_na
reminiscing ~ a1*masq_pa + start(.39)*masq_pa
... |
test_that("c works", {
expect_equal(fib_c(20), 6765)
})
test_that("rust works", {
expect_equal(fib_rust(20), 6765)
})
test_that("asc works", {
expect_equal(fib_assemblyscript(20), 6765)
})
test_that("go works", {
expect_equal(fib_go(20), 6765)
})
| /tests/testthat/test-fib.R | permissive | dirkschumacher/polyglotr | R | false | false | 259 | r | test_that("c works", {
expect_equal(fib_c(20), 6765)
})
test_that("rust works", {
expect_equal(fib_rust(20), 6765)
})
test_that("asc works", {
expect_equal(fib_assemblyscript(20), 6765)
})
test_that("go works", {
expect_equal(fib_go(20), 6765)
})
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/append_to_stream.R
\name{append_data_frame_to_stream}
\alias{append_data_frame_to_stream}
\title{Append an R data frame to a data.world stream.}
\usage{
append_data_frame_to_stream(
owner_id,
dataset_id,
stream_id,
data_frame,
retry... | /man/append_data_frame_to_stream.Rd | permissive | datadotworld/dwapi-r | R | false | true | 1,572 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/append_to_stream.R
\name{append_data_frame_to_stream}
\alias{append_data_frame_to_stream}
\title{Append an R data frame to a data.world stream.}
\usage{
append_data_frame_to_stream(
owner_id,
dataset_id,
stream_id,
data_frame,
retry... |
# PharmaTrace Supply Chain Information Network API
#
# The PharmaTrace SCIN API provides network members a resource and process oriented access to the blockchain backed market and inventory information. It represents a layer of abstraction above the Hyperledger network to facilitate a business focused development of cl... | /R/Pharmaceutical.r | no_license | Pharmatrace/rPtApiClient | R | false | false | 5,453 | r | # PharmaTrace Supply Chain Information Network API
#
# The PharmaTrace SCIN API provides network members a resource and process oriented access to the blockchain backed market and inventory information. It represents a layer of abstraction above the Hyperledger network to facilitate a business focused development of cl... |
library(ProjectTemplate)
load.project()
panel <- "Treg"
path_cytotrol <- "/loc/no-backup/ramey/Cytotrol"
path_FCS_files <- "/loc/no-backup/ramey/Cytotrol/Treg FCS files/"
path_workspace <- "/loc/no-backup/ramey/Cytotrol/XML/CA_CytoTrol Treg.xml"
# These are the markers that we will keep after the data have been prepr... | /munge/1-treg-preprocess.r | no_license | gfinak/Cytotrol | R | false | false | 2,213 | r | library(ProjectTemplate)
load.project()
panel <- "Treg"
path_cytotrol <- "/loc/no-backup/ramey/Cytotrol"
path_FCS_files <- "/loc/no-backup/ramey/Cytotrol/Treg FCS files/"
path_workspace <- "/loc/no-backup/ramey/Cytotrol/XML/CA_CytoTrol Treg.xml"
# These are the markers that we will keep after the data have been prepr... |
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source("../../../scripts/h2o-r-test-setup.R")
check.verify.parameters.slot <- function() {
Log.info("Getting data...")
iris.hex <- h2o.uploadFile( locate("smalldata/iris/iris.csv"))
Log.info("Create and and duplicate...")
iri... | /h2o-r/tests/testdir_algos/kmeans/runit_kmeans_parameters.R | permissive | h2oai/h2o-3 | R | false | false | 1,083 | r | setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f")))
source("../../../scripts/h2o-r-test-setup.R")
check.verify.parameters.slot <- function() {
Log.info("Getting data...")
iris.hex <- h2o.uploadFile( locate("smalldata/iris/iris.csv"))
Log.info("Create and and duplicate...")
iri... |
library(tidyverse)
dplot = mpg %>%
mutate(car = str_to_title(sprintf("%s %s", manufacturer, model))) %>%
group_by(car) %>%
summarise(hwy = mean(hwy)) %>%
mutate(
car = fct_reorder(car, hwy)
)
p1 = ggplot(data=dplot) +
geom_point(aes(x=hwy, y=car), shape = 21) +
geom_text(aes(x=hwy, y=car, label = ca... | /session-03-activities-solultion.R | no_license | laurarago/statprog-course | R | false | false | 1,418 | r | library(tidyverse)
dplot = mpg %>%
mutate(car = str_to_title(sprintf("%s %s", manufacturer, model))) %>%
group_by(car) %>%
summarise(hwy = mean(hwy)) %>%
mutate(
car = fct_reorder(car, hwy)
)
p1 = ggplot(data=dplot) +
geom_point(aes(x=hwy, y=car), shape = 21) +
geom_text(aes(x=hwy, y=car, label = ca... |
#----------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you unde... | /RRBS-toolkit/Bismark_methylation_call/quality_control.R | permissive | FAANG/comm-methylation | R | false | false | 11,742 | r | #----------------------------------------------------------------
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you unde... |
rm(list=ls())
library(randomForest)
source('dataset.R')
LoadAdultDataset()
str(adult)
str(adult.test)
# Drop NA's from train dataset
a <- adult[complete.cases(adult), ]
a <- na.roughfix(a)
# Drop NA's from test dataset
at <- adult.test[complete.cases(adult.test), ]
at <- na.roughfix(at)
# Group the train and test d... | /adult_random_forest.R | no_license | rafael2reis/ml-adult | R | false | false | 1,794 | r | rm(list=ls())
library(randomForest)
source('dataset.R')
LoadAdultDataset()
str(adult)
str(adult.test)
# Drop NA's from train dataset
a <- adult[complete.cases(adult), ]
a <- na.roughfix(a)
# Drop NA's from test dataset
at <- adult.test[complete.cases(adult.test), ]
at <- na.roughfix(at)
# Group the train and test d... |
#!/usr/bin/env Rscript
#methylKit.R
##############################################
#### for installing the package on TACC: #####
##############################################
# #(only needs to be done once)
# source("https://bioconductor.org/biocLite.R")
# myTaccRLib="/home1/02260/grovesd/R/x86_64-pc-linux-gnu-librar... | /processing_scripts/methylKitWindows.R | no_license | Groves-Dixon-Matz-laboratory/benchmarking_coral_methylation | R | false | false | 7,897 | r | #!/usr/bin/env Rscript
#methylKit.R
##############################################
#### for installing the package on TACC: #####
##############################################
# #(only needs to be done once)
# source("https://bioconductor.org/biocLite.R")
# myTaccRLib="/home1/02260/grovesd/R/x86_64-pc-linux-gnu-librar... |
library(s2dverification)
library(multiApply) # nolint
library(ggplot2)
library(yaml)
library(ncdf4)
library(ClimProjDiags) #nolint
library(abind)
library(climdex.pcic)
#Parsing input file paths and creating output dirs
args <- commandArgs(trailingOnly = TRUE)
params <- read_yaml(args[1])
plot_dir <- params$plot_dir
r... | /esmvaltool/diag_scripts/magic_bsc/combined_indices.R | permissive | ESMValGroup/ESMValTool | R | false | false | 7,419 | r | library(s2dverification)
library(multiApply) # nolint
library(ggplot2)
library(yaml)
library(ncdf4)
library(ClimProjDiags) #nolint
library(abind)
library(climdex.pcic)
#Parsing input file paths and creating output dirs
args <- commandArgs(trailingOnly = TRUE)
params <- read_yaml(args[1])
plot_dir <- params$plot_dir
r... |
#Richard Danylo
#Gene Set Interpreter
#load libraries (use install.packages() to download if not installed)
library("readxl")
library("writexl")
library("ggplot2")
library("gridExtra")
library("stringr")
#test type
gender <- "female"
test <- "panther"
abr <- "fp"
#set directories (file locations)
work_dir <- "C:/Use... | /interpret/female/panther/panther_interpret.R | no_license | rdanylo/ebi-research | R | false | false | 4,449 | r | #Richard Danylo
#Gene Set Interpreter
#load libraries (use install.packages() to download if not installed)
library("readxl")
library("writexl")
library("ggplot2")
library("gridExtra")
library("stringr")
#test type
gender <- "female"
test <- "panther"
abr <- "fp"
#set directories (file locations)
work_dir <- "C:/Use... |
setwd("C:\\Users\\Ivan.Liuyanfeng\\Desktop\\Data_Mining_Work_Space\\Data-Science-Practical-Machine-Learning")
library(quantmod)
from.dat <- as.Date("01/01/08", format="%m/%d/%y")
to.dat <- as.Date("12/31/13", format="%m/%d/%y")
getSymbols("GOOG", src="google", from = from.dat, to = to.dat)
head(GOOG)
## Summarize month... | /wk4_forecasting.R | no_license | ivanliu1989/Data-Science-Practical-Machine-Learning | R | false | false | 913 | r | setwd("C:\\Users\\Ivan.Liuyanfeng\\Desktop\\Data_Mining_Work_Space\\Data-Science-Practical-Machine-Learning")
library(quantmod)
from.dat <- as.Date("01/01/08", format="%m/%d/%y")
to.dat <- as.Date("12/31/13", format="%m/%d/%y")
getSymbols("GOOG", src="google", from = from.dat, to = to.dat)
head(GOOG)
## Summarize month... |
# dbscanSuite.R
runSingleDBSCAN.eps <- function(truth_df, covObj, og_data, minPts = 6){
ret_df <- truth_df
truth_df <- subset(truth_df, select = -c(site))
dbscan.MSE1 <- dbscan.MSE(og_data, covObj, eps = .1, minPts = minPts)
dbscan.MSE01 <- dbscan.MSE(og_data, covObj, eps = .01, minPts = minPts)
dbscan.M... | /helper/DBSCAN/dbscanSuite.R | no_license | roth-mh/occ-cluster | R | false | false | 1,802 | r | # dbscanSuite.R
runSingleDBSCAN.eps <- function(truth_df, covObj, og_data, minPts = 6){
ret_df <- truth_df
truth_df <- subset(truth_df, select = -c(site))
dbscan.MSE1 <- dbscan.MSE(og_data, covObj, eps = .1, minPts = minPts)
dbscan.MSE01 <- dbscan.MSE(og_data, covObj, eps = .01, minPts = minPts)
dbscan.M... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/text_normalization.R
\name{step_text_normalization}
\alias{step_text_normalization}
\title{Normalization of Character Variables}
\usage{
step_text_normalization(
recipe,
...,
role = NA,
trained = FALSE,
columns = NULL,
normalizati... | /man/step_text_normalization.Rd | permissive | tidymodels/textrecipes | R | false | true | 3,005 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/text_normalization.R
\name{step_text_normalization}
\alias{step_text_normalization}
\title{Normalization of Character Variables}
\usage{
step_text_normalization(
recipe,
...,
role = NA,
trained = FALSE,
columns = NULL,
normalizati... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vega-embed.R
\name{only_actions}
\alias{only_actions}
\title{Helper function for vega_embed actions}
\usage{
only_actions(export = FALSE, source = FALSE, editor = FALSE)
}
\arguments{
\item{export}{\code{logical}, include "Export As ..." link... | /man/only_actions.Rd | permissive | heike/altair | R | false | true | 595 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vega-embed.R
\name{only_actions}
\alias{only_actions}
\title{Helper function for vega_embed actions}
\usage{
only_actions(export = FALSE, source = FALSE, editor = FALSE)
}
\arguments{
\item{export}{\code{logical}, include "Export As ..." link... |
library(viper)
library(ConsensusClusterPlus)
library(randomForest)
library(cluster)
# library(ROCR)
library(pROC)
library(mclust)
library(DESeq2)
library(MASS) #for lda
library(e1071) #for svm
library(FNN) #for get.knn
#Initial processing functions:
#1- Initial_processing_folds:
#Divides patients/sampl... | /ML_Pipeline/Main_function.R | no_license | alexandre-alloy/Prognosis-prediction | R | false | false | 23,135 | r | library(viper)
library(ConsensusClusterPlus)
library(randomForest)
library(cluster)
# library(ROCR)
library(pROC)
library(mclust)
library(DESeq2)
library(MASS) #for lda
library(e1071) #for svm
library(FNN) #for get.knn
#Initial processing functions:
#1- Initial_processing_folds:
#Divides patients/sampl... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xmu.R
\name{xmuMakeTwoHeadedPathsFromPathList}
\alias{xmuMakeTwoHeadedPathsFromPathList}
\title{xmuMakeTwoHeadedPathsFromPathList}
\usage{
xmuMakeTwoHeadedPathsFromPathList(pathList)
}
\arguments{
\item{pathList}{A list of paths}
}
\value{
\i... | /man/xmuMakeTwoHeadedPathsFromPathList.Rd | no_license | JunqiangZheng/umx | R | false | true | 2,362 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xmu.R
\name{xmuMakeTwoHeadedPathsFromPathList}
\alias{xmuMakeTwoHeadedPathsFromPathList}
\title{xmuMakeTwoHeadedPathsFromPathList}
\usage{
xmuMakeTwoHeadedPathsFromPathList(pathList)
}
\arguments{
\item{pathList}{A list of paths}
}
\value{
\i... |
context("pin dataframe")
test_that("can pin() data frame", {
roundtrip <- pin(iris, "iris")
expect_equal(as.data.frame(roundtrip), iris)
expect_equal(as.data.frame(pin_get("iris")), iris)
})
test_that("can sanitize data frame names", {
name <- "___sdf ds32___42342 dsf dsf dsfds____"
expect_equal(
p... | /tests/testthat/test-pin-dataframe.R | permissive | jduckles/pins | R | false | false | 402 | r | context("pin dataframe")
test_that("can pin() data frame", {
roundtrip <- pin(iris, "iris")
expect_equal(as.data.frame(roundtrip), iris)
expect_equal(as.data.frame(pin_get("iris")), iris)
})
test_that("can sanitize data frame names", {
name <- "___sdf ds32___42342 dsf dsf dsfds____"
expect_equal(
p... |
tileHarmonizeAxes <- function(tc) {
# Check for rugs
for (j in 1:length(tc$traces)) {
if (tc$traces[[j]]$graphic=="rug") {
if (tc$traces[[j]]$attachToX) {
tc[["xaxis"]]$rug[ tc$traces[[j]]$plot ] <- TRUE
tc$height$xaxis.rug[tc$traces[[j]]$plot] <- max(tc$height$xaxis... | /R/tileHarmonizeAxes.R | no_license | chrisadolph/tileForShiny | R | false | false | 17,508 | r | tileHarmonizeAxes <- function(tc) {
# Check for rugs
for (j in 1:length(tc$traces)) {
if (tc$traces[[j]]$graphic=="rug") {
if (tc$traces[[j]]$attachToX) {
tc[["xaxis"]]$rug[ tc$traces[[j]]$plot ] <- TRUE
tc$height$xaxis.rug[tc$traces[[j]]$plot] <- max(tc$height$xaxis... |
pdf(file="err-breakdown.pdf")
TRAIN.FILE <- "../data/train.RData"
get.returns <- function(df, ret.nums) {
# Extracts intra-day stock returns from a dataframe read from the .csv
# Returned matrix has one column per stock, one row per intra-day minute
ret.col.names <- paste("Ret", as.character(ret.nums), sep... | /Winton/analysis/err-breakdown.R | no_license | chrishefele/kaggle-sample-code | R | false | false | 894 | r | pdf(file="err-breakdown.pdf")
TRAIN.FILE <- "../data/train.RData"
get.returns <- function(df, ret.nums) {
# Extracts intra-day stock returns from a dataframe read from the .csv
# Returned matrix has one column per stock, one row per intra-day minute
ret.col.names <- paste("Ret", as.character(ret.nums), sep... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/super-getters.R
\name{get_trial_position.supermarket}
\alias{get_trial_position.supermarket}
\title{Returns position during trial}
\usage{
\method{get_trial_position}{supermarket}(obj, i_trial)
}
\arguments{
\item{obj}{supermarket object}
\i... | /man/get_trial_position.supermarket.Rd | no_license | BrainVR/brainvr-supermarket | R | false | true | 414 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/super-getters.R
\name{get_trial_position.supermarket}
\alias{get_trial_position.supermarket}
\title{Returns position during trial}
\usage{
\method{get_trial_position}{supermarket}(obj, i_trial)
}
\arguments{
\item{obj}{supermarket object}
\i... |
##########################################################
# Calculating logarithmic and Brier score for all models #
##########################################################
library(survival)
library(splines)
library(DescTools)
library(bayestestR)
library(tidyverse)
library(MASS)
library(glmnet)
sour... | /AUC and scoring rules/Scoring rule.R | no_license | mat8-stat1/P8 | R | false | false | 7,052 | r |
##########################################################
# Calculating logarithmic and Brier score for all models #
##########################################################
library(survival)
library(splines)
library(DescTools)
library(bayestestR)
library(tidyverse)
library(MASS)
library(glmnet)
sour... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RankDistance.R
\name{distKendall}
\alias{distKendall}
\title{Kendall distance between two ranks}
\usage{
distKendall(x, y, type = "ordering")
}
\arguments{
\item{x, y}{two ranks of size m.}
\item{type}{type of the rank representation ("order... | /fuzzedpackages/Rankcluster/man/distKendall.Rd | no_license | akhikolla/testpackages | R | false | true | 833 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RankDistance.R
\name{distKendall}
\alias{distKendall}
\title{Kendall distance between two ranks}
\usage{
distKendall(x, y, type = "ordering")
}
\arguments{
\item{x, y}{two ranks of size m.}
\item{type}{type of the rank representation ("order... |
## Copyright (C) 2012 Sage Bionetworks <www.sagebase.org>
##
## filename: test_restoreGenerics.R
## description: Test restoring S4 generics.
## author: Matthew D. Furia <matt.furia@sagebase.org>
##
## This file is part of the sessionTools R package.
##
## sessionTools is free software: provided the Funding Acknolegeme... | /inst/tests/test_restoreGenerics.R | no_license | MattNapsAlot/sessionTools | R | false | false | 3,304 | r | ## Copyright (C) 2012 Sage Bionetworks <www.sagebase.org>
##
## filename: test_restoreGenerics.R
## description: Test restoring S4 generics.
## author: Matthew D. Furia <matt.furia@sagebase.org>
##
## This file is part of the sessionTools R package.
##
## sessionTools is free software: provided the Funding Acknolegeme... |
## problem 1
pollutantmean<-function(directory, pollutant, id=1:332){
## 1. list all your files, 2. have a vector to save the value of means.
##3. read through each files to get the pollutant. 4.calculate the mean and save.
filelist<-list.files(path=directory, pattern=".csv",full.name=TRUE)
values<-numeric()##in... | /week2 assignment Q1.R | no_license | dandelionpath/r-programming-assign1 | R | false | false | 543 | r | ## problem 1
pollutantmean<-function(directory, pollutant, id=1:332){
## 1. list all your files, 2. have a vector to save the value of means.
##3. read through each files to get the pollutant. 4.calculate the mean and save.
filelist<-list.files(path=directory, pattern=".csv",full.name=TRUE)
values<-numeric()##in... |
# quiets concerns of R CMD check
if(getRversion() >= "2.15.1") utils::globalVariables(c("base", "c1F",
"c1base", "c1perc", "c1s", "c1v1", "c1v2", "c2F", "c2base", "c2final", "c2perc", "c2s",
"c2v1", "c2v2", ... | /R/ud_prep.R | no_license | heike/UpAndDown | R | false | false | 12,659 | r | # quiets concerns of R CMD check
if(getRversion() >= "2.15.1") utils::globalVariables(c("base", "c1F",
"c1base", "c1perc", "c1s", "c1v1", "c1v2", "c2F", "c2base", "c2final", "c2perc", "c2s",
"c2v1", "c2v2", ... |
### Exercise 1 ###
# libraries
library(dplyr)
# We'll be using the mtcars dataset -- adding rowname as a column
vehicle <- add_rownames(mtcars, var='car')
######## buggy ######### ----------------------------------------------
# Function to debug:
# Given a number of forward gears and a number of cylinders, what i... | /exercise-1/exercise.R | permissive | cmihran/m10-apis | R | false | false | 629 | r | ### Exercise 1 ###
# libraries
library(dplyr)
# We'll be using the mtcars dataset -- adding rowname as a column
vehicle <- add_rownames(mtcars, var='car')
######## buggy ######### ----------------------------------------------
# Function to debug:
# Given a number of forward gears and a number of cylinders, what i... |
#class balancer
ClassBalance <- function(dataframe, targetClass, targetQty){
obs <- as.vector(which(dataframe[,ncol(dataframe)]==targetClass))
universe <- dataframe[obs,]
maxObs<-max(table(dataframe[,ncol(dataframe)]))
sampleQty <-floor(maxObs*targetQty)
vectorClass<-universe[sample(nrow(universe), samp... | /news_popularity/leo/6 kaggle_functions.R | no_license | vanbalint/Kaggle | R | false | false | 569 | r | #class balancer
ClassBalance <- function(dataframe, targetClass, targetQty){
obs <- as.vector(which(dataframe[,ncol(dataframe)]==targetClass))
universe <- dataframe[obs,]
maxObs<-max(table(dataframe[,ncol(dataframe)]))
sampleQty <-floor(maxObs*targetQty)
vectorClass<-universe[sample(nrow(universe), samp... |
#' R -e 'library(ChipSeq);library(DoGs);DoGs:::runDoGs("SRP058633",file.path(system.file("extdata",package = "DoGs"),"sample_infor.txt"),"/projects/ctsi/bbc/Genome_Ref/Homo_sapiens/UCSC/hg19/Annotation/Genes/genes.gtf","/projects/ctsi/bbc/Genome_Ref/Homo_sapiens/UCSC/hg19/Sequence/Bowtie2Index/genome","/projects/ctsi/b... | /R/runDoGs.R | no_license | SCCC-BBC/DoGs | R | false | false | 13,432 | r | #' R -e 'library(ChipSeq);library(DoGs);DoGs:::runDoGs("SRP058633",file.path(system.file("extdata",package = "DoGs"),"sample_infor.txt"),"/projects/ctsi/bbc/Genome_Ref/Homo_sapiens/UCSC/hg19/Annotation/Genes/genes.gtf","/projects/ctsi/bbc/Genome_Ref/Homo_sapiens/UCSC/hg19/Sequence/Bowtie2Index/genome","/projects/ctsi/b... |
\name{ngroups}
\alias{ngroups}
\title{ngroups}
\usage{
ngroups(group, n.group = NULL, n)
}
\arguments{
\item{group}{group}
\item{n.group}{n.group}
\item{n}{n}
}
\description{
ngroups
}
\keyword{internal}
| /man/ngroups.Rd | no_license | oganm/ascii | R | false | false | 213 | rd | \name{ngroups}
\alias{ngroups}
\title{ngroups}
\usage{
ngroups(group, n.group = NULL, n)
}
\arguments{
\item{group}{group}
\item{n.group}{n.group}
\item{n}{n}
}
\description{
ngroups
}
\keyword{internal}
|
##
## this is part of the logging package. the logging package is free
## software: you can redistribute it as well as modify it under the terms of
## the GNU General Public License as published by the Free Software
## Foundation, either version 3 of the License, or (at your option) any later
## version.
##
## t... | /pkg/R/utils.R | no_license | nlbjan1/r-logging | R | false | false | 6,883 | r | ##
## this is part of the logging package. the logging package is free
## software: you can redistribute it as well as modify it under the terms of
## the GNU General Public License as published by the Free Software
## Foundation, either version 3 of the License, or (at your option) any later
## version.
##
## t... |
library (shiny)
shinyUI (fluidPage (
theme = "style.css",
withMathJax (),
includeMarkdown ('content.md')
))
| /probastat/exo/ch1/cours/ui.R | no_license | tdelbecque/shiny-sites | R | false | false | 121 | r | library (shiny)
shinyUI (fluidPage (
theme = "style.css",
withMathJax (),
includeMarkdown ('content.md')
))
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/export_raster.R
\name{export_raster}
\alias{export_raster}
\title{Write raster}
\usage{
export_raster(x, file, FUN = raster::writeRaster,
data_source = flyio_get_datasource(),
bucket = flyio_get_bucket(data_source), dir = flyio_get_dir(),... | /man/export_raster.Rd | no_license | agrawalsourabh/flyio | R | false | true | 1,101 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/export_raster.R
\name{export_raster}
\alias{export_raster}
\title{Write raster}
\usage{
export_raster(x, file, FUN = raster::writeRaster,
data_source = flyio_get_datasource(),
bucket = flyio_get_bucket(data_source), dir = flyio_get_dir(),... |
#' @import stats
cb = function(x,beta.post,mu2.post,qun){
vec.fp = rep(x,length(beta.post))
sroc = pnorm(-(qnorm(1-x)*exp(-beta.post/2)-mu2.post)/exp(beta.post/2))
quantile = quantile(sroc,qun)
return(quantile)
}
| /R/cb.R | no_license | cran/NMADiagT | R | false | false | 221 | r | #' @import stats
cb = function(x,beta.post,mu2.post,qun){
vec.fp = rep(x,length(beta.post))
sroc = pnorm(-(qnorm(1-x)*exp(-beta.post/2)-mu2.post)/exp(beta.post/2))
quantile = quantile(sroc,qun)
return(quantile)
}
|
\name{unifyStrand}
\alias{unifyStrand}
\title{Unify strand of Genomic Ranges object}
\usage{
unifyStrand(x, strand.name = "+")
}
\arguments{
\item{x}{Genomic Ranges object}
\item{strand.name}{character of genomic strand ("+" or
"-")}
}
\description{
This function unifies genomic strand of peaks in Genomic
... | /qugacomp/man/unifyStrand.Rd | permissive | dritoshi/QuGAcomp | R | false | false | 462 | rd | \name{unifyStrand}
\alias{unifyStrand}
\title{Unify strand of Genomic Ranges object}
\usage{
unifyStrand(x, strand.name = "+")
}
\arguments{
\item{x}{Genomic Ranges object}
\item{strand.name}{character of genomic strand ("+" or
"-")}
}
\description{
This function unifies genomic strand of peaks in Genomic
... |
#----- Here is the user-defined variable section. -----------------------------------------#
here = "thispath" # Current directory.
srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory.
outroot = "thisoutroot" # Source directory.
myplaces ... | /ED/Template/Template/plot_rk4.r | no_license | jhmatthes/ED2_Erelax | R | false | false | 33,674 | r | #----- Here is the user-defined variable section. -----------------------------------------#
here = "thispath" # Current directory.
srcdir = "/n/moorcroft_data/mlongo/util/Rsc" # Source directory.
outroot = "thisoutroot" # Source directory.
myplaces ... |
filedir <- "session1data/pretest"
pre <- read.files(filedir,skip=3)
table(pre$Subject)
| /session1/gettingstarted/session1objective.r | no_license | mvogel78/2015kurs2 | R | false | false | 88 | r | filedir <- "session1data/pretest"
pre <- read.files(filedir,skip=3)
table(pre$Subject)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Collection-proto.R
\name{Collection-class}
\alias{Collection-class}
\alias{Collection}
\title{Collection prototype}
\description{
This prototype represents a collection of
\code{\link{ProjectModifier-class}} objects.
}
\section{Fields}{
\des... | /fuzzedpackages/oppr/man/Collection-class.Rd | no_license | akhikolla/testpackages | R | false | true | 1,667 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Collection-proto.R
\name{Collection-class}
\alias{Collection-class}
\alias{Collection}
\title{Collection prototype}
\description{
This prototype represents a collection of
\code{\link{ProjectModifier-class}} objects.
}
\section{Fields}{
\des... |
########################################################
## set a cdkFormula function
.IMolecularFormula <- "org/openscience/cdk/interfaces/IMolecularFormula"
setClass("cdkFormula", representation(mass = "numeric",
objectJ = "jobjRef",
str... | /rcdk/R/formula.R | no_license | schymane/cdkr | R | false | false | 21,247 | r | ########################################################
## set a cdkFormula function
.IMolecularFormula <- "org/openscience/cdk/interfaces/IMolecularFormula"
setClass("cdkFormula", representation(mass = "numeric",
objectJ = "jobjRef",
str... |
plot2 <- function(data=NULL) {
if(is.null(data))
data <- load_data()
png("plot2.png", width=400, height=400)
plot(data$Time, data$Global_active_power,
type="l",
xlab="",
ylab="Global Active Power (kilowatts)")
dev.off()
}
date_time <- function(date, time) {
... | /plot2.r | no_license | meetrainier/ExData_Plotting1 | R | false | false | 1,025 | r | plot2 <- function(data=NULL) {
if(is.null(data))
data <- load_data()
png("plot2.png", width=400, height=400)
plot(data$Time, data$Global_active_power,
type="l",
xlab="",
ylab="Global Active Power (kilowatts)")
dev.off()
}
date_time <- function(date, time) {
... |
#' @importFrom tibble tibble
xya_pips_cards <- function(n_pips) {
if (n_pips == 0) {
return(tibble(x = numeric(0), y = numeric(0), angle = numeric(0)))
}
switch(n_pips,
tibble(x = 0.5, y = 0.5, angle = 0), # 1
tibble(x = 0.5, y = c(0.2, 0.8), angle = c(180, 0)), # 2
... | /R/utils-pips.R | permissive | cran/piecepackr | R | false | false | 20,888 | r | #' @importFrom tibble tibble
xya_pips_cards <- function(n_pips) {
if (n_pips == 0) {
return(tibble(x = numeric(0), y = numeric(0), angle = numeric(0)))
}
switch(n_pips,
tibble(x = 0.5, y = 0.5, angle = 0), # 1
tibble(x = 0.5, y = c(0.2, 0.8), angle = c(180, 0)), # 2
... |
#### R script to download, merge and clean birth certificates using the csv's from openarch
### load packages
library(data.table)
### GET DATA
# Download all bsg.csv.zip files from openarch using the url list at github/wp4-civreg,
# unzip and save as seperate csv's in working directory
setwd("C:\\Users\\Ruben\\... | /openarch_bsg_curation_cleaning.R | no_license | CLARIAH/wp4-civreg | R | false | false | 5,668 | r | #### R script to download, merge and clean birth certificates using the csv's from openarch
### load packages
library(data.table)
### GET DATA
# Download all bsg.csv.zip files from openarch using the url list at github/wp4-civreg,
# unzip and save as seperate csv's in working directory
setwd("C:\\Users\\Ruben\\... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_project.R
\name{get_project}
\alias{get_project}
\title{Get project}
\usage{
get_project(proj, use_geo_nodes)
}
\arguments{
\item{proj}{str project name (may be NULL)}
\item{use_geo_nodes}{logical indicating whether to use geospatial nod... | /mbg/mbg_core_code/mbg_central/LBDCore/man/get_project.Rd | no_license | The-Oxford-GBD-group/typhi_paratyphi_modelling_code | R | false | true | 442 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/get_project.R
\name{get_project}
\alias{get_project}
\title{Get project}
\usage{
get_project(proj, use_geo_nodes)
}
\arguments{
\item{proj}{str project name (may be NULL)}
\item{use_geo_nodes}{logical indicating whether to use geospatial nod... |
setOldClass("AsIs")
setClassUnion("AsIsORcharacter", c("AsIs","character"))
##
##==================================================================
##-----------------------------------------------------------------##
## ## Class ColorEnum for limited paletes
## ##-----------------------... | /R/Theme-class.R | no_license | ggobi/objectWidgets | R | false | false | 10,065 | r | setOldClass("AsIs")
setClassUnion("AsIsORcharacter", c("AsIs","character"))
##
##==================================================================
##-----------------------------------------------------------------##
## ## Class ColorEnum for limited paletes
## ##-----------------------... |
# Find probabilities of a conference rank by point differential
# libraries
library(dplyr)
library(ggplot2)
# read in standings doc
setwd("C:/Users/fishe/Documents/nba_2017")
x <- read.csv("nba_standings_1977_2016.csv", stringsAsFactors = F)
# z-score: pnorm([number], pop_mean, pop_sd)
# http://stats.sean... | /probability_confrank.R | no_license | jamesclarence/nba_2017 | R | false | false | 5,878 | r | # Find probabilities of a conference rank by point differential
# libraries
library(dplyr)
library(ggplot2)
# read in standings doc
setwd("C:/Users/fishe/Documents/nba_2017")
x <- read.csv("nba_standings_1977_2016.csv", stringsAsFactors = F)
# z-score: pnorm([number], pop_mean, pop_sd)
# http://stats.sean... |
#Write a script in R to create two vectors of different lengths and give these vectors as input to array and print addition and subtraction of those matrices.
# Create two vectors of different lengths.
vector1 <- c(7,4,9)
vector2 <- c(10,11,12,13,14,15)
# Take these vectors as input to the array.
array1 <- arr... | /PRACTICAL SLIPS/SLIP 11/Q4_r_pro.r | no_license | NikThePro/BCA-practical-slips--3-rd-Semester | R | false | false | 770 | r | #Write a script in R to create two vectors of different lengths and give these vectors as input to array and print addition and subtraction of those matrices.
# Create two vectors of different lengths.
vector1 <- c(7,4,9)
vector2 <- c(10,11,12,13,14,15)
# Take these vectors as input to the array.
array1 <- arr... |
################################################ PROCESSING MODIS DATA #######################################
########################################### Function to process MODIS datasets #####################################
#The current version processes MODIS dataset given a set of inputs
#This script download an... | /processing_MODIS_data_functions.R | no_license | bhargavako/space_time_lucc | R | false | false | 36,303 | r | ################################################ PROCESSING MODIS DATA #######################################
########################################### Function to process MODIS datasets #####################################
#The current version processes MODIS dataset given a set of inputs
#This script download an... |
#' Shiny module to render large time-series data with live server-client aggregation
#'
#'
#' @param id character, used to specify namesapce, see \code{shiny::\link[shiny]{NS}}
#' @param input standard, \code{shiny} input
#' @param output standard, \code{shiny} output
#' @param session standard, \code{shiny}... | /R/shiny_modules_timeSeries.R | no_license | aghozlane/rAmCharts | R | false | false | 36,349 | r | #' Shiny module to render large time-series data with live server-client aggregation
#'
#'
#' @param id character, used to specify namesapce, see \code{shiny::\link[shiny]{NS}}
#' @param input standard, \code{shiny} input
#' @param output standard, \code{shiny} output
#' @param session standard, \code{shiny}... |
library(dash)
library(dashCoreComponents)
library(dashHtmlComponents)
library(dashBootstrapComponents)
library(plotly)
source("load_data.R")
states_lst <- list()
for (i in seq_len(length(state.name)) + 1) {
states_lst[[i]] <-
list(
label = state.name[i],
value = state.name[i]
... | /app.R | no_license | program--/covid-tracker | R | false | false | 14,450 | r | library(dash)
library(dashCoreComponents)
library(dashHtmlComponents)
library(dashBootstrapComponents)
library(plotly)
source("load_data.R")
states_lst <- list()
for (i in seq_len(length(state.name)) + 1) {
states_lst[[i]] <-
list(
label = state.name[i],
value = state.name[i]
... |
##----------04/13/2020-----------------##
##----------Word Frequency by Subgroups-----------------##
#setwd("D:/Dropbox/MPA_research/MPAMystery/")
pacman::p_load(lfe,cowplot,stargazer,broom,qvalue,psych,factoextra,ineq, sf, rio, tidytext, plotly, tidyverse)
#resultPath <- "D:/Dropbox/MPA_research/"
#resultPath <- "C:/... | /3_Analysis/1_Social/1_Experimental_analyses/Econ_Wellbeing/subgroup_word_frequency_script.R | no_license | WWF-ConsEvidence/MPAMystery | R | false | false | 20,419 | r | ##----------04/13/2020-----------------##
##----------Word Frequency by Subgroups-----------------##
#setwd("D:/Dropbox/MPA_research/MPAMystery/")
pacman::p_load(lfe,cowplot,stargazer,broom,qvalue,psych,factoextra,ineq, sf, rio, tidytext, plotly, tidyverse)
#resultPath <- "D:/Dropbox/MPA_research/"
#resultPath <- "C:/... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/strataSplit.R
\name{strataSplit}
\alias{strataSplit}
\title{Split Strata}
\usage{
strataSplit(g, strata = NULL, remove.sequences = FALSE)
}
\arguments{
\item{g}{a \linkS4class{gtypes} object.}
\item{strata}{a character vector giving a subset... | /man/strataSplit.Rd | no_license | EricArcher/strataG | R | false | true | 908 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/strataSplit.R
\name{strataSplit}
\alias{strataSplit}
\title{Split Strata}
\usage{
strataSplit(g, strata = NULL, remove.sequences = FALSE)
}
\arguments{
\item{g}{a \linkS4class{gtypes} object.}
\item{strata}{a character vector giving a subset... |
## Word Cloud: Climate and COVID-19.
## install devtools package if it's not already
if (!requireNamespace("devtools", quietly = TRUE)) {
install.packages("devtools") }
library(rtweet)
create_token(
app = "TwitterData_Analysis2020",
consumer_key = '####################',
consumer_secret = '########... | /Climate_WordCloud_RFile.R | no_license | krishangi-deka/Climate-and-COVID | R | false | false | 2,725 | r | ## Word Cloud: Climate and COVID-19.
## install devtools package if it's not already
if (!requireNamespace("devtools", quietly = TRUE)) {
install.packages("devtools") }
library(rtweet)
create_token(
app = "TwitterData_Analysis2020",
consumer_key = '####################',
consumer_secret = '########... |
## Assignment 2
## makeCacheMatrix: This function creates a matrix that can cache its inverse.
## set : initializes the matrix
## get : returns the matrix created.
## setInverse : computes the inverse of a matrix and caches it.
## uses solve function in R. If x is a square invertible matrix
#... | /cachematrix.R | no_license | Chandrajith/ProgrammingAssignment2 | R | false | false | 2,931 | r | ## Assignment 2
## makeCacheMatrix: This function creates a matrix that can cache its inverse.
## set : initializes the matrix
## get : returns the matrix created.
## setInverse : computes the inverse of a matrix and caches it.
## uses solve function in R. If x is a square invertible matrix
#... |
test_that("Print exported objects", {
stats %as% st
expect_identical(
capture.output(print(st)),
capture.output(print(sort(getNamespaceExports("stats"))))
)
})
| /tests/testthat/test-print.R | permissive | atusy/importas | R | false | false | 174 | r | test_that("Print exported objects", {
stats %as% st
expect_identical(
capture.output(print(st)),
capture.output(print(sort(getNamespaceExports("stats"))))
)
})
|
## ___ _ ##
## | _ \ ______ _ _ ___| |___ __ _____ r-ØTWS - Comms Between R and an IB ##
## | /_|_ / -_) '_/ _ \ _\ V V (_-< TWS API <-> ØMQ Proxy ##
## |_|_(_)__\___|_| \___/\__|\_/\_//__/ Copyright © 2012, James Brotchie ##
... | /src/parser.R | no_license | brotchie/r-zerotws | R | false | false | 27,657 | r | ## ___ _ ##
## | _ \ ______ _ _ ___| |___ __ _____ r-ØTWS - Comms Between R and an IB ##
## | /_|_ / -_) '_/ _ \ _\ V V (_-< TWS API <-> ØMQ Proxy ##
## |_|_(_)__\___|_| \___/\__|\_/\_//__/ Copyright © 2012, James Brotchie ##
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xlConstants.R
\name{xlEarthRadius}
\alias{xlEarthRadius}
\title{Actual radius of the earth}
\source{
The numbers and equations are taken from
\href{http://en.wikipedia.org/wiki/Figure_of_the_Earth}{Wikipedia}
}
\usage{
xlEarthRadius(latitude)... | /man/xlEarthRadius.Rd | permissive | xinye1/xltools | R | false | true | 510 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xlConstants.R
\name{xlEarthRadius}
\alias{xlEarthRadius}
\title{Actual radius of the earth}
\source{
The numbers and equations are taken from
\href{http://en.wikipedia.org/wiki/Figure_of_the_Earth}{Wikipedia}
}
\usage{
xlEarthRadius(latitude)... |
mvpairs <- function(model, ...){
UseMethod("mvpairs", model)
}
mvpairs.plsm <- function(model, data, LVs, ask=TRUE, ...){
opar <- par(no.readonly=TRUE)
on.exit(par(opar))
par(ask=ask)
MVblocks <- vector(mode="list", length=length(model$latent))
names(MVblocks) <- model$latent
if(mis... | /semPLS/R/mvpairs.R | no_license | ingted/R-Examples | R | false | false | 7,853 | r | mvpairs <- function(model, ...){
UseMethod("mvpairs", model)
}
mvpairs.plsm <- function(model, data, LVs, ask=TRUE, ...){
opar <- par(no.readonly=TRUE)
on.exit(par(opar))
par(ask=ask)
MVblocks <- vector(mode="list", length=length(model$latent))
names(MVblocks) <- model$latent
if(mis... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/OptPath_getter.R
\name{getOptPathCol}
\alias{getOptPathCol}
\title{Get column from the optimization path.}
\usage{
getOptPathCol(op, name, dob, eol)
}
\arguments{
\item{op}{[\code{\link{OptPath}}]\cr
Optimization path.}
\item{name}{[... | /man/getOptPathCol.Rd | no_license | larskotthoff/ParamHelpers | R | false | false | 1,388 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/OptPath_getter.R
\name{getOptPathCol}
\alias{getOptPathCol}
\title{Get column from the optimization path.}
\usage{
getOptPathCol(op, name, dob, eol)
}
\arguments{
\item{op}{[\code{\link{OptPath}}]\cr
Optimization path.}
\item{name}{[... |
rm(list = ls())
library(data.table)
library(dplyr)
# choose Rajasthan data
myFile <- file.choose()
myData <- read.csv(myFile,header=TRUE)
######################################################################
############# Data Cleaning ##########################################
###################################... | /R Code/Logistic Regression.R | no_license | surendradattatrey/recommendation_engine_for_escorts_india | R | false | false | 2,562 | r |
rm(list = ls())
library(data.table)
library(dplyr)
# choose Rajasthan data
myFile <- file.choose()
myData <- read.csv(myFile,header=TRUE)
######################################################################
############# Data Cleaning ##########################################
###################################... |
library(dplyr)
#step 0: downlaod files
zipUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
zipFile <- "UCI HAR Dataset.zip"
if (!file.exists(zipFile)) {
download.file(zipUrl, zipFile, mode = "wb")
}
# unzip zip file containing data if data directory doesn't already ex... | /run_analysis.R | no_license | tianwenlan/Getting_and_Cleaning_Data | R | false | false | 3,730 | r | library(dplyr)
#step 0: downlaod files
zipUrl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
zipFile <- "UCI HAR Dataset.zip"
if (!file.exists(zipFile)) {
download.file(zipUrl, zipFile, mode = "wb")
}
# unzip zip file containing data if data directory doesn't already ex... |
#' Extract ptdf from cnes XML
#'
#' @param file {character} XML file
#' @param nbcl {numeric} parralel process
#' @param sizechunk {numeric} size of memory chunk.
#'
#' @examples
#' \dontrun{
#' getFbDomain("fb.XML", 4 )
#' }
#'
#' @import XML data.table
#' @export
getFbDomain <- function(file, nbcl = 4, sizechunk =... | /R/getCnesFb.R | no_license | rte-antares-rpackage/fbTools | R | false | false | 5,538 | r | #' Extract ptdf from cnes XML
#'
#' @param file {character} XML file
#' @param nbcl {numeric} parralel process
#' @param sizechunk {numeric} size of memory chunk.
#'
#' @examples
#' \dontrun{
#' getFbDomain("fb.XML", 4 )
#' }
#'
#' @import XML data.table
#' @export
getFbDomain <- function(file, nbcl = 4, sizechunk =... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gauss_model.R
\name{gauss_model}
\alias{gauss_model}
\title{Gaussian model of functional data}
\usage{
gauss_model(warp_data, n = 1, sort_samples = FALSE)
}
\arguments{
\item{warp_data}{fdawarp object from \link{time_warping} of aligned data}... | /fuzzedpackages/fdasrvf/man/gauss_model.Rd | no_license | akhikolla/testpackages | R | false | true | 1,000 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gauss_model.R
\name{gauss_model}
\alias{gauss_model}
\title{Gaussian model of functional data}
\usage{
gauss_model(warp_data, n = 1, sort_samples = FALSE)
}
\arguments{
\item{warp_data}{fdawarp object from \link{time_warping} of aligned data}... |
# 20.11.2021
# We plot the MSE vs TSS for different food webs
library(R.utils)
library(tictoc)
## Loading required libraries
library(ggpubr); library(plotrix); library(ggplot2)
library(cowplot); library(latex2exp); library(HDInterval)
library(doParallel); library(foreach); library(raster)
library(cheddar); library(dp... | /inst/main/MSE_vs_TSS_fw.R | no_license | anubhav3/C1_method_v2 | R | false | false | 11,256 | r | # 20.11.2021
# We plot the MSE vs TSS for different food webs
library(R.utils)
library(tictoc)
## Loading required libraries
library(ggpubr); library(plotrix); library(ggplot2)
library(cowplot); library(latex2exp); library(HDInterval)
library(doParallel); library(foreach); library(raster)
library(cheddar); library(dp... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 31201
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 31200
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 31200
c
c Input Parameter (command line, ... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Sauer-Reimer/ITC99/b20_PR_5_50/b20_PR_5_50.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 719 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 31201
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 31200
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 31200
c
c Input Parameter (command line, ... |
args <- commandArgs(trailingOnly=T)
if (length(args)!=1) {
stop("Requires 1 argument, initial N")
}
N<-as.integer(args[1])
steps<-0
while (N !=1) {
cat (N,"\n")
if (N%%2==0) {
N<-N/2
} else {
N<-3*N+1
}
steps <- steps+1
}
cat("steps=",steps,"\n")
| /hailstone3.R | no_license | lramirez49/chem160module18 | R | false | false | 288 | r | args <- commandArgs(trailingOnly=T)
if (length(args)!=1) {
stop("Requires 1 argument, initial N")
}
N<-as.integer(args[1])
steps<-0
while (N !=1) {
cat (N,"\n")
if (N%%2==0) {
N<-N/2
} else {
N<-3*N+1
}
steps <- steps+1
}
cat("steps=",steps,"\n")
|
ICTD <- function(data_bulk)
{
data.matrix = data_bulk
###########################################################
if(length(colnames(data.matrix)) == 0) {
warning("input data do NOT have colnames")
colnames(data.matrix) <- paste( "Setsample", 1:ncol(data.matrix), sep="")
}
data.matrix <- rm_zero_row(data.matrix... | /R/ICTD_main.R | no_license | zy26/ICTD | R | false | false | 5,818 | r |
ICTD <- function(data_bulk)
{
data.matrix = data_bulk
###########################################################
if(length(colnames(data.matrix)) == 0) {
warning("input data do NOT have colnames")
colnames(data.matrix) <- paste( "Setsample", 1:ncol(data.matrix), sep="")
}
data.matrix <- rm_zero_row(data.matrix... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checks.R
\name{check_sample_fraction}
\alias{check_sample_fraction}
\title{check sample.fraction}
\usage{
check_sample_fraction(sample.fraction, replace)
}
\arguments{
\item{sample.fraction}{scalar, fraction of data used for subsampling}
\it... | /orf/man/check_sample_fraction.Rd | no_license | okasag/orf | R | false | true | 489 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/checks.R
\name{check_sample_fraction}
\alias{check_sample_fraction}
\title{check sample.fraction}
\usage{
check_sample_fraction(sample.fraction, replace)
}
\arguments{
\item{sample.fraction}{scalar, fraction of data used for subsampling}
\it... |
source("util.R")
z <- 1:1500
dim(z) <- c(3, 5, 100)
# z[2, , ]
# z[, 2, ]
# z[, 2, 2]
# z[,,]
# z[]
#
# dim(z)
#
# z[2]
# z[1:10]
# z[1:length(z)]
# Z <- array(h, dim = c(3,4,2))
# is same as
# Z <- h; dim(Z) <- c(3,4,2)
x <- array(1:20, dim = c(4, 5))
i <- array(c(1:3,3:1), dim = c(3,2))
# x[i]
x[i] <- 0
# ???
# N... | /04-matrix.R | permissive | ngpeijiun/sample-code-r | R | false | false | 1,093 | r | source("util.R")
z <- 1:1500
dim(z) <- c(3, 5, 100)
# z[2, , ]
# z[, 2, ]
# z[, 2, 2]
# z[,,]
# z[]
#
# dim(z)
#
# z[2]
# z[1:10]
# z[1:length(z)]
# Z <- array(h, dim = c(3,4,2))
# is same as
# Z <- h; dim(Z) <- c(3,4,2)
x <- array(1:20, dim = c(4, 5))
i <- array(c(1:3,3:1), dim = c(3,2))
# x[i]
x[i] <- 0
# ???
# N... |
#' **ASSIGNMENT 2**
#'
#' These two functions will operate to calculate the inverse of a matrix - this
#' is usually a computationally costly exercise, and so writing functions can be hugely beneficial.
#'
#' There will be two functions:
#'
#' 1. makeCacheMatrix: This function creates a special "matrix" object that... | /cachematrix.R | no_license | ah7996/ProgrammingAssignment2 | R | false | false | 2,431 | r | #' **ASSIGNMENT 2**
#'
#' These two functions will operate to calculate the inverse of a matrix - this
#' is usually a computationally costly exercise, and so writing functions can be hugely beneficial.
#'
#' There will be two functions:
#'
#' 1. makeCacheMatrix: This function creates a special "matrix" object that... |
rm(list=ls())
library(MASS)
library(dplyr)
df=na.omit(survey)
#1
#install.packages("ggplot2")
library(ggplot2)
#2
ggplot(df, aes(x=Sex))+geom_bar(fill=c("red", "blue"))+ggtitle("Male and Female Participants")
#3
ggplot(df, aes(x=W.Hnd))+geom_bar(fill=c("yellow", "green"))+ggtitle("Left and Right Handers")
#4
c=df%... | /RStudio/SEM I/Lab5/5b.R | no_license | r-harini/Code | R | false | false | 1,182 | r | rm(list=ls())
library(MASS)
library(dplyr)
df=na.omit(survey)
#1
#install.packages("ggplot2")
library(ggplot2)
#2
ggplot(df, aes(x=Sex))+geom_bar(fill=c("red", "blue"))+ggtitle("Male and Female Participants")
#3
ggplot(df, aes(x=W.Hnd))+geom_bar(fill=c("yellow", "green"))+ggtitle("Left and Right Handers")
#4
c=df%... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.