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 |
|---|---|---|---|---|---|---|---|---|---|
# "" – do nothing
# "a:b:c" - generate quantitive variable with such proportions of answers
# "a:b=x;c:d=y" - generate qualitive data and give certain prob to a factor
# "a<1.0:b=c" for continuous FIRST
# Check whether numeration is from 1 everywhere
expected_corrs_vector = c("национальность", "планы на будуще... | /common/expected_corrs.r | no_license | isbur/dissertation | R | false | false | 4,787 | r | # "" – do nothing
# "a:b:c" - generate quantitive variable with such proportions of answers
# "a:b=x;c:d=y" - generate qualitive data and give certain prob to a factor
# "a<1.0:b=c" for continuous FIRST
# Check whether numeration is from 1 everywhere
expected_corrs_vector = c("национальность", "планы на будуще... |
\name{dr_identify}
\alias{dr_identify}
\title{Learn about the Dryad OAI-PMH service.}
\usage{
dr_identify(formatted = FALSE)
}
\arguments{
\item{formatted}{Defaults to printing results - set to
TRUE to silence printing.}
}
\value{
List of information describing Dryad.
}
\description{
Learn about the Dryad OAI... | /man/dr_identify.Rd | no_license | mja/rdryad | R | false | false | 376 | rd | \name{dr_identify}
\alias{dr_identify}
\title{Learn about the Dryad OAI-PMH service.}
\usage{
dr_identify(formatted = FALSE)
}
\arguments{
\item{formatted}{Defaults to printing results - set to
TRUE to silence printing.}
}
\value{
List of information describing Dryad.
}
\description{
Learn about the Dryad OAI... |
rm(list=ls())
# extração dos dados de treino e teste
train <- read.csv('data/dataset_treino.csv')
test <- read.csv('data/dataset_teste.csv')
save(list=ls(), file = 'data/load_data.RData') | /scripts/open_data.R | no_license | ffgama/prediction_energy_star_score | R | false | false | 191 | r | rm(list=ls())
# extração dos dados de treino e teste
train <- read.csv('data/dataset_treino.csv')
test <- read.csv('data/dataset_teste.csv')
save(list=ls(), file = 'data/load_data.RData') |
###################################################################################################
###################################################################################################
#likelihood functions
# Utility functions
logit = function(pp) { log(pp) - log(1-pp) }
expit = function(eta) {1/(1+exp... | /vishika.R | no_license | bandara10/research | R | false | false | 9,127 | r | ###################################################################################################
###################################################################################################
#likelihood functions
# Utility functions
logit = function(pp) { log(pp) - log(1-pp) }
expit = function(eta) {1/(1+exp... |
# CONSECUTIVE REGRESSION ANALYSES
# INTENSIVE MARGIN -----------
## Interventiontype x Sourcetype x Reactance interaction, with mean and median centering of Reactance -----------------------
DistLM <- lm(Dist ~ RecvsDefD * Sourcetype * Reactance, df)
DistRLM <- coeftest(DistLM, vcov = vcovHC(DistLM, "HC1"))
# center ... | /scripts/Consecutive regression analyses Stargazer.R | no_license | Zirys1/who-intervenes-how | R | false | false | 63,459 | r | # CONSECUTIVE REGRESSION ANALYSES
# INTENSIVE MARGIN -----------
## Interventiontype x Sourcetype x Reactance interaction, with mean and median centering of Reactance -----------------------
DistLM <- lm(Dist ~ RecvsDefD * Sourcetype * Reactance, df)
DistRLM <- coeftest(DistLM, vcov = vcovHC(DistLM, "HC1"))
# center ... |
# Title: Introduction to R
# Author: Rajanikant
# Description: Understanding the simple structure of R
print("Hello World!")
# Finding the help about the commands
?plot # 1st way
help("mean") # 2nd way
# Also you can go in the help tab and check the help about the function
# Installing and using the packages in the c... | /introduction.R | permissive | drajanikant/r-basics | R | false | false | 471 | r | # Title: Introduction to R
# Author: Rajanikant
# Description: Understanding the simple structure of R
print("Hello World!")
# Finding the help about the commands
?plot # 1st way
help("mean") # 2nd way
# Also you can go in the help tab and check the help about the function
# Installing and using the packages in the c... |
#'
#'
#'
#' @param n
#'@param iter
#'@param a
#'@param b
#'
#' @return
#' @export
#'
#' @examples
#'
mycltu=function(n,iter,a=0,b=10){
## r-random sample from the uniform
y=runif(n*iter,a,b)
## Place these numbers into a matrix
## The columns will correspond to the iteration and the rows will e... | /mycltu.R | no_license | megarae525/statistics2020OU | R | false | false | 1,481 | r | #'
#'
#'
#' @param n
#'@param iter
#'@param a
#'@param b
#'
#' @return
#' @export
#'
#' @examples
#'
mycltu=function(n,iter,a=0,b=10){
## r-random sample from the uniform
y=runif(n*iter,a,b)
## Place these numbers into a matrix
## The columns will correspond to the iteration and the rows will e... |
rm(list = ls())
# Load packages
library(ggrastr)
library(rstudioapi)
library(devtools)
library("flowCore")
library("flowWorkspace")
library(cytofCore)
library(FlowSOM)
# library(cytofkit)
library(cluster)
library(Rtsne)
library(ggplot2)
library(dplyr)
library(flowViz)
library(scales)
library(ggthemes)
library(RColorBre... | /Flow/FlowCyWorkflow_part3_DA.R | no_license | BorrelloLab/MM-GVAX | R | false | false | 2,975 | r | rm(list = ls())
# Load packages
library(ggrastr)
library(rstudioapi)
library(devtools)
library("flowCore")
library("flowWorkspace")
library(cytofCore)
library(FlowSOM)
# library(cytofkit)
library(cluster)
library(Rtsne)
library(ggplot2)
library(dplyr)
library(flowViz)
library(scales)
library(ggthemes)
library(RColorBre... |
library(tidyverse)
library(GenomicRanges)
library(Biostrings)
library(plyranges)
library(reshape2)
library(RColorBrewer)
species_list <-readr::read_tsv("~/Genomes/Birds/bird_genomes.tsv", col_names = c("species_name", "genome_name"))
work_dir <- "~/temp"
query_dir <- "~/Birds/OrthologueRegions/cluster"
genome_dir <- "... | /small_species_specific_ortho/Zosterops.R | no_license | jamesdgalbraith/Avian_CR1_Activity | R | false | false | 14,449 | r | library(tidyverse)
library(GenomicRanges)
library(Biostrings)
library(plyranges)
library(reshape2)
library(RColorBrewer)
species_list <-readr::read_tsv("~/Genomes/Birds/bird_genomes.tsv", col_names = c("species_name", "genome_name"))
work_dir <- "~/temp"
query_dir <- "~/Birds/OrthologueRegions/cluster"
genome_dir <- "... |
ListOfZooToZoo = function(listn, tseq) {
# Rachel Blakers 1/05/2014 v0.1
#
# Flatten a possibly nested list of zoo objects to a single
# zoo object.
dat = zoo(, tseq)
FlattenList = function(x) {
if (!is.list(x)) {
dat = merge(dat, x)
} else {
for (i in 1:length(x)) {
tmp = FlattenList(x[... | /Model/hydrological/Lib/ListOfZooToZoo.R | no_license | HYDFKI7/integrated-mk | R | false | false | 491 | r |
ListOfZooToZoo = function(listn, tseq) {
# Rachel Blakers 1/05/2014 v0.1
#
# Flatten a possibly nested list of zoo objects to a single
# zoo object.
dat = zoo(, tseq)
FlattenList = function(x) {
if (!is.list(x)) {
dat = merge(dat, x)
} else {
for (i in 1:length(x)) {
tmp = FlattenList(x[... |
\name{crx}
\alias{crx}
\docType{data}
\title{
crx
}
\description{
The Australian credit Aproval dataset form the Statlog Project
}
\usage{data("crx")}
\format{
A data frame with 690 observations on the following 16 variables.
\describe{
\item{\code{V1}}{a factor with levels \code{a} \code{b}}
... | /man/crx.Rd | no_license | neslon/dprep | R | false | false | 1,679 | rd | \name{crx}
\alias{crx}
\docType{data}
\title{
crx
}
\description{
The Australian credit Aproval dataset form the Statlog Project
}
\usage{data("crx")}
\format{
A data frame with 690 observations on the following 16 variables.
\describe{
\item{\code{V1}}{a factor with levels \code{a} \code{b}}
... |
library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/lymphoid.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.04,family="gaussian",standardize=TRUE)
sink('./Model/EN/ReliefF/lymphoid/lymphoid_017.txt',appe... | /Model/EN/ReliefF/lymphoid/lymphoid_017.R | no_license | leon1003/QSMART | R | false | false | 358 | r | library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/lymphoid.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.04,family="gaussian",standardize=TRUE)
sink('./Model/EN/ReliefF/lymphoid/lymphoid_017.txt',appe... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... | /CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615833250-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 438 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/makeClusterMPI.R
\name{makeClusterMPI}
\alias{makeClusterMPI}
\title{Create a Message Passing Interface (MPI) cluster of \R workers for parallel processing}
\usage{
makeClusterMPI(
workers,
...,
autoStop = FALSE,
verbose = getOption("... | /man/makeClusterMPI.Rd | no_license | myoung3/future | R | false | true | 1,650 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/makeClusterMPI.R
\name{makeClusterMPI}
\alias{makeClusterMPI}
\title{Create a Message Passing Interface (MPI) cluster of \R workers for parallel processing}
\usage{
makeClusterMPI(
workers,
...,
autoStop = FALSE,
verbose = getOption("... |
context('Call')
p0 <- list(param = data.frame(p0 = 3.2))
p1 <- list(param = data.frame(p1 = c(4)))
p2 <- list(param = data.frame(p2 = c(TRUE, FALSE)))
p3 <- list(param = data.frame(p3a = 'foo',
p3b = 5))
# We may want to pass only one structure with only one variable. The name of the
# v... | /tests/testthat/test_call.R | permissive | kostrzewa/paramvalf | R | false | false | 1,219 | r | context('Call')
p0 <- list(param = data.frame(p0 = 3.2))
p1 <- list(param = data.frame(p1 = c(4)))
p2 <- list(param = data.frame(p2 = c(TRUE, FALSE)))
p3 <- list(param = data.frame(p3a = 'foo',
p3b = 5))
# We may want to pass only one structure with only one variable. The name of the
# v... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in
% R/calcular_cota_maxima_transitividad_matriz_puntos.R
\name{calcular_cota_maxima_transitividad_matriz_puntos}
\alias{calcular_cota_maxima_transitividad_matriz_puntos}
\title{Calculate the upper bound of R with filled with each row of mpoints... | /man/calcular_cota_maxima_transitividad_matriz_puntos.Rd | no_license | emiliotorres/preferelation | R | false | true | 601 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in
% R/calcular_cota_maxima_transitividad_matriz_puntos.R
\name{calcular_cota_maxima_transitividad_matriz_puntos}
\alias{calcular_cota_maxima_transitividad_matriz_puntos}
\title{Calculate the upper bound of R with filled with each row of mpoints... |
#' Parse package dependency strings.
#'
#' @param string to parse. Should look like `"R (>= 3.0), ggplot2"` etc.
#' @return list of two character vectors: `name` package names,
#' and `version` package versions. If version is not specified,
#' it will be stored as NA.
#' @keywords internal
#' @export
#' @examples
#... | /R/package-deps.r | no_license | isabella232/pkgload | R | false | false | 2,563 | r | #' Parse package dependency strings.
#'
#' @param string to parse. Should look like `"R (>= 3.0), ggplot2"` etc.
#' @return list of two character vectors: `name` package names,
#' and `version` package versions. If version is not specified,
#' it will be stored as NA.
#' @keywords internal
#' @export
#' @examples
#... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kernel_Matern32.R
\docType{class}
\name{Matern32}
\alias{Matern32}
\title{Matern 3/2 Kernel R6 class}
\format{
\code{\link{R6Class}} object.
}
\value{
Object of \code{\link{R6Class}} with methods for fitting GP model.
}
\description{
Matern 3... | /man/Matern32.Rd | no_license | CollinErickson/GauPro | R | false | true | 7,743 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/kernel_Matern32.R
\docType{class}
\name{Matern32}
\alias{Matern32}
\title{Matern 3/2 Kernel R6 class}
\format{
\code{\link{R6Class}} object.
}
\value{
Object of \code{\link{R6Class}} with methods for fitting GP model.
}
\description{
Matern 3... |
# pipe.BaselineAdjustTranscripts.R
# scale a set of transcriptomes to have identical time zero expression levels
`pipe.BaselineAdjustTranscripts` <- function( sampleIDs, subjectIDs, timeIDs, baselineID=timeIDs[1],
adjusted.path="adjustedResults/transcript",
annotationFile="Annotation.txt", optionsFile="Optio... | /R/pipe.BaselineAdjustTranscripts.R | no_license | robertdouglasmorrison/DuffyNGS | R | false | false | 5,394 | r | # pipe.BaselineAdjustTranscripts.R
# scale a set of transcriptomes to have identical time zero expression levels
`pipe.BaselineAdjustTranscripts` <- function( sampleIDs, subjectIDs, timeIDs, baselineID=timeIDs[1],
adjusted.path="adjustedResults/transcript",
annotationFile="Annotation.txt", optionsFile="Optio... |
testlist <- list(X = structure(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), .Dim = 6:5))
result <- do.call(hmlasso:::covC,testlist)
str(result) | /hmlasso/inst/testfiles/covC/libFuzzer_covC/covC_valgrind_files/1609896830-test.R | no_license | akhikolla/newtestfiles-2 | R | false | false | 192 | r | testlist <- list(X = structure(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), .Dim = 6:5))
result <- do.call(hmlasso:::covC,testlist)
str(result) |
transpose_dataset=function(filename){
data_A=as.data.frame(read.csv(file=paste0("DataSet/",filename,".csv"),1))
data_A=as.data.frame(t(data_A))
data_B=parSapply(cl,1:(ncol(data_A)),function(i,data_A){
after=as.numeric(as.character(data_A[,i]))
return(after)
},data_A)
data_B=data_B[-1,]
data_B=as.data.frame(da... | /R/transpose_dataset.r | no_license | DaYi-TW/Data-science | R | false | false | 405 | r | transpose_dataset=function(filename){
data_A=as.data.frame(read.csv(file=paste0("DataSet/",filename,".csv"),1))
data_A=as.data.frame(t(data_A))
data_B=parSapply(cl,1:(ncol(data_A)),function(i,data_A){
after=as.numeric(as.character(data_A[,i]))
return(after)
},data_A)
data_B=data_B[-1,]
data_B=as.data.frame(da... |
decompose_table_data_ts_names <-
find_testthat_root_file(paste0("out/decompose-table-data-ts-", src_names, ".txt"))
reunite_parent_child_data_ts_names <-
find_testthat_root_file(paste0("out/reunite-parent-child-data-ts-", src_names, ".txt"))
reunite_parent_child_from_list_data_ts_names <-
find_testthat_root_file(... | /tests/testthat/test-table-surgery.R | permissive | philipp-baumann/dm | R | false | false | 1,745 | r | decompose_table_data_ts_names <-
find_testthat_root_file(paste0("out/decompose-table-data-ts-", src_names, ".txt"))
reunite_parent_child_data_ts_names <-
find_testthat_root_file(paste0("out/reunite-parent-child-data-ts-", src_names, ".txt"))
reunite_parent_child_from_list_data_ts_names <-
find_testthat_root_file(... |
getallpatterns <- function(myString, patLength) {
## Get all patterns of length patLength in the string "mystring"
strLength <- nchar(myString)
patterns <- vector('character')
for (i in 1:(strLength - patLength + 1)) {
pattern <- substring(myString, i, (i + patLength -1))
patterns <- c(patterns, patt... | /findkmersmismatches5.R | no_license | HomerJSimpson1/BioinfAlgos | R | false | false | 7,122 | r | getallpatterns <- function(myString, patLength) {
## Get all patterns of length patLength in the string "mystring"
strLength <- nchar(myString)
patterns <- vector('character')
for (i in 1:(strLength - patLength + 1)) {
pattern <- substring(myString, i, (i + patLength -1))
patterns <- c(patterns, patt... |
library(oce)
context("CTD")
test_that("ice-tethered profiler", {
if (1 == length(list.files(path=".", pattern="local_data"))) {
itp <- read.ctd.itp("local_data/itp99grd0000.dat")
summary(itp)
plot(itp)
expect_equal(itp[["latitude"]], 77.8840)
... | /tests/testthat/test_local_ctd.R | no_license | pablovaldes/oce | R | false | false | 391 | r | library(oce)
context("CTD")
test_that("ice-tethered profiler", {
if (1 == length(list.files(path=".", pattern="local_data"))) {
itp <- read.ctd.itp("local_data/itp99grd0000.dat")
summary(itp)
plot(itp)
expect_equal(itp[["latitude"]], 77.8840)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eqMI.main.R
\name{eqMI.main}
\alias{eqMI.main}
\title{The main function to test measurement invariance}
\usage{
eqMI.main(
...,
output = "both",
equivalence.test = TRUE,
adjRMSEA = TRUE,
projection = FALSE,
bootstrap = FALSE,
qu... | /man/eqMI.main.Rd | no_license | gabriellajg/equaltestMI | R | false | true | 5,408 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eqMI.main.R
\name{eqMI.main}
\alias{eqMI.main}
\title{The main function to test measurement invariance}
\usage{
eqMI.main(
...,
output = "both",
equivalence.test = TRUE,
adjRMSEA = TRUE,
projection = FALSE,
bootstrap = FALSE,
qu... |
#' Getting the optimization settings
#'
#' For the model or for the system of catchments, the function gets criterion value and optimization settings: type of criteria, weight for baseflow, initial groundwater storage
#' and specific settings for applied optimization type.
#'
#' @param object pointer to model instanc... | /R/bilan_optim.r | no_license | cran/bilan | R | false | false | 12,735 | r | #' Getting the optimization settings
#'
#' For the model or for the system of catchments, the function gets criterion value and optimization settings: type of criteria, weight for baseflow, initial groundwater storage
#' and specific settings for applied optimization type.
#'
#' @param object pointer to model instanc... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculateCoordWidth.R
\name{calculateCoordWidth}
\alias{calculateCoordWidth}
\title{calculates width/length of genomic coordinates}
\usage{
calculateCoordWidth(coord, unit = "kb")
}
\arguments{
\item{coord}{genomic coord in format: 'chr11:650... | /man/calculateCoordWidth.Rd | no_license | combiomed/irlib | R | false | true | 449 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculateCoordWidth.R
\name{calculateCoordWidth}
\alias{calculateCoordWidth}
\title{calculates width/length of genomic coordinates}
\usage{
calculateCoordWidth(coord, unit = "kb")
}
\arguments{
\item{coord}{genomic coord in format: 'chr11:650... |
testlist <- list(id = NULL, score = NULL, id = NULL, booklet_id = c(1869509492L, NA, 744714094L, 1936990313L, 1853106687L, -1L, -1L, -1L), item_score = NA_integer_, person_id = 712140129L)
result <- do.call(dexterMST:::mutate_booklet_score,testlist)
str(result) | /dexterMST/inst/testfiles/mutate_booklet_score/libFuzzer_mutate_booklet_score/mutate_booklet_score_valgrind_files/1612727336-test.R | no_license | akhikolla/updatedatatype-list1 | R | false | false | 267 | r | testlist <- list(id = NULL, score = NULL, id = NULL, booklet_id = c(1869509492L, NA, 744714094L, 1936990313L, 1853106687L, -1L, -1L, -1L), item_score = NA_integer_, person_id = 712140129L)
result <- do.call(dexterMST:::mutate_booklet_score,testlist)
str(result) |
setwd("C:\\Users\\Romanos\\Projects\\rworkspace\\TheAnalyticsEdge\\Unit5 - Text Analytics")
# Problem 1.1 - Loading the Data
emails = read.csv("data\\emails.csv", stringsAsFactors=FALSE)
nrow(emails)
# Problem 1.2 - Loading the Dataset
str(emails)
sum(emails$spam)
# Problem 1.5 - Loading the Dataset
max(nchar(emails... | /Unit5 - Text Analytics/homework3.R | no_license | RomanosTrechlis/TheAnalyticsEdge | R | false | false | 4,201 | r | setwd("C:\\Users\\Romanos\\Projects\\rworkspace\\TheAnalyticsEdge\\Unit5 - Text Analytics")
# Problem 1.1 - Loading the Data
emails = read.csv("data\\emails.csv", stringsAsFactors=FALSE)
nrow(emails)
# Problem 1.2 - Loading the Dataset
str(emails)
sum(emails$spam)
# Problem 1.5 - Loading the Dataset
max(nchar(emails... |
# AUTO GENERATED FILE - DO NOT EDIT
dccSlider <- function(id=NULL, className=NULL, disabled=NULL, dots=NULL, drag_value=NULL, included=NULL, loading_state=NULL, marks=NULL, max=NULL, min=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, step=NULL, tooltip=NULL, updatemode=NULL, value=NULL, vertical=... | /R/dccSlider.R | permissive | ChrisJobs046/dash-core-components | R | false | false | 1,317 | r | # AUTO GENERATED FILE - DO NOT EDIT
dccSlider <- function(id=NULL, className=NULL, disabled=NULL, dots=NULL, drag_value=NULL, included=NULL, loading_state=NULL, marks=NULL, max=NULL, min=NULL, persisted_props=NULL, persistence=NULL, persistence_type=NULL, step=NULL, tooltip=NULL, updatemode=NULL, value=NULL, vertical=... |
################################################################################################################
## This program iterates over the specified datasets, and computes the RMSE of the approximation formulas
#####################################################################################################... | /tools/Jorge/k200/verifyFit_k200_plot_sample_figures_BW.R | no_license | RUMCS/Thesis | R | false | false | 5,149 | r | ################################################################################################################
## This program iterates over the specified datasets, and computes the RMSE of the approximation formulas
#####################################################################################################... |
#install.packages('RgoogleMaps')
library(RgoogleMaps)
library(dplyr)
mycenter=c(37.501001, 127.038787)
mymap<-GetMap(
center = mycenter,
zoom=11,
maptype = 'road',
destfile = 'wifi.jpg'
)
svd<-read.csv('seoul.csv', header = T)
#데이터를 불러 올때 유니코드로 불러오거나 UTF-8로 불러온다 메모장을 이용
data3<-rename(svd,
comp... | /R programming/day07/r4.R | no_license | baeksangwoo/Connected_Project | R | false | false | 904 | r | #install.packages('RgoogleMaps')
library(RgoogleMaps)
library(dplyr)
mycenter=c(37.501001, 127.038787)
mymap<-GetMap(
center = mycenter,
zoom=11,
maptype = 'road',
destfile = 'wifi.jpg'
)
svd<-read.csv('seoul.csv', header = T)
#데이터를 불러 올때 유니코드로 불러오거나 UTF-8로 불러온다 메모장을 이용
data3<-rename(svd,
comp... |
## Put comments here that give an overall description of what your
## functions do
## The first function (makeCacheMatrix) creates a special, empty "matrix"
## This matrix is in reality a list containing a function which will:
## 1. Set the value of the matrix
## 2. Get the value of the matrix
## 3. Set the value of t... | /cachematrix.R | no_license | estocking/ProgrammingAssignment2 | R | false | false | 1,261 | r | ## Put comments here that give an overall description of what your
## functions do
## The first function (makeCacheMatrix) creates a special, empty "matrix"
## This matrix is in reality a list containing a function which will:
## 1. Set the value of the matrix
## 2. Get the value of the matrix
## 3. Set the value of t... |
library(dplyr)
info <- read.csv(snakemake@input[['info']])
import_kegg <- function(file, gsub_regex, origin){
# file name: full path to user_ko_definition.txt
# gsub_regex: regex to use on locus_tag column to create bin identifier. For crumbs, "(ass_[0-9]*)". For bins, "(_[0-9]*)"
# origin: either crumb or bin
... | /megahit/scripts/crumb_nitrogenase.R | no_license | taylorreiter/hu-snake | R | false | false | 2,938 | r | library(dplyr)
info <- read.csv(snakemake@input[['info']])
import_kegg <- function(file, gsub_regex, origin){
# file name: full path to user_ko_definition.txt
# gsub_regex: regex to use on locus_tag column to create bin identifier. For crumbs, "(ass_[0-9]*)". For bins, "(_[0-9]*)"
# origin: either crumb or bin
... |
#' Get Brain Connectivity Measures
#'
#' Provides measures of connectivity between brain regions from a nested tibble returned from `import_nirs()`. It
#' fits the data to a multilevel model with a specified number of lags. It returns a tibble with effect size measures
#' to and from each region.
#'
#' @param data obje... | /R/get_connections.R | no_license | TysonStanley/connectivity | R | false | false | 1,819 | r | #' Get Brain Connectivity Measures
#'
#' Provides measures of connectivity between brain regions from a nested tibble returned from `import_nirs()`. It
#' fits the data to a multilevel model with a specified number of lags. It returns a tibble with effect size measures
#' to and from each region.
#'
#' @param data obje... |
#' @export
plot_rf <- function(rf, hyperparameter = "pi"){
#=========cross val plot==========
cvp <- ggplot2::ggplot(rf[[hyperparameter]]$cross_validation,
ggplot2::aes(x = real, y = pred)) +
ggplot2::geom_point(ggplot2::aes(color = as.logical(in_error))) +
ggplot2::theme_bw() + ggp... | /R/plotting_functions.R | no_license | russelnelson/GeneArchEst | R | false | false | 2,617 | r | #' @export
plot_rf <- function(rf, hyperparameter = "pi"){
#=========cross val plot==========
cvp <- ggplot2::ggplot(rf[[hyperparameter]]$cross_validation,
ggplot2::aes(x = real, y = pred)) +
ggplot2::geom_point(ggplot2::aes(color = as.logical(in_error))) +
ggplot2::theme_bw() + ggp... |
library(shiny)
windChill1 <- function(v,t) 13.12+0.6215*t-13.956*v^0.16+0.4867*t*v^0.16
windChill2 <- function(v,t) 13.12+0.6215*t-11.37*v^0.16+0.3965*t*v^0.16
windChill3 <- function(v,t) 35.74+0.6215*t-35.75*v^0.16 + 0.4275*t*v^0.16
shinyServer(function(input, output) {
output$main_plot <- renderPlot({
a2 <-... | /server.R | no_license | matkur/dataproducts | R | false | false | 1,641 | r | library(shiny)
windChill1 <- function(v,t) 13.12+0.6215*t-13.956*v^0.16+0.4867*t*v^0.16
windChill2 <- function(v,t) 13.12+0.6215*t-11.37*v^0.16+0.3965*t*v^0.16
windChill3 <- function(v,t) 35.74+0.6215*t-35.75*v^0.16 + 0.4275*t*v^0.16
shinyServer(function(input, output) {
output$main_plot <- renderPlot({
a2 <-... |
#Download Data
library(data.table)
fileurl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
if (!file.exists('./Data Science/UCI HAR Dataset.zip')){
download.file(fileurl,'./Data Science/UCI HAR Dataset.zip', mode = 'wb')
unzip('./Data Science/UCI HAR Dataset.zip', ex... | /run_analysis.R | no_license | louischong1990/GCD-Course-Project | R | false | false | 2,329 | r | #Download Data
library(data.table)
fileurl <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
if (!file.exists('./Data Science/UCI HAR Dataset.zip')){
download.file(fileurl,'./Data Science/UCI HAR Dataset.zip', mode = 'wb')
unzip('./Data Science/UCI HAR Dataset.zip', ex... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\docType{methods}
\name{dbListTables,SQLiteConnection-method}
\alias{dbListTables,SQLiteConnection-method}
\title{List available SQLite tables.}
\usage{
\S4method{dbListTables}{SQLiteConnection}(conn)
}
\arguments{
\item{conn}{An existing \code{\linkS4class{SQLiteCon... | /man/dbListTables-SQLiteConnection-method.Rd | permissive | arturochian/RSQLite | R | false | false | 380 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\docType{methods}
\name{dbListTables,SQLiteConnection-method}
\alias{dbListTables,SQLiteConnection-method}
\title{List available SQLite tables.}
\usage{
\S4method{dbListTables}{SQLiteConnection}(conn)
}
\arguments{
\item{conn}{An existing \code{\linkS4class{SQLiteCon... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/package_maintenance.R
\docType{data}
\name{ndex_conf_header}
\alias{ndex_conf_header}
\title{Default header for the ndex_api_config.r file}
\format{An object of class \code{character} of length 1.}
\usage{
ndex_conf_header
}
\value{
character... | /ndexr-master/man/ndex_conf_header.Rd | no_license | jGaiser/grimes | R | false | true | 483 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/package_maintenance.R
\docType{data}
\name{ndex_conf_header}
\alias{ndex_conf_header}
\title{Default header for the ndex_api_config.r file}
\format{An object of class \code{character} of length 1.}
\usage{
ndex_conf_header
}
\value{
character... |
# vim:set ff=unix expandtab ts=2 sw=2:
findAllFunctions <- function(pkgEnv){
objectNames<-ls(pkgEnv)
funcs<-list()
for (fn in objectNames){
f<-eval(as.symbol(fn),pkgEnv)
if (is.function(f)){
funcs[[fn]]<-f
}
}
funcs
}
| /pkg/R/findAllFunctions.R | no_license | mamueller/linkeddocs | R | false | false | 267 | r |
# vim:set ff=unix expandtab ts=2 sw=2:
findAllFunctions <- function(pkgEnv){
objectNames<-ls(pkgEnv)
funcs<-list()
for (fn in objectNames){
f<-eval(as.symbol(fn),pkgEnv)
if (is.function(f)){
funcs[[fn]]<-f
}
}
funcs
}
|
# export `lavaan' lav model description to third-party software
#
lavExport <- function(object, target="lavaan", prefix="sem",
dir.name="lavExport", export=TRUE) {
stopifnot(inherits(object, "lavaan"))
target <- tolower(target)
ngroups <- object@Data@ngroups
if(ngroups > 1L) {... | /lavaan/R/lav_export.R | no_license | ingted/R-Examples | R | false | false | 5,540 | r | # export `lavaan' lav model description to third-party software
#
lavExport <- function(object, target="lavaan", prefix="sem",
dir.name="lavExport", export=TRUE) {
stopifnot(inherits(object, "lavaan"))
target <- tolower(target)
ngroups <- object@Data@ngroups
if(ngroups > 1L) {... |
# Compute Survival within clusters - SE, RI, MX, A3, A5, AL, AF events
# Using GMM subpopulations
rm(list = ls())
source("3.2-BRCA_isoforms.R")
library(rtracklayer)
library(dplyr)
# ********* A5 events
# Load clust object with GMM results
load("data/GMM_results/A5_clust_BRCA_TCGA.RData")
dim(A5_clust$ts_clusters)
... | /3_SUPPA_GaussianMixtureModel/3.9.3-BRCA_isoforms.R | permissive | Alex-Nesta/BRCA-LRseq-pipeline | R | false | false | 4,293 | r | # Compute Survival within clusters - SE, RI, MX, A3, A5, AL, AF events
# Using GMM subpopulations
rm(list = ls())
source("3.2-BRCA_isoforms.R")
library(rtracklayer)
library(dplyr)
# ********* A5 events
# Load clust object with GMM results
load("data/GMM_results/A5_clust_BRCA_TCGA.RData")
dim(A5_clust$ts_clusters)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/f_val_calc_Delta_from_ratios_in_out.R
\name{f_val_calc_Delta_from_ratios_in_out}
\alias{f_val_calc_Delta_from_ratios_in_out}
\title{Delta from ratios in and out?, (Re/Ro)-1, is this really the same?}
\usage{
f_val_calc_Delta_from_ratios_in_ou... | /man/f_val_calc_Delta_from_ratios_in_out.Rd | no_license | erikerhardt/isogasex | R | false | true | 745 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/f_val_calc_Delta_from_ratios_in_out.R
\name{f_val_calc_Delta_from_ratios_in_out}
\alias{f_val_calc_Delta_from_ratios_in_out}
\title{Delta from ratios in and out?, (Re/Ro)-1, is this really the same?}
\usage{
f_val_calc_Delta_from_ratios_in_ou... |
library(shiny)
shinyUI(pageWithSidebar(
headerPanel("The Iris Species Recognition App"),
sidebarPanel(
h3('Documentation'),
h4('1. Measure the petals of the Iris specimen you found'),
h4('2. Input the length and width (in centimeters) below. This should be a number between 0 and 10, e.g. 1.2'),
h4('... | /ui.R | no_license | SelfRemovableKnight/DevelopingDataProducts | R | false | false | 996 | r | library(shiny)
shinyUI(pageWithSidebar(
headerPanel("The Iris Species Recognition App"),
sidebarPanel(
h3('Documentation'),
h4('1. Measure the petals of the Iris specimen you found'),
h4('2. Input the length and width (in centimeters) below. This should be a number between 0 and 10, e.g. 1.2'),
h4('... |
############################################################################################################################
#' Detection and prevalence of SARS-CoV-2 co-infections during the Omicron variant circulation, France, December 2021 - February 2022
#' Antonin Bal, Bruno Simon, Gregory Destras, Richard Cha... | /script/article/SCRIPT/FigS13.R | permissive | genepii/seqmet | R | false | false | 11,400 | r | ############################################################################################################################
#' Detection and prevalence of SARS-CoV-2 co-infections during the Omicron variant circulation, France, December 2021 - February 2022
#' Antonin Bal, Bruno Simon, Gregory Destras, Richard Cha... |
# Temperature Thresholds
#
#
ifelse (flag_obs ==1,tot_yrs <- bl_years_tot, tot_yrs<-years_tot)
print("start temp thresholds")
# sum up the number of days at or below the threshold and average over tot_yrs
if(flag_obs==0) {
for (ithres in 1:Num_thre) {
dum_thres[,,ithres,i]<-apply(Temp_val[,,,i],c(1,2),functio... | /ClimDa/Scripts/US_only/Temp/Functions/TempThresholds.R | no_license | ranimurali/GSA-ClimDa | R | false | false | 587 | r | # Temperature Thresholds
#
#
ifelse (flag_obs ==1,tot_yrs <- bl_years_tot, tot_yrs<-years_tot)
print("start temp thresholds")
# sum up the number of days at or below the threshold and average over tot_yrs
if(flag_obs==0) {
for (ithres in 1:Num_thre) {
dum_thres[,,ithres,i]<-apply(Temp_val[,,,i],c(1,2),functio... |
#######################################################################
# arulesViz - Visualizing Association Rules and Frequent Itemsets
# Copyrigth (C) 2011 Michael Hahsler and Sudheer Chelluboina
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public L... | /arulesViz/R/plot.R | no_license | ingted/R-Examples | R | false | false | 3,628 | r | #######################################################################
# arulesViz - Visualizing Association Rules and Frequent Itemsets
# Copyrigth (C) 2011 Michael Hahsler and Sudheer Chelluboina
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public L... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/covariate_methods.R
\name{scott_fdrreg}
\alias{scott_fdrreg}
\title{scott_fdrreg: Wrapper for FDR regression}
\usage{
scott_fdrreg(unadj_p, filterstat, alpha, df = 3, lambda = 0.01)
}
\arguments{
\item{unadj_p}{Numeric vector of unadj... | /man/scott_fdrreg.Rd | no_license | allenzhuaz/ihwPaper | R | false | false | 520 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/covariate_methods.R
\name{scott_fdrreg}
\alias{scott_fdrreg}
\title{scott_fdrreg: Wrapper for FDR regression}
\usage{
scott_fdrreg(unadj_p, filterstat, alpha, df = 3, lambda = 0.01)
}
\arguments{
\item{unadj_p}{Numeric vector of unadj... |
#' Apply arithmetic expressions over all pixels of a data cube
#'
#' Create a proxy data cube, which applies arithmetics expressions over all pixels of a data cube. Expressions may access band values by their name.
#'
#' @param cube Source data cube
#' @param expr character vector with one or more arithmetic expressi... | /R/apply_pixel.R | permissive | edzer/gdalcubes_R | R | false | false | 1,494 | r |
#' Apply arithmetic expressions over all pixels of a data cube
#'
#' Create a proxy data cube, which applies arithmetics expressions over all pixels of a data cube. Expressions may access band values by their name.
#'
#' @param cube Source data cube
#' @param expr character vector with one or more arithmetic expressi... |
sumNat <- function(x)
{ ((x-1)*(x)/2) } | /R/SumNat.R | no_license | aldoavila26/sumNat-1 | R | false | false | 39 | r | sumNat <- function(x)
{ ((x-1)*(x)/2) } |
makeCacheMatrix <- function(x = matrix()) # matrix on which has to be inverted
{
inv <- NULL # initialize the cache
set <- function(y)
{
x <<- y
inv <<- NULL # when the matrix set after will clear the cache
}
get <- function() x
setInverse <- function(inverse) inv <<- inverse #set the cac... | /inverse_matrix.R | no_license | janhaveemevada/inverseofmatrix | R | false | false | 890 | r | makeCacheMatrix <- function(x = matrix()) # matrix on which has to be inverted
{
inv <- NULL # initialize the cache
set <- function(y)
{
x <<- y
inv <<- NULL # when the matrix set after will clear the cache
}
get <- function() x
setInverse <- function(inverse) inv <<- inverse #set the cac... |
dir.create('raw_data', showWarnings = FALSE)
dat <- mtcars
write.csv(dat, 'raw_data/raw_mtcars.csv')
| /scripts/import_raw_mtcars.R | no_license | mir-cat/make_example_r | R | false | false | 102 | r | dir.create('raw_data', showWarnings = FALSE)
dat <- mtcars
write.csv(dat, 'raw_data/raw_mtcars.csv')
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/speed_accel.R
\name{speed_accel}
\alias{speed_accel}
\title{Speed Acceleration Model Fit}
\usage{
speed_accel(game_data)
}
\arguments{
\item{game_data}{}
}
\value{
Modeled athlete max speed and max accel values, model fit (r_squared), and num... | /man/speed_accel.Rd | no_license | aadler/midsprint | R | false | true | 1,309 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/speed_accel.R
\name{speed_accel}
\alias{speed_accel}
\title{Speed Acceleration Model Fit}
\usage{
speed_accel(game_data)
}
\arguments{
\item{game_data}{}
}
\value{
Modeled athlete max speed and max accel values, model fit (r_squared), and num... |
### Running Regression in R ###
# change the working directory
getwd()
setwd("/Users/phparker/Dropbox/Rcourse/data/")
getwd()
# read in the data we need
library(foreign)
ach <- read.spss("PISA2003-Achievement.sav", to.data.frame = TRUE, use.value.labels = FALSE)
psych <- read.spss("PISA2003.sav", to.data.frame ... | /templateFiles/regression.R | no_license | pdparker/rcourse | R | false | false | 4,152 | r | ### Running Regression in R ###
# change the working directory
getwd()
setwd("/Users/phparker/Dropbox/Rcourse/data/")
getwd()
# read in the data we need
library(foreign)
ach <- read.spss("PISA2003-Achievement.sav", to.data.frame = TRUE, use.value.labels = FALSE)
psych <- read.spss("PISA2003.sav", to.data.frame ... |
library("RColorBrewer")
library("GISTools")
library("Cairo")
colors <- brewer.pal(8, "Set1")
colorsT <- add.alpha(colors, .4)
data <- read.csv("data.csv")
fields <- names(data)[4:length(names(data))]
fields <- c("Life Expectancy", "Adult Mortality", "Infant Death", "Alcohol", "% Healthcare Expenditure",
"Hepatit... | /assignment4_question.r | no_license | aypas/r-project | R | false | false | 1,102 | r | library("RColorBrewer")
library("GISTools")
library("Cairo")
colors <- brewer.pal(8, "Set1")
colorsT <- add.alpha(colors, .4)
data <- read.csv("data.csv")
fields <- names(data)[4:length(names(data))]
fields <- c("Life Expectancy", "Adult Mortality", "Infant Death", "Alcohol", "% Healthcare Expenditure",
"Hepatit... |
y_test.txt <- read.table("./test/y_test.txt") ## Reading the Test labels
X_test.txt <- read.table("./test/X_test.txt") ## Reading the Test data of 561 columns
subject_test.txt <- read.table("./test/subject_test.txt") ## Each perosn is given a subject Id which is sa... | /Peers/Peer2/run_analysis.R | no_license | JoseMariBarkin/Getting-and-Cleaning-Data-Project | R | false | false | 3,951 | r |
y_test.txt <- read.table("./test/y_test.txt") ## Reading the Test labels
X_test.txt <- read.table("./test/X_test.txt") ## Reading the Test data of 561 columns
subject_test.txt <- read.table("./test/subject_test.txt") ## Each perosn is given a subject Id which is sa... |
######################################
# Finds the cross-validated loglikelihood for a given penalty
######################################
cvl <- function(response, penalized, unpenalized, lambda1 = 0, lambda2= 0, positive = FALSE,
fusedl = FALSE, data, model = c("cox", "logistic", "linear", "poisson"),
startb... | /R/cvl.R | no_license | luederm/penalizedcpp | R | false | false | 26,233 | r | ######################################
# Finds the cross-validated loglikelihood for a given penalty
######################################
cvl <- function(response, penalized, unpenalized, lambda1 = 0, lambda2= 0, positive = FALSE,
fusedl = FALSE, data, model = c("cox", "logistic", "linear", "poisson"),
startb... |
#' @title Download NITRC file
#' @description Download a single file from NITRC
#' @param file_path Path to the file to be dowloaded
#' @param destfile Destination filename
#' @param prefix Prefix the file name with this (prevents
#' overwritting of same name files in case function is
#' used to download multiple scan ... | /R/download_nitrc_file.R | no_license | adigherman/nitrcbot | R | false | false | 1,586 | r | #' @title Download NITRC file
#' @description Download a single file from NITRC
#' @param file_path Path to the file to be dowloaded
#' @param destfile Destination filename
#' @param prefix Prefix the file name with this (prevents
#' overwritting of same name files in case function is
#' used to download multiple scan ... |
install.packages("tidyverse")
install.packages("haven")
install.packages("Hmisc")
install.packages("dplyr")
install.packages("readr")
install.packages("plyr")
install.packages("lubridate")
install.packages("openxlsx")
install.packages("data.table")
install.packages("tidyselect")
library(tidyverse)
library(haven)
libra... | /variable_weighting.R | no_license | JenHunter89/spotlight_r_analysis | R | false | false | 26,859 | r | install.packages("tidyverse")
install.packages("haven")
install.packages("Hmisc")
install.packages("dplyr")
install.packages("readr")
install.packages("plyr")
install.packages("lubridate")
install.packages("openxlsx")
install.packages("data.table")
install.packages("tidyselect")
library(tidyverse)
library(haven)
libra... |
#set number of chains
gc()
memory.limit()
memory.limit(10000)
# NCHAINS=8
# NITER=3500
# NWARMUP=3250
NCHAINS=1
NITER= 100
NWARMUP= 50
library("rstan")
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())
recodeFACTOR<-function(FACTOR) {
number<-as.numeric(as.factor(as.numeric(FACTOR)))
... | /running models.R | no_license | markbneal/trevorcaughlin-StateSpaceLandsat | R | false | false | 5,318 | r | #set number of chains
gc()
memory.limit()
memory.limit(10000)
# NCHAINS=8
# NITER=3500
# NWARMUP=3250
NCHAINS=1
NITER= 100
NWARMUP= 50
library("rstan")
rstan_options(auto_write = TRUE)
options(mc.cores = parallel::detectCores())
recodeFACTOR<-function(FACTOR) {
number<-as.numeric(as.factor(as.numeric(FACTOR)))
... |
# =,<- 같은 것 처럼 보이지만 <-를 이용해서 변수에 데이터를 할당
a=100
b <- 100
a
b
sqrt(9)
sqrt(x=9) #x는 함수의 매개변수로 인식
x
sqrt(x <- 9)
x
? c
myvector1 <- c(100,200,300)
myvector1
myvector[1]
myvector[2]
myvector[3]
myvector2 <- c(10,20,30)
myvector1
myvector2
myvector1+20
myvector1+2
myvector1+myvector2
mytext <- c("java","R","hadoop","android... | /basic/.Rproj.user/52AF2C5D/sources/per/t/79C9FB8B-contents | no_license | yuhwanwoo/r | R | false | false | 1,310 | # =,<- 같은 것 처럼 보이지만 <-를 이용해서 변수에 데이터를 할당
a=100
b <- 100
a
b
sqrt(9)
sqrt(x=9) #x는 함수의 매개변수로 인식
x
sqrt(x <- 9)
x
? c
myvector1 <- c(100,200,300)
myvector1
myvector[1]
myvector[2]
myvector[3]
myvector2 <- c(10,20,30)
myvector1
myvector2
myvector1+20
myvector1+2
myvector1+myvector2
mytext <- c("java","R","hadoop","android... | |
# Page No. 44
n <- 15
P <- 720
n_1 <- 2
n_2 <- 10
n_3 <- 3
P_N2 <- (n_1 / n) * P
P_O2 <- (n_2 / n) * P
P_CO2 <- (n_3 / n) * P
print(P_N2)
print(P_O2)
print(P_CO2) | /Modern_Physical_Chemistry_A_Molecular_Approach_by_George_H_Duffey/CH3/EX3.6/Ex3_6.R | permissive | FOSSEE/R_TBC_Uploads | R | false | false | 165 | r | # Page No. 44
n <- 15
P <- 720
n_1 <- 2
n_2 <- 10
n_3 <- 3
P_N2 <- (n_1 / n) * P
P_O2 <- (n_2 / n) * P
P_CO2 <- (n_3 / n) * P
print(P_N2)
print(P_O2)
print(P_CO2) |
library(KarsTS)
### Name: mainScreen
### Title: mainScreen: launches the main screen
### Aliases: mainScreen
### Keywords: ~kwd1 ~kwd2
### ** Examples
#Opens interface
KarsTS(skipWelcome = TRUE)
destroyMainScreen()
# When the interface has been opened once, the main screen can be opened directly
mainScreen()
destr... | /data/genthat_extracted_code/KarsTS/examples/mainScreen.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 339 | r | library(KarsTS)
### Name: mainScreen
### Title: mainScreen: launches the main screen
### Aliases: mainScreen
### Keywords: ~kwd1 ~kwd2
### ** Examples
#Opens interface
KarsTS(skipWelcome = TRUE)
destroyMainScreen()
# When the interface has been opened once, the main screen can be opened directly
mainScreen()
destr... |
library(genetics)
### Name: HWE.test
### Title: Estimate Disequilibrium and Test for Hardy-Weinberg Equilibrium
### Aliases: HWE.test HWE.test.genotype HWE.test.data.frame print.HWE.test
### Keywords: misc
### ** Examples
## Don't show:
set.seed(4657613)
## End(Don't show)
## Marker with two alleles:
example.data ... | /data/genthat_extracted_code/genetics/examples/HWE.test.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 815 | r | library(genetics)
### Name: HWE.test
### Title: Estimate Disequilibrium and Test for Hardy-Weinberg Equilibrium
### Aliases: HWE.test HWE.test.genotype HWE.test.data.frame print.HWE.test
### Keywords: misc
### ** Examples
## Don't show:
set.seed(4657613)
## End(Don't show)
## Marker with two alleles:
example.data ... |
## Caching the Inverse of a Matrix:
## Function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(inverse) inv <<- inverse
getInverse <- funct... | /cachematrix.R | no_license | a-tab-a/ProgrammingAssignment2 | R | false | false | 874 | r | ## Caching the Inverse of a Matrix:
## Function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(inverse) inv <<- inverse
getInverse <- funct... |
library(multifluo)
### Name: binning
### Title: Bins the pixels
### Aliases: binning
### ** Examples
data(gp)
binning(gp,2)
| /data/genthat_extracted_code/multifluo/examples/binning.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 131 | r | library(multifluo)
### Name: binning
### Title: Bins the pixels
### Aliases: binning
### ** Examples
data(gp)
binning(gp,2)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Lock5withR-package.R
\docType{data}
\name{AllCountries}
\alias{AllCountries}
\title{AllCountries}
\format{A dataset with 213 observations on the following 18 variables.
\itemize{
\item{\code{Country}} {Name of the country}
\item{\code{Code}} ... | /man/AllCountries.Rd | no_license | klaassenj/Lock5withR | R | false | true | 1,810 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Lock5withR-package.R
\docType{data}
\name{AllCountries}
\alias{AllCountries}
\title{AllCountries}
\format{A dataset with 213 observations on the following 18 variables.
\itemize{
\item{\code{Country}} {Name of the country}
\item{\code{Code}} ... |
library(timeSeries)
### Name: na
### Title: Handling Missing Time Series Values
### Aliases: na na.omit na.omit,timeSeries-method na.omit.timeSeries
### removeNA substituteNA interpNA
### Keywords: math
### ** Examples
## Create a Matrix -
X <- matrix(rnorm(100), ncol = 5)
## Replace a Single NA Inside -
... | /data/genthat_extracted_code/timeSeries/examples/stats-na.omit.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,052 | r | library(timeSeries)
### Name: na
### Title: Handling Missing Time Series Values
### Aliases: na na.omit na.omit,timeSeries-method na.omit.timeSeries
### removeNA substituteNA interpNA
### Keywords: math
### ** Examples
## Create a Matrix -
X <- matrix(rnorm(100), ncol = 5)
## Replace a Single NA Inside -
... |
daily_csv <- function(today_date = "2017-10-23"){
#https://api.intrinio.com/prices/exchange.csv?identifier=^XKLS&price_date=2017-10-23
price_base_1 <- "https://"
price_base_2 <- "@api.intrinio.com/prices/exchange.csv?identifier=^XKLS&price_date="
# today_date <- "2017-10-24"
username <- "d82a8b255816b922a... | /daily.R | no_license | larrymy/intri | R | false | false | 1,403 | r | daily_csv <- function(today_date = "2017-10-23"){
#https://api.intrinio.com/prices/exchange.csv?identifier=^XKLS&price_date=2017-10-23
price_base_1 <- "https://"
price_base_2 <- "@api.intrinio.com/prices/exchange.csv?identifier=^XKLS&price_date="
# today_date <- "2017-10-24"
username <- "d82a8b255816b922a... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/word-embeddings.R
\name{nlp_word_embeddings_model}
\alias{nlp_word_embeddings_model}
\title{Create a Spark NLP WordEmbeddingsModel}
\usage{
nlp_word_embeddings_model(
sc,
input_cols,
output_col,
storage_ref = NULL,
dimension,
case... | /man/nlp_word_embeddings_model.Rd | permissive | Georgi-Petkov/sparknlp | R | false | true | 969 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/word-embeddings.R
\name{nlp_word_embeddings_model}
\alias{nlp_word_embeddings_model}
\title{Create a Spark NLP WordEmbeddingsModel}
\usage{
nlp_word_embeddings_model(
sc,
input_cols,
output_col,
storage_ref = NULL,
dimension,
case... |
#' Summarize a timeseries
#'
#' @param var_src character vector of dataset types to summarize.
#' @param site_name character vector of the same length as var_src specifying
#' the site or sites (e.g., "nwis_24309857") where each timeseries dataset
#' should be sought.
#' @param out a list of one or more outputs to... | /R/summarize_ts.R | permissive | ehstanley/powstreams | R | false | false | 706 | r | #' Summarize a timeseries
#'
#' @param var_src character vector of dataset types to summarize.
#' @param site_name character vector of the same length as var_src specifying
#' the site or sites (e.g., "nwis_24309857") where each timeseries dataset
#' should be sought.
#' @param out a list of one or more outputs to... |
# Functions to compute functional rarity indices on various datasets
#
# Authors: Pierre Denelle & Matthias Grenié
#
#
#' Compute all Functional Rarity Indices from Matrices
#'
#' From a site-species matrix and functional distance matrix compute all indices
#' included in the package: functional uniqueness (reg... | /R/funrar.R | no_license | cran/funrar | R | false | false | 3,911 | r | # Functions to compute functional rarity indices on various datasets
#
# Authors: Pierre Denelle & Matthias Grenié
#
#
#' Compute all Functional Rarity Indices from Matrices
#'
#' From a site-species matrix and functional distance matrix compute all indices
#' included in the package: functional uniqueness (reg... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/innerjoinXL.R
\name{innerjoinXL}
\alias{innerjoinXL}
\alias{innerjoinXL()}
\title{Performs a SQL type inner join on 2 Excel files}
\usage{
innerjoinXL()
}
\value{
The joined file, inner_join.xlsx is placed in the working directory.
}
\descrip... | /man/innerjoinXL.Rd | no_license | yvonneglanville/joinXL | R | false | true | 998 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/innerjoinXL.R
\name{innerjoinXL}
\alias{innerjoinXL}
\alias{innerjoinXL()}
\title{Performs a SQL type inner join on 2 Excel files}
\usage{
innerjoinXL()
}
\value{
The joined file, inner_join.xlsx is placed in the working directory.
}
\descrip... |
# China_administrative-division-codes£¨1980-2019£©
# https://github.com/hezht3/
require(rvest)
require(dplyr)
require(haven)
website <- readRDS("F:/Box Sync/air polution/pilot analysis/China_administrative-division-codes/China administrative codes of each year_original website.rds")
city_code_year <- list()... | /city administrative id.R | no_license | Xian152/China_administrative-division-code-1980-2019- | R | false | false | 3,324 | r | # China_administrative-division-codes£¨1980-2019£©
# https://github.com/hezht3/
require(rvest)
require(dplyr)
require(haven)
website <- readRDS("F:/Box Sync/air polution/pilot analysis/China_administrative-division-codes/China administrative codes of each year_original website.rds")
city_code_year <- list()... |
## This section is to read the data and subset
data <- read.table("household_power_consumption.txt", header=TRUE, sep=";", comment.char="", na.strings="?")
data$timestamp <- with(data, as.POSIXct(paste(Date, Time), format="%d/%m/%Y %H:%M:%S"))
data$dateonly <- with(data, as.Date(Date, format="%d/%m/%Y"))
projectData <... | /Plot4.R | no_license | gchakri/ExData_Plotting1 | R | false | false | 1,244 | r | ## This section is to read the data and subset
data <- read.table("household_power_consumption.txt", header=TRUE, sep=";", comment.char="", na.strings="?")
data$timestamp <- with(data, as.POSIXct(paste(Date, Time), format="%d/%m/%Y %H:%M:%S"))
data$dateonly <- with(data, as.Date(Date, format="%d/%m/%Y"))
projectData <... |
### Pipeline for SC cancer datasets tsne plot comparisons
CaseN <- c("GSE75688_Breast", "GSE72056_Melanoma", "GSE70630_OG", "Astrocytoma", "GSE81383_Melanoma", "GSE103322_HNSCC", "E_MTAB_6149_NSCLC", "GSE81861_CRC")
### Import Packages
library(cluster)
library(Rtsne)
### Sample labeling and colors
colors = c(... | /Tsne Pipe.R | no_license | YuWei-Lin/TutorialCodes | R | false | false | 4,336 | r | ### Pipeline for SC cancer datasets tsne plot comparisons
CaseN <- c("GSE75688_Breast", "GSE72056_Melanoma", "GSE70630_OG", "Astrocytoma", "GSE81383_Melanoma", "GSE103322_HNSCC", "E_MTAB_6149_NSCLC", "GSE81861_CRC")
### Import Packages
library(cluster)
library(Rtsne)
### Sample labeling and colors
colors = c(... |
#' Generalize Average Treatment Effect from Randomized Trial to Population
#'
#' @param outcome variable name denoting outcome
#' @param treatment variable name denoting binary treatment assignment (ok if only available in trial, not population)
#' @param trial variable name denoting binary trial participation (1 = tr... | /R/generalize.R | no_license | muschellij2/generalize | R | false | false | 9,145 | r |
#' Generalize Average Treatment Effect from Randomized Trial to Population
#'
#' @param outcome variable name denoting outcome
#' @param treatment variable name denoting binary treatment assignment (ok if only available in trial, not population)
#' @param trial variable name denoting binary trial participation (1 = tr... |
# Run this file to perform all data analysis
if (study_type == 'before_after') {
mod_env <- new.env()
# source the mod.dat prep step that will feed into both MDC calculations and modeling
source('scripts/data_analysis/0_before_after_datmod_prep.R', echo = F, local = mod_env)
# source script to calculate ... | /scripts_for_collaborators/scripts/run_files/analysis_run_file.R | no_license | limnoliver/GLRIeof | R | false | false | 1,320 | r | # Run this file to perform all data analysis
if (study_type == 'before_after') {
mod_env <- new.env()
# source the mod.dat prep step that will feed into both MDC calculations and modeling
source('scripts/data_analysis/0_before_after_datmod_prep.R', echo = F, local = mod_env)
# source script to calculate ... |
predicted<-c(1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1)
actual<-c(1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1)
xtabs( ~ predicted + actual)
sum(predicted == actual) / NROW(actual)
library(caret)
library(lattice)
library(ggplot2)
confusionMatrix(predicted, actual)
f_predicted <- as.factor(predicted)
f_actual <- as.factor(actual)
c... | /r_study_Regression1.R | permissive | z-ho-bjj/R_study | R | false | false | 813 | r | predicted<-c(1, 0, 0, 1, 1, 1, 0, 0, 0, 1, 1, 1)
actual<-c(1, 0, 0, 1, 1, 0, 1, 1, 0, 1, 1, 1)
xtabs( ~ predicted + actual)
sum(predicted == actual) / NROW(actual)
library(caret)
library(lattice)
library(ggplot2)
confusionMatrix(predicted, actual)
f_predicted <- as.factor(predicted)
f_actual <- as.factor(actual)
c... |
# This is the server logic for a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
library(jsonlite)
library(dplyr)
library(tidyr)
library(purrr)
library(sp)
library(rworldmap)
library(ggplot2)
#library(ggmap)
library(plotly)
#sou... | /earthquakeApp/server.R | no_license | akshayayadav/usgs-earthquake-data-analysis | R | false | false | 5,782 | r |
# This is the server logic for a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
library(jsonlite)
library(dplyr)
library(tidyr)
library(purrr)
library(sp)
library(rworldmap)
library(ggplot2)
#library(ggmap)
library(plotly)
#sou... |
#' Gives cleanly parsed data
#'
#' Very tightly tied to how https://github.com/metrica-sports/sample-data is
#' organised right now since I don't know how tracking data is otherwise
#' organised. Home team always attacks from left to right, x 0 to x 1.
#'
#' @param cRootPath
#' @examples
#' @import data.table
#' @expor... | /R/fParseTrackingDataBothTeams.R | permissive | thecomeonman/CodaBonito | R | false | false | 4,685 | r | #' Gives cleanly parsed data
#'
#' Very tightly tied to how https://github.com/metrica-sports/sample-data is
#' organised right now since I don't know how tracking data is otherwise
#' organised. Home team always attacks from left to right, x 0 to x 1.
#'
#' @param cRootPath
#' @examples
#' @import data.table
#' @expor... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GCMMplots.R
\name{componentsplot}
\alias{componentsplot}
\title{GCMM Components Plot}
\usage{
componentsplot(
model,
rug = FALSE,
ruglwd = 2,
lwd = 3,
col = c("black", "grey40", "grey60", "grey80"),
scale = "NULL",
ymax = "NULL"... | /man/componentsplot.Rd | no_license | cran/activityGCMM | R | false | true | 1,777 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GCMMplots.R
\name{componentsplot}
\alias{componentsplot}
\title{GCMM Components Plot}
\usage{
componentsplot(
model,
rug = FALSE,
ruglwd = 2,
lwd = 3,
col = c("black", "grey40", "grey60", "grey80"),
scale = "NULL",
ymax = "NULL"... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/set_graph_undirected.R
\name{set_graph_undirected}
\alias{set_graph_undirected}
\title{Convert a directed graph to an undirected graph}
\usage{
set_graph_undirected(graph)
}
\arguments{
\item{graph}{a graph object of class
\code{dgr_graph}.}
... | /man/set_graph_undirected.Rd | permissive | akkalbist55/DiagrammeR | R | false | true | 768 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/set_graph_undirected.R
\name{set_graph_undirected}
\alias{set_graph_undirected}
\title{Convert a directed graph to an undirected graph}
\usage{
set_graph_undirected(graph)
}
\arguments{
\item{graph}{a graph object of class
\code{dgr_graph}.}
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Bootstrap.R
\name{Bootstrap}
\alias{Bootstrap}
\title{Process module: Boostrap}
\usage{
Bootstrap(.data, n = NULL, seed = NULL)
}
\arguments{
\item{.data}{\strong{Internal parameter, do not use in the workflow
function}. \code{.data} is a lis... | /man/Bootstrap.Rd | no_license | Doi90/modules | R | false | true | 1,704 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Bootstrap.R
\name{Bootstrap}
\alias{Bootstrap}
\title{Process module: Boostrap}
\usage{
Bootstrap(.data, n = NULL, seed = NULL)
}
\arguments{
\item{.data}{\strong{Internal parameter, do not use in the workflow
function}. \code{.data} is a lis... |
maxcomb=read.csv("Avcom.csv")
ordbirds2=maxcomb[2:66]
birdmax2=metaMDS(ordbirds2, distance="bray", k=3, trymax=5000)
#gg_ordiplot(birdmax2,birdenv$TRT.y, kind="sd" )+theme_bw()
plot(birdmax2)
birdenv=maxcomb[,c(67:ncol(maxcomb))]
View(birdenv)
colnames(birdenv)
env4test=birdenv[,c(3,4,5,11,1... | /Density2022.R | no_license | CameronDuquette/CGREC-AVian-Community | R | false | false | 33,113 | r | maxcomb=read.csv("Avcom.csv")
ordbirds2=maxcomb[2:66]
birdmax2=metaMDS(ordbirds2, distance="bray", k=3, trymax=5000)
#gg_ordiplot(birdmax2,birdenv$TRT.y, kind="sd" )+theme_bw()
plot(birdmax2)
birdenv=maxcomb[,c(67:ncol(maxcomb))]
View(birdenv)
colnames(birdenv)
env4test=birdenv[,c(3,4,5,11,1... |
\name{static_file}
\alias{static_file}
\title{Send static file to browser, if present. Otherwise pass.}
\usage{
static_file(path, status = 200L, remove = FALSE)
}
\arguments{
\item{path}{path to file}
\item{status}{http status code}
\item{remove}{boolean to remove file after being read}
}
\description{
Send... | /man/static_file.Rd | no_license | kashenfelter/sinartra | R | false | false | 376 | rd | \name{static_file}
\alias{static_file}
\title{Send static file to browser, if present. Otherwise pass.}
\usage{
static_file(path, status = 200L, remove = FALSE)
}
\arguments{
\item{path}{path to file}
\item{status}{http status code}
\item{remove}{boolean to remove file after being read}
}
\description{
Send... |
#' Alpine01 function
#'
#' Highly multimodal single-objective optimization test function. It is defined
#' as \deqn{f(\mathbf{x}) = \sum_{i = 1}^{n} |\mathbf{x}_i \sin(\mathbf{x}_i) + 0.1\mathbf{x}_i|}
#' with box constraints \eqn{\mathbf{x}_i \in [-10, 10]} for \eqn{i = 1, \ldots, n}.
#'
#' @references S. Rahnamyan, H... | /R/sof.alpine01.R | no_license | fmumbi/smoof | R | false | false | 1,422 | r | #' Alpine01 function
#'
#' Highly multimodal single-objective optimization test function. It is defined
#' as \deqn{f(\mathbf{x}) = \sum_{i = 1}^{n} |\mathbf{x}_i \sin(\mathbf{x}_i) + 0.1\mathbf{x}_i|}
#' with box constraints \eqn{\mathbf{x}_i \in [-10, 10]} for \eqn{i = 1, \ldots, n}.
#'
#' @references S. Rahnamyan, H... |
## Merges the training and the test sets to create one data set.
## Extracts only the measurements on the mean and standard deviation for each measurement.
## Uses descriptive activity names to name the activities in the data set
## Appropriately labels the data set with descriptive variable names.
## From the data s... | /run_analysis.R | no_license | vijayender/GettingAndCleaningDataCourseProject | R | false | false | 1,703 | r | ## Merges the training and the test sets to create one data set.
## Extracts only the measurements on the mean and standard deviation for each measurement.
## Uses descriptive activity names to name the activities in the data set
## Appropriately labels the data set with descriptive variable names.
## From the data s... |
## ----setup, echo = FALSE-------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
screenshot.force = FALSE,
comment = "#>"
)
library(weibulltools)
# set.seed() for reproducibility of random sampled id's
set.seed(2905)
## ----MRR all distributions, message = FALSE----... | /weibulltools/inst/doc/Life_Data_Analysis_Part_II.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 6,617 | r | ## ----setup, echo = FALSE-------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
screenshot.force = FALSE,
comment = "#>"
)
library(weibulltools)
# set.seed() for reproducibility of random sampled id's
set.seed(2905)
## ----MRR all distributions, message = FALSE----... |
library(datasets)
df <- read.table("household_power_consumption.txt", sep=";", header = TRUE) #Reading the data
df$Date <- as.Date(df$Date, format="%d/%m/%Y") #converting 'Date' variables to Date class
active_power <- subset(df, Date == "2007-02-01" | Date == "2007-02-02")$Global_active_power #subsetting the requir... | /plot1.r | no_license | Ben-Marl/ExData_Plotting1 | R | false | false | 524 | r | library(datasets)
df <- read.table("household_power_consumption.txt", sep=";", header = TRUE) #Reading the data
df$Date <- as.Date(df$Date, format="%d/%m/%Y") #converting 'Date' variables to Date class
active_power <- subset(df, Date == "2007-02-01" | Date == "2007-02-02")$Global_active_power #subsetting the requir... |
#' Automatic Machine Learning
#'
#' The Automatic Machine Learning (AutoML) function automates the supervised machine learning model training process.
#' The current version of AutoML trains and cross-validates the following algorithms (in the following order):
#' three pre-specified XGBoost GBM (Gradient Boosting Mach... | /h2o-r/h2o-package/R/automl.R | permissive | BlueTea88/h2o-3 | R | false | false | 34,165 | r | #' Automatic Machine Learning
#'
#' The Automatic Machine Learning (AutoML) function automates the supervised machine learning model training process.
#' The current version of AutoML trains and cross-validates the following algorithms (in the following order):
#' three pre-specified XGBoost GBM (Gradient Boosting Mach... |
## Coursera
## Getting & Cleaning Data Course Project
## R V.3.6.3
## Load libraries
library(dplyr)
library(tidyr)
## Load data
features <- read.table("UCI HAR Dataset/features.txt", header = F)
labels <- read.table("UCI HAR Dataset/activity_labels.txt", col.names = c("index", "labels"), header = F)
train <- read.... | /run_analysis.R | no_license | zlash929/CleaningData | R | false | false | 2,096 | r | ## Coursera
## Getting & Cleaning Data Course Project
## R V.3.6.3
## Load libraries
library(dplyr)
library(tidyr)
## Load data
features <- read.table("UCI HAR Dataset/features.txt", header = F)
labels <- read.table("UCI HAR Dataset/activity_labels.txt", col.names = c("index", "labels"), header = F)
train <- read.... |
source("VStationData.R")
source("VColList.R")
#source("/home/eibestations/ei_data_exploratories/scripts/julendat/src/julendat/rmodules/VStationData.R")
#source("/home/eibestations/ei_data_exploratories/scripts/julendat/src/julendat/rmodules/VColList.R")
#inpath <- "D:/development/test/julendat/processing/plots/be"
inpa... | /src/julendat/rmodules/run_VStationData.R | no_license | environmentalinformatics-marburg/julendat | R | false | false | 1,996 | r | source("VStationData.R")
source("VColList.R")
#source("/home/eibestations/ei_data_exploratories/scripts/julendat/src/julendat/rmodules/VStationData.R")
#source("/home/eibestations/ei_data_exploratories/scripts/julendat/src/julendat/rmodules/VColList.R")
#inpath <- "D:/development/test/julendat/processing/plots/be"
inpa... |
# This code loads and cleans the data set, then creates two .txt files for
# the Course Project of the Getting ans Cleaning Data course.
#
# The script does the followings:
# 1. Loads the data from the working directory into data frames.
# 2. Merges the training and the test sets to create one data set.
# 3. Extracts ... | /run_analysis.R | no_license | judit-b/getting-cleaning-course-project | R | false | false | 4,317 | r | # This code loads and cleans the data set, then creates two .txt files for
# the Course Project of the Getting ans Cleaning Data course.
#
# The script does the followings:
# 1. Loads the data from the working directory into data frames.
# 2. Merges the training and the test sets to create one data set.
# 3. Extracts ... |
test_that("f_load_one works in offline mode", {
data <- f_load_one(ticker = "MATAS.CO", offline = TRUE)
## Expecting data.table
expect_true(is.data.table(data))
## Expecting rows
expect_gt(nrow(data), 1)
## Expecting columns
expect_gt(ncol(data), 10)
## Expecting Close and RSI variables
expect_tr... | /tests/testthat/test-f_load_one.R | permissive | kristian-bak/kb.modelling | R | false | false | 368 | r | test_that("f_load_one works in offline mode", {
data <- f_load_one(ticker = "MATAS.CO", offline = TRUE)
## Expecting data.table
expect_true(is.data.table(data))
## Expecting rows
expect_gt(nrow(data), 1)
## Expecting columns
expect_gt(ncol(data), 10)
## Expecting Close and RSI variables
expect_tr... |
library(quantmod)
library(rvest)
library(tidyverse)
library(tidyquant)
library(janitor)
today <- Sys.Date()
date = today %m+% years(-3)
#date = "2019-01-01"
# pass SP500 ticker ^GSPC to tq_get function
SP500 = tq_get("^GSPC", from = date)
SP500 %>%
head()
# We need to create a vector of all companies in the SP500, ... | /Portfolio Management/ChartRollingCorrelations.R | no_license | murphy-k/Rquant | R | false | false | 2,454 | r | library(quantmod)
library(rvest)
library(tidyverse)
library(tidyquant)
library(janitor)
today <- Sys.Date()
date = today %m+% years(-3)
#date = "2019-01-01"
# pass SP500 ticker ^GSPC to tq_get function
SP500 = tq_get("^GSPC", from = date)
SP500 %>%
head()
# We need to create a vector of all companies in the SP500, ... |
#
# ctl.plot.R
#
# copyright (c) 2010-2012 - GBIC, Danny Arends, Bruno Tesson and Ritsert C. Jansen
# last modified Oct, 2012
# first written Nov, 2010
#
# Plotting routines for CTL analysis
#
CTLasLOD <- function(CTLscan, QTLscores, main, do.legend=TRUE){
if(missing(CTLscan)) stop("argument 'CTLscan' is... | /R/ctl.plot.R | no_license | cran/ctl | R | false | false | 9,590 | r | #
# ctl.plot.R
#
# copyright (c) 2010-2012 - GBIC, Danny Arends, Bruno Tesson and Ritsert C. Jansen
# last modified Oct, 2012
# first written Nov, 2010
#
# Plotting routines for CTL analysis
#
CTLasLOD <- function(CTLscan, QTLscores, main, do.legend=TRUE){
if(missing(CTLscan)) stop("argument 'CTLscan' is... |
## ----eval=TRUE, echo=TRUE, warning=FALSE--------------------------------------
# Load countfitteR package
library(countfitteR)
# Assign the csv file to filename
data("case_study")
processed_counts <- process_counts(case_study)
fit_counts(processed_counts, model = "all")
| /inst/doc/countfitteR.R | no_license | cran/countfitteR | R | false | false | 277 | r | ## ----eval=TRUE, echo=TRUE, warning=FALSE--------------------------------------
# Load countfitteR package
library(countfitteR)
# Assign the csv file to filename
data("case_study")
processed_counts <- process_counts(case_study)
fit_counts(processed_counts, model = "all")
|
/Data Process/dplyr7.R | no_license | JinxiaoDu/STAT-5206 | R | false | false | 5,082 | r |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.