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 |
|---|---|---|---|---|---|---|---|---|---|
#' Get a summary of the logistic glm model considering reference levels
#' @param model A glm logistic model
#' @examples
#'
#' data("german_credit")
#'
#' model <- glm(
#' good_bad ~ purpose + present_employment_since + credit_history,
#' data = german_credit, family = binomial
#' )
#'
#' model_summar... | /R/model.R | permissive | miission/irks | R | false | false | 4,386 | r | #' Get a summary of the logistic glm model considering reference levels
#' @param model A glm logistic model
#' @examples
#'
#' data("german_credit")
#'
#' model <- glm(
#' good_bad ~ purpose + present_employment_since + credit_history,
#' data = german_credit, family = binomial
#' )
#'
#' model_summar... |
context("ml stat - chisq")
sc <- testthat_spark_connection()
df_tbl <- sdf_copy_to(sc, data.frame(
gender = sample(c("F", "M"), 200,replace = TRUE),
party = sample(c("D", "I", "R"), 200,replace = TRUE),
stringsAsFactors = FALSE
), overwrite = TRUE)
test_that("ml_chisquare_test() works", {
test_requires_versio... | /tests/testthat/test-ml-stat-chisq.R | permissive | zslajchrt/sparklyr | R | false | false | 920 | r | context("ml stat - chisq")
sc <- testthat_spark_connection()
df_tbl <- sdf_copy_to(sc, data.frame(
gender = sample(c("F", "M"), 200,replace = TRUE),
party = sample(c("D", "I", "R"), 200,replace = TRUE),
stringsAsFactors = FALSE
), overwrite = TRUE)
test_that("ml_chisquare_test() works", {
test_requires_versio... |
library(semTools)
### Name: parcelAllocation
### Title: Random Allocation of Items to Parcels in a Structural Equation
### Model
### Aliases: parcelAllocation
### ** Examples
## Fit 2-factor CFA to simulated data. Each factor has 9 indicators.
## Specify the item-level model (if NO parcels were created)
item.sy... | /data/genthat_extracted_code/semTools/examples/parcelAllocation.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,966 | r | library(semTools)
### Name: parcelAllocation
### Title: Random Allocation of Items to Parcels in a Structural Equation
### Model
### Aliases: parcelAllocation
### ** Examples
## Fit 2-factor CFA to simulated data. Each factor has 9 indicators.
## Specify the item-level model (if NO parcels were created)
item.sy... |
#' Browse
#'
#' Browse to different locations on Connect via
#' utils::browseURL
#'
#' @param content A R6 Content object
#' @param connect A R6 Connect object
#'
#' @return The url that is opened in the browser
#'
#' @rdname browse
#' @export
browse_solo <- function(content) {
validate_R6_class("Content", conte... | /R/browse.R | no_license | tbradley1013/connectapi | R | false | false | 780 | r | #' Browse
#'
#' Browse to different locations on Connect via
#' utils::browseURL
#'
#' @param content A R6 Content object
#' @param connect A R6 Connect object
#'
#' @return The url that is opened in the browser
#'
#' @rdname browse
#' @export
browse_solo <- function(content) {
validate_R6_class("Content", conte... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Other.R
\name{dataKNMI}
\alias{dataKNMI}
\title{Wind speeds in the Netherlands.}
\format{
dataKNMI$data is a matrix with 672 rows and 22 columns, dataKNMI$loc is a matrix with 22 rows
and 2 columns.
}
\source{
KNMI
}
\description{
Daily maxim... | /man/dataKNMI.Rd | no_license | cran/tailDepFun | R | false | true | 1,184 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Other.R
\name{dataKNMI}
\alias{dataKNMI}
\title{Wind speeds in the Netherlands.}
\format{
dataKNMI$data is a matrix with 672 rows and 22 columns, dataKNMI$loc is a matrix with 22 rows
and 2 columns.
}
\source{
KNMI
}
\description{
Daily maxim... |
# Read Marwan's data, subset and rename 5 columns ------------------------------
# Load Experiment I. Gravel feed is set at 4.33 g/ms,
# while the sand feed starts at 0 g/ms and increases to 13.0 g/ms. The
# experiment was run for 95 hrs with a data point every 15 min.
expI_15min <- read.csv("ExpI-SievedData.csv", ... | /scripts/s_g_15min_EXP_I_std.R | no_license | stephen-bird/magic_sand | R | false | false | 8,483 | r |
# Read Marwan's data, subset and rename 5 columns ------------------------------
# Load Experiment I. Gravel feed is set at 4.33 g/ms,
# while the sand feed starts at 0 g/ms and increases to 13.0 g/ms. The
# experiment was run for 95 hrs with a data point every 15 min.
expI_15min <- read.csv("ExpI-SievedData.csv", ... |
##### Orden Datos SII #####
setwd("C:\Users\o\Documents\GitHub\Info_SII\SII")
library(readr)
##### Carga de Datos y Orden #####
anos=c("2015_1","2015_2","2016_1","2016_2","2017_1","2017_2","2018_1","2018_2","2019_1")
an=anos[9]
for (an in anos) {
N <- read_delim(paste0("txt/BRORGA2441N_NAC_",an,".txt"),
... | /1_Orden_SII.R | no_license | agubas/Info_SII | R | false | false | 3,228 | r | ##### Orden Datos SII #####
setwd("C:\Users\o\Documents\GitHub\Info_SII\SII")
library(readr)
##### Carga de Datos y Orden #####
anos=c("2015_1","2015_2","2016_1","2016_2","2017_1","2017_2","2018_1","2018_2","2019_1")
an=anos[9]
for (an in anos) {
N <- read_delim(paste0("txt/BRORGA2441N_NAC_",an,".txt"),
... |
#' Maximum-likelihood genetic clustering using EM algorithm
#'
#' This function implements the fast maximum-likelihood genetic clustering
#' approach described in Beugin et al (2018). The underlying model is very close
#' to the model implemented by STRUCTURE, but allows for much faster estimation
#' of genetic cluster... | /R/snapclust.R | no_license | thibautjombart/adegenet | R | false | false | 18,712 | r | #' Maximum-likelihood genetic clustering using EM algorithm
#'
#' This function implements the fast maximum-likelihood genetic clustering
#' approach described in Beugin et al (2018). The underlying model is very close
#' to the model implemented by STRUCTURE, but allows for much faster estimation
#' of genetic cluster... |
test_io_check_exists <- function()
{
.io_check_exists <- Rsamtools:::.io_check_exists
fls <- c(
tempfile(), tempfile(),
"ftp://some.where/file",
"http://some.where/file",
"https://some.where/file",
NA
)
file.create(fls[1])
checkTrue(is.null(.io_check_exists(f... | /Rsamtools/unitTests/test_utilities.R | permissive | solgenomics/R_libs | R | false | false | 1,321 | r | test_io_check_exists <- function()
{
.io_check_exists <- Rsamtools:::.io_check_exists
fls <- c(
tempfile(), tempfile(),
"ftp://some.where/file",
"http://some.where/file",
"https://some.where/file",
NA
)
file.create(fls[1])
checkTrue(is.null(.io_check_exists(f... |
# context("add SE and RSE")
# library(GenomicRanges)
# library(SummarizedExperiment)
#
#
# # SummarizedExperiment ####
# test_that("add SummarizedExperiment", {
# multi <- createMultiDataSet()
#
# nrows <- 10; ncols <- 6
# counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
# colData <- DataFra... | /testsOld/testthat/test_04addrse.R | permissive | isglobal-brge/MultiDataSet | R | false | false | 3,450 | r | # context("add SE and RSE")
# library(GenomicRanges)
# library(SummarizedExperiment)
#
#
# # SummarizedExperiment ####
# test_that("add SummarizedExperiment", {
# multi <- createMultiDataSet()
#
# nrows <- 10; ncols <- 6
# counts <- matrix(runif(nrows * ncols, 1, 1e4), nrows)
# colData <- DataFra... |
rm(list = ls())
source("cls2/1_pars.R")
# create cluster for parallel processing
cl <- makeCluster(cores_l)
registerDoParallel(cl)
tdfp_cat <- foreach(n = 1:length(fdate), .packages = c("hts","forecast")) %dopar% {
dx <- fdate[n]
lapply(fmethods, function(fx){
# Run forecasting methods
foreca... | /cls2/2_bt_tdfp.R | no_license | GalElgavish/hierarch_bayes | R | false | false | 993 | r |
rm(list = ls())
source("cls2/1_pars.R")
# create cluster for parallel processing
cl <- makeCluster(cores_l)
registerDoParallel(cl)
tdfp_cat <- foreach(n = 1:length(fdate), .packages = c("hts","forecast")) %dopar% {
dx <- fdate[n]
lapply(fmethods, function(fx){
# Run forecasting methods
foreca... |
## Put comments here that give an overall description of what your
## functions do
## Added by Antonio Tavera: Pair of functions that cache the inverse of a matrix
## Write a short comment describing this function
## Added by Antonio Tavera:
## This function creates a special "matrix" object that can cache its invers... | /cachematrix.R | no_license | tavera509/ProgrammingAssignment2 | R | false | false | 1,338 | r | ## Put comments here that give an overall description of what your
## functions do
## Added by Antonio Tavera: Pair of functions that cache the inverse of a matrix
## Write a short comment describing this function
## Added by Antonio Tavera:
## This function creates a special "matrix" object that can cache its invers... |
corr <- function(directory, threshold = 0) {
form1 <- function(doc) {
data <- read.csv(file.path(directory, doc))
nobs <- sum(complete.cases(data))
if (nobs > threshold) {
return (cor(data$nitrate, data$sulfate, use="complete.obs"))
}
}
form2 <- sapply(list.files(directory), form1)
form2 <- unlist(form2[!... | /corr.R | no_license | MattPath/datasciencecoursera | R | false | false | 362 | r | corr <- function(directory, threshold = 0) {
form1 <- function(doc) {
data <- read.csv(file.path(directory, doc))
nobs <- sum(complete.cases(data))
if (nobs > threshold) {
return (cor(data$nitrate, data$sulfate, use="complete.obs"))
}
}
form2 <- sapply(list.files(directory), form1)
form2 <- unlist(form2[!... |
#' Write data in 10X format i.e. directory with barcodes.tsv, genes.tsv, matrix.mtx
#' If object is Seurat v2, output cellranger2-like format
#' If object is Seurat v3, output cellranger3-like format
#'
#' @param obj Seurat object to print
#' @param dir Character. Directory in which to place 10X-like files
#' @export
#... | /R/Write10X.R | no_license | daskelly/earlycross | R | false | false | 2,177 | r | #' Write data in 10X format i.e. directory with barcodes.tsv, genes.tsv, matrix.mtx
#' If object is Seurat v2, output cellranger2-like format
#' If object is Seurat v3, output cellranger3-like format
#'
#' @param obj Seurat object to print
#' @param dir Character. Directory in which to place 10X-like files
#' @export
#... |
testlist <- list(bytes1 = c(168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, ... | /mcga/inst/testfiles/ByteCodeMutation/libFuzzer_ByteCodeMutation/ByteCodeMutation_valgrind_files/1612802087-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 669 | r | testlist <- list(bytes1 = c(168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, 168430090L, ... |
# load dependencies
require("carenR")
source("LRAR/caren.R")
source("LRAR/predictLRAR.R")
source("edira/edira.R")
#default rank
def.rank <- function(ys)
{
ready <- FALSE
while (ready == FALSE)
{
r <- rank(colMeans(ys))
if (length(unique(r))==1 )
{
ys <- ys[-1,]
} else {
ready <- TRUE
... | /src/miner.R | no_license | mpgon/master-dissertation | R | false | false | 10,593 | r | # load dependencies
require("carenR")
source("LRAR/caren.R")
source("LRAR/predictLRAR.R")
source("edira/edira.R")
#default rank
def.rank <- function(ys)
{
ready <- FALSE
while (ready == FALSE)
{
r <- rank(colMeans(ys))
if (length(unique(r))==1 )
{
ys <- ys[-1,]
} else {
ready <- TRUE
... |
source("giveData.R")
df <- giveData("household_power_consumption.txt")
png("plot3.png",width = 480,height = 480)
#plot 3
text <- c("Sub_metering_1","Sub_metering_2","Sub_metering_3")
with(df,plot(Date_Time,Sub_metering_1,type = "n",
ylab = "Energy sub metering",
xlab = ""))
with(... | /plot3.R | no_license | AnikMallick/ExData_Plotting1 | R | false | false | 571 | r | source("giveData.R")
df <- giveData("household_power_consumption.txt")
png("plot3.png",width = 480,height = 480)
#plot 3
text <- c("Sub_metering_1","Sub_metering_2","Sub_metering_3")
with(df,plot(Date_Time,Sub_metering_1,type = "n",
ylab = "Energy sub metering",
xlab = ""))
with(... |
# Test helper functions
test_that("Special mathematics functions work as expected", {
expect_error(lmvgamma(-1, 2))
expect_error(lmvgamma(2, 0))
expect_equal(lmvgamma(2, 1), 0)
expect_equal(lmvgamma(3, 1), 0.693147, tolerance = 1e-5)
expect_equal(lmvgamma(3, 2), 1.550195, tolerance = 1e-5)
expect_equal(lmv... | /tests/testthat/test-helpers.R | no_license | jatotterdell/varapproxr | R | false | false | 818 | r | # Test helper functions
test_that("Special mathematics functions work as expected", {
expect_error(lmvgamma(-1, 2))
expect_error(lmvgamma(2, 0))
expect_equal(lmvgamma(2, 1), 0)
expect_equal(lmvgamma(3, 1), 0.693147, tolerance = 1e-5)
expect_equal(lmvgamma(3, 2), 1.550195, tolerance = 1e-5)
expect_equal(lmv... |
##
## save.R
## Saving functions for package Hipathia
##
## Written by Marta R. Hidalgo, Jose Carbonell-Caballero
##
## Code style by Hadley Wickham (http://r-pkgs.had.co.nz/style.html)
## https://www.bioconductor.org/developers/how-to/coding-style/
##
##################################
# Save results
################... | /R/save.R | no_license | mialaalv/hipathia | R | false | false | 30,417 | r | ##
## save.R
## Saving functions for package Hipathia
##
## Written by Marta R. Hidalgo, Jose Carbonell-Caballero
##
## Code style by Hadley Wickham (http://r-pkgs.had.co.nz/style.html)
## https://www.bioconductor.org/developers/how-to/coding-style/
##
##################################
# Save results
################... |
# --------------------------------------------------- #
# Author: Marius D. Pascariu
# License: MIT
# Last update: Wed Jun 05 14:33:49 2019
# --------------------------------------------------- #
#' Compute Life Tables from Mortality Data
#'
#' Construct either a full or abridged life table with various input choices... | /R/LifeTable.R | permissive | SheilaDesanze/MortalityLaws | R | false | false | 16,249 | r | # --------------------------------------------------- #
# Author: Marius D. Pascariu
# License: MIT
# Last update: Wed Jun 05 14:33:49 2019
# --------------------------------------------------- #
#' Compute Life Tables from Mortality Data
#'
#' Construct either a full or abridged life table with various input choices... |
setwd("F:/Introduction to Data Science/Week5/Assessment/Kaggle_Higgs_Boson_Machine_Learning_Challenge")
getwd()
#load the updated dataset
training.elimNA <- read.csv("trainingElimNA.csv")
#discard weights
Label <- training.elimNA$Label
predictors <- training.elimNA[, 1:25]
tidyData <- cbind(predictors, Label)
dim(ti... | /Week5/TreeBag.R | no_license | nasimulhasan/Data_Science | R | false | false | 13,101 | r | setwd("F:/Introduction to Data Science/Week5/Assessment/Kaggle_Higgs_Boson_Machine_Learning_Challenge")
getwd()
#load the updated dataset
training.elimNA <- read.csv("trainingElimNA.csv")
#discard weights
Label <- training.elimNA$Label
predictors <- training.elimNA[, 1:25]
tidyData <- cbind(predictors, Label)
dim(ti... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aggRaster.R
\name{aggRaster}
\alias{aggRaster}
\title{aggRaster}
\usage{
aggRaster(x, func = "mean", inmem = FALSE, outdir = getwd(), ...)
}
\arguments{
\item{x, }{Raster* object}
\item{func, }{character, 'mean' or ,'sum'}
\item{inmem, }{lo... | /man/aggRaster.Rd | no_license | dsval/splashTools | R | false | true | 827 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/aggRaster.R
\name{aggRaster}
\alias{aggRaster}
\title{aggRaster}
\usage{
aggRaster(x, func = "mean", inmem = FALSE, outdir = getwd(), ...)
}
\arguments{
\item{x, }{Raster* object}
\item{func, }{character, 'mean' or ,'sum'}
\item{inmem, }{lo... |
#' Calculate the filtering distribution for a specified set of parents and a fixed delta.
#'
#' @param Yt the vector of observed time series, length T
#' @param Ft the matrix of covariates, dim = number of thetas (p) x number of time points (T), usually a column of 1s to represent an intercept and the time series of th... | /R/mdm.R | no_license | AlirezaDanesh1350/mdm | R | false | false | 20,905 | r | #' Calculate the filtering distribution for a specified set of parents and a fixed delta.
#'
#' @param Yt the vector of observed time series, length T
#' @param Ft the matrix of covariates, dim = number of thetas (p) x number of time points (T), usually a column of 1s to represent an intercept and the time series of th... |
#' Download ncov 2019 data from
#' https://github.com/BlankerL/DXY-COVID-19-Data/ (csv) or
#' https://github.com/yiluheihei/nCoV-2019-Data (RDS)
#'
#' @param latest logical, download the latest or all time-series ncov data,
#' default \code{TRUE}
#' @param method character
#'
#' @export
get_ncov2 <- function(latest = T... | /R/ncov-data.R | permissive | yiluheihei/ncovmap | R | false | false | 6,689 | r | #' Download ncov 2019 data from
#' https://github.com/BlankerL/DXY-COVID-19-Data/ (csv) or
#' https://github.com/yiluheihei/nCoV-2019-Data (RDS)
#'
#' @param latest logical, download the latest or all time-series ncov data,
#' default \code{TRUE}
#' @param method character
#'
#' @export
get_ncov2 <- function(latest = T... |
#' Calculates the weighted correlation given a data set and a set of weights.
#'
#' This is a copy of corr function from the boot package. It calculates the correlation coefficient in weighted form.
#' @param d a matrix with two columns corresponding to the two variables whose correlation we wish to calculate.
#' @para... | /R/corr.R | no_license | cran/PResiduals | R | false | false | 834 | r | #' Calculates the weighted correlation given a data set and a set of weights.
#'
#' This is a copy of corr function from the boot package. It calculates the correlation coefficient in weighted form.
#' @param d a matrix with two columns corresponding to the two variables whose correlation we wish to calculate.
#' @para... |
Classifier <- setRefClass("Classifier", fields=list(
x = "data.frame",
y = "factor",
x.test = "data.frame",
y.test = "factor",
predicted.class = "factor",
predicted.value = "numeric",
optimalCutoff = "numeric",
sens = "numeric",#based on yo... | /R/Classifier.R | no_license | zzxxyui/metadarclean | R | false | false | 4,003 | r | Classifier <- setRefClass("Classifier", fields=list(
x = "data.frame",
y = "factor",
x.test = "data.frame",
y.test = "factor",
predicted.class = "factor",
predicted.value = "numeric",
optimalCutoff = "numeric",
sens = "numeric",#based on yo... |
install.packages('rgl')
library(rgl)
iris <- data('iris')
open3d()
plot3d(iris$Sepal.Length, iris$Sepal.Width, iris$Petal.Width)
plot3d(iris$Sepal.Length, iris$Sepal.Width, iris$Petal.Width, type = 's')
plot3d(iris$Sepal.Length, iris$Sepal.Width, iris$Petal.Width, type = 's',
col = as.integer(iris$Species)... | /plot3d Example.r | no_license | leocalnan1/Rcode | R | false | false | 323 | r | install.packages('rgl')
library(rgl)
iris <- data('iris')
open3d()
plot3d(iris$Sepal.Length, iris$Sepal.Width, iris$Petal.Width)
plot3d(iris$Sepal.Length, iris$Sepal.Width, iris$Petal.Width, type = 's')
plot3d(iris$Sepal.Length, iris$Sepal.Width, iris$Petal.Width, type = 's',
col = as.integer(iris$Species)... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cvlars.R
\name{plot.HDcvlars}
\alias{plot.HDcvlars}
\title{plot cross validation mean square error}
\usage{
\method{plot}{HDcvlars}(x, ...)
}
\arguments{
\item{x}{Output from HDcvlars function.}
\item{...}{graphical parameters}
}
\descriptio... | /man/plot.HDcvlars.Rd | no_license | Ivis4ml/HDPenReg | R | false | true | 540 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cvlars.R
\name{plot.HDcvlars}
\alias{plot.HDcvlars}
\title{plot cross validation mean square error}
\usage{
\method{plot}{HDcvlars}(x, ...)
}
\arguments{
\item{x}{Output from HDcvlars function.}
\item{...}{graphical parameters}
}
\descriptio... |
% File src/library/grDevices/man/n2mfrow.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2007 R Core Team
% Distributed under GPL 2 or later
\name{n2mfrow}
\alias{n2mfrow}
\title{Compute Default mfrow From Number of Plots}
\description{
Easy setup for plotting multiple figures (in a rectangula... | /bin/R-3.5.1/src/library/grDevices/man/n2mfrow.Rd | permissive | lifebit-ai/exomedepth | R | false | false | 1,099 | rd | % File src/library/grDevices/man/n2mfrow.Rd
% Part of the R package, https://www.R-project.org
% Copyright 1995-2007 R Core Team
% Distributed under GPL 2 or later
\name{n2mfrow}
\alias{n2mfrow}
\title{Compute Default mfrow From Number of Plots}
\description{
Easy setup for plotting multiple figures (in a rectangula... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{iqsiblings}
\alias{iqsiblings}
\title{IQs of Siblings}
\format{A data frame with 80 observations on the following 2 variables.
\describe{
\item{First}{IQ of the older sibling.}
\item{Second}{IQ of the young... | /man/iqsiblings.Rd | no_license | nishantsbi/tigerstats | R | false | false | 444 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{iqsiblings}
\alias{iqsiblings}
\title{IQs of Siblings}
\format{A data frame with 80 observations on the following 2 variables.
\describe{
\item{First}{IQ of the older sibling.}
\item{Second}{IQ of the young... |
############## AF function for a clogit object #####################
#' @title Attributable fraction estimation based on a conditional logistic regression model as a \code{clogit} object (commonly used for matched case-control sampling designs).
#' @description \code{AFclogit} estimates the model-based adjusted attri... | /R/AFclogit.R | no_license | ElisabethDahlqwist/AF | R | false | false | 10,343 | r | ############## AF function for a clogit object #####################
#' @title Attributable fraction estimation based on a conditional logistic regression model as a \code{clogit} object (commonly used for matched case-control sampling designs).
#' @description \code{AFclogit} estimates the model-based adjusted attri... |
dataFile <- "/Users/shriarao/GitHub/datasciencecoursera/Coursera/household_power_consumption.txt"
data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
#str(subSetData)
datetime <- strptime(paste(subSetData$Date, subSetData$Tim... | /Plot3.R | no_license | meerao1/ExData_Plotting1 | R | false | false | 932 | r | dataFile <- "/Users/shriarao/GitHub/datasciencecoursera/Coursera/household_power_consumption.txt"
data <- read.table(dataFile, header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".")
subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,]
#str(subSetData)
datetime <- strptime(paste(subSetData$Date, subSetData$Tim... |
### =========================================================================
### MulticoreParam objects
### -------------------------------------------------------------------------
multicoreWorkers <- function()
.snowCores("multicore")
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ... | /R/MulticoreParam-class.R | no_license | Bioconductor/BiocParallel | R | false | false | 2,922 | r | ### =========================================================================
### MulticoreParam objects
### -------------------------------------------------------------------------
multicoreWorkers <- function()
.snowCores("multicore")
### - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ... |
library(BAT)
### Name: beta.accum
### Title: Beta diversity accumulation curves.
### Aliases: beta.accum
### ** Examples
comm1 <- matrix(c(2,2,0,0,0,1,1,0,0,0,0,2,2,0,0,0,0,0,2,2), nrow = 4, byrow = TRUE)
comm2 <- matrix(c(1,1,0,0,0,0,2,1,0,0,0,0,2,1,0,0,0,0,2,1), nrow = 4, byrow = TRUE)
tree <- hclust(dist(c(1:5),... | /data/genthat_extracted_code/BAT/examples/beta.accum.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 540 | r | library(BAT)
### Name: beta.accum
### Title: Beta diversity accumulation curves.
### Aliases: beta.accum
### ** Examples
comm1 <- matrix(c(2,2,0,0,0,1,1,0,0,0,0,2,2,0,0,0,0,0,2,2), nrow = 4, byrow = TRUE)
comm2 <- matrix(c(1,1,0,0,0,0,2,1,0,0,0,0,2,1,0,0,0,0,2,1), nrow = 4, byrow = TRUE)
tree <- hclust(dist(c(1:5),... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotDimRed.R
\name{plotDimRed}
\alias{plotDimRed}
\title{Plot results either on already run results of reduced dimensions data.}
\usage{
plotDimRed(inSCE, colorBy = "No Color", shape = "No Shape",
reducedDimName = NULL, useAssay = "logcount... | /man/plotDimRed.Rd | permissive | zhangyuqing/singleCellTK | R | false | true | 1,474 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plotDimRed.R
\name{plotDimRed}
\alias{plotDimRed}
\title{Plot results either on already run results of reduced dimensions data.}
\usage{
plotDimRed(inSCE, colorBy = "No Color", shape = "No Shape",
reducedDimName = NULL, useAssay = "logcount... |
# FUNCTIONS FOR CLEANING RAW DATA FILES
#### efficacy_function cleans raw efficacy data in Shiny app
library(dplyr)
efficacy_function <- function(efficacy_df){
efficacy_clean <- efficacy_df %>%
select(Protocol_Animal, Compound, Group, Drug_Dose, Days_Treatment,
Treatment_Interval,Elung,Espleen) %>... | /Shiny_App/group_1_functions.R | no_license | KatieKey/input_output_shiny_group | R | false | false | 3,932 | r |
# FUNCTIONS FOR CLEANING RAW DATA FILES
#### efficacy_function cleans raw efficacy data in Shiny app
library(dplyr)
efficacy_function <- function(efficacy_df){
efficacy_clean <- efficacy_df %>%
select(Protocol_Animal, Compound, Group, Drug_Dose, Days_Treatment,
Treatment_Interval,Elung,Espleen) %>... |
library(DrugsInPeds)
setwd('s:/temp')
password <- NULL
user <- NULL
oracleTempSchema <- NULL
dbms <- "postgresql"
server <- "localhost/ohdsi"
cdmDatabaseSchema <- "cdm4_sim"
port <- NULL
cdmVersion <- "4"
user <- "postgres"
password <- Sys.getenv("pwPostgres")
dbms <- "sql server"
server <- "RNDUSRDHIT07.jnj.com"
c... | /DrugsInPeds/extras/TestCode.R | no_license | jingjingz/StudyProtocols | R | false | false | 1,682 | r | library(DrugsInPeds)
setwd('s:/temp')
password <- NULL
user <- NULL
oracleTempSchema <- NULL
dbms <- "postgresql"
server <- "localhost/ohdsi"
cdmDatabaseSchema <- "cdm4_sim"
port <- NULL
cdmVersion <- "4"
user <- "postgres"
password <- Sys.getenv("pwPostgres")
dbms <- "sql server"
server <- "RNDUSRDHIT07.jnj.com"
c... |
##' QGIS Algorithm provided by GRASS i.smap (grass7:i.smap)
##'
##' @title QGIS algorithm i.smap
##'
##' @param input `multilayer` - Input rasters. .
##' @param signaturefile `file` - Name of input file containing signatures. Path to a file.
##' @param blocksize `number` - Size of submatrix to process at one time. A nu... | /R/grass7_i_smap.R | permissive | VB6Hobbyst7/r_package_qgis | R | false | false | 2,872 | r | ##' QGIS Algorithm provided by GRASS i.smap (grass7:i.smap)
##'
##' @title QGIS algorithm i.smap
##'
##' @param input `multilayer` - Input rasters. .
##' @param signaturefile `file` - Name of input file containing signatures. Path to a file.
##' @param blocksize `number` - Size of submatrix to process at one time. A nu... |
#' Write data to a Praat TextGrid file
#'
#' Write data to a TextGrid file into R
#' @param tg TextGrid data, returned from readTextGrid() or createTextGrid() functions
#' @param file a character string of the filename to write to
#' @export
#' @examples
#' Write to the current working directory
#' writeTextGrid(tg_dat... | /R/writeTextGrid.R | no_license | fauxneticien/phonpack | R | false | false | 670 | r | #' Write data to a Praat TextGrid file
#'
#' Write data to a TextGrid file into R
#' @param tg TextGrid data, returned from readTextGrid() or createTextGrid() functions
#' @param file a character string of the filename to write to
#' @export
#' @examples
#' Write to the current working directory
#' writeTextGrid(tg_dat... |
###################################################
### code chunk number 6: Cs04_model-default
###################################################
kem <- MARSS(dat)
| /inst/userguide/figures/QE--Cs04_model-default.R | permissive | nwfsc-timeseries/MARSS | R | false | false | 168 | r | ###################################################
### code chunk number 6: Cs04_model-default
###################################################
kem <- MARSS(dat)
|
# Identify TF genes and TF families
require(dplyr)
require(stringr)
require(tidyr)
require(ggplot2)
#### Get epigenetic data
epi <- read.csv("~/Projects/fusion_ML/data/gene_identity_data/epigenetic/EpiGenes_main_clean.csv", header=TRUE, stringsAsFactors = FALSE); head(epi)
epi <- epi %>% select(Id, UniProt_ID, Functio... | /identify_epigenetic_genes.R | no_license | wangdi2014/cancer_ML | R | false | false | 2,961 | r | # Identify TF genes and TF families
require(dplyr)
require(stringr)
require(tidyr)
require(ggplot2)
#### Get epigenetic data
epi <- read.csv("~/Projects/fusion_ML/data/gene_identity_data/epigenetic/EpiGenes_main_clean.csv", header=TRUE, stringsAsFactors = FALSE); head(epi)
epi <- epi %>% select(Id, UniProt_ID, Functio... |
library(RUnit)
library(SttrDataPackage)
library(DEMOdz)
options(stringsAsFactors=FALSE)
#----------------------------------------------------------------------------------------------------
runTests <- function()
{
testConstructor();
test.loadFiles()
test.getPatientList()
test.getPatientTable()
test.getGeneSe... | /r_modules/dataPackages/SttrDataPackage/inst/unitTests/test_SttrDataPackage.R | permissive | pablopunk/Oncoscape | R | false | false | 6,788 | r | library(RUnit)
library(SttrDataPackage)
library(DEMOdz)
options(stringsAsFactors=FALSE)
#----------------------------------------------------------------------------------------------------
runTests <- function()
{
testConstructor();
test.loadFiles()
test.getPatientList()
test.getPatientTable()
test.getGeneSe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SSLangmuir2analysis.R
\name{SSLangmuir2analysis}
\alias{SSLangmuir2analysis}
\title{Langmuir Isotherm Nonlinear Analysis via selfStart and Langmuir Second Linear Model}
\usage{
SSLangmuir2analysis(Ce, Qe)
}
\arguments{
\item{Ce}{the numerical... | /man/SSLangmuir2analysis.Rd | no_license | cran/PUPAIM | R | false | true | 1,362 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SSLangmuir2analysis.R
\name{SSLangmuir2analysis}
\alias{SSLangmuir2analysis}
\title{Langmuir Isotherm Nonlinear Analysis via selfStart and Langmuir Second Linear Model}
\usage{
SSLangmuir2analysis(Ce, Qe)
}
\arguments{
\item{Ce}{the numerical... |
household_power <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", stringsAsFactors = FALSE, dec=".")
household_power <- household_power[household_power$Date %in% c("1/2/2007","2/2/2007") ,]
Global_active_power <- as.numeric(household_power$Global_active_power)
datetime <- strptime(paste(househ... | /plot2.R | no_license | nickfranciose/ExData_Plotting1 | R | false | false | 534 | r | household_power <- read.table("household_power_consumption.txt", header = TRUE, sep = ";", stringsAsFactors = FALSE, dec=".")
household_power <- household_power[household_power$Date %in% c("1/2/2007","2/2/2007") ,]
Global_active_power <- as.numeric(household_power$Global_active_power)
datetime <- strptime(paste(househ... |
## These functions enable the caching of a matrix's
## inverse to prevent costly recalculation. It assumes
## that the matrices passed in are invertible so no
## error-checking is done.
## makeCacheMatrix - create a matrix object that is
## able to cache its inverse.
## It has getter and setter methods for the matr... | /cachematrix.R | no_license | Eureka25/ProgrammingAssignment2 | R | false | false | 1,642 | r | ## These functions enable the caching of a matrix's
## inverse to prevent costly recalculation. It assumes
## that the matrices passed in are invertible so no
## error-checking is done.
## makeCacheMatrix - create a matrix object that is
## able to cache its inverse.
## It has getter and setter methods for the matr... |
testlist <- list(lims = structure(c(1.24163114000614e-77, 4.77948086237667e-299, 7.09454157885966e-304, 1.3906712444562e-309, 2.40380942855972e-265, 7.2911185379979e-304, 5.59680502928481e-275, 7.29112201963189e-304, 5.60525372017014e-228, 1.40825002853428e+135, 5.48612408923109e+303, 1.12126408607488e-308), .Dim =... | /palm/inst/testfiles/pbc_distances/libFuzzer_pbc_distances/pbc_distances_valgrind_files/1612987573-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 491 | r | testlist <- list(lims = structure(c(1.24163114000614e-77, 4.77948086237667e-299, 7.09454157885966e-304, 1.3906712444562e-309, 2.40380942855972e-265, 7.2911185379979e-304, 5.59680502928481e-275, 7.29112201963189e-304, 5.60525372017014e-228, 1.40825002853428e+135, 5.48612408923109e+303, 1.12126408607488e-308), .Dim =... |
testlist <- list(a = 458342399L, b = -1L, x = -1L)
result <- do.call(grattan:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610055480-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 111 | r | testlist <- list(a = 458342399L, b = -1L, x = -1L)
result <- do.call(grattan:::anyOutside,testlist)
str(result) |
#install packages
install.packages('rpart')
install.packages('rattle')
install.packages('RColorBrewer')
library(rattle)
library(rpart.plot)
library(RColorBrewer)
## read .csv files
test <- read.csv("test.csv", stringsAsFactors = FALSE)
train <- read.csv("train.csv", stringsAsFactors = FALSE)
##create "Survived" colum... | /titanic1.R | no_license | cwang0129/datasciencecoursera | R | false | false | 1,028 | r | #install packages
install.packages('rpart')
install.packages('rattle')
install.packages('RColorBrewer')
library(rattle)
library(rpart.plot)
library(RColorBrewer)
## read .csv files
test <- read.csv("test.csv", stringsAsFactors = FALSE)
train <- read.csv("train.csv", stringsAsFactors = FALSE)
##create "Survived" colum... |
#STEP FOR CREATING A R PACKAGE ON THE FLY
#SOURCE: https://hilaryparker.com/2014/04/29/writing-an-r-package-from-scratch/
# 1. INSTALL DEVTOOLS AND LOAD IT IN ORDER TO BE ABLE TO DOWNLOAD PACKAGES FROM GITHUB
#install.packages("devtools")
library(devtools)
# 2. INSTALL ROXYGEN FROM REPO AND LOAD IT
#install.packages(... | /pkgsteps.R | no_license | faffr/pkgsteps | R | false | false | 1,879 | r | #STEP FOR CREATING A R PACKAGE ON THE FLY
#SOURCE: https://hilaryparker.com/2014/04/29/writing-an-r-package-from-scratch/
# 1. INSTALL DEVTOOLS AND LOAD IT IN ORDER TO BE ABLE TO DOWNLOAD PACKAGES FROM GITHUB
#install.packages("devtools")
library(devtools)
# 2. INSTALL ROXYGEN FROM REPO AND LOAD IT
#install.packages(... |
###############################
### ###
### WIFI LOCATION ###
### ###
### ###
### ###
###############################
library("tidyr")
library("dplyr")
library("taRifx")
library("lubridate")
library("rpart")
libra... | /NormalizeDataset.R | no_license | MachinelearningBcn/UJILocation | R | false | false | 1,111 | r | ###############################
### ###
### WIFI LOCATION ###
### ###
### ###
### ###
###############################
library("tidyr")
library("dplyr")
library("taRifx")
library("lubridate")
library("rpart")
libra... |
library(tidyverse)
NRI_data_2015 <- read_csv2("Hauptseminararbeit/Data/Raw/NRI/NRI_SH3.csv") %>%
drop_na()
EC_data_2015_raw <- read_csv2("Hauptseminararbeit/Data/Raw/UNSD_Data/07_2020_UNSD__production_trade_energy_supply.csv")%>%
janitor::clean_names('snake') %>%
separate(number_region_country_area_year_series... | /Hauptseminararbeit/SRC/code_first_try_SH3.R | no_license | BergJakob/Hauptseminar | R | false | false | 2,830 | r | library(tidyverse)
NRI_data_2015 <- read_csv2("Hauptseminararbeit/Data/Raw/NRI/NRI_SH3.csv") %>%
drop_na()
EC_data_2015_raw <- read_csv2("Hauptseminararbeit/Data/Raw/UNSD_Data/07_2020_UNSD__production_trade_energy_supply.csv")%>%
janitor::clean_names('snake') %>%
separate(number_region_country_area_year_series... |
#' Run R CMD check from R and Capture Results
#'
#' Run R CMD check form R programatically, and capture the results of the
#' individual checks.
#'
#' @docType package
#' @name rcmdcheck
NULL
#' Run `R CMD check` on a package or a directory
#'
#' @param path Path to a package tarball or a directory.
#' @param quiet W... | /R/package.R | no_license | DavisVaughan/rcmdcheck | R | false | false | 5,460 | r |
#' Run R CMD check from R and Capture Results
#'
#' Run R CMD check form R programatically, and capture the results of the
#' individual checks.
#'
#' @docType package
#' @name rcmdcheck
NULL
#' Run `R CMD check` on a package or a directory
#'
#' @param path Path to a package tarball or a directory.
#' @param quiet W... |
#reading in data
crabdata <- read.csv("https://raw.githubusercontent.com/RobertsLab/project-crab/master/data/goodsamples.csv")
crabdata
write.csv(crabdata, file = "data/crabdata.csv")
library(dplyr)
#is there a difference in RNA concentration based on when grab was in cold water treatment versus warmwater?
M... | /scripts/0515.R | no_license | fish497-2018/Roberts-crab | R | false | false | 499 | r |
#reading in data
crabdata <- read.csv("https://raw.githubusercontent.com/RobertsLab/project-crab/master/data/goodsamples.csv")
crabdata
write.csv(crabdata, file = "data/crabdata.csv")
library(dplyr)
#is there a difference in RNA concentration based on when grab was in cold water treatment versus warmwater?
M... |
#' Get a List Element
#'
#' @param .list a named list object.
#' @param .pattern a regular expression to be matched to a character string.
#'
#' @return a single element of a list.
#'
#' @examples
#' get_element(.list = list(first_element = 1:3, second_element = 4:6), .pattern = "second")
get_element <- function(.list... | /R/helpers.R | permissive | BWAM/validator | R | false | false | 985 | r | #' Get a List Element
#'
#' @param .list a named list object.
#' @param .pattern a regular expression to be matched to a character string.
#'
#' @return a single element of a list.
#'
#' @examples
#' get_element(.list = list(first_element = 1:3, second_element = 4:6), .pattern = "second")
get_element <- function(.list... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/metricsgraphics-package.R
\docType{package}
\name{metricsgraphics}
\alias{metricsgraphics}
\alias{metricsgraphics-package}
\title{An \code{htmlwidget} interface to the
\href{http://metricsgraphicsjs.org/}{MetricsGraphics.js} D3 chart ... | /man/metricsgraphics.Rd | no_license | mostlyeconmix/metricsgraphics | R | false | false | 491 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/metricsgraphics-package.R
\docType{package}
\name{metricsgraphics}
\alias{metricsgraphics}
\alias{metricsgraphics-package}
\title{An \code{htmlwidget} interface to the
\href{http://metricsgraphicsjs.org/}{MetricsGraphics.js} D3 chart ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/icc2x3.r
\name{icc3.nointer.fn}
\alias{icc3.nointer.fn}
\title{Intraclass Correlation Coefficients ICC(3,1) and ICCa(3,1) under ANOVA Model 3 without interaction.}
\usage{
icc3.nointer.fn(dfra)
}
\arguments{
\item{dfra}{This is a dat... | /man/icc3.nointer.fn.Rd | no_license | cran/irrICC | R | false | true | 1,924 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/icc2x3.r
\name{icc3.nointer.fn}
\alias{icc3.nointer.fn}
\title{Intraclass Correlation Coefficients ICC(3,1) and ICCa(3,1) under ANOVA Model 3 without interaction.}
\usage{
icc3.nointer.fn(dfra)
}
\arguments{
\item{dfra}{This is a dat... |
# ------------------------------------------------------------------
# Contributed by Michel Lang, TU Dortmund
# ------------------------------------------------------------------
# L1-penalized logistic regression using the glmnet package with default parameters
# USEAGE: Rscript [scriptfile] [problem-number] [number ... | /MachineLearningAlg/main_functions/glmnet_classification.R | no_license | ishandutta2007/benchR | R | false | false | 1,010 | r | # ------------------------------------------------------------------
# Contributed by Michel Lang, TU Dortmund
# ------------------------------------------------------------------
# L1-penalized logistic regression using the glmnet package with default parameters
# USEAGE: Rscript [scriptfile] [problem-number] [number ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/IPDFilecheck.R
\name{represent_numerical_data_forsubgroups}
\alias{represent_numerical_data_forsubgroups}
\title{Function to find the number and percentages of categories}
\usage{
represent_numerical_data_forsubgroups(data, variable1, variabl... | /man/represent_numerical_data_forsubgroups.Rd | no_license | sheejamk/IPDFileCheck | R | false | true | 929 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/IPDFilecheck.R
\name{represent_numerical_data_forsubgroups}
\alias{represent_numerical_data_forsubgroups}
\title{Function to find the number and percentages of categories}
\usage{
represent_numerical_data_forsubgroups(data, variable1, variabl... |
## This first line will likely take a few seconds. Be patient!
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
#Question 1
total<-aggregate(NEI$Emissions,by=list(Category=NEI$year),FUN=sum)
png(file="Q1.png",width=480,height=480)
plot(total$Category,total$x,type="o",xlab="year",y... | /plot1.R | no_license | TheCode2017/Analysis-of-fine-particulate-matter-PM-2.5- | R | false | false | 422 | r | ## This first line will likely take a few seconds. Be patient!
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
#Question 1
total<-aggregate(NEI$Emissions,by=list(Category=NEI$year),FUN=sum)
png(file="Q1.png",width=480,height=480)
plot(total$Category,total$x,type="o",xlab="year",y... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/integration.R
\name{gq_points_weights}
\alias{gq_points_weights}
\title{Gaussian Quadrature points and weights}
\usage{
gq_points_weights(dimensions = 1, mu = rep(0, dimensions),
sigma = diag(1, dimensions), settings = settings.gq())
}
\arg... | /man/gq_points_weights.Rd | permissive | sebastianueckert/funsu | R | false | true | 875 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/integration.R
\name{gq_points_weights}
\alias{gq_points_weights}
\title{Gaussian Quadrature points and weights}
\usage{
gq_points_weights(dimensions = 1, mu = rep(0, dimensions),
sigma = diag(1, dimensions), settings = settings.gq())
}
\arg... |
# Code to run in class
Help()
help()
# Source code
help
h el p ()
help ( topic = "mean")
`+`(1, 3)
1 + 3
## Assignment with arrow "<-"
a <- c(1, 3, 4, 6)
b <- c("marcel", "ramos")
## Assignment with equals sign "="
a = c(1, 3, 4, 7)
## Operation works on each value in `a`
a + 1
object.size(a)
?mean
h... | /InClass/inClass_S1.R | no_license | gitter-badger/IntroR | R | false | false | 1,051 | r | # Code to run in class
Help()
help()
# Source code
help
h el p ()
help ( topic = "mean")
`+`(1, 3)
1 + 3
## Assignment with arrow "<-"
a <- c(1, 3, 4, 6)
b <- c("marcel", "ramos")
## Assignment with equals sign "="
a = c(1, 3, 4, 7)
## Operation works on each value in `a`
a + 1
object.size(a)
?mean
h... |
library(tidyverse)
library(modelr)
library(scatterplot3d)
library(readr,dplyr)
library(ggplot2)
library(caret)
library(rsample)
library(ISLR)
library(rpart)
library(rpart.plot)
Analysis <- read_csv("breast_cancer_data2.csv")
# TODO data cleanup
Analysis$diagnosis <- as.factor(Analysis$diagnosis) # con... | /proiect Final.R | no_license | bpastiu/bigData | R | false | false | 7,444 | r | library(tidyverse)
library(modelr)
library(scatterplot3d)
library(readr,dplyr)
library(ggplot2)
library(caret)
library(rsample)
library(ISLR)
library(rpart)
library(rpart.plot)
Analysis <- read_csv("breast_cancer_data2.csv")
# TODO data cleanup
Analysis$diagnosis <- as.factor(Analysis$diagnosis) # con... |
setwd("C:/Users/KSGI/Desktop/Data Science/Programming Assignement 3")
best <- function(state, outcome){
out <- read.csv("outcome-of-care-measures.csv", h=T, sep=",")
if(outcome=="heart attack") {
hosp <- out[,c(which(colnames(out)=="Hospital.Name"),
which(colnames(out)=="State"),
... | /Programming Assignement 3/best.R | no_license | Kgiabou/Data-Science | R | false | false | 1,387 | r | setwd("C:/Users/KSGI/Desktop/Data Science/Programming Assignement 3")
best <- function(state, outcome){
out <- read.csv("outcome-of-care-measures.csv", h=T, sep=",")
if(outcome=="heart attack") {
hosp <- out[,c(which(colnames(out)=="Hospital.Name"),
which(colnames(out)=="State"),
... |
## makeCacheMatrix creates a cacheable matrix type.
## A cacheable matrix is a list with named elements that are methods that get/set the matrix
## and its inverse
## The matrix and the inverse are saved in the closure
## Arguments to makeCacheMatrix() are the same as those for matrix()
makeCacheMatrix <- function(...)... | /cachematrix.R | no_license | ankanban/ProgrammingAssignment2 | R | false | false | 1,205 | r | ## makeCacheMatrix creates a cacheable matrix type.
## A cacheable matrix is a list with named elements that are methods that get/set the matrix
## and its inverse
## The matrix and the inverse are saved in the closure
## Arguments to makeCacheMatrix() are the same as those for matrix()
makeCacheMatrix <- function(...)... |
library(shinyWidgets)
### Name: downloadBttn
### Title: Create a download bttn
### Aliases: downloadBttn
### ** Examples
## Not run:
##D
##D if (interactive()) {
##D
##D library(shiny)
##D library(shinyWidgets)
##D
##D ui <- fluidPage(
##D tags$h2("Download bttn"),
##D downloadBttn(
##D outputId = "down... | /data/genthat_extracted_code/shinyWidgets/examples/downloadBttn.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 761 | r | library(shinyWidgets)
### Name: downloadBttn
### Title: Create a download bttn
### Aliases: downloadBttn
### ** Examples
## Not run:
##D
##D if (interactive()) {
##D
##D library(shiny)
##D library(shinyWidgets)
##D
##D ui <- fluidPage(
##D tags$h2("Download bttn"),
##D downloadBttn(
##D outputId = "down... |
library(leaflet)
library(ShinyDash)
shinyUI(fluidPage(
tags$head(tags$link(rel='stylesheet', type='text/css', href='styles.css')),
leafletMap(
"map", "100%", 400,
initialTileLayer = "//{s}.tiles.mapbox.com/v3/jcheng.map-5ebohr46/{z}/{x}/{y}.png",
initialTileLayerAttribution = HTML('Maps by <a href="htt... | /R-Portable/library/leaflet/legacy/examples/population/ui.R | permissive | ksasso/Electron_ShinyApp_Deployment | R | false | false | 1,410 | r | library(leaflet)
library(ShinyDash)
shinyUI(fluidPage(
tags$head(tags$link(rel='stylesheet', type='text/css', href='styles.css')),
leafletMap(
"map", "100%", 400,
initialTileLayer = "//{s}.tiles.mapbox.com/v3/jcheng.map-5ebohr46/{z}/{x}/{y}.png",
initialTileLayerAttribution = HTML('Maps by <a href="htt... |
##########################################
#### GAM MODELS FOR T1 BIFACTOR STUDY ####
##########################################
#Load data
data.JAC <- readRDS("/data/jux/BBL/projects/pncT1AcrossDisorder/subjectData/n1239_T1_subjData_NoPsychMeds.rds")
#Load library
library(mgcv)
#Get JAC variable names
jacComponents... | /NewJacobian/GamAnalyses_T1Bifactors_NewJacobian_medu1_TBV_noPsychMed.R | no_license | PennBBL/pncT1Bifactors | R | false | false | 5,183 | r | ##########################################
#### GAM MODELS FOR T1 BIFACTOR STUDY ####
##########################################
#Load data
data.JAC <- readRDS("/data/jux/BBL/projects/pncT1AcrossDisorder/subjectData/n1239_T1_subjData_NoPsychMeds.rds")
#Load library
library(mgcv)
#Get JAC variable names
jacComponents... |
## 이미지데이터를 randomForest로 train 및 test하기
test <- read.csv('https://raw.githubusercontent.com/ozt-ca/tjo.hatenablog.samples/master/r_samples/public_lib/jp/mnist_reproduced/short_prac_test.csv')
train <- read.csv('https://raw.githubusercontent.com/ozt-ca/tjo.hatenablog.samples/master/r_samples/public_lib/jp/mnist_reprodu... | /code/2주차/170713_eun3.R | no_license | keuns/bigdata | R | false | false | 1,558 | r | ## 이미지데이터를 randomForest로 train 및 test하기
test <- read.csv('https://raw.githubusercontent.com/ozt-ca/tjo.hatenablog.samples/master/r_samples/public_lib/jp/mnist_reproduced/short_prac_test.csv')
train <- read.csv('https://raw.githubusercontent.com/ozt-ca/tjo.hatenablog.samples/master/r_samples/public_lib/jp/mnist_reprodu... |
## Tue May 21 02:04:46 2013
## Original file Copyright 2013 A.C. Guidoum
## This file is part of the R package kedd.
## Arsalane Chouaib GUIDOUM <acguidoum@usthb.dz> and <starsalane@gmail.com>
## Department of Probabilities-Statistics
## Faculty of Mathematics
## University of Science and Technology Houari Boume... | /kedd/R/BCV.R | no_license | ingted/R-Examples | R | false | false | 11,539 | r | ## Tue May 21 02:04:46 2013
## Original file Copyright 2013 A.C. Guidoum
## This file is part of the R package kedd.
## Arsalane Chouaib GUIDOUM <acguidoum@usthb.dz> and <starsalane@gmail.com>
## Department of Probabilities-Statistics
## Faculty of Mathematics
## University of Science and Technology Houari Boume... |
## Put comments here that give an overall description of what your
## functions do
## The first function, makeVector creates a special "vector", which is really a list containing a function to set the value of the Matrix get the value of the Matrix
## set the value of the Inverse
## get the value of the Inverse
make... | /cachematrix.R | no_license | Ankurkaus029/ProgrammingAssignment2 | R | false | false | 1,012 | r | ## Put comments here that give an overall description of what your
## functions do
## The first function, makeVector creates a special "vector", which is really a list containing a function to set the value of the Matrix get the value of the Matrix
## set the value of the Inverse
## get the value of the Inverse
make... |
## Install and require the necessary libraries
#install.packages("readr")
library(readr)
#install.packages("dplyr")
library(dplyr)
## Download the data set and unzip the file:
url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(url, destfile = "./data.zip")
unz... | /run_analysis.R | no_license | SouradeepSaha/Getting-and-cleaning-data | R | false | false | 2,443 | r | ## Install and require the necessary libraries
#install.packages("readr")
library(readr)
#install.packages("dplyr")
library(dplyr)
## Download the data set and unzip the file:
url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(url, destfile = "./data.zip")
unz... |
library(nsRFA)
### Name: GENPAR
### Title: Three parameter generalized Pareto distribution and L-moments
### Aliases: GENPAR f.genpar F.genpar invF.genpar Lmom.genpar par.genpar
### rand.genpar
### Keywords: distribution
### ** Examples
data(hydroSIMN)
annualflows
summary(annualflows)
x <- annualflows["dato"][,]
... | /data/genthat_extracted_code/nsRFA/examples/GENPAR.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 903 | r | library(nsRFA)
### Name: GENPAR
### Title: Three parameter generalized Pareto distribution and L-moments
### Aliases: GENPAR f.genpar F.genpar invF.genpar Lmom.genpar par.genpar
### rand.genpar
### Keywords: distribution
### ** Examples
data(hydroSIMN)
annualflows
summary(annualflows)
x <- annualflows["dato"][,]
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/groan.R
\name{groan}
\alias{groan}
\title{Function to return random dad joke}
\usage{
groan(sting = TRUE)
}
\arguments{
\item{sting}{Plays a joke sting after the joke. Sound from
\url{https://archive.org/details/Rimshot_254}}
}
\value{
Invis... | /man/groan.Rd | no_license | jhollist/dadjokeapi | R | false | true | 654 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/groan.R
\name{groan}
\alias{groan}
\title{Function to return random dad joke}
\usage{
groan(sting = TRUE)
}
\arguments{
\item{sting}{Plays a joke sting after the joke. Sound from
\url{https://archive.org/details/Rimshot_254}}
}
\value{
Invis... |
# Copyright 2020 Observational Health Data Sciences and Informatics
#
# This file is part of Capr
#
# 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/LICENS... | /R/LowLevelSaveFn.R | permissive | rfherrerac/Capr | R | false | false | 8,873 | r | # Copyright 2020 Observational Health Data Sciences and Informatics
#
# This file is part of Capr
#
# 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/LICENS... |
library(ggplot2)
library(stats)
library(GGally)
library(scatterplot3d)
getwd()
setwd(".\\")
getwd()
survey <- read.csv("gss-2016.csv")
survey[1:15,c('CHILDS','SIBS','SEX')]
# Assuming 1 for males and 2 for females.
males =subset(survey,SEX==1)
females = subset(survey,SEX==2)
males[1:10,c('CHILDS','SIBS','SEX')]
... | /Bellevue University/Courses/DSC520/Week6/Assignment 6 - GSS_2016_Survey.R | no_license | safarie1103/Safarie1103 | R | false | false | 1,896 | r | library(ggplot2)
library(stats)
library(GGally)
library(scatterplot3d)
getwd()
setwd(".\\")
getwd()
survey <- read.csv("gss-2016.csv")
survey[1:15,c('CHILDS','SIBS','SEX')]
# Assuming 1 for males and 2 for females.
males =subset(survey,SEX==1)
females = subset(survey,SEX==2)
males[1:10,c('CHILDS','SIBS','SEX')]
... |
## ---- CFCall_benchmark ----
## Compare the speed of C and Fortran interfaces with R
dyn.load(file.path("R_Fortran", "01_convolve", paste0("convolve", .Platform$dynlib.ext))) # Platform independence
dyn.load(file.path("R_C", "01_convolve", paste0("convolveC", .Platform$dynlib.ext)))
dyn.load(file.path("R_C", "01_conv... | /benchmark.R | no_license | mingsnu/R_Fortran_Test_Notes | R | false | false | 2,452 | r | ## ---- CFCall_benchmark ----
## Compare the speed of C and Fortran interfaces with R
dyn.load(file.path("R_Fortran", "01_convolve", paste0("convolve", .Platform$dynlib.ext))) # Platform independence
dyn.load(file.path("R_C", "01_convolve", paste0("convolveC", .Platform$dynlib.ext)))
dyn.load(file.path("R_C", "01_conv... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EarlyStopping.R
\name{Scaling}
\alias{Scaling}
\title{scaling input matix}
\usage{
Scaling(X.mat)
}
\description{
scaling input matix
}
| /project-2-linear-models/linearModels.Rcheck/00_pkg_src/linearModels/man/Scaling.Rd | no_license | nhanderson/cs499-spring2019 | R | false | true | 214 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/EarlyStopping.R
\name{Scaling}
\alias{Scaling}
\title{scaling input matix}
\usage{
Scaling(X.mat)
}
\description{
scaling input matix
}
|
## Fuse Networks
# Load things
library( "dplyr" )
annotated_molecule_edges <- readRDS( "processed-data/annotated_molecule_edges.rds" )
fgnem_ko_edges <- readRDS( "processed-data/fgnem_ko_edges.rds" )
molecule_ids <- readRDS( "processed-data/molecule-ids.rds" )
# Assume kos loaded
# Get the KO-protein map
ko_proteins... | /R/fuse-networks.R | permissive | sverchkov/metabolite-and-protein-network-from-knockouts | R | false | false | 1,801 | r | ## Fuse Networks
# Load things
library( "dplyr" )
annotated_molecule_edges <- readRDS( "processed-data/annotated_molecule_edges.rds" )
fgnem_ko_edges <- readRDS( "processed-data/fgnem_ko_edges.rds" )
molecule_ids <- readRDS( "processed-data/molecule-ids.rds" )
# Assume kos loaded
# Get the KO-protein map
ko_proteins... |
library(shiny)
library(DT)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
navbarPage(
title = "Tags classification",
tabPanel("Data",
sidebarLayout(
sidebarPanel(
fileInput("file1", "Choose CSV File",
... | /ui.R | no_license | SergKramarev/tags-classification | R | false | false | 2,331 | r | library(shiny)
library(DT)
# Define UI for application that draws a histogram
shinyUI(fluidPage(
navbarPage(
title = "Tags classification",
tabPanel("Data",
sidebarLayout(
sidebarPanel(
fileInput("file1", "Choose CSV File",
... |
install.packages("readxl")
install.packages("matrixStats")
install.packages("factoextra")
library(matrixStats)
library(reshape2)
workingdic <- getwd()
workingdic <- trimws(workingdic) # Trimming and spaces at either ends
print(workingdic)
setwd(workingdic)
###################################################### Tot... | /CA3/PCA.R | no_license | murthysn18/Data_Science | R | false | false | 7,071 | r | install.packages("readxl")
install.packages("matrixStats")
install.packages("factoextra")
library(matrixStats)
library(reshape2)
workingdic <- getwd()
workingdic <- trimws(workingdic) # Trimming and spaces at either ends
print(workingdic)
setwd(workingdic)
###################################################### Tot... |
library(data.table)
all_movement_locations <- function(location_dt) {
start_column <- 2
location_columns <- c(start_column, grep("Location", colnames(location_dt)))
locations <- unique(as.vector(as.matrix(location_dt[, ..location_columns])))
locations[is.finite(locations)]
}
test_that("bloodmeal density ass... | /macro/tests/testthat/test-bloodmeal_density.R | no_license | dd-harp/MASH | R | false | false | 2,166 | r | library(data.table)
all_movement_locations <- function(location_dt) {
start_column <- 2
location_columns <- c(start_column, grep("Location", colnames(location_dt)))
locations <- unique(as.vector(as.matrix(location_dt[, ..location_columns])))
locations[is.finite(locations)]
}
test_that("bloodmeal density ass... |
#' Plotting predicted risk
#'
#' Show predicted risk obtained by a risk prediction model as a function of
#' time.
#'
#' @aliases plot.riskRegression
#' @usage
#' \method{plot}{riskRegression}(x,
##' cause,
##' newdata,
##' xlab,
##' ylab,
##' xlim,
##' ylim,
##' lwd,
##' col,
##' lty,
##' axes=T... | /R/plot.riskRegression.R | no_license | LoSerigne/riskRegression | R | false | false | 7,673 | r | #' Plotting predicted risk
#'
#' Show predicted risk obtained by a risk prediction model as a function of
#' time.
#'
#' @aliases plot.riskRegression
#' @usage
#' \method{plot}{riskRegression}(x,
##' cause,
##' newdata,
##' xlab,
##' ylab,
##' xlim,
##' ylim,
##' lwd,
##' col,
##' lty,
##' axes=T... |
training = read.csv("C:/Users/Avinash Vallur/Desktop/Arjhun/Data Mining/Datasets/income_tr.csv")
testing = read.csv("C:/Users/Avinash Vallur/Desktop/Arjhun/Data Mining/Datasets/income_te.csv")
setwd("C:/Users/Avinash Vallur/Desktop/Arjhun/Data Mining/Datasets/")
#training=training[1:100,]
#testing=testing[1:100,]
#fu... | /income_class_combined.R | no_license | arjhunh/kNNClassifier | R | false | false | 13,547 | r | training = read.csv("C:/Users/Avinash Vallur/Desktop/Arjhun/Data Mining/Datasets/income_tr.csv")
testing = read.csv("C:/Users/Avinash Vallur/Desktop/Arjhun/Data Mining/Datasets/income_te.csv")
setwd("C:/Users/Avinash Vallur/Desktop/Arjhun/Data Mining/Datasets/")
#training=training[1:100,]
#testing=testing[1:100,]
#fu... |
#' variable influence of BRT (gbm)
#' @export
Brt_imp = function(variabledf, opti = F, ntree = 1000, y_varname = c("day_value", "night_value", "value_mean"), interaction.depth = 6,bag.fraction = 0.5,shrinkage= 0.01, training, test, grepstring, ...) {
prenres = paste(y_varname, "|", grepstring, sep = "")
pre_m... | /R/Brt_imp.R | no_license | mengluchu/APMtools | R | false | false | 1,086 | r | #' variable influence of BRT (gbm)
#' @export
Brt_imp = function(variabledf, opti = F, ntree = 1000, y_varname = c("day_value", "night_value", "value_mean"), interaction.depth = 6,bag.fraction = 0.5,shrinkage= 0.01, training, test, grepstring, ...) {
prenres = paste(y_varname, "|", grepstring, sep = "")
pre_m... |
##############################################################################
############### calculate governance score for each fisheries stock ##########
##############################################################################
## ReadMe : ##################################################################
## a... | /globalprep/fis/v2015/Stock_resilience.R | no_license | OHI-Science/ohiprep_v2018 | R | false | false | 9,317 | r | ##############################################################################
############### calculate governance score for each fisheries stock ##########
##############################################################################
## ReadMe : ##################################################################
## a... |
# Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
context("Test UserInfoOut")
model.instance <- UserInfoOut$new()
test_that("uid", {
# tests for the property `uid` (character)
# uncomment below to test the property
#expect_equal(model.insta... | /tests/testthat/test_user_info_out.R | no_license | namsor/namsor-r-sdk2 | R | false | false | 3,096 | r | # Automatically generated by openapi-generator (https://openapi-generator.tech)
# Please update as you see appropriate
context("Test UserInfoOut")
model.instance <- UserInfoOut$new()
test_that("uid", {
# tests for the property `uid` (character)
# uncomment below to test the property
#expect_equal(model.insta... |
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12389708290749e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613114544-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 251 | r | testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12389708290749e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Database.R
\name{get_label}
\alias{get_label}
\title{Get label information}
\usage{
get_label(
label_id,
token = NA
)
}
\arguments{
\item{label_id}{Integer value representing a valid release ID}
\item{token}{(optional) Token object obtaine... | /man/get_label.Rd | no_license | Pascallio/discogsAPI | R | false | true | 494 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Database.R
\name{get_label}
\alias{get_label}
\title{Get label information}
\usage{
get_label(
label_id,
token = NA
)
}
\arguments{
\item{label_id}{Integer value representing a valid release ID}
\item{token}{(optional) Token object obtaine... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GetBranchPolygon.R
\name{do_some_cal}
\alias{do_some_cal}
\title{Simple function to test}
\usage{
do_some_cal(x)
}
\arguments{
\item{x}{some number}
}
\value{
some number
}
\description{
Simple function to test
}
\examples{
do_some_cal(5)
}
| /man/do_some_cal.Rd | no_license | onehungano1/maptools | R | false | true | 319 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/GetBranchPolygon.R
\name{do_some_cal}
\alias{do_some_cal}
\title{Simple function to test}
\usage{
do_some_cal(x)
}
\arguments{
\item{x}{some number}
}
\value{
some number
}
\description{
Simple function to test
}
\examples{
do_some_cal(5)
}
|
## Pair of functions that like the examples given calculate the
## inverse of a matrix, or gets the value from the cache
## Makes a special "vector", which is really a list containing
##a function to
##set the value of the matrix
##get the value of the matrix
##set the value of the inverse
##get the... | /cachematrix.R | no_license | EthanAskew/ProgrammingAssignment2 | R | false | false | 1,024 | r | ## Pair of functions that like the examples given calculate the
## inverse of a matrix, or gets the value from the cache
## Makes a special "vector", which is really a list containing
##a function to
##set the value of the matrix
##get the value of the matrix
##set the value of the inverse
##get the... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ops-function.R
\name{register_native_user_function}
\alias{register_native_user_function}
\title{Register Native UserFunction}
\usage{
register_native_user_function(op_id, module_name, factory_method_name)
}
\arguments{
\item{factory_method_n... | /man/register_native_user_function.Rd | permissive | Bhaskers-Blu-Org2/CNTK-R | R | false | true | 469 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ops-function.R
\name{register_native_user_function}
\alias{register_native_user_function}
\title{Register Native UserFunction}
\usage{
register_native_user_function(op_id, module_name, factory_method_name)
}
\arguments{
\item{factory_method_n... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/gram_mat.R
\name{gram_mat}
\alias{gram_mat}
\title{Gram Matrix}
\usage{
gram_mat(mydat, sigma)
}
\arguments{
\item{mydat}{is the training data.}
\item{sigma}{is the scale parameter for use in the gaussian kernel.}
}
\description{
Thi... | /man/gram_mat.Rd | no_license | waitalone/svdd | R | false | false | 455 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/gram_mat.R
\name{gram_mat}
\alias{gram_mat}
\title{Gram Matrix}
\usage{
gram_mat(mydat, sigma)
}
\arguments{
\item{mydat}{is the training data.}
\item{sigma}{is the scale parameter for use in the gaussian kernel.}
}
\description{
Thi... |
#Loading required libraries
library(dplyr)
library(reshape2)
#Metadata
activity_labels <- read.table("./activity_labels.txt", quote="\"")
names(activity_labels) <- c("activity_id","activity_label")
features <- read.table("./features.txt", quote="\"")
#Getting the test data
subject_test <- read.table("./test/subject_t... | /run_analysis.R | no_license | nikan/GCDProject | R | false | false | 2,173 | r | #Loading required libraries
library(dplyr)
library(reshape2)
#Metadata
activity_labels <- read.table("./activity_labels.txt", quote="\"")
names(activity_labels) <- c("activity_id","activity_label")
features <- read.table("./features.txt", quote="\"")
#Getting the test data
subject_test <- read.table("./test/subject_t... |
helper <- '
var levels = function(a, lvl){ return _.uniq(_.pluck(a, lvl)) }
var months = levels(data, "age");
var newData = map(function(month){
//Select the data that correspond to each month
var itemInfo = {age: month}
var itemData = _.where(data, itemInfo)
//prepare data for a dictionary with the utilies (freq,... | /models/helpers.R | no_license | afourtassi/networks | R | false | false | 2,928 | r | helper <- '
var levels = function(a, lvl){ return _.uniq(_.pluck(a, lvl)) }
var months = levels(data, "age");
var newData = map(function(month){
//Select the data that correspond to each month
var itemInfo = {age: month}
var itemData = _.where(data, itemInfo)
//prepare data for a dictionary with the utilies (freq,... |
testlist <- list(x = c(16777217L, -452984832L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0... | /diffrprojects/inst/testfiles/dist_mat_absolute/libFuzzer_dist_mat_absolute/dist_mat_absolute_valgrind_files/1609962065-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 417 | r | testlist <- list(x = c(16777217L, -452984832L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0... |
setwd("C:/COURSERA/Exploratory_data_analysis/Project1/ExData_Plotting1")
library(dplyr)
library(data.table)
data<-read.table("household_power_consumption.txt", header=TRUE,sep=";",na.strings="?")
#Remove NAs
check_na<-complete.cases(data)
data<-data[check_na,]
# Check class of each variable
sapply(data,class)
#Cre... | /plot2.R | no_license | NickMaki/ExData_Plotting1 | R | false | false | 1,065 | r | setwd("C:/COURSERA/Exploratory_data_analysis/Project1/ExData_Plotting1")
library(dplyr)
library(data.table)
data<-read.table("household_power_consumption.txt", header=TRUE,sep=";",na.strings="?")
#Remove NAs
check_na<-complete.cases(data)
data<-data[check_na,]
# Check class of each variable
sapply(data,class)
#Cre... |
\name{ghkvec}
\alias{ghkvec}
\concept{multivariate normal distribution}
\concept{GHK method}
\concept{integral}
\title{Compute GHK approximation to Multivariate Normal Integrals}
\description{
\code{ghkvec} computes the GHK approximation to the integral of a multivariate normal density over a half plane defined by a ... | /man/ghkvec.Rd | no_license | nicoaramayo/bayesm | R | false | false | 3,123 | rd | \name{ghkvec}
\alias{ghkvec}
\concept{multivariate normal distribution}
\concept{GHK method}
\concept{integral}
\title{Compute GHK approximation to Multivariate Normal Integrals}
\description{
\code{ghkvec} computes the GHK approximation to the integral of a multivariate normal density over a half plane defined by a ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_tlo_contacts}
\alias{get_tlo_contacts}
\title{Get TFE and OPS Contacts}
\usage{
get_tlo_contacts(conn, org_ids)
}
\arguments{
\item{conn}{connection to the data warehouse}
\item{org_ids}{list of organisation ids}
}
\value{
... | /man/get_tlo_contacts.Rd | permissive | koad7/anahita | R | false | true | 675 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_tlo_contacts}
\alias{get_tlo_contacts}
\title{Get TFE and OPS Contacts}
\usage{
get_tlo_contacts(conn, org_ids)
}
\arguments{
\item{conn}{connection to the data warehouse}
\item{org_ids}{list of organisation ids}
}
\value{
... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\docType{package}
\name{drexplorer-package}
\alias{drexplorer}
\alias{drexplorer-package}
\title{Dose-response Explorer}
\description{
There is a great variety of models developed for dose-response
data, many of which have been implemented in the drc and DoseFindi... | /man/drexplorer-package.Rd | no_license | hjanime/drexplorer | R | false | false | 757 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\docType{package}
\name{drexplorer-package}
\alias{drexplorer}
\alias{drexplorer-package}
\title{Dose-response Explorer}
\description{
There is a great variety of models developed for dose-response
data, many of which have been implemented in the drc and DoseFindi... |
## We will first import the data, clean it up some, and then subset it down to what we want to analyze
library(dplyr)
electricdata <- read.table("household_power_consumption.txt", sep = ";")
a1 <- as.vector(t(a)[,1])
names(electricdata) <- a1
electricdata <- electricdata[-c(1),]
electricdata_subset <- subset(el... | /plot1.R | no_license | totokamari/Exploratory_Data_Analysis | R | false | false | 684 | r | ## We will first import the data, clean it up some, and then subset it down to what we want to analyze
library(dplyr)
electricdata <- read.table("household_power_consumption.txt", sep = ";")
a1 <- as.vector(t(a)[,1])
names(electricdata) <- a1
electricdata <- electricdata[-c(1),]
electricdata_subset <- subset(el... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.