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 |
|---|---|---|---|---|---|---|---|---|---|
R <- function(object, ...)
UseMethod("R")
R.Surv <- function(object, as.R.ordered = FALSE, as.R.interval = FALSE, ...) {
type <- attr(object, "type")
stopifnot(type %in% c("left", "right", "interval",
"interval2", "counting"))
status <- object[, "status"]
if (as.R.inte... | /R/R.R | no_license | cran/mlt | R | false | false | 18,354 | r |
R <- function(object, ...)
UseMethod("R")
R.Surv <- function(object, as.R.ordered = FALSE, as.R.interval = FALSE, ...) {
type <- attr(object, "type")
stopifnot(type %in% c("left", "right", "interval",
"interval2", "counting"))
status <- object[, "status"]
if (as.R.inte... |
#----------------------------------------------------------------------------------------------
# Script: Calculations am 12.11.2014
#
# Script to paper by Langanki, Schulz 2015
# R version 3.1.2 (2014-10-31), RStudio 0.98.1103
#
# Last modified: 22.05.2015
# Package dependencies:
# FGClimatology
#
# Contact: schulz... | /code/temp.calculations.R | no_license | gavin971/r_dev_messkonzept | R | false | false | 1,984 | r | #----------------------------------------------------------------------------------------------
# Script: Calculations am 12.11.2014
#
# Script to paper by Langanki, Schulz 2015
# R version 3.1.2 (2014-10-31), RStudio 0.98.1103
#
# Last modified: 22.05.2015
# Package dependencies:
# FGClimatology
#
# Contact: schulz... |
#' @title Analysis of residual sum of squares (AoRSS)
#'
#' @description Returns the test statistic and p-value corresponding to a method of comparing a number of curves called the analysis of residual sum of squares (AoRSS). The null hypothesis of test is that the K curves can be assumed coincident.
#'
#' @param R... | /R/AoRSS.R | no_license | IMPRESSPROJECT/AoRSS | R | false | false | 2,573 | r | #' @title Analysis of residual sum of squares (AoRSS)
#'
#' @description Returns the test statistic and p-value corresponding to a method of comparing a number of curves called the analysis of residual sum of squares (AoRSS). The null hypothesis of test is that the K curves can be assumed coincident.
#'
#' @param R... |
library(tidyverse)
library(devtools)
install_github("rstudio/gt")
orig <- read_csv(file = "https://raw.githubusercontent.com/TheUpshot/2018-live-poll-results/master/data/elections-poll-az06-3.csv",
col_types = cols(
.default = col_character(),
turnout_scale = co... | /R.Script-02-21.R | no_license | henryzhu88/class-2019-02-21 | R | false | false | 767 | r | library(tidyverse)
library(devtools)
install_github("rstudio/gt")
orig <- read_csv(file = "https://raw.githubusercontent.com/TheUpshot/2018-live-poll-results/master/data/elections-poll-az06-3.csv",
col_types = cols(
.default = col_character(),
turnout_scale = co... |
# split_into_root_folder_file_extension ----------------------------------------
#' Split Full Paths into Root, Folder, File and Extension
#'
#' @param paths vector of character representing full file paths
#' @param n_root_parts number of first path segments considered as "root"
#' @return data frame with columns \co... | /R/split_into_root_folder_file_extension.R | permissive | KWB-R/kwb.file | R | false | false | 1,873 | r | # split_into_root_folder_file_extension ----------------------------------------
#' Split Full Paths into Root, Folder, File and Extension
#'
#' @param paths vector of character representing full file paths
#' @param n_root_parts number of first path segments considered as "root"
#' @return data frame with columns \co... |
library(readr)
library(data.table)
########################## CONSTANTS ##########################
address <- "~/Documents/experimento_doutorado/"
################################### RELEASE ###################################
release <- read_delim("~/Documentos/Experimento Doutorado/bases de dados/MusicBrainz/mbdum... | /Scripts/MusicBrainz_Load.R | no_license | ricooliveira/moad_old | R | false | false | 11,042 | r | library(readr)
library(data.table)
########################## CONSTANTS ##########################
address <- "~/Documents/experimento_doutorado/"
################################### RELEASE ###################################
release <- read_delim("~/Documentos/Experimento Doutorado/bases de dados/MusicBrainz/mbdum... |
#' Mirror Plot -- Regional Association ComparER Plot
#'
#' This function allows you to creat a plot of -log10(P-values) for two sets of association data.
#' Mirror plots illustrate the two associations on a common x-axis, with the first association
#' inverted, mirroring the two associations against one another.
#'
#' ... | /R/mirrorPlotRACER.R | no_license | jonaszierer/RACER | R | false | false | 12,377 | r | #' Mirror Plot -- Regional Association ComparER Plot
#'
#' This function allows you to creat a plot of -log10(P-values) for two sets of association data.
#' Mirror plots illustrate the two associations on a common x-axis, with the first association
#' inverted, mirroring the two associations against one another.
#'
#' ... |
library(ggplot2)
library(tm)
library(qdap)
library(rJava)
library(RWekajars)
library(RWeka) # Install JAVA before installing this
library(dplyr)
library(wordcloud)
library(stringr)
library(bigmemory)
library(slam)
# Open Connection
con_twitter <- file("en_US.twitter.txt", "r")
con_news <- file("en_US.news.txt", "r") ... | /nextword1.R | no_license | sdasadia/NextWord | R | false | false | 7,910 | r | library(ggplot2)
library(tm)
library(qdap)
library(rJava)
library(RWekajars)
library(RWeka) # Install JAVA before installing this
library(dplyr)
library(wordcloud)
library(stringr)
library(bigmemory)
library(slam)
# Open Connection
con_twitter <- file("en_US.twitter.txt", "r")
con_news <- file("en_US.news.txt", "r") ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/toggleConstraint.R
\name{toggleConstraint}
\alias{toggleConstraint}
\title{toggleConstraint}
\usage{
toggleConstraint(myCaNmod, constr)
}
\arguments{
\item{myCaNmod}{a CaNmod object with following elements}
\item{constr}{a vector of strings ... | /RCaNmodel/man/toggleConstraint.Rd | permissive | inrae/RCaNmodel | R | false | true | 705 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/toggleConstraint.R
\name{toggleConstraint}
\alias{toggleConstraint}
\title{toggleConstraint}
\usage{
toggleConstraint(myCaNmod, constr)
}
\arguments{
\item{myCaNmod}{a CaNmod object with following elements}
\item{constr}{a vector of strings ... |
source('testingDataset.R')
monStationTemplate <- read_excel('data/tbl_ir_mon_stations_template.xlsx') # from X:\2018_Assessment\StationsDatabase\VRO
# Single station data ----------------------------------------------------------------------
conventionals_HUC<- left_join(conventionals, dplyr::select(stationTable, FDT_... | /R&S_app_v1/appModules_Testing/buildMetalsModule.R | no_license | EmmaVJones/Rivers-StreamsAssessment | R | false | false | 7,055 | r | source('testingDataset.R')
monStationTemplate <- read_excel('data/tbl_ir_mon_stations_template.xlsx') # from X:\2018_Assessment\StationsDatabase\VRO
# Single station data ----------------------------------------------------------------------
conventionals_HUC<- left_join(conventionals, dplyr::select(stationTable, FDT_... |
\name{MakeCensWeights}
\alias{MakeCensWeights}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Additive hazard weights for censoring.
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
MakeCensWeights(fFit, cfFit, data, startTimeName, stopTimeName,
... | /man/MakeCensWeights.Rd | no_license | kjetilroysland/ahw | R | false | false | 2,197 | rd | \name{MakeCensWeights}
\alias{MakeCensWeights}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Additive hazard weights for censoring.
}
\description{
%% ~~ A concise (1-5 lines) description of what the function does. ~~
}
\usage{
MakeCensWeights(fFit, cfFit, data, startTimeName, stopTimeName,
... |
library(BCEA)
#load_all("..")
#load_all("voi")
#load_all("../../../BCEA")
chemo_bcea <- bcea(e=chemo_cea$e, c=chemo_cea$c, wtp=30000)
test_that("Agrees with BCEA: single parameter, default GAM",{
expect_equal(
BCEA::evppi(parameter=c("pi1"), he=chemo_bcea, input=chemo_pars)$evppi[1],
voi::evppi(o... | /tests/tests_slow/test_bcea.R | no_license | chjackson/voi | R | false | false | 1,229 | r | library(BCEA)
#load_all("..")
#load_all("voi")
#load_all("../../../BCEA")
chemo_bcea <- bcea(e=chemo_cea$e, c=chemo_cea$c, wtp=30000)
test_that("Agrees with BCEA: single parameter, default GAM",{
expect_equal(
BCEA::evppi(parameter=c("pi1"), he=chemo_bcea, input=chemo_pars)$evppi[1],
voi::evppi(o... |
MISSING_VALUE <- "Not available"
#' DatasetSummary, This class contains the information of one particuar dataset in OmicsDI
#'
#' @importFrom rjson fromJSON
#' @import methods
#' @export
#' @exportClass DatasetSummary
#'
setClass("DatasetSummary",
slots = c(
dataset.id = "character",
description = "char... | /R/AllClasses.R | no_license | gccong/ddiR-sirius | R | false | false | 13,057 | r | MISSING_VALUE <- "Not available"
#' DatasetSummary, This class contains the information of one particuar dataset in OmicsDI
#'
#' @importFrom rjson fromJSON
#' @import methods
#' @export
#' @exportClass DatasetSummary
#'
setClass("DatasetSummary",
slots = c(
dataset.id = "character",
description = "char... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gl.ibd.r
\name{gl.ibd}
\alias{gl.ibd}
\title{Isolation by distance}
\usage{
gl.ibd(
gl = NULL,
Dgen = NULL,
Dgeo = NULL,
projected = FALSE,
permutations = 999,
plot = TRUE
)
}
\arguments{
\item{gl}{genlight object. If provided a s... | /man/gl.ibd.Rd | no_license | qitsweauca/dartR | R | false | true | 2,525 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/gl.ibd.r
\name{gl.ibd}
\alias{gl.ibd}
\title{Isolation by distance}
\usage{
gl.ibd(
gl = NULL,
Dgen = NULL,
Dgeo = NULL,
projected = FALSE,
permutations = 999,
plot = TRUE
)
}
\arguments{
\item{gl}{genlight object. If provided a s... |
library(glmnet)
mydata = read.table("./TrainingSet/Correlation/large_intestine.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.55,family="gaussian",standardize=TRUE)
sink('./Model/EN/Correlation/large_intestine/... | /Model/EN/Correlation/large_intestine/large_intestine_061.R | no_license | leon1003/QSMART | R | false | false | 387 | r | library(glmnet)
mydata = read.table("./TrainingSet/Correlation/large_intestine.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.55,family="gaussian",standardize=TRUE)
sink('./Model/EN/Correlation/large_intestine/... |
# File: R_1_Basics.R
# Course: Introduction to R
# Section: 1: The basics
# Author: Christopher Solis, uic.edu, @csolisoc
# Date: 2019-04-23
# Based on Mhairi McNeill Base R Cheat Sheet
# Some good introductory guides to R:
# https://rladiessydney.org/courses/ryouwithme/01-basicbasics-2/
# https://moderndive.n... | /IntroR/R_1_Basics.R | no_license | Tafheemmalik/https-github.com-chsolis-Into-to-R | R | false | false | 5,914 | r | # File: R_1_Basics.R
# Course: Introduction to R
# Section: 1: The basics
# Author: Christopher Solis, uic.edu, @csolisoc
# Date: 2019-04-23
# Based on Mhairi McNeill Base R Cheat Sheet
# Some good introductory guides to R:
# https://rladiessydney.org/courses/ryouwithme/01-basicbasics-2/
# https://moderndive.n... |
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{prop_domain}
\alias{prop_domain}
\title{Property domain.}
\usage{
prop_domain(x, data)
}
\arguments{
\item{x}{property to dispatch on}
\item{data}{name of data set}
}
\description{
Property domain.
}
| /man/prop_domain.Rd | no_license | jjallaire/ggvis | R | false | false | 261 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{prop_domain}
\alias{prop_domain}
\title{Property domain.}
\usage{
prop_domain(x, data)
}
\arguments{
\item{x}{property to dispatch on}
\item{data}{name of data set}
}
\description{
Property domain.
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/TwoPart_MultiMS.R
\name{convert_log2}
\alias{convert_log2}
\title{Convert values in a matrix to log2 transfored values}
\usage{
convert_log2(mm, use_cols)
}
\arguments{
\item{mm}{a dataframe of raw intensities in format:
(# peptides)x(# sampl... | /man/convert_log2.Rd | permissive | YuliyaLab/ProteoMM | R | false | true | 1,593 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/TwoPart_MultiMS.R
\name{convert_log2}
\alias{convert_log2}
\title{Convert values in a matrix to log2 transfored values}
\usage{
convert_log2(mm, use_cols)
}
\arguments{
\item{mm}{a dataframe of raw intensities in format:
(# peptides)x(# sampl... |
#Prepare a classification model using SVM for salary data
#Data Description:
# age -- age of a person
#workclass -- A work class is a grouping of work
#education -- Education of an individuals
#maritalstatus -- Marital status of an individulas
#occupation -- occupation of an individuals
#relationship --... | /SVM/salary_svm_solution.R | no_license | ksanu24/Data-science-assignment | R | false | false | 4,237 | r | #Prepare a classification model using SVM for salary data
#Data Description:
# age -- age of a person
#workclass -- A work class is a grouping of work
#education -- Education of an individuals
#maritalstatus -- Marital status of an individulas
#occupation -- occupation of an individuals
#relationship --... |
prelim.wt.cat.lines <- function(agg.data, supplier.name){
cat.agg <- aggregate(Total.Sales ~ Categ.By.Year + Category + Year, agg.data, sum)
cats.line <- ggplot(cat.agg, aes(x = Year, color = Category)) +
geom_line(aes(y = Total.Sales), size = 3) +
theme_dark() + labs(y = "Sales", title = paste("Sales by C... | /supplier.dash.scripts.jan18/prelim.wt.cat.lines.R | no_license | hamnsannah/supp_dash_fix | R | false | false | 413 | r | prelim.wt.cat.lines <- function(agg.data, supplier.name){
cat.agg <- aggregate(Total.Sales ~ Categ.By.Year + Category + Year, agg.data, sum)
cats.line <- ggplot(cat.agg, aes(x = Year, color = Category)) +
geom_line(aes(y = Total.Sales), size = 3) +
theme_dark() + labs(y = "Sales", title = paste("Sales by C... |
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = c(3.97314911878724e-307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = c(1.46950620900256e+302, 4.11932782999429e-175, -3.8... | /meteor/inst/testfiles/ET0_PriestleyTaylor/AFL_ET0_PriestleyTaylor/ET0_PriestleyTaylor_valgrind_files/1615844203-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 2,232 | r | testlist <- list(G = numeric(0), Rn = numeric(0), atmp = c(3.97314911878724e-307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = c(1.46950620900256e+302, 4.11932782999429e-175, -3.8... |
testlist <- list(A = structure(c(2.17107980817984e+205, 3.13388079053782e+296 ), .Dim = 1:2), B = structure(c(2.19477802979261e+294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance:::match_rows,testlist)
str(resu... | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613122359-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 323 | r | testlist <- list(A = structure(c(2.17107980817984e+205, 3.13388079053782e+296 ), .Dim = 1:2), B = structure(c(2.19477802979261e+294, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance:::match_rows,testlist)
str(resu... |
#' @title ATAC-seq Quality Control
#'
#' @description ATAC-seq, an assay for Transposase-Accessible Chromatin using
#' sequencing, is a rapid and sensitive method for chromatin accessibility
#' analysis. It was developed as an alternative method to MNase-seq, FAIRE-seq
#' and DNAse-seq. Comparing to the other method... | /R/ATACseqQC.R | no_license | jaime11/Transcription-Factor-Footprinting | R | false | false | 969 | r | #' @title ATAC-seq Quality Control
#'
#' @description ATAC-seq, an assay for Transposase-Accessible Chromatin using
#' sequencing, is a rapid and sensitive method for chromatin accessibility
#' analysis. It was developed as an alternative method to MNase-seq, FAIRE-seq
#' and DNAse-seq. Comparing to the other method... |
#this script is appended to readcounts2.R, and plots the forward and reverse strand reads for each category of RNA
#ddd
fwdrev = readcounts$Vaaa+readcounts$Vbbb #total number of reads
rect(base,c(1:nsamples)-0.8,base+fwdrev/readcounts$V2,c(1:nsamples)-0.2,col=colors()[ccc])
revfrac = readcounts$Vbbb/fwdrev
rect(base,c... | /Plots/readcounts_2.R | no_license | a-jartseva/RiboSeq-Analysis | R | false | false | 591 | r | #this script is appended to readcounts2.R, and plots the forward and reverse strand reads for each category of RNA
#ddd
fwdrev = readcounts$Vaaa+readcounts$Vbbb #total number of reads
rect(base,c(1:nsamples)-0.8,base+fwdrev/readcounts$V2,c(1:nsamples)-0.2,col=colors()[ccc])
revfrac = readcounts$Vbbb/fwdrev
rect(base,c... |
library(ape)
testtree <- read.tree("10571_2.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="10571_2_unrooted.txt") | /codeml_files/newick_trees_processed_and_cleaned/10571_2/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("10571_2.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="10571_2_unrooted.txt") |
library(shiny)
fluidPage(
titlePanel("Image output"),
fluidRow(
radioButtons("type","Image type:",c("wordcloud" = "cloud","mapping"="map"))
),
imageOutput("image2")
)
| /ui.R | no_license | linlu66/finalproject06 | R | false | false | 212 | r | library(shiny)
fluidPage(
titlePanel("Image output"),
fluidRow(
radioButtons("type","Image type:",c("wordcloud" = "cloud","mapping"="map"))
),
imageOutput("image2")
)
|
if(!require(tidyverse)) install.packages("tidyverse", repos = "http://cran.us.r-project.org")
if(!require(caret)) install.packages("caret", repos = "http://cran.us.r-project.org")
if(!require(data.table)) install.packages("data.table", repos = "http://cran.us.r-project.org")
if(!require(e1071)) install.packages("e10... | /project_fraud_detection.R | no_license | rahmed2/Credit-Card-Fraud-Detection | R | false | false | 5,581 | r | if(!require(tidyverse)) install.packages("tidyverse", repos = "http://cran.us.r-project.org")
if(!require(caret)) install.packages("caret", repos = "http://cran.us.r-project.org")
if(!require(data.table)) install.packages("data.table", repos = "http://cran.us.r-project.org")
if(!require(e1071)) install.packages("e10... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/util.r
\name{lsos}
\alias{lsos}
\title{show largest objects}
\usage{
lsos(..., n = 10)
}
\arguments{
\item{...}{arguments passed on to \code{.ls.objects}}
\item{n}{scalar integer, number of objects to show}
}
\description{
https://gist.githu... | /man/lsos.Rd | no_license | jackwasey/jwutil | R | false | true | 454 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/util.r
\name{lsos}
\alias{lsos}
\title{show largest objects}
\usage{
lsos(..., n = 10)
}
\arguments{
\item{...}{arguments passed on to \code{.ls.objects}}
\item{n}{scalar integer, number of objects to show}
}
\description{
https://gist.githu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/is.url.R
\name{is.url}
\alias{is.url}
\title{Which entries are URL's.}
\usage{
is.url(x)
}
\arguments{
\item{x}{a character vector.}
}
\value{
a logical vector of length x. values are TRUE if the entry looks
like a URL. NB the URL's are not... | /man/is.url.Rd | no_license | drmjc/mjcbase | R | false | true | 481 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/is.url.R
\name{is.url}
\alias{is.url}
\title{Which entries are URL's.}
\usage{
is.url(x)
}
\arguments{
\item{x}{a character vector.}
}
\value{
a logical vector of length x. values are TRUE if the entry looks
like a URL. NB the URL's are not... |
\name{densum}
\alias{densum}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Do Something
}
\description{
Densum
}
\usage{
densum(vin, bw = 5, dw = 3, match.wt.f = NULL, return.x = T,
from = min(vin), to = max(vin), step = 1, new.code = T)
}
%- maybe also 'usage' for other objects document... | /man/densum.Rd | no_license | fbrundu/spp | R | false | false | 2,572 | rd | \name{densum}
\alias{densum}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Do Something
}
\description{
Densum
}
\usage{
densum(vin, bw = 5, dw = 3, match.wt.f = NULL, return.x = T,
from = min(vin), to = max(vin), step = 1, new.code = T)
}
%- maybe also 'usage' for other objects document... |
library(reshape2)
airquality <- airquality
View(airquality)
# question 1. Using the melt() function, format "airquality"
# with 1 measurement per Month/Day date.
# Store it as "weatherSurvey".
head(airquality)
str(airquality)
names(airquality) <- tolower(names(airquality))
##위의 변수는 대문자를 소문자로 변환
melt_test <- melt(air... | /practice_5_AdsP_reshape_student.R | no_license | MyChoYS/R_ADsp_basic | R | false | false | 1,731 | r | library(reshape2)
airquality <- airquality
View(airquality)
# question 1. Using the melt() function, format "airquality"
# with 1 measurement per Month/Day date.
# Store it as "weatherSurvey".
head(airquality)
str(airquality)
names(airquality) <- tolower(names(airquality))
##위의 변수는 대문자를 소문자로 변환
melt_test <- melt(air... |
# install.packages(c("ggplot2", "dplyr", "geojsonio"))
library(leaflet)
library(dplyr)
# Basic leaflet usage ----
# leaflet() Starts a map
# addTiles() Add basemap so you can se eenvironment
# addMarkers() Add a marker at a position
leaflet() %>%
addTiles() %>%
addMarkers(lng = -122.30768, lat = 47.654... | /leaflet.R | permissive | andreybutenko/leaflet-demo | R | false | false | 2,470 | r | # install.packages(c("ggplot2", "dplyr", "geojsonio"))
library(leaflet)
library(dplyr)
# Basic leaflet usage ----
# leaflet() Starts a map
# addTiles() Add basemap so you can se eenvironment
# addMarkers() Add a marker at a position
leaflet() %>%
addTiles() %>%
addMarkers(lng = -122.30768, lat = 47.654... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glmnetFlex.R
\name{predict.glmnetfit}
\alias{predict.glmnetfit}
\title{Get predictions from a \code{glmnetfit} fit object}
\usage{
\method{predict}{glmnetfit}(object, newx, s = NULL, type = c("link",
"response", "coefficients", "nonzero"), ... | /man/predict.glmnetfit.Rd | no_license | nfultz/glmnet-mirror | R | false | true | 2,517 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glmnetFlex.R
\name{predict.glmnetfit}
\alias{predict.glmnetfit}
\title{Get predictions from a \code{glmnetfit} fit object}
\usage{
\method{predict}{glmnetfit}(object, newx, s = NULL, type = c("link",
"response", "coefficients", "nonzero"), ... |
#' convert phrases into single tokens
#'
#' Replace multi-word phrases in text(s) with a compound version of the phrases
#' concatenated with \code{concatenator} (by default, the "\code{_}" character) to
#' form a single token. This prevents tokenization of the phrases during
#' subsequent processing by eliminati... | /R/phrases.R | no_license | VIboy/quanteda | R | false | false | 5,571 | r |
#' convert phrases into single tokens
#'
#' Replace multi-word phrases in text(s) with a compound version of the phrases
#' concatenated with \code{concatenator} (by default, the "\code{_}" character) to
#' form a single token. This prevents tokenization of the phrases during
#' subsequent processing by eliminati... |
#' Maximum likelihood estimate
#'
#' Perform inference of bias and interaction parameters for a single response group
#'
#' Given numeric data matrix, either pseudo-likelihood
#' of mean-field theory is used to find the maximum likelihood estimate
#' of bias \code{h} and interaction \code{J} parameters. Normally
#' ... | /bbl/R/mlk.R | no_license | akhikolla/InformationHouse | R | false | false | 5,233 | r | #' Maximum likelihood estimate
#'
#' Perform inference of bias and interaction parameters for a single response group
#'
#' Given numeric data matrix, either pseudo-likelihood
#' of mean-field theory is used to find the maximum likelihood estimate
#' of bias \code{h} and interaction \code{J} parameters. Normally
#' ... |
library(ggplot2)
pivottrackerdata = read.csv("applico_fall_intern_project.csv",header = TRUE, stringsAsFactors = TRUE)
projectbudgetdata = read.csv("Fall_Intern_Project_Budget.csv",header = TRUE, stringsAsFactors = F)
pivottrackerdata$Estimate
sum(pivottrackerdata$Estimate)
pointsremaining = numeric(6)
for(i in 1:5){... | /Burndownchart.R | no_license | gketchum/Data-Intern-Project | R | false | false | 1,540 | r | library(ggplot2)
pivottrackerdata = read.csv("applico_fall_intern_project.csv",header = TRUE, stringsAsFactors = TRUE)
projectbudgetdata = read.csv("Fall_Intern_Project_Budget.csv",header = TRUE, stringsAsFactors = F)
pivottrackerdata$Estimate
sum(pivottrackerdata$Estimate)
pointsremaining = numeric(6)
for(i in 1:5){... |
plot2 <- function(){
energy_data <- read.table("c:/users/hugo.m.barros/videos/Data Science/Exploratory Data Analysis/Course Project 1/household_power_consumption.txt",sep = ";")
lines<- grep("^(1|2)/2/2007$",energy_data[,"V1"])
feb2007 <- energy_data[lines,]
measures <- c("Date","Time","Glob... | /plot2.R | no_license | hudafh/ExData_Plotting1 | R | false | false | 987 | r | plot2 <- function(){
energy_data <- read.table("c:/users/hugo.m.barros/videos/Data Science/Exploratory Data Analysis/Course Project 1/household_power_consumption.txt",sep = ";")
lines<- grep("^(1|2)/2/2007$",energy_data[,"V1"])
feb2007 <- energy_data[lines,]
measures <- c("Date","Time","Glob... |
#install.packages("trajectorySim", repos="http://R-Forge.R-project.org")
#install.packages("SimilarityMeasures")
#install.packages("vegclust")
#install.packages("RColorBrewer")
#install.packages("smacof")
#install.packages("simmer")
#install.packages("MASS")
#install.packages("ggpubr")
#install.packages("factoe... | /0724 trajectory similarity.R | no_license | llim913/2020-R-Trajectory-with-MoveVis-Move | R | false | false | 4,929 | r | #install.packages("trajectorySim", repos="http://R-Forge.R-project.org")
#install.packages("SimilarityMeasures")
#install.packages("vegclust")
#install.packages("RColorBrewer")
#install.packages("smacof")
#install.packages("simmer")
#install.packages("MASS")
#install.packages("ggpubr")
#install.packages("factoe... |
#' Raw Read for data corresponding to the Schuur dataset
#'
#' Download and read in the raw data tables from Hicks-Pries C. and Bonanza Creek LTER (2009).
#' Identifier: knb-lter-bnz.366.16
#'
#' This is not post-processed or QA/QCed by this package.
#'
#' @param dataDir filename for download directory
#' @param downl... | /R/readSchuur2009.R | permissive | kaleydodson/SOCDRaHR2 | R | false | false | 3,592 | r | #' Raw Read for data corresponding to the Schuur dataset
#'
#' Download and read in the raw data tables from Hicks-Pries C. and Bonanza Creek LTER (2009).
#' Identifier: knb-lter-bnz.366.16
#'
#' This is not post-processed or QA/QCed by this package.
#'
#' @param dataDir filename for download directory
#' @param downl... |
#' gets median of sample
#'
#' @param a vector
#' @param integer sample size
#' @param integer number of repetitions
#'
#'
#' @return medians of the vector samples
#'
#' @import stringr
#' @import dplyr
#' @import glue
#' @import purrr
#'
#' @export
many_sample_medians <- function(vec, n, reps){
medians <- replicate(... | /R/many_sample_medians.R | permissive | nadav-levanoni/CLT_Helper | R | false | false | 369 | r | #' gets median of sample
#'
#' @param a vector
#' @param integer sample size
#' @param integer number of repetitions
#'
#'
#' @return medians of the vector samples
#'
#' @import stringr
#' @import dplyr
#' @import glue
#' @import purrr
#'
#' @export
many_sample_medians <- function(vec, n, reps){
medians <- replicate(... |
# Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... | /R/evaluate_models.R | permissive | datasciences/glassbox | R | false | false | 1,947 | r | # Copyright 2014 Google Inc. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or a... |
source(system.file("extdata", "utils.R", package = "nhdplusTools"))
data_dir <- file.path(tempdir(check = TRUE), "nhdplusTools")
download_pkg_data("sample_natseamless.gpkg",
"https://doi-usgs.github.io/nhdplusTools/data/sample_natseamless.gpkg",
data_dir)
sample_data <- fi... | /inst/extdata/sample_data.R | permissive | cran/nhdplusTools | R | false | false | 366 | r | source(system.file("extdata", "utils.R", package = "nhdplusTools"))
data_dir <- file.path(tempdir(check = TRUE), "nhdplusTools")
download_pkg_data("sample_natseamless.gpkg",
"https://doi-usgs.github.io/nhdplusTools/data/sample_natseamless.gpkg",
data_dir)
sample_data <- fi... |
`ep` <-
function(mu, R, rho, n, isd=NULL, nRep=1, seed=NULL, crit=1e-6, maxiter=20)
{
if (nRep < 1 ) stop("Number of replications must be at least 1")
if (crit <= 0 ) stop("Precision criterion must be greater than zero")
if (maxiter < 1) stop("Maximum number of iterations must be at least 1")
... | /R/ep.R | no_license | cran/mvtBinaryEP | R | false | false | 2,505 | r | `ep` <-
function(mu, R, rho, n, isd=NULL, nRep=1, seed=NULL, crit=1e-6, maxiter=20)
{
if (nRep < 1 ) stop("Number of replications must be at least 1")
if (crit <= 0 ) stop("Precision criterion must be greater than zero")
if (maxiter < 1) stop("Maximum number of iterations must be at least 1")
... |
## ----global_options, include = FALSE------------------------------------------------------------------------------------------------------------------------------
try(source("../../.Rprofile"))
## import platform as platform
## print(platform.release())
## # This assums using an EC2 instance where amzn is in plat... | /aws/s3/htmlpdfr/fs_aws_s3.R | permissive | FanWangEcon/Py4Econ | R | false | false | 3,532 | r | ## ----global_options, include = FALSE------------------------------------------------------------------------------------------------------------------------------
try(source("../../.Rprofile"))
## import platform as platform
## print(platform.release())
## # This assums using an EC2 instance where amzn is in plat... |
#!/applications/R/R-3.5.0/bin/Rscript
# Perform hypergeometric tests to determine whether each HudsonRM_all
# gene quantile is over-represented or under-represented for
# NLR-encoding genes (as defined by Ksenia Krasileva) and, separately,
# meiotic-module genes (as defined in Alabdullah et al. 2019 Front. Plant Sci.)... | /ASY1_CS/snakemake_ChIPseq/mapped/geneProfiles_subgenomes/quantiles/proportion_NLRs_in_gene_quantiles_hypergeometricTest_HudsonRM.R | no_license | ajtock/wheat | R | false | false | 15,624 | r | #!/applications/R/R-3.5.0/bin/Rscript
# Perform hypergeometric tests to determine whether each HudsonRM_all
# gene quantile is over-represented or under-represented for
# NLR-encoding genes (as defined by Ksenia Krasileva) and, separately,
# meiotic-module genes (as defined in Alabdullah et al. 2019 Front. Plant Sci.)... |
#' Create a pp module which converts numerical features to principal components.
#'
#' @param cols A character vector. Specify the names of features to convert.
#' @param threshold A numeric value in [0, 1).
#' @param desc (optional) Description of the module.
pp_pca <- function(cols, threshold = .8,
... | /R/pp_pca.R | no_license | jeongnna/dps | R | false | false | 1,042 | r | #' Create a pp module which converts numerical features to principal components.
#'
#' @param cols A character vector. Specify the names of features to convert.
#' @param threshold A numeric value in [0, 1).
#' @param desc (optional) Description of the module.
pp_pca <- function(cols, threshold = .8,
... |
ggplot(df, aes(as.factor(Age_Bin), Pop_Percentage, fill = Gender)) +
geom_bar(stat = "identity") +
scale_y_continuous(breaks=seq(-100,100,5),labels=abs(seq(-100,100,5)),limits = (c(minx,maxx))) +
scale_x_discrete(labels = paste0(df$Age_Bin, "-", df$Age_Bin + 4)) +
coord_flip() +
ylab("Popu... | /css/ggplot-orig.R | no_license | kev-ho/Upskill-The-Essential-Web-Developer-Course | R | false | false | 551 | r | ggplot(df, aes(as.factor(Age_Bin), Pop_Percentage, fill = Gender)) +
geom_bar(stat = "identity") +
scale_y_continuous(breaks=seq(-100,100,5),labels=abs(seq(-100,100,5)),limits = (c(minx,maxx))) +
scale_x_discrete(labels = paste0(df$Age_Bin, "-", df$Age_Bin + 4)) +
coord_flip() +
ylab("Popu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{t11}
\alias{t11}
\title{97130187.t11}
\format{A data frame with 401 rows and 6 variables:
\describe{
\item{depth}{depth}
\item{temper}{temperature}
\item{salinity}{salinity}
\item{oxygen}{oxygen}
\item{ox... | /man/t11.Rd | no_license | boshek/limnotools | R | false | true | 507 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{t11}
\alias{t11}
\title{97130187.t11}
\format{A data frame with 401 rows and 6 variables:
\describe{
\item{depth}{depth}
\item{temper}{temperature}
\item{salinity}{salinity}
\item{oxygen}{oxygen}
\item{ox... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tt_afun_utils.R
\name{in_rows}
\alias{in_rows}
\title{Create multiple rows in analysis or summary functions}
\usage{
in_rows(
...,
.list = NULL,
.names = NULL,
.labels = NULL,
.formats = NULL,
.indent_mods = NULL,
.cell_footnote... | /man/in_rows.Rd | permissive | jcheng5/rtables | R | false | true | 1,894 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tt_afun_utils.R
\name{in_rows}
\alias{in_rows}
\title{Create multiple rows in analysis or summary functions}
\usage{
in_rows(
...,
.list = NULL,
.names = NULL,
.labels = NULL,
.formats = NULL,
.indent_mods = NULL,
.cell_footnote... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xGridBuild.R
\name{xGridBuild}
\alias{xGridBuild}
\title{xGridBuild}
\usage{
xGridBuild(xmin, xmax, ymin, ymax, cellsize, CELLCENTER = FALSE)
}
\arguments{
\item{xmin}{xmin}
\item{xmax}{xmax}
\item{ymin}{ymin}
\item{ymax}{ymax}
\item{cell... | /man/xGridBuild.Rd | no_license | jeanmarie-eu/spatialManip | R | false | true | 458 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/xGridBuild.R
\name{xGridBuild}
\alias{xGridBuild}
\title{xGridBuild}
\usage{
xGridBuild(xmin, xmax, ymin, ymax, cellsize, CELLCENTER = FALSE)
}
\arguments{
\item{xmin}{xmin}
\item{xmax}{xmax}
\item{ymin}{ymin}
\item{ymax}{ymax}
\item{cell... |
###########################################################################/**
# @set "class=Class"
#
# @RdocMethod getRdDeclaration
#
# @title "Gets the class declaraction in Rd format"
#
# \description{
# @get "title".
# }
#
# @synopsis
#
# \arguments{
# \item{...}{Not used.}
# }
#
# \value{
# Returns a @charact... | /R.oo/R/Class.misc.R | no_license | ingted/R-Examples | R | false | false | 6,214 | r | ###########################################################################/**
# @set "class=Class"
#
# @RdocMethod getRdDeclaration
#
# @title "Gets the class declaraction in Rd format"
#
# \description{
# @get "title".
# }
#
# @synopsis
#
# \arguments{
# \item{...}{Not used.}
# }
#
# \value{
# Returns a @charact... |
rows <- nrow(d)
fold <- floor(rows/10)
folds <- c(1,fold,fold*2,fold*3,fold*4,fold*5,fold*6,fold*7,fold*8,fold*9)
for(j in 1:9){
print(j)
if( j == 1){
train <- d[folds[j+1]+1:nrow(d),]
test <- d[folds[j]:folds[j+1],]
print(paste("train ", folds[j+1]+1,"-" , nrow(d)))
print(paste("test ", folds[j],"-" , folds[j+1... | /folds.R | no_license | gigacardoso/HMMinR | R | false | false | 904 | r | rows <- nrow(d)
fold <- floor(rows/10)
folds <- c(1,fold,fold*2,fold*3,fold*4,fold*5,fold*6,fold*7,fold*8,fold*9)
for(j in 1:9){
print(j)
if( j == 1){
train <- d[folds[j+1]+1:nrow(d),]
test <- d[folds[j]:folds[j+1],]
print(paste("train ", folds[j+1]+1,"-" , nrow(d)))
print(paste("test ", folds[j],"-" , folds[j+1... |
# required_data(c("STG_TRACK_PIECE", "STG_TRACK"))
# input_track <- 2
create_track_table_wide <- function(input_track, STG_TRACK_PIECE, STG_TRACK) {
currtrack <- STG_TRACK[input_track == TRACK_ID, TRACK_PIECE_VECTOR]
splitted_track <- data.table(TRACK_PIECE_ID = strsplit(currtrack, split = ",")[[1]])
splitted_t... | /scripts/solution/create_track_table_wide.R | no_license | Laurigit/flAImme | R | false | false | 1,131 | r |
# required_data(c("STG_TRACK_PIECE", "STG_TRACK"))
# input_track <- 2
create_track_table_wide <- function(input_track, STG_TRACK_PIECE, STG_TRACK) {
currtrack <- STG_TRACK[input_track == TRACK_ID, TRACK_PIECE_VECTOR]
splitted_track <- data.table(TRACK_PIECE_ID = strsplit(currtrack, split = ",")[[1]])
splitted_t... |
library(pracma)
library(xlsx)
library(sf)
load(file = "f:/UCDAVIS/C2VSIM_FG_OR/C2Vsim_FG_v2/ERS_proj/DGW2015.Rdata")
script_path = "F:/UCDAVIS/C2VSIM_FG_OR/C2Vsim_FG_v2/ERS_proj/"
c2vsim_path <- "f:/UCDAVIS/C2VSIM_FG_OR/C2Vsim_FG_v2/C2VSimFG-BETA_PublicRelease/"
# Read the Kern subregions
kern <- read_sf(paste0(scrip... | /ERS_proj/KernDGW.R | no_license | giorgk/C2Vsim_FG_v2 | R | false | false | 2,467 | r | library(pracma)
library(xlsx)
library(sf)
load(file = "f:/UCDAVIS/C2VSIM_FG_OR/C2Vsim_FG_v2/ERS_proj/DGW2015.Rdata")
script_path = "F:/UCDAVIS/C2VSIM_FG_OR/C2Vsim_FG_v2/ERS_proj/"
c2vsim_path <- "f:/UCDAVIS/C2VSIM_FG_OR/C2Vsim_FG_v2/C2VSimFG-BETA_PublicRelease/"
# Read the Kern subregions
kern <- read_sf(paste0(scrip... |
library(ggplot2)
cosmicColumnName <- c("Ap", "Dst", "Kp", "Lyman", "Sunspot", "Solar", "Proton10", "Proton30", "Proton60", "Temperature", "Density", "Speed", "PCN", "PCS")
nameDirs <- c("Ap_index", "Dst_index", "Kp_index", "Lyman_alpha_index", "R_sunspot_number", "Solar_index_F10.7", "Proton_flux_over_10_MeV", "Proto... | /spracovane_data/2010-2018/9-rocna_korelacia/Statistika/porovnanieTypovNehodovosti/vizualizaciaPorovnanieTypovNehodovosti.r | no_license | astronomer93/dopravna_nehodovost | R | false | false | 2,030 | r | library(ggplot2)
cosmicColumnName <- c("Ap", "Dst", "Kp", "Lyman", "Sunspot", "Solar", "Proton10", "Proton30", "Proton60", "Temperature", "Density", "Speed", "PCN", "PCS")
nameDirs <- c("Ap_index", "Dst_index", "Kp_index", "Lyman_alpha_index", "R_sunspot_number", "Solar_index_F10.7", "Proton_flux_over_10_MeV", "Proto... |
#!/bin/env Rscript
## Utility for mass automated download of QxMD Paper Collections
## utilizing RSelenium, rvest, and good ol' fashioned parsing
## Parse arguments -------------------------------------------------------------
library(optparse)
## Help text
option_list <- list(
make_option(c("-d", "--dest"), acti... | /collectionScraper.R | no_license | robertamezquita/collectionScraper | R | false | false | 1,921 | r | #!/bin/env Rscript
## Utility for mass automated download of QxMD Paper Collections
## utilizing RSelenium, rvest, and good ol' fashioned parsing
## Parse arguments -------------------------------------------------------------
library(optparse)
## Help text
option_list <- list(
make_option(c("-d", "--dest"), acti... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Class-BootPos.R
\docType{class}
\name{BootPos-class}
\alias{BootPos}
\alias{BootPos-class}
\title{Class for Generation of Bootstrapped Replications of a Time Series.}
\description{
\code{BootPos} is an S4 class that provides a common interfac... | /man/BootPos-class.Rd | no_license | LiangCZhang/quantspec | R | false | true | 1,223 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Class-BootPos.R
\docType{class}
\name{BootPos-class}
\alias{BootPos}
\alias{BootPos-class}
\title{Class for Generation of Bootstrapped Replications of a Time Series.}
\description{
\code{BootPos} is an S4 class that provides a common interfac... |
# read csv file without factors
hh_power_cons <- read.table("household_power_consumption.txt",
header = TRUE, sep=";", as.is = TRUE, na.strings="?")
# convert Date column into date:
hh_power_cons$Date2 <- as.Date(hh_power_cons$Date, "%d/%m/%Y")
# subset to 2007-02-01 and 2007-02-01 dates:
hh_power_cons2007 <- hh... | /plot2.R | no_license | arne7777777/ExData_Plotting1 | R | false | false | 1,019 | r | # read csv file without factors
hh_power_cons <- read.table("household_power_consumption.txt",
header = TRUE, sep=";", as.is = TRUE, na.strings="?")
# convert Date column into date:
hh_power_cons$Date2 <- as.Date(hh_power_cons$Date, "%d/%m/%Y")
# subset to 2007-02-01 and 2007-02-01 dates:
hh_power_cons2007 <- hh... |
# taken from https://gist.github.com/kdauria/524eade46135f6348140
# modified to only add r^2, not the equation as well; and b
stat_smooth_func <- function(mapping = NULL, data = NULL,
geom = "smooth", position = "identity",
...,
method = "auto",
... | /functions/stat_smooth_func.R | no_license | jdeines/RS_irrigation | R | false | false | 5,062 | r | # taken from https://gist.github.com/kdauria/524eade46135f6348140
# modified to only add r^2, not the equation as well; and b
stat_smooth_func <- function(mapping = NULL, data = NULL,
geom = "smooth", position = "identity",
...,
method = "auto",
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/htmlTable_helpers.R
\name{prAddCells}
\alias{prAddCells}
\title{Add a cell}
\usage{
prAddCells(rowcells, cellcode, align, style, cgroup_spacer_cells, has_rn_col,
col.columns, offset = 1, css.cell)
}
\arguments{
\item{rowcells}{The cells wit... | /man/prAddCells.Rd | no_license | ghaarsma/htmlTable | R | false | true | 1,927 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/htmlTable_helpers.R
\name{prAddCells}
\alias{prAddCells}
\title{Add a cell}
\usage{
prAddCells(rowcells, cellcode, align, style, cgroup_spacer_cells, has_rn_col,
col.columns, offset = 1, css.cell)
}
\arguments{
\item{rowcells}{The cells wit... |
#' @export
#' @title Download Southern Oscillation Index data
#'
#'
#' @description The Southern Oscillation Index is defined as the standardized difference between barometric readings at Darwin, Australia and Tahiti.
#'
#' @return
#' \itemize{
#' \item Date: Date object that uses the first of the month as a place... | /R/download-soi.R | no_license | pslota/rsoi | R | false | false | 1,430 | r | #' @export
#' @title Download Southern Oscillation Index data
#'
#'
#' @description The Southern Oscillation Index is defined as the standardized difference between barometric readings at Darwin, Australia and Tahiti.
#'
#' @return
#' \itemize{
#' \item Date: Date object that uses the first of the month as a place... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/id_mapping.R
\name{variant_to_study}
\alias{variant_to_study}
\title{Map a variant id to a study id}
\usage{
variant_to_study(variant_id, verbose = FALSE, warnings = TRUE)
}
\arguments{
\item{variant_id}{A character vector of variant identifi... | /man/variant_to_study.Rd | permissive | fmadani/gwasrapidd | R | false | true | 783 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/id_mapping.R
\name{variant_to_study}
\alias{variant_to_study}
\title{Map a variant id to a study id}
\usage{
variant_to_study(variant_id, verbose = FALSE, warnings = TRUE)
}
\arguments{
\item{variant_id}{A character vector of variant identifi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-aaa.r
\docType{methods}
\name{removeRmlist,plot_base-method}
\alias{removeRmlist,plot_base-method}
\title{Remove Registered Temporary Objects}
\usage{
\S4method{removeRmlist}{plot_base}()
}
\description{
\code{removeRmlist} met... | /man/plot-plot_base-removeRmlist.Rd | no_license | cran/RcmdrPlugin.KMggplot2 | R | false | true | 1,971 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot-aaa.r
\docType{methods}
\name{removeRmlist,plot_base-method}
\alias{removeRmlist,plot_base-method}
\title{Remove Registered Temporary Objects}
\usage{
\S4method{removeRmlist}{plot_base}()
}
\description{
\code{removeRmlist} met... |
\name{concept_names}
\alias{concept_names}
\title{Resolve concept names in the supplied lazy table reference}
\description{
This function accepts a (lazy) tibble and for each variable of the form
\code{XXX_concept_id} adds a corresponding variable
\code{XXX_concept_name} obtained by (left) joining against the
\code{con... | /man/concept_names.Rd | no_license | cran/omopr | R | false | false | 1,500 | rd | \name{concept_names}
\alias{concept_names}
\title{Resolve concept names in the supplied lazy table reference}
\description{
This function accepts a (lazy) tibble and for each variable of the form
\code{XXX_concept_id} adds a corresponding variable
\code{XXX_concept_name} obtained by (left) joining against the
\code{con... |
## Step 1. Data preperation
#(i) loading
#load IO data
IOT_b=read.csv(file="IOT_b.csv",header=T, as.is=T)
#load index mapping
sector_ind=read.csv(file="indcode.csv",header=T, as.is=T)
#(ii)preparing index
row_ind=sector_ind[,1:2]
col_ind=sector_ind[,3:4]
sec_group=sector_ind[,5:8]
va_ind=sector_ind[,9:10]
fd_ind=secto... | /SAM/IO/agg.r | no_license | katto2/CGE_2016 | R | false | false | 10,280 | r | ## Step 1. Data preperation
#(i) loading
#load IO data
IOT_b=read.csv(file="IOT_b.csv",header=T, as.is=T)
#load index mapping
sector_ind=read.csv(file="indcode.csv",header=T, as.is=T)
#(ii)preparing index
row_ind=sector_ind[,1:2]
col_ind=sector_ind[,3:4]
sec_group=sector_ind[,5:8]
va_ind=sector_ind[,9:10]
fd_ind=secto... |
<html>
<head>
<meta name="TextLength" content="SENT_NUM:5, WORD_NUM:97">
</head>
<body bgcolor="white">
<a href="#0" id="0">These children will soon be adults."</a>
<a href="#1" id="1">They will live this case until the day they die."</a>
<a href="#2" id="2">Many of the children who attended McMartin are now entering t... | /DUC-Dataset/Summary_p100_R/D080.LA012090-0110.html.R | no_license | Angela7126/SLNSumEval | R | false | false | 827 | r | <html>
<head>
<meta name="TextLength" content="SENT_NUM:5, WORD_NUM:97">
</head>
<body bgcolor="white">
<a href="#0" id="0">These children will soon be adults."</a>
<a href="#1" id="1">They will live this case until the day they die."</a>
<a href="#2" id="2">Many of the children who attended McMartin are now entering t... |
#' Plot anisotropy
#'
#' @param object An object from [sdmTMB()].
#'
#' @export
#' @rdname plot_anisotropy
#' @examples
#' \donttest{
#' d <- pcod
#' m <- sdmTMB(data = d,
#' formula = density ~ 0 + as.factor(year),
#' time = "year", spde = make_mesh(d, c("X", "Y"), n_knots = 80, type = "kmeans"),
#' family = twe... | /R/plot.R | no_license | Kotkot/sdmTMB | R | false | false | 960 | r | #' Plot anisotropy
#'
#' @param object An object from [sdmTMB()].
#'
#' @export
#' @rdname plot_anisotropy
#' @examples
#' \donttest{
#' d <- pcod
#' m <- sdmTMB(data = d,
#' formula = density ~ 0 + as.factor(year),
#' time = "year", spde = make_mesh(d, c("X", "Y"), n_knots = 80, type = "kmeans"),
#' family = twe... |
reactivation_tranches <- function(connection, month.min = 3, active.var = c('confirmed', 'manually_created', 'shared'),
lag.var = c('confirmed', 'rejected', 'manually_created', 'auto_created', 'shared'), lags = 3, tranche.min = 550){
#Connect to Local PSQL Database and Pull Data
print(noquote("Connecting to local Po... | /datascience-master/functions/reactivation_tranches.R | no_license | goughgorski/clusteryourself | R | false | false | 10,472 | r | reactivation_tranches <- function(connection, month.min = 3, active.var = c('confirmed', 'manually_created', 'shared'),
lag.var = c('confirmed', 'rejected', 'manually_created', 'auto_created', 'shared'), lags = 3, tranche.min = 550){
#Connect to Local PSQL Database and Pull Data
print(noquote("Connecting to local Po... |
\name{Biodetection}
\alias{Biodetection-class}
\alias{Biodetection}
\alias{show,Biodetection-method}
\alias{explo.plot,Biodetection-method}
\alias{dat2save,Biodetection-method}
\docType{class}
\title{Biodetection class}
\description{
Biodetection class generated from dat() function with type="biodetection". This objec... | /man/Biodetection.Rd | no_license | SoniaTC/NOISeq | R | false | false | 2,679 | rd | \name{Biodetection}
\alias{Biodetection-class}
\alias{Biodetection}
\alias{show,Biodetection-method}
\alias{explo.plot,Biodetection-method}
\alias{dat2save,Biodetection-method}
\docType{class}
\title{Biodetection class}
\description{
Biodetection class generated from dat() function with type="biodetection". This objec... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/createFLT.R
\name{createFLT}
\alias{createFLT}
\title{Create cells' FLT}
\usage{
createFLT(cell_list, Ncols)
}
\arguments{
\item{cell_list}{A list containing all the cell instants of the movie.}
\item{Ncols}{Number of colonies in the movie, ... | /man/createFLT.Rd | no_license | vicstefanou/ViSCA | R | false | true | 3,285 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/createFLT.R
\name{createFLT}
\alias{createFLT}
\title{Create cells' FLT}
\usage{
createFLT(cell_list, Ncols)
}
\arguments{
\item{cell_list}{A list containing all the cell instants of the movie.}
\item{Ncols}{Number of colonies in the movie, ... |
#NOTE: this code requires that the two scripts be saved in the same directory.
iterations=100
xt=matrix(NA, nrow=iterations, ncol=3)
mt=matrix(NA,nrow=iterations, ncol=3)
for(j in 1:iterations) {
source("stochastic_freq-depend.r")
xt[j,1] = max(which(N[,1] > 0))
xt[j,2] = max(which(N[,2] > 0))
xt[j,3] = max(... | /Community Original/iterations.r | no_license | gmyenni/RareStabilizationSimulation | R | false | false | 1,698 | r | #NOTE: this code requires that the two scripts be saved in the same directory.
iterations=100
xt=matrix(NA, nrow=iterations, ncol=3)
mt=matrix(NA,nrow=iterations, ncol=3)
for(j in 1:iterations) {
source("stochastic_freq-depend.r")
xt[j,1] = max(which(N[,1] > 0))
xt[j,2] = max(which(N[,2] > 0))
xt[j,3] = max(... |
#EJERCICIOS DE ARRAYS Y FACTORES.
#----------------------------------------
#este vector con 3 dimensiones 2 filas 2 columnas y 2 capas de profundidad
a <- array(1:8, dim=c(2, 2, 2))
'FACTORES'
'------------------------------------------------------'
#Creación de factor sin orden
gender_vector <- c('M', 'F', 'F', '... | /Scripts/Ejercicios_Arrays_Factores1.R | no_license | WadieAC/R-CODES | R | false | false | 3,200 | r | #EJERCICIOS DE ARRAYS Y FACTORES.
#----------------------------------------
#este vector con 3 dimensiones 2 filas 2 columnas y 2 capas de profundidad
a <- array(1:8, dim=c(2, 2, 2))
'FACTORES'
'------------------------------------------------------'
#Creación de factor sin orden
gender_vector <- c('M', 'F', 'F', '... |
# load source files
LoadSource<-function(bamchop.path) {
source.path<-paste(bamchop.path, '/source', sep='');
sources<-dir(source.path);
sources<-sources[grep('R$', sources)];
sapply(paste(source.path, sources, sep='/'), source)->x;
} | /source/LoadSource.R | no_license | BioinformaticsArchive/bamchop | R | false | false | 242 | r | # load source files
LoadSource<-function(bamchop.path) {
source.path<-paste(bamchop.path, '/source', sep='');
sources<-dir(source.path);
sources<-sources[grep('R$', sources)];
sapply(paste(source.path, sources, sep='/'), source)->x;
} |
# RPackageBuildDemo.R
# Do these first
# install.packages(c("devtools", "roxygen2", "testthat", "usethis"))
# update.packages(ask = FALSE, checkBuilt = TRUE)
# You need the #'@export before any local functions you want visible
#
#' @export
hello = function (){cat('Hello ...')}
#' @export
goodbye = function (){cat('Good... | /R/RPackageBuildDemo.R | no_license | tnearey/RPackageCreationDemo | R | false | false | 807 | r | # RPackageBuildDemo.R
# Do these first
# install.packages(c("devtools", "roxygen2", "testthat", "usethis"))
# update.packages(ask = FALSE, checkBuilt = TRUE)
# You need the #'@export before any local functions you want visible
#
#' @export
hello = function (){cat('Hello ...')}
#' @export
goodbye = function (){cat('Good... |
#' @title A-priori data information class
#' @description
#' This function creates an apriori class based on input.
#' @param data_type character, specifying type of data
#' @param units character, specifying units of data
#' @return A-priori object.
#' @examples
#' # For example:
#' ap <- apriori("air pressure", "cmH2... | /gwloggeR/R/apriori.R | permissive | afronhoffs/groundwater-logger-validation | R | false | false | 683 | r | #' @title A-priori data information class
#' @description
#' This function creates an apriori class based on input.
#' @param data_type character, specifying type of data
#' @param units character, specifying units of data
#' @return A-priori object.
#' @examples
#' # For example:
#' ap <- apriori("air pressure", "cmH2... |
# Intrinio API
#
# Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://i... | /R/ApiResponseSecurityDonchianChannel.r | no_license | federico-700/r-sdk | R | false | false | 6,550 | r | # Intrinio API
#
# Welcome to the Intrinio API! Through our Financial Data Marketplace, we offer a wide selection of financial data feed APIs sourced by our own proprietary processes as well as from many data vendors. For a complete API request / response reference please view the [Intrinio API documentation](https://i... |
separate_arguments <- function(arglist){
if (is.null(names(arglist))) {
return(list(unamed = arglist, named = list()))
}
idx <- names(arglist) != ""
unamed <- arglist[!idx]
names(unamed) <- NULL
return(list(unamed = unamed, named = arglist[idx]))
}
| /R/argument.R | permissive | Non-Contradiction/JuliaCall | R | false | false | 281 | r | separate_arguments <- function(arglist){
if (is.null(names(arglist))) {
return(list(unamed = arglist, named = list()))
}
idx <- names(arglist) != ""
unamed <- arglist[!idx]
names(unamed) <- NULL
return(list(unamed = unamed, named = arglist[idx]))
}
|
# functions get_Splinebasis to get x spline basis
# functions get_TimeSplinebasis to get time spline basis
get_Splinebasis <- function(objterm,
data=parent.frame(),
specials="NPHNLL",
all.vars.func=all_specials_vars,
... | /flexrsurv/R/get_Splinebasis.R | no_license | ingted/R-Examples | R | false | false | 8,756 | r | # functions get_Splinebasis to get x spline basis
# functions get_TimeSplinebasis to get time spline basis
get_Splinebasis <- function(objterm,
data=parent.frame(),
specials="NPHNLL",
all.vars.func=all_specials_vars,
... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL # set the inverse of the Matrix
... | /cachematrix.R | no_license | thirupathip7/ProgrammingAssignment2 | R | false | false | 1,223 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL # set the inverse of the Matrix
... |
library(shiny)
# Define UI for dataset viewer application
shinyUI(pageWithSidebar(
# Application title.
headerPanel(""),
sidebarPanel(
sliderInput(inputId = "starve",
label = "Starvation period (hrs)",
min = 2,
max = 24,
value = 2,
... | /ui.R | no_license | NatashaDukach/shiny-survival-covariate | R | false | false | 627 | r | library(shiny)
# Define UI for dataset viewer application
shinyUI(pageWithSidebar(
# Application title.
headerPanel(""),
sidebarPanel(
sliderInput(inputId = "starve",
label = "Starvation period (hrs)",
min = 2,
max = 24,
value = 2,
... |
#input mirBase_allNTA.txt
if (!require("ggplot2")){
install.packages("ggplot2", repos='http://cran.us.r-project.org')
}
if (!require("scales")){
install.packages("scales", repos='http://cran.us.r-project.org')
}
args <- commandArgs(TRUE)
STATFILE <- args[1]
GRAPHFILE <- args[2]
th<-theme_bw()+theme... | /isomiR.r | no_license | rlebron88/sRNAde_Ranalysis | R | false | false | 2,748 | r | #input mirBase_allNTA.txt
if (!require("ggplot2")){
install.packages("ggplot2", repos='http://cran.us.r-project.org')
}
if (!require("scales")){
install.packages("scales", repos='http://cran.us.r-project.org')
}
args <- commandArgs(TRUE)
STATFILE <- args[1]
GRAPHFILE <- args[2]
th<-theme_bw()+theme... |
test_that("agg_ppm generates file", {
file <- tempfile(fileext = '.ppm')
agg_ppm(file)
plot(1:10, 1:10)
dev.off()
expect_gt(file.info(file)$size, 0)
unlink(file)
})
| /tests/testthat/test-ppm.R | permissive | r-lib/ragg | R | false | false | 183 | r | test_that("agg_ppm generates file", {
file <- tempfile(fileext = '.ppm')
agg_ppm(file)
plot(1:10, 1:10)
dev.off()
expect_gt(file.info(file)$size, 0)
unlink(file)
})
|
################################################################################
# TODO LIST
# TODO: Re-write to simplify and for efficiency.
################################################################################
# CHANGE LOG (last 20 changes)
# 24.08.2018: Removed unused variables.
# 06.08.2017: Added audit... | /R/addColor.r | no_license | OskarHansson/strvalidator | R | false | false | 10,737 | r | ################################################################################
# TODO LIST
# TODO: Re-write to simplify and for efficiency.
################################################################################
# CHANGE LOG (last 20 changes)
# 24.08.2018: Removed unused variables.
# 06.08.2017: Added audit... |
#' @include internal.R
NULL
#' Coerce object to another object
#'
#' Coerce an object.
#'
#' @param x Object.
#'
#' @param ... unused arguments.
#'
#' @return An object.
#'
#' @name as
NULL
#' @rdname as
#' @method as.list Parameters
#' @export
as.list.Parameters <- function(x, ...)
structure(lapply(x$ids(), functi... | /R/misc.R | no_license | bbest/prioritizr | R | false | false | 692 | r | #' @include internal.R
NULL
#' Coerce object to another object
#'
#' Coerce an object.
#'
#' @param x Object.
#'
#' @param ... unused arguments.
#'
#' @return An object.
#'
#' @name as
NULL
#' @rdname as
#' @method as.list Parameters
#' @export
as.list.Parameters <- function(x, ...)
structure(lapply(x$ids(), functi... |
library(timereg)
### Name: two.stage
### Title: Fit Clayton-Oakes-Glidden Two-Stage model
### Aliases: two.stage
### Keywords: survival
### ** Examples
library(timereg)
data(diabetes)
# Marginal Cox model with treat as covariate
marg <- cox.aalen(Surv(time,status)~prop(treat)+prop(adult)+
cluster(id),data=diab... | /data/genthat_extracted_code/timereg/examples/two.stage.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 2,279 | r | library(timereg)
### Name: two.stage
### Title: Fit Clayton-Oakes-Glidden Two-Stage model
### Aliases: two.stage
### Keywords: survival
### ** Examples
library(timereg)
data(diabetes)
# Marginal Cox model with treat as covariate
marg <- cox.aalen(Surv(time,status)~prop(treat)+prop(adult)+
cluster(id),data=diab... |
# Automatically generated from all.nw using noweb
predict.coxph <- function(object, newdata,
type=c("lp", "risk", "expected", "terms"),
se.fit=FALSE, na.action=na.pass,
terms=names(object$assign), collapse,
reference=c("strata... | /survival/R/predict.coxph.R | no_license | fuentesdt/viewsurvivalsource | R | false | false | 13,579 | r | # Automatically generated from all.nw using noweb
predict.coxph <- function(object, newdata,
type=c("lp", "risk", "expected", "terms"),
se.fit=FALSE, na.action=na.pass,
terms=names(object$assign), collapse,
reference=c("strata... |
library(tidyverse)
library(dplyr)
library(ggplot2)
library(lubridate)
setwd('~/Dropbox/chlorophyll_processing/data/')
chla_master_df <- read_csv('manual_chlorophyll_2014_2021')
snp <- filter(chla_master_df, Reservoir == "SNP")
#################################################################
######################... | /Data/DataAlreadyUploadedToEDI/EDIProductionFiles/MakeEMLFilteredChlorophyll/2021/chla_pub_plots.R | no_license | CareyLabVT/Reservoirs | R | false | false | 11,841 | r | library(tidyverse)
library(dplyr)
library(ggplot2)
library(lubridate)
setwd('~/Dropbox/chlorophyll_processing/data/')
chla_master_df <- read_csv('manual_chlorophyll_2014_2021')
snp <- filter(chla_master_df, Reservoir == "SNP")
#################################################################
######################... |
####################################################
##### ADMMnet (ADMM-L0) #####
##### Penalty: L1, L2, Laplacian #####
##### Algorithm: one-step coordinate descent #####
####################################################
ADMMnet=function(x, y, family=c("gaussian", ... | /fuzzedpackages/ADMMnet/R/ADMMnet.R | no_license | akhikolla/testpackages | R | false | false | 1,628 | r |
####################################################
##### ADMMnet (ADMM-L0) #####
##### Penalty: L1, L2, Laplacian #####
##### Algorithm: one-step coordinate descent #####
####################################################
ADMMnet=function(x, y, family=c("gaussian", ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/alteration.R
\name{early_or_late}
\alias{early_or_late}
\title{Determine if timing metrics are early, late, or in range}
\usage{
early_or_late(value, early_value, late_value, days_in_water_year)
}
\description{
Properly rolls over the calenda... | /ffcAPIClient/man/early_or_late.Rd | no_license | ceff-tech/ffc_api_client | R | false | true | 948 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/alteration.R
\name{early_or_late}
\alias{early_or_late}
\title{Determine if timing metrics are early, late, or in range}
\usage{
early_or_late(value, early_value, late_value, days_in_water_year)
}
\description{
Properly rolls over the calenda... |
### ===== File part of R package expm =====
###
### Function to compute the matrix logarithm
###
logm <- function(x, method = c("Higham08", "Eigen"),
## order = 8, trySym = TRUE,
tol = .Machine$double.eps)
{
## work with "Matrix" too: A<-as.matrix(A)
d <- dim(x)
if(length(d) != 2 || d[1]... | /R/logm.R | no_license | cran/expm | R | false | false | 734 | r | ### ===== File part of R package expm =====
###
### Function to compute the matrix logarithm
###
logm <- function(x, method = c("Higham08", "Eigen"),
## order = 8, trySym = TRUE,
tol = .Machine$double.eps)
{
## work with "Matrix" too: A<-as.matrix(A)
d <- dim(x)
if(length(d) != 2 || d[1]... |
## Now using K-nearest neighbours
kn3<-knn3(as.factor(Attrition_Flag)~.,data =train_data,k=7,prob=TRUE)
summary(kn3)
## we predict using kn3
kn3_predict<-predict(kn3,test_data,type = "class")
plot(kn3_predict)
confusionMatrix(data = as.factor(kn3_predict), reference = test_AF)
##Calculating accuracy
mea... | /Knn-model.R | no_license | ashvin14/Credit_Card_customers | R | false | false | 1,058 | r |
## Now using K-nearest neighbours
kn3<-knn3(as.factor(Attrition_Flag)~.,data =train_data,k=7,prob=TRUE)
summary(kn3)
## we predict using kn3
kn3_predict<-predict(kn3,test_data,type = "class")
plot(kn3_predict)
confusionMatrix(data = as.factor(kn3_predict), reference = test_AF)
##Calculating accuracy
mea... |
# This file contains decision functions (not exported)
# to use, pass cmfilter:::corMinusPartCor to cmf function
#' the difference in coefficients decision function (correlation - partial cor)
#'
#' @importFrom stats cor qnorm
#'
#' @examples # generate data
#' dat <- generateMed(n = 100, a = 0.4, b = -0.8)
... | /R/decisionFunctions.R | no_license | cran/cmfilter | R | false | false | 2,990 | r | # This file contains decision functions (not exported)
# to use, pass cmfilter:::corMinusPartCor to cmf function
#' the difference in coefficients decision function (correlation - partial cor)
#'
#' @importFrom stats cor qnorm
#'
#' @examples # generate data
#' dat <- generateMed(n = 100, a = 0.4, b = -0.8)
... |
#' simMultDir - creates multiple Dirichlet distributions.
#'
#' @param n A number corresponding to the number of distributions to generate.
#' @param vec A vector of parameter values for the Dirichlet
#' @seealso Note that this loads the \code{gtools} package for the \code{rdirichlet} function.
#' @examples
#' makeDir(... | /R/simMultDir.R | no_license | robschick/eliciteg | R | false | false | 422 | r | #' simMultDir - creates multiple Dirichlet distributions.
#'
#' @param n A number corresponding to the number of distributions to generate.
#' @param vec A vector of parameter values for the Dirichlet
#' @seealso Note that this loads the \code{gtools} package for the \code{rdirichlet} function.
#' @examples
#' makeDir(... |
incerc sa - mi imaginez ce face un parlamentar roman in singuratatea biroului sau .
isi suna nevasta sau amanta pentru un " ce mai faci " , urmat de doua - trei detalii marunte .
mergem acolo , ai luat aia , ai vorbit cu cutare , ce nota a luat copilu' , ne vedem la sapte !
pe urma , suna un coleg de partid .
ai vo... | /data/Newspapers/1999.05.02.editorial.46925.0025.r | no_license | narcis96/decrypting-alpha | R | false | false | 4,488 | r | incerc sa - mi imaginez ce face un parlamentar roman in singuratatea biroului sau .
isi suna nevasta sau amanta pentru un " ce mai faci " , urmat de doua - trei detalii marunte .
mergem acolo , ai luat aia , ai vorbit cu cutare , ce nota a luat copilu' , ne vedem la sapte !
pe urma , suna un coleg de partid .
ai vo... |
# Challenge 313 Intermediate ----------------------------------------------
library(stringr)
library(RCurl)
library(readr)
img_mani <- function(img, op) {
all <- str_split(img, "\n")[[1]]
data <- as.numeric(all[c(-1)])
data <- data[!is.na(data)]
dim <- str_split(all[1], " ")[[1]]
img <- matrix(... | /313 Intermediate.R | no_license | albcab/-r-dailyprogrammer- | R | false | false | 1,219 | r |
# Challenge 313 Intermediate ----------------------------------------------
library(stringr)
library(RCurl)
library(readr)
img_mani <- function(img, op) {
all <- str_split(img, "\n")[[1]]
data <- as.numeric(all[c(-1)])
data <- data[!is.na(data)]
dim <- str_split(all[1], " ")[[1]]
img <- matrix(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulation_functions.R
\name{simulate_answer}
\alias{simulate_answer}
\title{Simulate answer}
\usage{
simulate_answer(theta, model, alpha, beta, guessing, item_keys)
}
\arguments{
\item{theta}{Vector with true theta.}
\item{model}{One of \co... | /man/simulate_answer.Rd | no_license | Karel-Kroeze/ShadowCAT | R | false | true | 2,591 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulation_functions.R
\name{simulate_answer}
\alias{simulate_answer}
\title{Simulate answer}
\usage{
simulate_answer(theta, model, alpha, beta, guessing, item_keys)
}
\arguments{
\item{theta}{Vector with true theta.}
\item{model}{One of \co... |
testlist <- list(Rs = numeric(0), atmp = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = numeric(0), temp = numeric(0))
result <- do.call(meteor:::ET0_Makkink,testlist)
str(result) | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615852744-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 267 | r | testlist <- list(Rs = numeric(0), atmp = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = numeric(0), temp = numeric(0))
result <- do.call(meteor:::ET0_Makkink,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/terrain_analysis.R
\name{wbt_slope}
\alias{wbt_slope}
\title{Slope}
\usage{
wbt_slope(
dem,
output,
zfactor = NULL,
units = "degrees",
wd = NULL,
verbose_mode = FALSE,
compress_rasters = FALSE
)
}
\arguments{
\item{dem}{Input ra... | /man/wbt_slope.Rd | permissive | dondealban/whiteboxR | R | false | true | 932 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/terrain_analysis.R
\name{wbt_slope}
\alias{wbt_slope}
\title{Slope}
\usage{
wbt_slope(
dem,
output,
zfactor = NULL,
units = "degrees",
wd = NULL,
verbose_mode = FALSE,
compress_rasters = FALSE
)
}
\arguments{
\item{dem}{Input ra... |
# Run the coevolutionary model with interactions shifting in time.
# Based on a probability prob_change (g), in each timestep of the simulation, an interaction
# shifts (MM -> AM and AM -> MM).
#
# This script returns a simple graph with species traits changing in time due to coevolution.
# The asteriscs in the graph s... | /R/scripts/ConDep_Basic_Traits.R | no_license | lucascamacho/coevo_mut_antag | R | false | false | 2,681 | r | # Run the coevolutionary model with interactions shifting in time.
# Based on a probability prob_change (g), in each timestep of the simulation, an interaction
# shifts (MM -> AM and AM -> MM).
#
# This script returns a simple graph with species traits changing in time due to coevolution.
# The asteriscs in the graph s... |
library(caret)
install.packages("party")
library(rpart)
library(randomForest)
library(dplyr)
library(caTools)
install.packages("gbm")
library(gbm)
library(plyr)
# load data
train <- read.csv("train.csv")
test <- read.csv("test.csv")
# combine train and test data
casual <- train$casual
registered <- train$registered
co... | /Code/Bike.R | no_license | TrungLe205/Bike-Sharing | R | false | false | 6,682 | r | library(caret)
install.packages("party")
library(rpart)
library(randomForest)
library(dplyr)
library(caTools)
install.packages("gbm")
library(gbm)
library(plyr)
# load data
train <- read.csv("train.csv")
test <- read.csv("test.csv")
# combine train and test data
casual <- train$casual
registered <- train$registered
co... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.