content
large_stringlengths
0
6.46M
path
large_stringlengths
3
331
license_type
large_stringclasses
2 values
repo_name
large_stringlengths
5
125
language
large_stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
4
6.46M
extension
large_stringclasses
75 values
text
stringlengths
0
6.46M
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ismevExtension.R \name{print.gpd.fit} \alias{print.gpd.fit} \title{Nicer print of gpd.fit results} \usage{ \method{print}{gpd.fit}(x, ...) } \arguments{ \item{x}{a fitted object of the class pp.fit.} \item{...}{further arguments passed to \c...
/man/print.gpd.fit.Rd
no_license
ilapros/ilaprosUtils
R
false
true
589
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ismevExtension.R \name{print.gpd.fit} \alias{print.gpd.fit} \title{Nicer print of gpd.fit results} \usage{ \method{print}{gpd.fit}(x, ...) } \arguments{ \item{x}{a fitted object of the class pp.fit.} \item{...}{further arguments passed to \c...
makeCacheMatrix <- function(x = matrix()) { ## This function creates a special "matrix" object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { ## define the argument with default mode of "matrix" inv <- NULL ## initialize inv as NULL; will hold value of matr...
/Cachematrix.R
no_license
schmiderek/cachematrix.R
R
false
false
1,347
r
makeCacheMatrix <- function(x = matrix()) { ## This function creates a special "matrix" object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { ## define the argument with default mode of "matrix" inv <- NULL ## initialize inv as NULL; will hold value of matr...
pgs <- function(...) { #' @rdname pgs #' @export UseMethod("pgs") }
/R/pgs.R
permissive
RogerZou0108/lassosum
R
false
false
75
r
pgs <- function(...) { #' @rdname pgs #' @export UseMethod("pgs") }
##' add horizontal align lines ##' ##' ##' @title geom_aline ##' @param mapping aes mapping ##' @param linetype line type ##' @param size line size ##' @param ... additional parameter ##' @return aline layer ##' @export ##' @author Yu Guangchuang geom_aline <- function(mapping=NULL, linetype="dotted", size=1, ...) { ...
/R/geom_segment.R
no_license
smyang2018/ggtree
R
false
false
3,534
r
##' add horizontal align lines ##' ##' ##' @title geom_aline ##' @param mapping aes mapping ##' @param linetype line type ##' @param size line size ##' @param ... additional parameter ##' @return aline layer ##' @export ##' @author Yu Guangchuang geom_aline <- function(mapping=NULL, linetype="dotted", size=1, ...) { ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/colour_palettes.R \name{gg_fill_customs} \alias{gg_fill_customs} \title{Custom colours to use in ggplot as scale_fill_manual} \usage{ gg_fill_customs() } \description{ This function lets the user use pre-defined default colours } \seealso{ Ot...
/man/gg_fill_customs.Rd
no_license
Hong-Sung-Hyun/lares
R
false
true
482
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/colour_palettes.R \name{gg_fill_customs} \alias{gg_fill_customs} \title{Custom colours to use in ggplot as scale_fill_manual} \usage{ gg_fill_customs() } \description{ This function lets the user use pre-defined default colours } \seealso{ Ot...
library(tidyverse) library(modelr) options(na.action = na.warn) library(nycflights13) library(lubridate) ggplot(diamonds, aes(cut, price)) + geom_boxplot() ggplot(diamonds, aes(color, price)) + geom_boxplot() ggplot(diamonds, aes(clarity, price)) + geom_boxplot() ggplot(diamonds, aes(carat, price)) + geom_hex(bins ...
/Chapter19.R
no_license
chor-nyan/r4ds
R
false
false
4,285
r
library(tidyverse) library(modelr) options(na.action = na.warn) library(nycflights13) library(lubridate) ggplot(diamonds, aes(cut, price)) + geom_boxplot() ggplot(diamonds, aes(color, price)) + geom_boxplot() ggplot(diamonds, aes(clarity, price)) + geom_boxplot() ggplot(diamonds, aes(carat, price)) + geom_hex(bins ...
testlist <- list(testX = c(191493125665849920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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), trainX ...
/dann/inst/testfiles/calc_distance_C/AFL_calc_distance_C/calc_distance_C_valgrind_files/1609867301-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
1,199
r
testlist <- list(testX = c(191493125665849920, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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), trainX ...
#!/usr/bin/env Rscript #upload library #install.packages("VennDiagram") #setwd("/public/home/nong/pro/npc/process2/results/plot_dir") arg = commandArgs(trailingOnly = TRUE) read_cutoff = arg[1] sample_cutfoff = arg[2] library(data.table) ciri2 = fread('ciri2.table.txt', sep="\t") ce2 = fread('circexplorer2.table.txt'...
/scripts/venn.R
permissive
zhaoljunproject/PipeOne
R
false
false
953
r
#!/usr/bin/env Rscript #upload library #install.packages("VennDiagram") #setwd("/public/home/nong/pro/npc/process2/results/plot_dir") arg = commandArgs(trailingOnly = TRUE) read_cutoff = arg[1] sample_cutfoff = arg[2] library(data.table) ciri2 = fread('ciri2.table.txt', sep="\t") ce2 = fread('circexplorer2.table.txt'...
context('test regex2fixed.R') test_that("regex2fixed converts regex patterns correctly", { regex <- list(c('^a$', '^b'), c('c'), c('d'), c('b$')) types <- c('A', 'AA', 'B', 'BB', 'C', 'CC', 'a', 'aa', 'b', 'bb', 'c', 'cc') expect_identical(setdiff( regex2fixed(regex, types, 'fixed', cas...
/tests/testthat/test-regex2fixed.R
no_license
strategist922/quanteda
R
false
false
1,783
r
context('test regex2fixed.R') test_that("regex2fixed converts regex patterns correctly", { regex <- list(c('^a$', '^b'), c('c'), c('d'), c('b$')) types <- c('A', 'AA', 'B', 'BB', 'C', 'CC', 'a', 'aa', 'b', 'bb', 'c', 'cc') expect_identical(setdiff( regex2fixed(regex, types, 'fixed', cas...
#' Ancestral Character State Estimation #' #' @description #' #' Given a tree and a cladistic matrix uses likelihood to estimate the ancestral states for every character. #' #' @param cladistic_matrix A character-taxon matrix in the format imported by \link{read_nexus_matrix}. #' @param time_tree A tree (phylo object) ...
/R/estimate_ancestral_states.R
no_license
cran/Claddis
R
false
false
23,515
r
#' Ancestral Character State Estimation #' #' @description #' #' Given a tree and a cladistic matrix uses likelihood to estimate the ancestral states for every character. #' #' @param cladistic_matrix A character-taxon matrix in the format imported by \link{read_nexus_matrix}. #' @param time_tree A tree (phylo object) ...
## Week 1, Course Project 1 # set working dir setwd("~/R Projects/Coursera/04_ExpDataAnalysis/Week 1") # load data df <- read.table("household_power_consumption.txt", sep=";", header=TRUE, na.strings = "?") df$DateTime <- strptime(paste(df$Date, df$Time), "%d/%m/%Y %T", tz="GMT") # subset the data to 2007-0...
/plot3.R
no_license
dzastera/ExData_Plotting1
R
false
false
1,059
r
## Week 1, Course Project 1 # set working dir setwd("~/R Projects/Coursera/04_ExpDataAnalysis/Week 1") # load data df <- read.table("household_power_consumption.txt", sep=";", header=TRUE, na.strings = "?") df$DateTime <- strptime(paste(df$Date, df$Time), "%d/%m/%Y %T", tz="GMT") # subset the data to 2007-0...
plot.PCA <- function (x, axes = c(1, 2), choix = c("ind","var","varcor"), ellipse = NULL, xlim = NULL, ylim = NULL, habillage = "none", col.hab = NULL, col.ind = "black", col.ind.sup = "blue", col.quali = "magenta", col.quanti.sup = "blue", ...
/R/plot.PCA.R
no_license
yyleon/FactoMineR
R
false
false
57,032
r
plot.PCA <- function (x, axes = c(1, 2), choix = c("ind","var","varcor"), ellipse = NULL, xlim = NULL, ylim = NULL, habillage = "none", col.hab = NULL, col.ind = "black", col.ind.sup = "blue", col.quali = "magenta", col.quanti.sup = "blue", ...
#PAGE=239 a11=0.05 a1=15 a=1-a11 a=qchisq(a,df=a1) a=round(a,digits = 1) a b1=21 a=1-a11 a=qchisq(a,df=b1) b=round(a,digits = 1) b c1=50 a=1-a11 a=qchisq(a,df=c1) c=round(a,digits = 1) c
/Schaum'S_Outline_Series_-_Theory_And_Problems_Of_Statistics_by_Murray_R._Spiegel/CH11/EX11.11.11/Ex11_11_11.R
permissive
FOSSEE/R_TBC_Uploads
R
false
false
210
r
#PAGE=239 a11=0.05 a1=15 a=1-a11 a=qchisq(a,df=a1) a=round(a,digits = 1) a b1=21 a=1-a11 a=qchisq(a,df=b1) b=round(a,digits = 1) b c1=50 a=1-a11 a=qchisq(a,df=c1) c=round(a,digits = 1) c
args<-commandArgs(T) in_file <-paste(args[1],'-',args[2],'.kinf',sep = "") data <-read.table(in_file,sep='\t',header = T) d <- as.dist(data) out.hclust=hclust(d,method="average") out.id <- cutree(out.hclust,h=args[2]) out_file <- paste(args[1],'_',args[2],'.genotype',sep = "") write.table(out.id, sep = "\t",col.names ...
/Diploid-Outcrossing/diploid_cross_cluster.R
no_license
Tomcxf/OutcrossSeq
R
false
false
350
r
args<-commandArgs(T) in_file <-paste(args[1],'-',args[2],'.kinf',sep = "") data <-read.table(in_file,sep='\t',header = T) d <- as.dist(data) out.hclust=hclust(d,method="average") out.id <- cutree(out.hclust,h=args[2]) out_file <- paste(args[1],'_',args[2],'.genotype',sep = "") write.table(out.id, sep = "\t",col.names ...
#Now Combine all the Test MSE to a single files combined_linear_mse <- as_tibble(rbind(MSE_lsr, MSE_ridge, MSE_lasso, MSE_pcr, MSE_pls, MSE_boost_reg)) %>% mutate(Fit_Technique = c("Least Squares", "Ridge", "Lasso", "PCR", "PLS", "Boosted Regression")) colnames(combined_linear_mse)<-c("MSE", "Model") combined_li...
/src/09_summary_MSE.R
no_license
medewitt/wine_analysis
R
false
false
684
r
#Now Combine all the Test MSE to a single files combined_linear_mse <- as_tibble(rbind(MSE_lsr, MSE_ridge, MSE_lasso, MSE_pcr, MSE_pls, MSE_boost_reg)) %>% mutate(Fit_Technique = c("Least Squares", "Ridge", "Lasso", "PCR", "PLS", "Boosted Regression")) colnames(combined_linear_mse)<-c("MSE", "Model") combined_li...
#'imputation by robust matrix decomposition #' #' @param Y A single cell RNA data matrix; #' rows representing cells. #' @param tau Tuning parameter to penalize the sparsity of S; #' @param lambda Tuning parameter to penalize the row rank of L; #' @param initL The initionlization of L; #' @param initS The initionlizati...
/R/rmd.R
no_license
ChongC1990/scRMD
R
false
false
3,358
r
#'imputation by robust matrix decomposition #' #' @param Y A single cell RNA data matrix; #' rows representing cells. #' @param tau Tuning parameter to penalize the sparsity of S; #' @param lambda Tuning parameter to penalize the row rank of L; #' @param initL The initionlization of L; #' @param initS The initionlizati...
# # STEP 1 # # read the data # cars <- read.csv("cars.csv") # # STEP 2 # # split data into "in-sample data" and "out-of-sample" data # (also known as "train" and "test" sets) # split <- floor(nrow(mtcars) * .75) in_sample_data <- cars[1:split, ] out_sample_data <- cars[(split+1):nrow(cars), ] # # STEP 3 # # ...
/mlr.r
no_license
dbusteed/hello-regression
R
false
false
2,350
r
# # STEP 1 # # read the data # cars <- read.csv("cars.csv") # # STEP 2 # # split data into "in-sample data" and "out-of-sample" data # (also known as "train" and "test" sets) # split <- floor(nrow(mtcars) * .75) in_sample_data <- cars[1:split, ] out_sample_data <- cars[(split+1):nrow(cars), ] # # STEP 3 # # ...
#' open_repo #' #' @description Open repository #' @param repo_obj An initialized repository #' @return #' Summary of the repository. #' @details Open repository. #' @export open_repo <- function(repo_obj) { if(git2r::is_empty(repo_obj)){ repo <- git2r::repository(normalizePath(getwd())) } else{ ...
/R/open_repo.R
no_license
AngelosPsy/pssr
R
false
false
407
r
#' open_repo #' #' @description Open repository #' @param repo_obj An initialized repository #' @return #' Summary of the repository. #' @details Open repository. #' @export open_repo <- function(repo_obj) { if(git2r::is_empty(repo_obj)){ repo <- git2r::repository(normalizePath(getwd())) } else{ ...
# # Title: Web Scraping In R # Purpose: (Knowledge Development) Learning to webscrape with R # Author: Billy Caughey # Date: 2020.11.19 - Initial build # ##### Introduction to HTML ##### library(rvest) # <h[1-5]> are header tacks # <p> are paragraph tacks # <ul> <li> is how to open a bulleted list # <a hre...
/Web Scraping In R/Web Scraping in R.R
no_license
wcaughey1984/datacamp
R
false
false
24,819
r
# # Title: Web Scraping In R # Purpose: (Knowledge Development) Learning to webscrape with R # Author: Billy Caughey # Date: 2020.11.19 - Initial build # ##### Introduction to HTML ##### library(rvest) # <h[1-5]> are header tacks # <p> are paragraph tacks # <ul> <li> is how to open a bulleted list # <a hre...
#'Build a simulated distribution for No. of Shared Alleles #'@details This function generates multinomial distribution for loci known the Allele Frequency and Expected Probability of Shared 2,1 or 0 alleles #'@usage Simulate_DistX(e,m,t) #'@param e a matrix of Probability of Sharing 2,1 or 0 alleles at each loci. Each ...
/R/Simulate_DistX.R
no_license
ice4prince/mixIndependR
R
false
false
1,225
r
#'Build a simulated distribution for No. of Shared Alleles #'@details This function generates multinomial distribution for loci known the Allele Frequency and Expected Probability of Shared 2,1 or 0 alleles #'@usage Simulate_DistX(e,m,t) #'@param e a matrix of Probability of Sharing 2,1 or 0 alleles at each loci. Each ...
library(rgbif) library(spocc) library(maps) library(mapdata) map('worldHires','India') # for Himalayan Tiger tiger<-occ(query="Tetraogallus himalayensis",from="gbif",has_coords = TRUE,limit=10) # for Himalayan Tiger datatig<-tiger$gbif$data$Tetraogallus_himalayensis # longitude and latitude of Himalyan Tiger datatigx<...
/Easy1.R
no_license
jatinrajani/BiodiversityDataCleaning
R
false
false
1,366
r
library(rgbif) library(spocc) library(maps) library(mapdata) map('worldHires','India') # for Himalayan Tiger tiger<-occ(query="Tetraogallus himalayensis",from="gbif",has_coords = TRUE,limit=10) # for Himalayan Tiger datatig<-tiger$gbif$data$Tetraogallus_himalayensis # longitude and latitude of Himalyan Tiger datatigx<...
\name{df2scidb} \alias{df2scidb} \title{Copy a data frame into a SciDB array.} \description{ Copy a data frame into a new 1-D SciDB array. } \usage{ df2scidb(X, name = tmpnam(), dimlabel = "row", chunkSize, rowOverlap = 0L, types = NULL, nullable, schema_only = FALSE, gc, start) } %- maybe also 'usage' for oth...
/man/df2scidb.Rd
no_license
anukat2015/SciDBR
R
false
false
1,803
rd
\name{df2scidb} \alias{df2scidb} \title{Copy a data frame into a SciDB array.} \description{ Copy a data frame into a new 1-D SciDB array. } \usage{ df2scidb(X, name = tmpnam(), dimlabel = "row", chunkSize, rowOverlap = 0L, types = NULL, nullable, schema_only = FALSE, gc, start) } %- maybe also 'usage' for oth...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dprime.R \name{dprime} \alias{dprime} \title{Dprime and Other Signal Detection Theory indices.} \usage{ dprime(n_hit, n_fa, n_miss = NULL, n_cr = NULL, n_targets = NULL, n_distractors = NULL, adjusted = TRUE) } \arguments{ \item{n_hit}{Numb...
/man/dprime.Rd
permissive
hectorabonza/psycho.R
R
false
true
2,839
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dprime.R \name{dprime} \alias{dprime} \title{Dprime and Other Signal Detection Theory indices.} \usage{ dprime(n_hit, n_fa, n_miss = NULL, n_cr = NULL, n_targets = NULL, n_distractors = NULL, adjusted = TRUE) } \arguments{ \item{n_hit}{Numb...
retrieve_modis_raw_data <- function(product = "MOD13Q1", lat = 31.938, lon = -109.080, buffer_size = 1) { products <- mt_products() bands <- mt_bands(product = product) dates <- mt_dates(product = product, lat = lat, lon = lon) ...
/R/modis_NDVI_functions.R
permissive
PaulESantos/NDVIning
R
false
false
6,621
r
retrieve_modis_raw_data <- function(product = "MOD13Q1", lat = 31.938, lon = -109.080, buffer_size = 1) { products <- mt_products() bands <- mt_bands(product = product) dates <- mt_dates(product = product, lat = lat, lon = lon) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ggplot-utils.R \name{gg_watermark} \alias{gg_watermark} \title{Add in a watermark to plots} \usage{ gg_watermark( lab = "DRAFT", disable = getOption("ggrrr.disable.watermark", default = FALSE) ) } \arguments{ \item{lab}{the watermark labe...
/man/gg_watermark.Rd
permissive
terminological/ggrrr
R
false
true
504
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ggplot-utils.R \name{gg_watermark} \alias{gg_watermark} \title{Add in a watermark to plots} \usage{ gg_watermark( lab = "DRAFT", disable = getOption("ggrrr.disable.watermark", default = FALSE) ) } \arguments{ \item{lab}{the watermark labe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_areas_middle.R \name{get_areas_middle} \alias{get_areas_middle} \title{Implements the Acquire Area Middle Master API.} \usage{ get_areas_middle(api_key = "eca7388c8a3c6332eb702a21bcc63b46", lang = "en") } \arguments{ \item{api_key}{string...
/man/get_areas_middle.Rd
permissive
gmlang/RGurunavi
R
false
true
912
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_areas_middle.R \name{get_areas_middle} \alias{get_areas_middle} \title{Implements the Acquire Area Middle Master API.} \usage{ get_areas_middle(api_key = "eca7388c8a3c6332eb702a21bcc63b46", lang = "en") } \arguments{ \item{api_key}{string...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/quick_design.R \name{fill_out} \alias{fill_out} \alias{redesign} \title{Declare a Design via a Template Function} \usage{ fill_out(template, expand = TRUE, ...) redesign(design, expand = TRUE, ...) } \arguments{ \item{template}{a function wh...
/man/fill_out.Rd
no_license
antoshachekhonte/DeclareDesign
R
false
true
1,575
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/quick_design.R \name{fill_out} \alias{fill_out} \alias{redesign} \title{Declare a Design via a Template Function} \usage{ fill_out(template, expand = TRUE, ...) redesign(design, expand = TRUE, ...) } \arguments{ \item{template}{a function wh...
dir <- system.file("examples", "demo", package = "shinyjs") setwd(dir) shiny::shinyAppDir(".")
/shinyjs-demo/app.R
permissive
ycalvinner/shiny-server
R
false
false
95
r
dir <- system.file("examples", "demo", package = "shinyjs") setwd(dir) shiny::shinyAppDir(".")
#' List of persons in Priestley's A Chart of Biography #' #' Table with biographical information: names, birth dates, death dates, #' ages, occupation, category, and the lifespan segments to use in the #' timeline for all individuals in the 1st (1764) and 7th (1778) editions #' of Joseph Priestley's *A Chart of Biograp...
/R/Biographies.R
no_license
jrnold/priestley
R
false
false
4,791
r
#' List of persons in Priestley's A Chart of Biography #' #' Table with biographical information: names, birth dates, death dates, #' ages, occupation, category, and the lifespan segments to use in the #' timeline for all individuals in the 1st (1764) and 7th (1778) editions #' of Joseph Priestley's *A Chart of Biograp...
## Santiago Mota ## Exploratory Data Analysis ## Course Project 1 ## https://class.coursera.org/exdata-002/human_grading/view/courses/972082/assessments/3/submissions ## https://github.com/santiagomota/ExData_Plotting1 # Fork branch file with data urls <- ("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhouseho...
/plot3.R
no_license
santiagomota/ExData_Plotting1
R
false
false
1,838
r
## Santiago Mota ## Exploratory Data Analysis ## Course Project 1 ## https://class.coursera.org/exdata-002/human_grading/view/courses/972082/assessments/3/submissions ## https://github.com/santiagomota/ExData_Plotting1 # Fork branch file with data urls <- ("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhouseho...
#' gets beta prior paramenters #' #' gets beta prior paramenters and plots distribution #' @param mu mean of beta distribution #' @param CV cv of beta distribution #' @param Min min of x-axis range (default = 0) #' @param Prior X-axis label #' @param Plot c(TRUE,FALSE) #' @return a and b parameter (shape and scale) #' ...
/R/jabba_utils.R
no_license
Henning-Winker/JABBApkg
R
false
false
4,845
r
#' gets beta prior paramenters #' #' gets beta prior paramenters and plots distribution #' @param mu mean of beta distribution #' @param CV cv of beta distribution #' @param Min min of x-axis range (default = 0) #' @param Prior X-axis label #' @param Plot c(TRUE,FALSE) #' @return a and b parameter (shape and scale) #' ...
# ------------------------------------------------------------------------------- # This file is part of Ranger. # # Ranger is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or...
/rangerts/R/predict.R
no_license
BenjaminGoehry/BlocRF
R
false
false
25,752
r
# ------------------------------------------------------------------------------- # This file is part of Ranger. # # Ranger is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or...
# Have total emissions from PM2.5 decreased in the Baltimore City, Maryland # (fips == "24510") from 1999 to 2008? Use the base plotting system to make # a plot answering this question. NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") tidydata<-aggregate(Emissions ~ year + fips...
/plot2.R
no_license
yencarnacion/ExData_Plotting2
R
false
false
566
r
# Have total emissions from PM2.5 decreased in the Baltimore City, Maryland # (fips == "24510") from 1999 to 2008? Use the base plotting system to make # a plot answering this question. NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") tidydata<-aggregate(Emissions ~ year + fips...
#' Check DEVILS directory sturucture and print warnings for wrong file types #' #' This function perfoms the data reduction on a 2dfDR arc file. #' You must provide an idx filename and tramline file name (potentially produced by aaorunTLM.R). #' Optionally you can also perform a bias subtraction and dark correction...
/DEVILSTAZ/R/bizCheck.R
no_license
ICRAR/DEVILS-TAZ
R
false
false
9,593
r
#' Check DEVILS directory sturucture and print warnings for wrong file types #' #' This function perfoms the data reduction on a 2dfDR arc file. #' You must provide an idx filename and tramline file name (potentially produced by aaorunTLM.R). #' Optionally you can also perform a bias subtraction and dark correction...
############### ############### ############### # prevalence pprev <- function(counts){ nsamples <- ncol(counts) prev <- (rowSums(counts > 0)/nsamples)*100 prev.df <- data.frame(Taxon=rownames(counts), Prevalence=prev) return(prev.df) } ############### ############### ############### # plotting ...
/R/prevalence.R
permissive
nickilott/PSC_UC_Host_Microbiome
R
false
false
818
r
############### ############### ############### # prevalence pprev <- function(counts){ nsamples <- ncol(counts) prev <- (rowSums(counts > 0)/nsamples)*100 prev.df <- data.frame(Taxon=rownames(counts), Prevalence=prev) return(prev.df) } ############### ############### ############### # plotting ...
numPerPatch48112 <- c(2479,2521)
/NatureEE-data-archive/Run203021/JAFSdata/JAFSnumPerPatch48112.R
no_license
flaxmans/NatureEE2017
R
false
false
33
r
numPerPatch48112 <- c(2479,2521)
library(dplyr) library(ggplot2) library(gridExtra) library(lubridate) library(tidyverse) # data manipulation library(cluster) # clustering algorithms library(factoextra) # clustering algorithms & visualization orders = read.csv("C:/Users/OJElGhiran/Desktop/Candidate Test/Brazil/olist_orders_dataset.csv",he...
/Customer Segmentation RFM Clustering.R
no_license
oelghira/Customer-Segmentation-from-RFM-Clustering
R
false
false
12,779
r
library(dplyr) library(ggplot2) library(gridExtra) library(lubridate) library(tidyverse) # data manipulation library(cluster) # clustering algorithms library(factoextra) # clustering algorithms & visualization orders = read.csv("C:/Users/OJElGhiran/Desktop/Candidate Test/Brazil/olist_orders_dataset.csv",he...
suppressPackageStartupMessages(library(oro.nifti)) suppressPackageStartupMessages(library(plyr)) source("source_headerFunc.R") source("plotter/source_2dplot.R")
/plotter/header_plotter.R
no_license
felixxiao/brain-imaging
R
false
false
162
r
suppressPackageStartupMessages(library(oro.nifti)) suppressPackageStartupMessages(library(plyr)) source("source_headerFunc.R") source("plotter/source_2dplot.R")
#Figure 4.9 write.csv(gen, "data/genesFromAtas.csv") gen <- read.csv("data/genesFromAtas.csv") # perform pca using prcomp func, choosing the top n number of genes ntop=2000 Pvars <- rowVars(assay(vsd)) select <- order(Pvars, decreasing = TRUE)[seq_len(min(ntop, l...
/R/03_heatMapCOrr.R
no_license
Harithaa-Anandakumar/masters.github.io
R
false
false
10,052
r
#Figure 4.9 write.csv(gen, "data/genesFromAtas.csv") gen <- read.csv("data/genesFromAtas.csv") # perform pca using prcomp func, choosing the top n number of genes ntop=2000 Pvars <- rowVars(assay(vsd)) select <- order(Pvars, decreasing = TRUE)[seq_len(min(ntop, l...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.R \name{add_blueprint} \alias{add_blueprint} \title{Add blueprint to a recipe} \usage{ add_blueprint(base_recipe, blueprint) } \arguments{ \item{base_recipe}{A the basic recipe specified by the user. See (TODO reference).} \item{blue...
/man/add_blueprint.Rd
permissive
konradsemsch/cookbook
R
false
true
574
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/helpers.R \name{add_blueprint} \alias{add_blueprint} \title{Add blueprint to a recipe} \usage{ add_blueprint(base_recipe, blueprint) } \arguments{ \item{base_recipe}{A the basic recipe specified by the user. See (TODO reference).} \item{blue...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model.R \name{model-method-variational} \alias{model-method-variational} \alias{variational} \title{Run Stan's variational approximation algorithms} \usage{ variational( data = NULL, seed = NULL, refresh = NULL, init = NULL, save_la...
/man/model-method-variational.Rd
permissive
mike-lawrence/cmdstanr
R
false
true
11,586
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/model.R \name{model-method-variational} \alias{model-method-variational} \alias{variational} \title{Run Stan's variational approximation algorithms} \usage{ variational( data = NULL, seed = NULL, refresh = NULL, init = NULL, save_la...
## -------------------------------- ## ## Script name: makeCompleteFiles.R ## ## Purpose of script: Make stitched CSVs -- one for trackerholder (the real hand), ## and one for cursorObject (the object) ## ## Author: Shanaa Modchalingam ## ## Date created: 2019-12-16 ## ## Email: s.modcha@gmail.com ## ## --------------...
/preprocessing/makeCompleteFiles.R
no_license
shanaam/reachToTarget_distances
R
false
false
2,637
r
## -------------------------------- ## ## Script name: makeCompleteFiles.R ## ## Purpose of script: Make stitched CSVs -- one for trackerholder (the real hand), ## and one for cursorObject (the object) ## ## Author: Shanaa Modchalingam ## ## Date created: 2019-12-16 ## ## Email: s.modcha@gmail.com ## ## --------------...
library(shiny) install.packages("praise",repos = "https://cran.r-project.org") #this doesn't appear to be working yet... #install.packages("rgdal", type = "source", # repos = "https://cran.r-project.org", # configure.args=c('--with-proj-include=/home/vcap/deps/0/apt/usr/include', # ...
/contributedCode/cloud_gov_shiny/rgdal/shiny.R
permissive
USEPA/R-User-Group
R
false
false
626
r
library(shiny) install.packages("praise",repos = "https://cran.r-project.org") #this doesn't appear to be working yet... #install.packages("rgdal", type = "source", # repos = "https://cran.r-project.org", # configure.args=c('--with-proj-include=/home/vcap/deps/0/apt/usr/include', # ...
\name{BayesPen} \alias{BayesPen} \title{ Bayesian Penalized Credible Regions } \description{ Fits the Bayesian penalized credible regions method from the posterior mean and covariance of a Bayesian model. The function performs variable selection (Bondell and Reich 2012) and confounder selection (Wilson and Reich 201...
/man/BayesPen.Rd
no_license
cran/BayesPen
R
false
false
4,119
rd
\name{BayesPen} \alias{BayesPen} \title{ Bayesian Penalized Credible Regions } \description{ Fits the Bayesian penalized credible regions method from the posterior mean and covariance of a Bayesian model. The function performs variable selection (Bondell and Reich 2012) and confounder selection (Wilson and Reich 201...
#' Title salamu #' #' Description Generates a message given someone's name #' #' @param name Name #' #' @return A message #' #' @export #' #' @examples #' salamu("Shel") #' salamu <- function(name){ paste0("Hi ", name, ", I hope you are well.") }
/R/salamu.R
permissive
Shelmith-Kariuki/rdarasa
R
false
false
250
r
#' Title salamu #' #' Description Generates a message given someone's name #' #' @param name Name #' #' @return A message #' #' @export #' #' @examples #' salamu("Shel") #' salamu <- function(name){ paste0("Hi ", name, ", I hope you are well.") }
#' Find Trading Frequency #' #' This helper function looks for the trading frequency of the input data set. #' It can identify daily, weekly, monthly or yearly trading frequency in the #' data set. #' #' @param x The input data set whose trading period we are interested in #' #' @return trade.freq The number that ...
/R/trade_freq.R
no_license
rynkwn/backtestGraphics
R
false
false
1,637
r
#' Find Trading Frequency #' #' This helper function looks for the trading frequency of the input data set. #' It can identify daily, weekly, monthly or yearly trading frequency in the #' data set. #' #' @param x The input data set whose trading period we are interested in #' #' @return trade.freq The number that ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/single_marker_test.R \name{glma} \alias{glma} \title{Single marker association analysis using linear models or linear mixed models} \usage{ glma( y = NULL, X = NULL, W = NULL, Glist = NULL, chr = NULL, fit = NULL, verbose = FALS...
/man/glma.Rd
no_license
psoerensen/qgg
R
false
true
6,158
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/single_marker_test.R \name{glma} \alias{glma} \title{Single marker association analysis using linear models or linear mixed models} \usage{ glma( y = NULL, X = NULL, W = NULL, Glist = NULL, chr = NULL, fit = NULL, verbose = FALS...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/method-results.R \docType{methods} \name{results} \alias{results} \alias{results,} \alias{results.OutriderDataSet} \alias{results,OutriderDataSet-method} \title{Accessor function for the 'results' object in an OutriderDataSet object.} \usage{...
/man/results.Rd
permissive
loipf/OUTRIDER
R
false
true
1,525
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/method-results.R \docType{methods} \name{results} \alias{results} \alias{results,} \alias{results.OutriderDataSet} \alias{results,OutriderDataSet-method} \title{Accessor function for the 'results' object in an OutriderDataSet object.} \usage{...
# 5일차 # 엑셀파일 읽는 방법, 별도로 설치하는 환경 있어야.#텍스트, 엑셀파일 읽기함. # 범주형, 연속형. 두가지의 유형 데이터. 단일 변수형태냐, 단일 변수형태냐. 0#다변 일변량이냐 단수량이냐? 문제정의,데이터수집, 데이터전처리, 탐색적, 데이터분석, 보고서, 발표 #이 절차는 순차적이긴 하지만 계속 피드백하는 과정을 거쳐. #분석절차 1. 문제정의 2. 자료수집 3. 자료 전처리 4. 자료 탐색(EDA) "오늘 18,내일 19 자료 탐색에 대해서 배울 것. 단일 변수 범주형 자료, 단일 변수 범주형, 연속형. 전처리라는 것은 수집한 데이터가 완벽한 자료...
/M20200518.R
no_license
peolgok/WorkspaceR
R
false
false
13,489
r
# 5일차 # 엑셀파일 읽는 방법, 별도로 설치하는 환경 있어야.#텍스트, 엑셀파일 읽기함. # 범주형, 연속형. 두가지의 유형 데이터. 단일 변수형태냐, 단일 변수형태냐. 0#다변 일변량이냐 단수량이냐? 문제정의,데이터수집, 데이터전처리, 탐색적, 데이터분석, 보고서, 발표 #이 절차는 순차적이긴 하지만 계속 피드백하는 과정을 거쳐. #분석절차 1. 문제정의 2. 자료수집 3. 자료 전처리 4. 자료 탐색(EDA) "오늘 18,내일 19 자료 탐색에 대해서 배울 것. 단일 변수 범주형 자료, 단일 변수 범주형, 연속형. 전처리라는 것은 수집한 데이터가 완벽한 자료...
testlist <- list(end = NULL, start = NULL, x = structure(c(4.65661649758392e-10, 1.39067099575524e-309, 2.32903286132618e+96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), segment_end = structure(0, .Dim = c(1L, 1L)), segment_start = structure(0,...
/dynutils/inst/testfiles/project_to_segments/AFL_project_to_segments/project_to_segments_valgrind_files/1609871734-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
409
r
testlist <- list(end = NULL, start = NULL, x = structure(c(4.65661649758392e-10, 1.39067099575524e-309, 2.32903286132618e+96, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)), segment_end = structure(0, .Dim = c(1L, 1L)), segment_start = structure(0,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/myfuncs-package.R \docType{package} \name{myfuncs-package} \alias{myfuncs-package} \alias{myfuncs} \title{My collection of utility functions} \description{ A collection of utility functions } \details{ A collection of utility functions } \sec...
/man/myfuncs-package.Rd
no_license
january3/myfuncs
R
false
true
3,116
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/myfuncs-package.R \docType{package} \name{myfuncs-package} \alias{myfuncs-package} \alias{myfuncs} \title{My collection of utility functions} \description{ A collection of utility functions } \details{ A collection of utility functions } \sec...
# Read in the dataset power <- read.table('../Course4_ExploratoryDataAnalysis/data/household_power_consumption.txt', header = TRUE, sep = ';', dec ='.' ) #Restrict data to the dates 2007-02-01 to 2007-02-02 power$Date <- strptime(power$Date,"%d/%m/%Y") power$Date <- as.Date(power$Date) power_clean <- subset(power,Date...
/plot4.R
no_license
regfish7/ExData_Plotting1
R
false
false
2,215
r
# Read in the dataset power <- read.table('../Course4_ExploratoryDataAnalysis/data/household_power_consumption.txt', header = TRUE, sep = ';', dec ='.' ) #Restrict data to the dates 2007-02-01 to 2007-02-02 power$Date <- strptime(power$Date,"%d/%m/%Y") power$Date <- as.Date(power$Date) power_clean <- subset(power,Date...
##' @title Make tables ##' @param effortdat data.frame containing annual estimates of hectares ##' incentivized for each program ##' @param habitatdat data.frame containing the annual estimates of hectares of ##' habitat available by land cover type, including lcl and ucl from Monte ##' Carlo ##' @param shortfall...
/R/make_tables.R
no_license
pointblue/wetland-incentives-bioenergetics
R
false
false
23,702
r
##' @title Make tables ##' @param effortdat data.frame containing annual estimates of hectares ##' incentivized for each program ##' @param habitatdat data.frame containing the annual estimates of hectares of ##' habitat available by land cover type, including lcl and ucl from Monte ##' Carlo ##' @param shortfall...
##### Defining global objects#### # source functions source("2_load_libraries.R") library(tidyverse) library(plotly) master=read.csv("data/All_bycatch_data_2010_2015.csv") %>% select(-c(CV,FOOTNOTE.S.,FISHERY.TYPE.GENERAL,FISHERY.TYPE.SPECIFIC)) %>% .[complete.cases(.[,c(6,9,10)]),] %>% mutate(NUM.FISH=seq(1:nrow(.))) ...
/NBR_bycatch_explorer/app_V2.R
no_license
mssavoca/NOP_NBR_bycatch_analysis
R
false
false
14,119
r
##### Defining global objects#### # source functions source("2_load_libraries.R") library(tidyverse) library(plotly) master=read.csv("data/All_bycatch_data_2010_2015.csv") %>% select(-c(CV,FOOTNOTE.S.,FISHERY.TYPE.GENERAL,FISHERY.TYPE.SPECIFIC)) %>% .[complete.cases(.[,c(6,9,10)]),] %>% mutate(NUM.FISH=seq(1:nrow(.))) ...
#install.packages('tabulizer') #install.packages('rJava') #install.packages('devtools') #install.packages('pdftools') #install.packages('data.table') library(rvest) library(tidyverse) library(data.table) library(tidytext) library(stringr) library(ggplot2) library(shiny) library(data.table) library(leaflet) library(geoj...
/hw3_u_final.R
no_license
keunyoungko/millennial_migration_los_angeles
R
false
false
13,604
r
#install.packages('tabulizer') #install.packages('rJava') #install.packages('devtools') #install.packages('pdftools') #install.packages('data.table') library(rvest) library(tidyverse) library(data.table) library(tidytext) library(stringr) library(ggplot2) library(shiny) library(data.table) library(leaflet) library(geoj...
# function to make a grid of the truth data to compare to predicted # will be the average intensity of each grid square make_truth_grid <- function(resolution, dat1, dimensions, type=c('truth', 'grid'), ...
/make_truth_grid.R
no_license
ssarahas/MScProject_ISDM
R
false
false
1,378
r
# function to make a grid of the truth data to compare to predicted # will be the average intensity of each grid square make_truth_grid <- function(resolution, dat1, dimensions, type=c('truth', 'grid'), ...
library(qtl) library(snowfall) load("/share/malooflab/Ruijuan/F2/QTL_analysis/data/LG.f2.after.crossover.43traits.Rdata") LG.f2.after.crossover <- sim.geno(LG.f2.after.crossover,step=1,n.draws=32) LG.f2.after.crossover <- calc.genoprob(LG.f2.after.crossover,step=1) sfInit(parallel = TRUE, cpus = 16) sfExport("LG.f2....
/F2/scantwo/scantwo_perm_5.7.R
no_license
leejimmy93/KIAT_cabernet
R
false
false
746
r
library(qtl) library(snowfall) load("/share/malooflab/Ruijuan/F2/QTL_analysis/data/LG.f2.after.crossover.43traits.Rdata") LG.f2.after.crossover <- sim.geno(LG.f2.after.crossover,step=1,n.draws=32) LG.f2.after.crossover <- calc.genoprob(LG.f2.after.crossover,step=1) sfInit(parallel = TRUE, cpus = 16) sfExport("LG.f2....
#' @include MariaDBConnection.R NULL #' Connect/disconnect to a MariaDB DBMS #' #' These methods are straight-forward implementations of the corresponding #' generic functions. #' #' @section Time zones: #' MySQL and MariaDB support named time zones, #' they must be installed on the server. #' See <https://dev.mysql.c...
/R/connect.R
permissive
bpvgoncalves/RMariaDB
R
false
false
10,688
r
#' @include MariaDBConnection.R NULL #' Connect/disconnect to a MariaDB DBMS #' #' These methods are straight-forward implementations of the corresponding #' generic functions. #' #' @section Time zones: #' MySQL and MariaDB support named time zones, #' they must be installed on the server. #' See <https://dev.mysql.c...
#' Reads a NetCDF file #' #' Reads the full content of a NetCDF file, given only the file name #' #' @param filn A character string specifying the full path of the NetCDF #' file to be read. #' @param varnam A character string specifying the variable name of the NetCDF file. #' Can also be a vector of character strings...
/R/read_nc_onefile.R
no_license
stineb/rbeni
R
false
false
6,707
r
#' Reads a NetCDF file #' #' Reads the full content of a NetCDF file, given only the file name #' #' @param filn A character string specifying the full path of the NetCDF #' file to be read. #' @param varnam A character string specifying the variable name of the NetCDF file. #' Can also be a vector of character strings...
## The makeCacheMatrix 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 setInv <- function(i) inv <<- i getInv <- function() inv list(s...
/cachematrix.R
no_license
szetov/ProgrammingAssignment2
R
false
false
816
r
## The makeCacheMatrix 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 setInv <- function(i) inv <<- i getInv <- function() inv list(s...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/drug_common_utilities.R \name{get_xml_db_rows} \alias{get_xml_db_rows} \title{Reads drug bank xml database and set it in memory.} \usage{ get_xml_db_rows(xml_db_name) } \arguments{ \item{xml_db_name}{string, full path for the drug bank xml or...
/man/get_xml_db_rows.Rd
no_license
Sparklingredstar/dbparser
R
false
true
1,014
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/drug_common_utilities.R \name{get_xml_db_rows} \alias{get_xml_db_rows} \title{Reads drug bank xml database and set it in memory.} \usage{ get_xml_db_rows(xml_db_name) } \arguments{ \item{xml_db_name}{string, full path for the drug bank xml or...
# library(googleCharts) # library(shinythemes) # Use global max/min for axes so the view window stays # constant as the user moves between years xlim <- list( min = 0, max = (length(unique(meta_frame$metric))+1) ) ylim <- list( min = 0, max = 1.1 ) navbarPage(title=div(#img(src="logo.png",width = "100px", hei...
/ui.R
permissive
ATL64/anomaly-detection
R
false
false
7,347
r
# library(googleCharts) # library(shinythemes) # Use global max/min for axes so the view window stays # constant as the user moves between years xlim <- list( min = 0, max = (length(unique(meta_frame$metric))+1) ) ylim <- list( min = 0, max = 1.1 ) navbarPage(title=div(#img(src="logo.png",width = "100px", hei...
#' Build a data frame or list #' #' @description #' `tibble()` is a trimmed down version of [data.frame()] that: #' #' * Never coerces inputs (i.e. strings stay as strings!). #' * Never adds `row.names`. #' * Never munges column names. #' * Only recycles length 1 inputs. #' * Evaluates its arguments lazily and in order...
/R/tibble.R
no_license
jeffreyhanson/tibble
R
false
false
3,453
r
#' Build a data frame or list #' #' @description #' `tibble()` is a trimmed down version of [data.frame()] that: #' #' * Never coerces inputs (i.e. strings stay as strings!). #' * Never adds `row.names`. #' * Never munges column names. #' * Only recycles length 1 inputs. #' * Evaluates its arguments lazily and in order...
#' Transform a quantitative variable into a qualitative variable #' #' This function transforms a quantitative variable into a qualitative #' one by breaking it into classes with the same frequencies. #' #' @param var variable to transform #' @param nbclass number of classes #' @param include.lowest argument passed to ...
/R/recode.R
no_license
gdutz/questionr
R
false
false
4,019
r
#' Transform a quantitative variable into a qualitative variable #' #' This function transforms a quantitative variable into a qualitative #' one by breaking it into classes with the same frequencies. #' #' @param var variable to transform #' @param nbclass number of classes #' @param include.lowest argument passed to ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gamelift_operations.R \name{gamelift_start_match_backfill} \alias{gamelift_start_match_backfill} \title{Finds new players to fill open slots in an existing game session} \usage{ gamelift_start_match_backfill(TicketId, ConfigurationName, Gam...
/paws/man/gamelift_start_match_backfill.Rd
permissive
sanchezvivi/paws
R
false
true
4,503
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/gamelift_operations.R \name{gamelift_start_match_backfill} \alias{gamelift_start_match_backfill} \title{Finds new players to fill open slots in an existing game session} \usage{ gamelift_start_match_backfill(TicketId, ConfigurationName, Gam...
# Checks the construction of the SNN graph. # require(scran); require(testthat); source("test-snn.R") # Constructing a reference value. library(igraph) library(FNN) check <- function(vals, k=10) { g <- buildSNNGraph(vals, k=k, d=NA) # turning off PCA. nn.out <- get.knn(t(vals), k=k) IDX <- cbind(seq_len(n...
/tests/testthat/test-snn.R
no_license
jan-glx/scran
R
false
false
2,994
r
# Checks the construction of the SNN graph. # require(scran); require(testthat); source("test-snn.R") # Constructing a reference value. library(igraph) library(FNN) check <- function(vals, k=10) { g <- buildSNNGraph(vals, k=k, d=NA) # turning off PCA. nn.out <- get.knn(t(vals), k=k) IDX <- cbind(seq_len(n...
sink("logs/2_analyze.txt") cat("This file conducts the analysis") print(Sys.time()) # Prepare environment library(tidyverse) library(mgcv) library(foreach) library(doParallel) library(doRNG) cl <- makeCluster(5) registerDoParallel(cl) # Set seed for replicability set.seed(90095) # Load prepared data prepared <- ...
/continuous_treatments/code/2_analyze.R
no_license
ilundberg/replication
R
false
false
16,946
r
sink("logs/2_analyze.txt") cat("This file conducts the analysis") print(Sys.time()) # Prepare environment library(tidyverse) library(mgcv) library(foreach) library(doParallel) library(doRNG) cl <- makeCluster(5) registerDoParallel(cl) # Set seed for replicability set.seed(90095) # Load prepared data prepared <- ...
########################################################### ### Author: ### Adapted from Code written by ### Date: 12/9/2016 ### Project: GBD Nonfatal Estimation ### Purpose: CSMR and Prevalence by location and sex- Alzheimer's Disease ########################################################### #Setup rm(l...
/cod_code/neuro_dementia/dementia_country_selection_clean.R
no_license
Nermin-Ghith/ihme-modeling
R
false
false
4,071
r
########################################################### ### Author: ### Adapted from Code written by ### Date: 12/9/2016 ### Project: GBD Nonfatal Estimation ### Purpose: CSMR and Prevalence by location and sex- Alzheimer's Disease ########################################################### #Setup rm(l...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/runSimulation.R \name{runSimulation} \alias{runSimulation} \alias{summary.SimDesign} \alias{print.SimDesign} \title{Run a Monte Carlo simulation given a data.frame of conditions and simulation functions} \usage{ runSimulation( design, rep...
/man/runSimulation.Rd
no_license
phdtai/SimDesign
R
false
true
38,382
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/runSimulation.R \name{runSimulation} \alias{runSimulation} \alias{summary.SimDesign} \alias{print.SimDesign} \title{Run a Monte Carlo simulation given a data.frame of conditions and simulation functions} \usage{ runSimulation( design, rep...
# Combine .RDA files from "combine_dim.R" # into single dataframe # This runs 1 time # Packages #library(tidyverse, lib.loc = "/ifs/home/msph/ehs/eag2186/local/hpc/") ## Get functions source("/ifs/scratch/msph/ehs/eag2186/npbnmf/compare_functions.R") #source("/ifs/scratch/msph/ehs/eag2186/npbnmf/factor_correspondence...
/misc/Dim/aggregate_dim.R
permissive
lizzyagibson/BN2MF
R
false
false
1,581
r
# Combine .RDA files from "combine_dim.R" # into single dataframe # This runs 1 time # Packages #library(tidyverse, lib.loc = "/ifs/home/msph/ehs/eag2186/local/hpc/") ## Get functions source("/ifs/scratch/msph/ehs/eag2186/npbnmf/compare_functions.R") #source("/ifs/scratch/msph/ehs/eag2186/npbnmf/factor_correspondence...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{remove_empty_lines} \alias{remove_empty_lines} \title{Parse config file and remove empty lines} \usage{ remove_empty_lines(lines) } \arguments{ \item{lines}{A list of config file lines.} } \value{ A list of config file lines whe...
/man/remove_empty_lines.Rd
permissive
durandmorgan/DecoupleR
R
false
true
418
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{remove_empty_lines} \alias{remove_empty_lines} \title{Parse config file and remove empty lines} \usage{ remove_empty_lines(lines) } \arguments{ \item{lines}{A list of config file lines.} } \value{ A list of config file lines whe...
library(ggplot2) data(diamonds) diamonds$cut <- unclass(diamonds$cut) diamonds$color <- unclass(diamonds$color) diamonds$clarity <- unclass(diamonds$clarity) fit<- lm(price ~ ., data=diamonds) shinyServer( function(input, output) { output$carat <- renderPrint({input$carat}) output$cut <- renderText({ ...
/server.R
no_license
Gabegao/DataProductProject
R
false
false
1,861
r
library(ggplot2) data(diamonds) diamonds$cut <- unclass(diamonds$cut) diamonds$color <- unclass(diamonds$color) diamonds$clarity <- unclass(diamonds$clarity) fit<- lm(price ~ ., data=diamonds) shinyServer( function(input, output) { output$carat <- renderPrint({input$carat}) output$cut <- renderText({ ...
################################################################# # # File: read.cdb.R # Purpose: Read a cdb database # # Created: 20130416 # Authors: Emilio Torres Manzanera # # Modifications: # ################################################################# read.cdb <- function(file, type=...
/R/read.cdb.R
no_license
cran/cdb
R
false
false
2,530
r
################################################################# # # File: read.cdb.R # Purpose: Read a cdb database # # Created: 20130416 # Authors: Emilio Torres Manzanera # # Modifications: # ################################################################# read.cdb <- function(file, type=...
#' getPretrainedNetwork #' #' Downloads antsrnet pretrained network. \url{10.6084/m9.figshare.7246985} #' #' @param fileid one of the permitted file ids or pass "show" to list all #' valid possibilities. Note that most require internet access to download. #' @param targetFileName optional target filename #' @param ve...
/R/getPretrainedNetwork.R
no_license
neuroimaginador/ANTsRNet
R
false
false
1,751
r
#' getPretrainedNetwork #' #' Downloads antsrnet pretrained network. \url{10.6084/m9.figshare.7246985} #' #' @param fileid one of the permitted file ids or pass "show" to list all #' valid possibilities. Note that most require internet access to download. #' @param targetFileName optional target filename #' @param ve...
##------- ## Plot 3 ##------- png("plot3.png") plot(DateTime,Sub_metering_1,type="l",ylab="",xlab="") lines(DateTime,Sub_metering_2,type="l",col="red") lines(DateTime,Sub_metering_3,type="l",col="blue") title(ylab="Energy sub metering") legend("topright",lty=1, col = c("black", "red","blue"), legend = c("Sub metering 1...
/plot3.R
no_license
tsimonso/ExData_Plotting1
R
false
false
371
r
##------- ## Plot 3 ##------- png("plot3.png") plot(DateTime,Sub_metering_1,type="l",ylab="",xlab="") lines(DateTime,Sub_metering_2,type="l",col="red") lines(DateTime,Sub_metering_3,type="l",col="blue") title(ylab="Energy sub metering") legend("topright",lty=1, col = c("black", "red","blue"), legend = c("Sub metering 1...
# This project looks at EPL season collected from seasons 93/94 to 17/18 # The goal of this project is to tell a story with data relating to # current season title holders; Liverpool FC. # We want to pave the way for insight that can be looked back upon when # performing a detailed analysis of the impact Jurgen Klopp h...
/KloppStatisticalAnalysis.R
no_license
agjamali/Jurgen-Klopp-Liverpool-FC-Statistical-Analysis
R
false
false
908
r
# This project looks at EPL season collected from seasons 93/94 to 17/18 # The goal of this project is to tell a story with data relating to # current season title holders; Liverpool FC. # We want to pave the way for insight that can be looked back upon when # performing a detailed analysis of the impact Jurgen Klopp h...
#====================================================== # Example 9.2.2 on Page 436 # Test for Homogeneity #------------------------------------------------------ U = c(25, 31, 20, 42, 39, 19, 35, 36, 44, 26, 38, 31, 29, 41, 43, 36, 28, 31, 25, 38 ) V = c(28, 17, 33, 25, 31, 21, 16, 19, 31, 27, ...
/Stat/R/Example-9-2-2.r
no_license
AppliedStat/class
R
false
false
792
r
#====================================================== # Example 9.2.2 on Page 436 # Test for Homogeneity #------------------------------------------------------ U = c(25, 31, 20, 42, 39, 19, 35, 36, 44, 26, 38, 31, 29, 41, 43, 36, 28, 31, 25, 38 ) V = c(28, 17, 33, 25, 31, 21, 16, 19, 31, 27, ...
################################ ## Function to split long peptides sequences into smaller pieces of length n (by default n=8) ## and insert \n at split location. This is for having shorter texts on plots. In practice, ## \n breaks peptide names into multiple lines. .spltpep <- function(x, n=8) { nc <- nchar(x) i...
/scripts/tmtFuncs.R
no_license
fredrious/CblbTMT
R
false
false
5,892
r
################################ ## Function to split long peptides sequences into smaller pieces of length n (by default n=8) ## and insert \n at split location. This is for having shorter texts on plots. In practice, ## \n breaks peptide names into multiple lines. .spltpep <- function(x, n=8) { nc <- nchar(x) i...
testlist <- list(x = c(5.25663347308138e+83, 1.02849645494772e-319, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) result <- do.call(myTAI:::cpp_geom_mean,testlist) str(result)
/myTAI/inst/testfiles/cpp_geom_mean/AFL_cpp_geom_mean/cpp_geom_mean_valgrind_files/1615839307-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
194
r
testlist <- list(x = c(5.25663347308138e+83, 1.02849645494772e-319, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0)) result <- do.call(myTAI:::cpp_geom_mean,testlist) str(result)
\name{CTMC_PO_1-class} \Rdversion{1.1} \docType{class} \alias{CTMC_PO_1-class} \title{Class "CTMC_PO_1"} \description{Partially observed CTMC.} \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("CTMC_PO_1", ...)}. Like CTMCs butdon't have an ending time; the final observation t...
/man/CTMC_PO_1-class.Rd
no_license
cran/DOBAD
R
false
false
833
rd
\name{CTMC_PO_1-class} \Rdversion{1.1} \docType{class} \alias{CTMC_PO_1-class} \title{Class "CTMC_PO_1"} \description{Partially observed CTMC.} \section{Objects from the Class}{ Objects can be created by calls of the form \code{new("CTMC_PO_1", ...)}. Like CTMCs butdon't have an ending time; the final observation t...
#' read.soilcarbon #' #' This function imports data from xlsx format matching the standard soil carbon data template #' #' @param file directory to data file #' @param template set to TRUE if reading in a template file #' @import openxlsx #' @import utils #' @export read.soilcarbon<-function(file, template=F){ requ...
/R/read.soilcarbon.R
no_license
jb388/soilcarbon
R
false
false
1,823
r
#' read.soilcarbon #' #' This function imports data from xlsx format matching the standard soil carbon data template #' #' @param file directory to data file #' @param template set to TRUE if reading in a template file #' @import openxlsx #' @import utils #' @export read.soilcarbon<-function(file, template=F){ requ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/visHierarchicalLayout.R \name{visHierarchicalLayout} \alias{visHierarchicalLayout} \title{Network visualization Hierarchical layout options} \usage{ visHierarchicalLayout(graph, enabled = TRUE, levelSeparation = NULL, direction = NU...
/man/visHierarchicalLayout.Rd
no_license
hnbeck/visNetwork
R
false
false
1,598
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/visHierarchicalLayout.R \name{visHierarchicalLayout} \alias{visHierarchicalLayout} \title{Network visualization Hierarchical layout options} \usage{ visHierarchicalLayout(graph, enabled = TRUE, levelSeparation = NULL, direction = NU...
#My first R code xlim <- c(-16.738281, 56.601563) ylim <- c(-35.039321, 36.856229) map("world", col="#191919", fill=TRUE, bg="#000000", lwd=0.05, xlim=xlim, ylim=ylim) pal <- colorRampPalette(c("#333333", "white", "#1292db")) colors <- pal(100) mydata=read.csv("/Users/newuser/Downloads/flights/the_File2.csv") fsub<-myd...
/Flights.Rd
no_license
connor11528/Africa-flight-routes
R
false
false
782
rd
#My first R code xlim <- c(-16.738281, 56.601563) ylim <- c(-35.039321, 36.856229) map("world", col="#191919", fill=TRUE, bg="#000000", lwd=0.05, xlim=xlim, ylim=ylim) pal <- colorRampPalette(c("#333333", "white", "#1292db")) colors <- pal(100) mydata=read.csv("/Users/newuser/Downloads/flights/the_File2.csv") fsub<-myd...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lookup_species.R \name{lookup_species} \alias{lookup_species} \title{Match species origin, growth form and type} \usage{ lookup_species(raw_field_data, species_lookup_data) } \arguments{ \item{raw_field_data}{A data_frame of raw percentage co...
/man/lookup_species.Rd
no_license
egouldo/testpackage
R
false
true
1,274
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lookup_species.R \name{lookup_species} \alias{lookup_species} \title{Match species origin, growth form and type} \usage{ lookup_species(raw_field_data, species_lookup_data) } \arguments{ \item{raw_field_data}{A data_frame of raw percentage co...
if (!exists("df", mode = "list")) source("loadData.R") # `df` is a dataframe loaded by `loadData.R` if not already present in the # current environment. It has the following structure: # Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 2880 obs. of 8 variables: # $ DateTime : POSIXct, format: "2007-02-01 00:...
/plot1.R
no_license
Randall-Data-Science/ExData_Plotting1
R
false
false
1,211
r
if (!exists("df", mode = "list")) source("loadData.R") # `df` is a dataframe loaded by `loadData.R` if not already present in the # current environment. It has the following structure: # Classes ‘tbl_df’, ‘tbl’ and 'data.frame': 2880 obs. of 8 variables: # $ DateTime : POSIXct, format: "2007-02-01 00:...
#' @title ind_genotyped_helper #' @description Help individual's genotyped threshold #' @rdname ind_genotyped_helper #' @export #' @keywords internal ind_genotyped_helper <- function(x) { # x <- res$missing.genotypes.ind # Set the breaks for the figure max.ind <- dplyr::n_distinct(x$INDIVIDUALS) threshold...
/R/internal.R
no_license
thierrygosselin/grur
R
false
false
32,467
r
#' @title ind_genotyped_helper #' @description Help individual's genotyped threshold #' @rdname ind_genotyped_helper #' @export #' @keywords internal ind_genotyped_helper <- function(x) { # x <- res$missing.genotypes.ind # Set the breaks for the figure max.ind <- dplyr::n_distinct(x$INDIVIDUALS) threshold...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/VST.R \name{distBioCond} \alias{distBioCond} \title{Quantify the Distance between Each Pair of Samples of a \code{bioCond}} \usage{ distBioCond(x, subset = NULL, method = c("prior", "posterior", "none"), min.var = 0, p = 2, diag = FA...
/man/distBioCond.Rd
no_license
wwang-chcn/MAnorm2
R
false
true
10,160
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/VST.R \name{distBioCond} \alias{distBioCond} \title{Quantify the Distance between Each Pair of Samples of a \code{bioCond}} \usage{ distBioCond(x, subset = NULL, method = c("prior", "posterior", "none"), min.var = 0, p = 2, diag = FA...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/xx.Deprecated.functions.R \name{loadTocc} \alias{loadTocc} \title{Load filtered occurrence data} \usage{ loadTocc(...) } \arguments{ \item{...}{additional arguments} } \description{ Load filtered occurrence data from object returned by "thin_...
/man/loadTocc.Rd
no_license
HemingNM/ENMwizard
R
false
true
334
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/xx.Deprecated.functions.R \name{loadTocc} \alias{loadTocc} \title{Load filtered occurrence data} \usage{ loadTocc(...) } \arguments{ \item{...}{additional arguments} } \description{ Load filtered occurrence data from object returned by "thin_...
# pdx.compare.dae.to.pca # Directory where RF code is stored codedir <- "~/school/research/pdx/code" # Directory where data object split.cm.data and biomarker datasets are stored datadir <- "~/school/research/pdx/data" # Directory where final data objects should be sent outdir <- "~/school/research/pdx/results"...
/PDX.Code/RNA/pdx.compare.dae.to.pca.R
no_license
jasa-acs/High-Dimensional-Precision-Medicine-From-Patient-Derived-Xenografts
R
false
false
1,074
r
# pdx.compare.dae.to.pca # Directory where RF code is stored codedir <- "~/school/research/pdx/code" # Directory where data object split.cm.data and biomarker datasets are stored datadir <- "~/school/research/pdx/data" # Directory where final data objects should be sent outdir <- "~/school/research/pdx/results"...
# Perform differential expression from limma-voom (with eBayes) rm(list = ls()) load("readcounts_dfs.RData") library(edgeR) # use edgeR to remove lowly expressed genes and normalize reads for # sequencing depth ; see code chunks above info_e.edger <- factor(c(rep("4C", 3) , rep("4C11+", 3))) info_e.edger <- releve...
/scripts/R/rnaseq/limma-voom-e-new-log.R
no_license
flaviaerius/methylation-data
R
false
false
3,869
r
# Perform differential expression from limma-voom (with eBayes) rm(list = ls()) load("readcounts_dfs.RData") library(edgeR) # use edgeR to remove lowly expressed genes and normalize reads for # sequencing depth ; see code chunks above info_e.edger <- factor(c(rep("4C", 3) , rep("4C11+", 3))) info_e.edger <- releve...
testlist <- list(x = structure(c(NaN, 2.54166853232633e+117, 7.27917493709237e-95, 5.72778147612284e+250, 3.33836074328217e-28, 0, 0, 0, 0, 0, 0, 0), .Dim = 4:3)) result <- do.call(multivariance:::doubleCenterBiasCorrected,testlist) str(result)
/multivariance/inst/testfiles/doubleCenterBiasCorrected/libFuzzer_doubleCenterBiasCorrected/doubleCenterBiasCorrected_valgrind_files/1612884236-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
246
r
testlist <- list(x = structure(c(NaN, 2.54166853232633e+117, 7.27917493709237e-95, 5.72778147612284e+250, 3.33836074328217e-28, 0, 0, 0, 0, 0, 0, 0), .Dim = 4:3)) result <- do.call(multivariance:::doubleCenterBiasCorrected,testlist) str(result)
# making table data sets library(dplyr) library(tidyr) library(MorpheusData) library(data.table) #############benchmark 85 set.seed(14592) dat <- data.frame( vial_id = 1:6, band = sample(0:2, 6, replace = TRUE), non_spec = sample(0:2, 6, replace = TRUE), reads = r...
/R73.R
permissive
boyland-pf/MorpheusData
R
false
false
1,304
r
# making table data sets library(dplyr) library(tidyr) library(MorpheusData) library(data.table) #############benchmark 85 set.seed(14592) dat <- data.frame( vial_id = 1:6, band = sample(0:2, 6, replace = TRUE), non_spec = sample(0:2, 6, replace = TRUE), reads = r...
"nEvents" <- function(hr = .6, alpha = .025, beta = .1, ratio = 1, sided = 1, hr0 = 1, n = 0, tbl = FALSE) { if (sided != 1 && sided != 2) stop("sided must be 1 or 2") c <- sqrt(ratio) / (1 + ratio) delta <- -c * (log(hr) - log(hr0)) if (n[1] == 0) { n <- (qnorm(1-alpha/sided)+qnorm(1-beta))^2...
/gsDesign/R/nEvents.R
no_license
ingted/R-Examples
R
false
false
1,399
r
"nEvents" <- function(hr = .6, alpha = .025, beta = .1, ratio = 1, sided = 1, hr0 = 1, n = 0, tbl = FALSE) { if (sided != 1 && sided != 2) stop("sided must be 1 or 2") c <- sqrt(ratio) / (1 + ratio) delta <- -c * (log(hr) - log(hr0)) if (n[1] == 0) { n <- (qnorm(1-alpha/sided)+qnorm(1-beta))^2...
# Page 58 curve( sin(1/x), from=-4/pi, to=4/pi, col="blue", n=10000, add=TRUE) abline(v = c(-2/pi,-1/pi, 1/pi, 2/pi), lty=2, col="red" ) abline(h=0, col="black")
/Calculus/R/Example-02-1-07.r
no_license
AppliedStat/class
R
false
false
169
r
# Page 58 curve( sin(1/x), from=-4/pi, to=4/pi, col="blue", n=10000, add=TRUE) abline(v = c(-2/pi,-1/pi, 1/pi, 2/pi), lty=2, col="red" ) abline(h=0, col="black")
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../../scripts/h2o-r-test-setup.R") test.automl.documentation.suite <- function() { r_demo <- function() { prostate_path <- system.file("extdata", "prostate.csv", package = "h2o") prostate_hf <- h2o.uploadFile(path = prostate_p...
/h2o-r/tests/testdir_algos/automl/runit_automl_demo_for_api_documentation.R
permissive
h2oai/h2o-3
R
false
false
676
r
setwd(normalizePath(dirname(R.utils::commandArgs(asValues=TRUE)$"f"))) source("../../../scripts/h2o-r-test-setup.R") test.automl.documentation.suite <- function() { r_demo <- function() { prostate_path <- system.file("extdata", "prostate.csv", package = "h2o") prostate_hf <- h2o.uploadFile(path = prostate_p...
#'Calculate the analytic steady state concentration for model pbtk. #' #'This function calculates the analytic steady state plasma or venous blood #'concentrations as a result of infusion dosing. #' #'@param chem.name Either the chemical name, CAS number, or the parameters must #'be specified. #'@param chem.cas Eithe...
/R/calc_analytic_css_pbtk.R
no_license
bellsha/CompTox-ExpoCast-httk
R
false
false
6,997
r
#'Calculate the analytic steady state concentration for model pbtk. #' #'This function calculates the analytic steady state plasma or venous blood #'concentrations as a result of infusion dosing. #' #'@param chem.name Either the chemical name, CAS number, or the parameters must #'be specified. #'@param chem.cas Eithe...
#' Equation 7 #' #' @description Equation 7 from Montagnes et al (2008) citing Schoolfield et al. (1981) #' #' @param temp temperature (in Celsius) #' @param rate rate measurement #' @param augment logical wether the dataset with fits should be returned instead of the parameter values #' @param return_fit logical wethe...
/R/equ7.R
no_license
padpadpadpad/temperatureresponse
R
false
false
2,164
r
#' Equation 7 #' #' @description Equation 7 from Montagnes et al (2008) citing Schoolfield et al. (1981) #' #' @param temp temperature (in Celsius) #' @param rate rate measurement #' @param augment logical wether the dataset with fits should be returned instead of the parameter values #' @param return_fit logical wethe...
check_ia <- function(data) { # Check if PupilPre is installed #.check_for_PupilPre(type="NotAvailable") # Check right eye Rias <- data %>% rename(RIGHT_IA_ID = RIGHT_INTEREST_AREA_ID, RIGHT_IA_LABEL = RIGHT_INTEREST_AREA_LABEL) %>% group_by(RIGHT_IA_LABEL, RIGHT_IA_ID) %>% ...
/R/check_ia.R
no_license
Turner-JA/EyetrackingWA
R
false
false
3,814
r
check_ia <- function(data) { # Check if PupilPre is installed #.check_for_PupilPre(type="NotAvailable") # Check right eye Rias <- data %>% rename(RIGHT_IA_ID = RIGHT_INTEREST_AREA_ID, RIGHT_IA_LABEL = RIGHT_INTEREST_AREA_LABEL) %>% group_by(RIGHT_IA_LABEL, RIGHT_IA_ID) %>% ...
head1 = function(filename, rows) { data = read.table(file = filename, sep= ",", header = TRUE, stringsAsFactors = FALSE) hrows = data[1:rows, ] return(print(h_rows)) } head1("wages.csv", 5) #Part 2 iris_data <- read.table(file = "iris.csv", sep= ",", header = TRUE, stringsAsFactors = FALSE) print(tail(iris_data...
/ex7.R
no_license
aliyevND/Biocomp_tutorial9
R
false
false
879
r
head1 = function(filename, rows) { data = read.table(file = filename, sep= ",", header = TRUE, stringsAsFactors = FALSE) hrows = data[1:rows, ] return(print(h_rows)) } head1("wages.csv", 5) #Part 2 iris_data <- read.table(file = "iris.csv", sep= ",", header = TRUE, stringsAsFactors = FALSE) print(tail(iris_data...
# HH MA example - customer #install.packages("amap") library(amap) ##Read the data in the file url = 'https://docs.google.com/spreadsheets/d/1PWWoMqE5o3ChwJbpexeeYkW6p4BHL9hubVb1fkKSBgA/edit#gid=2073914016' library(gsheet) data = as.data.frame(gsheet2tbl(url)) str(data) head(data) names(data) summary(data) str(data)...
/clusteringLive.R
no_license
abani013/analytics1
R
false
false
1,123
r
# HH MA example - customer #install.packages("amap") library(amap) ##Read the data in the file url = 'https://docs.google.com/spreadsheets/d/1PWWoMqE5o3ChwJbpexeeYkW6p4BHL9hubVb1fkKSBgA/edit#gid=2073914016' library(gsheet) data = as.data.frame(gsheet2tbl(url)) str(data) head(data) names(data) summary(data) str(data)...