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/summary_functions.R \name{IRMSE} \alias{IRMSE} \title{Compute the integrated root mean-square error} \usage{ IRMSE( estimate, parameter, fn, density = function(theta, ...) 1, lower = -Inf, upper = Inf, ... ) } \arguments{ \item{...
/man/IRMSE.Rd
no_license
GloriaColmenares/SimDesign
R
false
true
3,103
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summary_functions.R \name{IRMSE} \alias{IRMSE} \title{Compute the integrated root mean-square error} \usage{ IRMSE( estimate, parameter, fn, density = function(theta, ...) 1, lower = -Inf, upper = Inf, ... ) } \arguments{ \item{...
# Pin devtools to version 1.13.6 & install its dependencies # devtools is the package we use to install specific versions of other packages # see also: https://github.com/AlexsLemonade/refinebio/pull/752 # From https://github.com/AlexsLemonade/refinebio/blob/d55616dff8270aa46179a26c8e86318c8535df32/common/install_devt...
/R/dependencies.R
permissive
AlexsLemonade/identifier-refinery
R
false
false
3,973
r
# Pin devtools to version 1.13.6 & install its dependencies # devtools is the package we use to install specific versions of other packages # see also: https://github.com/AlexsLemonade/refinebio/pull/752 # From https://github.com/AlexsLemonade/refinebio/blob/d55616dff8270aa46179a26c8e86318c8535df32/common/install_devt...
x=c(21,25,26,27,28,30,50,40,60,90,100) x hist(x)
/randomnommers.R
no_license
youngstacpt/mushongac
R
false
false
49
r
x=c(21,25,26,27,28,30,50,40,60,90,100) x hist(x)
library(tidyverse) library(magrittr) library(grid) library(gridExtra) library(extrafont) main = function(histone_spn1_depletion_westerns_rdata, chipseq_abundance_barplots_h3_rdata, h3_mods_non_h3_norm_rdata, h3_mods_facet_expression_rdata, fig_width=8.5, ...
/scripts/assemble_figure_h3_mods_supp.R
no_license
winston-lab/spn1_paper_figures
R
false
false
2,154
r
library(tidyverse) library(magrittr) library(grid) library(gridExtra) library(extrafont) main = function(histone_spn1_depletion_westerns_rdata, chipseq_abundance_barplots_h3_rdata, h3_mods_non_h3_norm_rdata, h3_mods_facet_expression_rdata, fig_width=8.5, ...
library(oce) #used for despiking library(hydroGOF) #forgot what I used this for library(pls) #Load the pls package #******Specify file paths and names inPath<-"C:/Users/FBLab/Documents/GitHub/Brittany/inputFiles/" #Specify folder where data is located outPath<-"C:/Users/FBLab/Documents/GitHub/Brittany/output/" fitPat...
/olderCode/tests/estimateComponentsForPLSRForAllDataInputs.R
no_license
BirgandLab/Brittany
R
false
false
5,042
r
library(oce) #used for despiking library(hydroGOF) #forgot what I used this for library(pls) #Load the pls package #******Specify file paths and names inPath<-"C:/Users/FBLab/Documents/GitHub/Brittany/inputFiles/" #Specify folder where data is located outPath<-"C:/Users/FBLab/Documents/GitHub/Brittany/output/" fitPat...
##loading data to R data <- read.table("household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") ##subseting loaded data as per required dates subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #extracting variable of interenst globalActivePower <- as.numeric(subSetData$Global...
/plot1.R
no_license
musakarim/ExData_Plotting1
R
false
false
487
r
##loading data to R data <- read.table("household_power_consumption.txt", header=TRUE, sep=";", stringsAsFactors=FALSE, dec=".") ##subseting loaded data as per required dates subSetData <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #extracting variable of interenst globalActivePower <- as.numeric(subSetData$Global...
#' Create a call by "hand" #' #' @param f Function to call. For \code{make_call}, either a string, a symbol #' or a quoted call. For \code{do_call}, a bare function name or call. #' @param ...,.args Arguments to the call either in or out of a list #' @export #' @examples #' # f can either be a string, a symbol or a c...
/R/call.R
no_license
hadley/lazyeval
R
false
false
2,114
r
#' Create a call by "hand" #' #' @param f Function to call. For \code{make_call}, either a string, a symbol #' or a quoted call. For \code{do_call}, a bare function name or call. #' @param ...,.args Arguments to the call either in or out of a list #' @export #' @examples #' # f can either be a string, a symbol or a c...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/interpolation-class.R \name{interpolate.VolSurface} \alias{interpolate.VolSurface} \title{Interpolate a \code{VolSurface} object.} \usage{ \method{interpolate}{VolSurface}(x, at, ...) } \arguments{ \item{x}{object of class \code{VolSurface} t...
/man/interpolate.VolSurface.Rd
no_license
sefhamada/fmbasics
R
false
true
1,317
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/interpolation-class.R \name{interpolate.VolSurface} \alias{interpolate.VolSurface} \title{Interpolate a \code{VolSurface} object.} \usage{ \method{interpolate}{VolSurface}(x, at, ...) } \arguments{ \item{x}{object of class \code{VolSurface} t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rte-api.R \name{get_hydraulique_fil_de_l_eau_eclusee} \alias{get_hydraulique_fil_de_l_eau_eclusee} \title{Get hydraulique data drom eco2mix} \usage{ get_hydraulique_fil_de_l_eau_eclusee(from = NULL, to = NULL, user = NULL, proxy_pwd = NULL)...
/man/get_hydraulique_fil_de_l_eau_eclusee.Rd
no_license
rte-antares-rpackage/antaresWeeklyMargin
R
false
true
829
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/rte-api.R \name{get_hydraulique_fil_de_l_eau_eclusee} \alias{get_hydraulique_fil_de_l_eau_eclusee} \title{Get hydraulique data drom eco2mix} \usage{ get_hydraulique_fil_de_l_eau_eclusee(from = NULL, to = NULL, user = NULL, proxy_pwd = NULL)...
library(tempR) ### Name: tcata.line.plot ### Title: Temporal Check-All-That-Apply (TCATA) curve ### Aliases: tcata.line.plot ### ** Examples # example using 'syrah' data set low1 <- t(syrah[seq(3, 1026, by = 6), -c(1:4)]) colnames(low1) <- 10:180 tcata.line.plot(get.smooth(low1), lwd = 2, main = "Low-ethanol wine (...
/data/genthat_extracted_code/tempR/examples/tcata.line.plot.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,588
r
library(tempR) ### Name: tcata.line.plot ### Title: Temporal Check-All-That-Apply (TCATA) curve ### Aliases: tcata.line.plot ### ** Examples # example using 'syrah' data set low1 <- t(syrah[seq(3, 1026, by = 6), -c(1:4)]) colnames(low1) <- 10:180 tcata.line.plot(get.smooth(low1), lwd = 2, main = "Low-ethanol wine (...
closestPair<-function(x,y) { distancev <- function(pointsv) { x1 <- pointsv[1] y1 <- pointsv[2] x2 <- pointsv[3] y2 <- pointsv[4] sqrt((x1 - x2)^2 + (y1 - y2)^2) } pairstocompare <- t(combn(length(x),2)) pointsv <- cbind(x[pairstocompare[,1]],y[pairstocompare[,1]],x[pairstocompare[,2...
/Programming Language Detection/Experiment-2/Dataset/Train/R/closest-pair-problem-2.r
no_license
dlaststark/machine-learning-projects
R
false
false
904
r
closestPair<-function(x,y) { distancev <- function(pointsv) { x1 <- pointsv[1] y1 <- pointsv[2] x2 <- pointsv[3] y2 <- pointsv[4] sqrt((x1 - x2)^2 + (y1 - y2)^2) } pairstocompare <- t(combn(length(x),2)) pointsv <- cbind(x[pairstocompare[,1]],y[pairstocompare[,1]],x[pairstocompare[,2...
get_catalog_scpenetration <- function( data_name = "scpenetration" , output_dir , ... ){ catalog <- NULL for( ma_pd in c( "MA" , "PDP" ) ){ pene_url <- paste0( "https://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/MCRAdvPartDEnrolData/" , ma_pd , "-State-County-Penetratio...
/R/scpenetration.R
no_license
yluair/lodown
R
false
false
3,317
r
get_catalog_scpenetration <- function( data_name = "scpenetration" , output_dir , ... ){ catalog <- NULL for( ma_pd in c( "MA" , "PDP" ) ){ pene_url <- paste0( "https://www.cms.gov/Research-Statistics-Data-and-Systems/Statistics-Trends-and-Reports/MCRAdvPartDEnrolData/" , ma_pd , "-State-County-Penetratio...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/primaryKey.R \name{minimumPK} \alias{minimumPK} \title{Find the minimum fields which make a valid Primary Key} \usage{ minimumPK( x, fieldOrder = character(), excludeFields = character(), maxFields = ncol(x), minFieldSet = character...
/man/minimumPK.Rd
no_license
jmaspons/dbTools
R
false
true
877
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/primaryKey.R \name{minimumPK} \alias{minimumPK} \title{Find the minimum fields which make a valid Primary Key} \usage{ minimumPK( x, fieldOrder = character(), excludeFields = character(), maxFields = ncol(x), minFieldSet = character...
## path to file holding data file file <- ".\\exdata_data_household_power_consumption\\household_power_consumption.txt" ## read the file power <- read.table(file, sep=";", header=TRUE, colClasses="character") ## Subset power into partialPower for days Feb 1, 2007 and Feb 2, 2007 partialPower <- power[power$Date == "1...
/plot3.R
no_license
Cooter/ExData_Plotting1
R
false
false
1,817
r
## path to file holding data file file <- ".\\exdata_data_household_power_consumption\\household_power_consumption.txt" ## read the file power <- read.table(file, sep=";", header=TRUE, colClasses="character") ## Subset power into partialPower for days Feb 1, 2007 and Feb 2, 2007 partialPower <- power[power$Date == "1...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wind_functions2.R \name{cost.FMGS} \alias{cost.FMGS} \alias{flow.dispersion} \title{Compute flow-based cost or conductance} \usage{ cost.FMGS(wind.direction, wind.speed, target, type = "active") flow.dispersion(x, fun = cost.FMGS, output = "...
/man/flow.dispersion.Rd
no_license
cran/rWind
R
false
true
3,167
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/wind_functions2.R \name{cost.FMGS} \alias{cost.FMGS} \alias{flow.dispersion} \title{Compute flow-based cost or conductance} \usage{ cost.FMGS(wind.direction, wind.speed, target, type = "active") flow.dispersion(x, fun = cost.FMGS, output = "...
install.packages("devtools") library(devtools) devtools::install_github(repo="maksimhorowitz/nflscrapR") library(nflscrapR) season_2015 <- season_play_by_play(2015) summary(season_2015) head(season_2015) season_2015$PlayType #just have run or pass nspec_season_2015 <- season_2015 %>% filter(PlayType == "Run" | Pla...
/nfl scraper.R
no_license
dbrait/NFL
R
false
false
2,296
r
install.packages("devtools") library(devtools) devtools::install_github(repo="maksimhorowitz/nflscrapR") library(nflscrapR) season_2015 <- season_play_by_play(2015) summary(season_2015) head(season_2015) season_2015$PlayType #just have run or pass nspec_season_2015 <- season_2015 %>% filter(PlayType == "Run" | Pla...
#==========================================================================================# #==========================================================================================# # This sub-routine makes the first letter of every entry capitalised, whilst leaving # # the other letters lower case. ...
/R-utils/charutils.r
no_license
yjkim1028/ED2.mixed
R
false
false
4,348
r
#==========================================================================================# #==========================================================================================# # This sub-routine makes the first letter of every entry capitalised, whilst leaving # # the other letters lower case. ...
library(class) x = c(151, 174, 138, 186, 128, 136, 179, 163, 152, 131) y = c(63, 81, 56, 91, 47, 57, 76, 72, 62, 48) xandy = cbind(x, y) xy_train = xandy[1:8, ] xy_test = xandy[9:10, ] ycl = y[1:8] pred = knn(train = xy_train, test = xy_test, cl = ycl, k =5) pred y[9:10]
/DatSciInClassStuff/Mar29.R
no_license
wesleymerrick/Data-Sci-Class
R
false
false
273
r
library(class) x = c(151, 174, 138, 186, 128, 136, 179, 163, 152, 131) y = c(63, 81, 56, 91, 47, 57, 76, 72, 62, 48) xandy = cbind(x, y) xy_train = xandy[1:8, ] xy_test = xandy[9:10, ] ycl = y[1:8] pred = knn(train = xy_train, test = xy_test, cl = ycl, k =5) pred y[9:10]
/formacao-cientista/3. regressao/regressao_multipla.R
no_license
robsongcruz/machinelearning
R
false
false
516
r
library(dplyr) library(shiny) library(DT) topTen <- read.csv("topProjected.csv", check.names = FALSE) loss <- read.csv("historicAndProjectedLoss.csv", check.names = FALSE) shinyServer(function(input, output) { output$distPlot <- DT::renderDataTable( topTen, options = li...
/resCareDataRequest/server.R
no_license
bekahdevore/rKW
R
false
false
508
r
library(dplyr) library(shiny) library(DT) topTen <- read.csv("topProjected.csv", check.names = FALSE) loss <- read.csv("historicAndProjectedLoss.csv", check.names = FALSE) shinyServer(function(input, output) { output$distPlot <- DT::renderDataTable( topTen, options = li...
library(shiny) library(shinythemes) library(shinyFiles) shinythemes::themeSelector() navbarPage( theme = shinytheme("cerulean"), "HCMMCNVs", # First bar: Title Search tabPanel("Data pre-processing", sidebarPanel( tags$div(tags$label(h4("1. Choose bam files directory"))), sh...
/ui.R
no_license
lunching/HCMM_CNVs
R
false
false
6,002
r
library(shiny) library(shinythemes) library(shinyFiles) shinythemes::themeSelector() navbarPage( theme = shinytheme("cerulean"), "HCMMCNVs", # First bar: Title Search tabPanel("Data pre-processing", sidebarPanel( tags$div(tags$label(h4("1. Choose bam files directory"))), sh...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fetch-donations.R \name{fetch_donations} \alias{fetch_donations} \title{Fetch donations from GDQ across multiple pages} \usage{ fetch_donations(event = c("cgdq", "agdq2011", "jrdq", "agdq2016", "sgdq2016"), min_page = 1, max_page = 0) } \ar...
/man/fetch_donations.Rd
no_license
bkkkk/gdqr
R
false
true
656
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fetch-donations.R \name{fetch_donations} \alias{fetch_donations} \title{Fetch donations from GDQ across multiple pages} \usage{ fetch_donations(event = c("cgdq", "agdq2011", "jrdq", "agdq2016", "sgdq2016"), min_page = 1, max_page = 0) } \ar...
#!/usr/bin/env Rscript ## This function will do the data processing for all of the plotting scripts. ## It will output a .Rda file for fast loading that the individual scripts ## can use. The plotting scripts will check the current working directory ## for the presence of the .Rda file. If found it will be loaded, if ...
/code/processData.R
no_license
mailb88/ExData_Plotting1
R
false
false
1,530
r
#!/usr/bin/env Rscript ## This function will do the data processing for all of the plotting scripts. ## It will output a .Rda file for fast loading that the individual scripts ## can use. The plotting scripts will check the current working directory ## for the presence of the .Rda file. If found it will be loaded, if ...
library(tidyverse) library(rvest) library(clipr) library(lubridate) library(RSelenium) library(xml2) library(jsonlite) library(googledrive) library(googlesheets4) library(wdman) #install.packages('DescTools') library(DescTools) # library(germanpolls)
/src/config.R
no_license
sueddeutsche/sz-poll-collect
R
false
false
256
r
library(tidyverse) library(rvest) library(clipr) library(lubridate) library(RSelenium) library(xml2) library(jsonlite) library(googledrive) library(googlesheets4) library(wdman) #install.packages('DescTools') library(DescTools) # library(germanpolls)
library(shiny) library(googleAuthR) options(googleAuthR.scopes.selected = "https://www.googleapis.com/auth/urlshortener") options(googleAuthR.webapp.client_id = "201908948134-cjjs89cffh3k429vi7943ftpk3jg36ed.apps.googleusercontent.com") options(googleAuthR.webapp.client_secret = "mE7rHl0-iNtzyI1MQia-mg1o") options(shin...
/Shiny/server.R
no_license
Vaibhav-PublicisSapient/Shiny
R
false
false
1,188
r
library(shiny) library(googleAuthR) options(googleAuthR.scopes.selected = "https://www.googleapis.com/auth/urlshortener") options(googleAuthR.webapp.client_id = "201908948134-cjjs89cffh3k429vi7943ftpk3jg36ed.apps.googleusercontent.com") options(googleAuthR.webapp.client_secret = "mE7rHl0-iNtzyI1MQia-mg1o") options(shin...
library(shiny) ### Name: getQueryString ### Title: Get the query string / hash component from the URL ### Aliases: getQueryString getUrlHash ### ** Examples ## Only run this example in interactive R sessions if (interactive()) { ## App 1: getQueryString ## Printing the value of the query string ## (Use the b...
/data/genthat_extracted_code/shiny/examples/getQueryString.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,624
r
library(shiny) ### Name: getQueryString ### Title: Get the query string / hash component from the URL ### Aliases: getQueryString getUrlHash ### ** Examples ## Only run this example in interactive R sessions if (interactive()) { ## App 1: getQueryString ## Printing the value of the query string ## (Use the b...
#! /usr/bin/env Rscript rm(list=ls(all=TRUE)) library(TCGAbiolinks) library(SummarizedExperiment) library(plyr) require("getopt", quietly=TRUE) library(limma) library(sva) ################################# #Rscript thisscript.R -i TCGA-BRCA -d brcaExp_PreprocessedData_wo_batch.rda -f female_onlyTandN.txt -t 6 -s ...
/my_old/specifyTypesStages.R
no_license
mutual-ai/TCGA_RNA-seq
R
false
false
13,866
r
#! /usr/bin/env Rscript rm(list=ls(all=TRUE)) library(TCGAbiolinks) library(SummarizedExperiment) library(plyr) require("getopt", quietly=TRUE) library(limma) library(sva) ################################# #Rscript thisscript.R -i TCGA-BRCA -d brcaExp_PreprocessedData_wo_batch.rda -f female_onlyTandN.txt -t 6 -s ...
#### Preamble #### # Purpose: Prepare and clean the survey data downloaded from [...UPDATE ME!!!!!] # Author: Rohan Alexander and Sam Caetano [CHANGE THIS TO YOUR NAME!!!!] # Data: 22 October 2020 # Contact: rohan.alexander@utoronto.ca [PROBABLY CHANGE THIS ALSO!!!!] # License: MIT # Pre-requisites: # - Need to have d...
/01-data_cleaning-survey1.R
no_license
jlkuee/Sta304-problemset3
R
false
false
2,830
r
#### Preamble #### # Purpose: Prepare and clean the survey data downloaded from [...UPDATE ME!!!!!] # Author: Rohan Alexander and Sam Caetano [CHANGE THIS TO YOUR NAME!!!!] # Data: 22 October 2020 # Contact: rohan.alexander@utoronto.ca [PROBABLY CHANGE THIS ALSO!!!!] # License: MIT # Pre-requisites: # - Need to have d...
#!/usr/bin/Rscript args <- commandArgs(TRUE) # now args is a character vector containing the arguments.# Suppose the first argument should be interpreted as a number # and the second as a character string and the third as a boolean: numericArg <- as.numeric(args[1]) charArg <- args[2] logicalArg <- as.logical(args[3]...
/units/exampleRscript.R
no_license
potatopaul/stat243-fall-2014
R
false
false
417
r
#!/usr/bin/Rscript args <- commandArgs(TRUE) # now args is a character vector containing the arguments.# Suppose the first argument should be interpreted as a number # and the second as a character string and the third as a boolean: numericArg <- as.numeric(args[1]) charArg <- args[2] logicalArg <- as.logical(args[3]...
#Rolling Window RMSE Function # series is the array of the series # horizon is how far you want to predict into the future # d is the order of the differencing: (1-B^)^d # s is the order of the seasonality: (1-B^s) # phi = coefficients of the stationary AR term # theta = coefficients of the invertible MA term # It sim...
/R/roll.win.rmse.wge.R
no_license
cran/tswge
R
false
false
7,000
r
#Rolling Window RMSE Function # series is the array of the series # horizon is how far you want to predict into the future # d is the order of the differencing: (1-B^)^d # s is the order of the seasonality: (1-B^s) # phi = coefficients of the stationary AR term # theta = coefficients of the invertible MA term # It sim...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/normalization.R \name{setmin.dat} \alias{setmin.dat} \title{Normalize data in data frame to minimal value (Null value) by subtraction of difference.} \usage{ setmin.dat(df) } \arguments{ \item{df}{Data frame from mean data file.} } \value{ da...
/man/setmin.dat.Rd
no_license
suvarzz/MNuc
R
false
true
448
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/normalization.R \name{setmin.dat} \alias{setmin.dat} \title{Normalize data in data frame to minimal value (Null value) by subtraction of difference.} \usage{ setmin.dat(df) } \arguments{ \item{df}{Data frame from mean data file.} } \value{ da...
library(tidyr, warn.conflicts = F, quietly = T) library(dplyr, warn.conflicts = F, quietly = T) library(purrr, warn.conflicts = F, quietly = T) library(MASS, warn.conflicts = F, quietly = T) library(bin2mi) library(m2imp) alpha <- 0.025 power <- 0.85 cor_xl <- 0.4 pc <- 0.8 pt <- 0.775 m1 <- 0.23 n_obs <- 250 #rate ...
/checks/dfchecks/pgms/mdsur_obs3_dfcheck_sc5.R
no_license
yuliasidi/ch2sim
R
false
false
2,386
r
library(tidyr, warn.conflicts = F, quietly = T) library(dplyr, warn.conflicts = F, quietly = T) library(purrr, warn.conflicts = F, quietly = T) library(MASS, warn.conflicts = F, quietly = T) library(bin2mi) library(m2imp) alpha <- 0.025 power <- 0.85 cor_xl <- 0.4 pc <- 0.8 pt <- 0.775 m1 <- 0.23 n_obs <- 250 #rate ...
# Load packages: ---------------------------------------------------------- library(httr) # Tools for Working with URLs and HTTP, CRAN v1.4.2 library(jsonlite) # A Simple and Robust JSON Parser and Generator for R, CRAN v1.7.1 library(tidyverse) # Easily Install and Load the 'Tidyverse', CRAN v1.3.0 library(lub...
/tfgm_webscrape.R
permissive
NathanKhadaroo/tfgm_webscraping
R
false
false
1,931
r
# Load packages: ---------------------------------------------------------- library(httr) # Tools for Working with URLs and HTTP, CRAN v1.4.2 library(jsonlite) # A Simple and Robust JSON Parser and Generator for R, CRAN v1.7.1 library(tidyverse) # Easily Install and Load the 'Tidyverse', CRAN v1.3.0 library(lub...
context("lin_pow") library(sars) test_that("lin_pow returns correct results", { data(galap) fit <- lin_pow(galap, con = 1) expect_equal(round(fit$Model$coefficients[2], 2), 0.34) expect_equal(round(fit$normaTest[[2]]$p.value, 2), 0.35) })
/tests/testthat/test_lin_pow.R
no_license
Bhanditz/sars
R
false
false
261
r
context("lin_pow") library(sars) test_that("lin_pow returns correct results", { data(galap) fit <- lin_pow(galap, con = 1) expect_equal(round(fit$Model$coefficients[2], 2), 0.34) expect_equal(round(fit$normaTest[[2]]$p.value, 2), 0.35) })
cas <- smart_read("cas500.csv") not_a_df <- 1:10 rda <- file.path(tempdir(), "my_files.rda") on.exit(unlink(rda)) save(cas, iris, not_a_df, file = rda) test_that("Load returns list of data frames", { res <- load_rda(rda) expect_type(res, "list") expect_equal(names(res), c("cas", "iris")) expect_equal(...
/tests/testthat/test_load_save.R
no_license
cran/iNZightTools
R
false
false
813
r
cas <- smart_read("cas500.csv") not_a_df <- 1:10 rda <- file.path(tempdir(), "my_files.rda") on.exit(unlink(rda)) save(cas, iris, not_a_df, file = rda) test_that("Load returns list of data frames", { res <- load_rda(rda) expect_type(res, "list") expect_equal(names(res), c("cas", "iris")) expect_equal(...
# clean USGS Rio Vista Bridge (SRV) stage and flow data for modeling library(dplyr) library(readr) library(glue) library(contentid) library(janitor) library(tidyr) f_clean_flow_usgs_11455420 <- function(){ # get raw data ID: SRV_flow <- contentid::store("data_raw/raw_flow_usgs_11455420.zip") SRV_flow_id <- co...
/scripts/functions/f_clean_flow_usgs_11455420.R
no_license
Delta-Stewardship-Council/swg-21-connectivity
R
false
false
2,481
r
# clean USGS Rio Vista Bridge (SRV) stage and flow data for modeling library(dplyr) library(readr) library(glue) library(contentid) library(janitor) library(tidyr) f_clean_flow_usgs_11455420 <- function(){ # get raw data ID: SRV_flow <- contentid::store("data_raw/raw_flow_usgs_11455420.zip") SRV_flow_id <- co...
## File Name: tam2mirt.R ## File Version: 0.292 # convert a fitted tam object into a mirt object tam2mirt <- function( tamobj ) { est.mirt <- FALSE # extract intercept AXsi <- tamobj$AXsi # extract loadings B <- tamobj$B # number of dimensions D <- dim(B)[3] # extract trait distributio...
/R/tam2mirt.R
no_license
alexanderrobitzsch/sirt
R
false
false
1,677
r
## File Name: tam2mirt.R ## File Version: 0.292 # convert a fitted tam object into a mirt object tam2mirt <- function( tamobj ) { est.mirt <- FALSE # extract intercept AXsi <- tamobj$AXsi # extract loadings B <- tamobj$B # number of dimensions D <- dim(B)[3] # extract trait distributio...
library(RSurveillance) ### Name: n.rb.2stage.2 ### Title: Sample size for 2-stage risk-based surveillance, allowing for ### risk factors at either or both cluster and unit level ### Aliases: n.rb.2stage.2 ### Keywords: methods ### ** Examples rr.c<- c(5,3,1) ppr.c<- c(0.1, 0.2, 0.7) spr.c<- c(0.4, 0.4, 0.2) rr.u<...
/data/genthat_extracted_code/RSurveillance/examples/n.rb.2stage.2.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
588
r
library(RSurveillance) ### Name: n.rb.2stage.2 ### Title: Sample size for 2-stage risk-based surveillance, allowing for ### risk factors at either or both cluster and unit level ### Aliases: n.rb.2stage.2 ### Keywords: methods ### ** Examples rr.c<- c(5,3,1) ppr.c<- c(0.1, 0.2, 0.7) spr.c<- c(0.4, 0.4, 0.2) rr.u<...
############################################################### ## make contrast matrix for pairwise comparisons ############################################################### #' @keywords internal .makeContrast <- function(groups) { ncomp <- length(groups) * (length(groups) - 1) / 2 # Number of comparison cont...
/R/linearModel.functions.R
no_license
zzsnow/MSstatsTMT
R
false
false
17,215
r
############################################################### ## make contrast matrix for pairwise comparisons ############################################################### #' @keywords internal .makeContrast <- function(groups) { ncomp <- length(groups) * (length(groups) - 1) / 2 # Number of comparison cont...
# This is the server logic library(shiny) shinyServer(function(input, output) { output$Plot <- renderPlot({ # Graph cars using blue points overlayed by a line plot(data, type="o", col="blue", xaxt='n') ticks<-c(1:nrow(data)) axis(1,at=ticks,labels=ticks) }) })
/R-Scripts/PredictingLSD/server.R
permissive
dmpe/BIInternship
R
false
false
319
r
# This is the server logic library(shiny) shinyServer(function(input, output) { output$Plot <- renderPlot({ # Graph cars using blue points overlayed by a line plot(data, type="o", col="blue", xaxt='n') ticks<-c(1:nrow(data)) axis(1,at=ticks,labels=ticks) }) })
navbarMenu("Hydrograph", # tabPanel("raw queried data", # # tags$head(tags$script(HTML(jscode.mup))), tabPanel("daily-mean data", source(file.path("ui/hydrograph", "discharge.R"), local = TRUE)$value ), tabPanel("(baseflow) separation", source(file.path("ui/hydrograph", "separation.R"),...
/ui/hydrograph.R
permissive
maseology/sHydrology_analysis
R
false
false
833
r
navbarMenu("Hydrograph", # tabPanel("raw queried data", # # tags$head(tags$script(HTML(jscode.mup))), tabPanel("daily-mean data", source(file.path("ui/hydrograph", "discharge.R"), local = TRUE)$value ), tabPanel("(baseflow) separation", source(file.path("ui/hydrograph", "separation.R"),...
# create evt140_0021500411.RDS data file with LaVine speed/dist metrics library(dplyr) library(animation) source("../graphics.R") pt <- readRDS("0021500411.RDS") drive <- pt drive$game <- pt$game %>% filter(event_id == 140) # drop time after the event takes place (i.e. when the game clock stops) gc_stop_indx <- w...
/data/pt_data_evt140_drive.R
permissive
imadmali/bball-hmm
R
false
false
2,435
r
# create evt140_0021500411.RDS data file with LaVine speed/dist metrics library(dplyr) library(animation) source("../graphics.R") pt <- readRDS("0021500411.RDS") drive <- pt drive$game <- pt$game %>% filter(event_id == 140) # drop time after the event takes place (i.e. when the game clock stops) gc_stop_indx <- w...
# Up and running with R: Lynda.com. Early Oct 2017. 2 + 2 # vbasic math #control-return runs it if you're on that line # [1] = index number for the vector 1:100 #print numbers 1-100 on several lines #[21] = index number for vector #no command terminator #for command more than one line, use parentheses print("Hello W...
/intro R.R
no_license
bethcozz/ssi2017_ex
R
false
false
11,824
r
# Up and running with R: Lynda.com. Early Oct 2017. 2 + 2 # vbasic math #control-return runs it if you're on that line # [1] = index number for the vector 1:100 #print numbers 1-100 on several lines #[21] = index number for vector #no command terminator #for command more than one line, use parentheses print("Hello W...
library(plotly) library(gapminder) # Iris graf <- plotly::plot_ly(data = iris, x = ~Sepal.Length, y = ~Sepal.Width, type = "scatter", mode = "markers", color = ~Species, size = ~iris$Petal.Length, frame = ~Species) graf # Gapminder graf <- plotly...
/Graficos_avancados/template_graficosAnimados.R
no_license
joscelino/Graficos_em_R
R
false
false
832
r
library(plotly) library(gapminder) # Iris graf <- plotly::plot_ly(data = iris, x = ~Sepal.Length, y = ~Sepal.Width, type = "scatter", mode = "markers", color = ~Species, size = ~iris$Petal.Length, frame = ~Species) graf # Gapminder graf <- plotly...
\name{ActivityInfo-package} \alias{ActivityInfo-package} \alias{ActivityInfo} \docType{package} \title{ R Client for ActivityInfo.org } \description{ More about what it does (maybe more than one line) ~~ A concise (1-5 lines) description of the package ~~ } \details{ \tabular{ll}{ Package: \tab ActivityInfo\cr Type: \t...
/man/ActivityInfo-package.Rd
no_license
Edouard-Legoupil/activityinfo-R
R
false
false
534
rd
\name{ActivityInfo-package} \alias{ActivityInfo-package} \alias{ActivityInfo} \docType{package} \title{ R Client for ActivityInfo.org } \description{ More about what it does (maybe more than one line) ~~ A concise (1-5 lines) description of the package ~~ } \details{ \tabular{ll}{ Package: \tab ActivityInfo\cr Type: \t...
setwd("E:\\SS\\Coursera Data Science Specialization\\exploratory-data-analysis\\Week1\\Course Project 1") ## Getting full dataset data_full <- read.csv("./household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", q...
/plot1.R
no_license
shan4224/ExData_Plotting1
R
false
false
865
r
setwd("E:\\SS\\Coursera Data Science Specialization\\exploratory-data-analysis\\Week1\\Course Project 1") ## Getting full dataset data_full <- read.csv("./household_power_consumption.txt", header=T, sep=';', na.strings="?", nrows=2075259, check.names=F, stringsAsFactors=F, comment.char="", q...
airquality <- structure(list(Ozone = c(41L, 36L, 12L, 18L, NA, 28L, 23L, 19L, 8L, NA, 7L, 16L, 11L, 14L, 18L, 14L, 34L, 6L, 30L, 11L, 1L, 11L, 4L, 32L, NA, NA, NA, 23L, 45L, 115L, 37L, NA, NA, NA, NA, NA, NA, 29L, NA, 71L, 39L, NA, NA, 23L, NA, NA, 21L, 37L, 20L, 12L, 13L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 13...
/airrQ.R
no_license
CesarAAG/Programacion_Actuarial_III_OT16
R
false
false
4,774
r
airquality <- structure(list(Ozone = c(41L, 36L, 12L, 18L, NA, 28L, 23L, 19L, 8L, NA, 7L, 16L, 11L, 14L, 18L, 14L, 34L, 6L, 30L, 11L, 1L, 11L, 4L, 32L, NA, NA, NA, 23L, 45L, 115L, 37L, NA, NA, NA, NA, NA, NA, 29L, NA, 71L, 39L, NA, NA, 23L, NA, NA, 21L, 37L, 20L, 12L, 13L, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 13...
# Read data from CSV file data <- read.table(file = "hw1_data.csv", header = TRUE, sep = ",") # Getting column names of the dataset names(data) # Extracting the first 2 rows of the data frame head(data, 2) # Number of observations in the data frame nrow(data) # Extracting the first 2 rows of the data frame tail(dat...
/coursera/comp-data-analys/assignment1.R
no_license
Peque/peque
R
false
false
1,044
r
# Read data from CSV file data <- read.table(file = "hw1_data.csv", header = TRUE, sep = ",") # Getting column names of the dataset names(data) # Extracting the first 2 rows of the data frame head(data, 2) # Number of observations in the data frame nrow(data) # Extracting the first 2 rows of the data frame tail(dat...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cforest_LUR.R \name{cforest_LUR} \alias{cforest_LUR} \title{Random forest for LUR (using cforest)} \usage{ cforest_LUR( variabledf, vis1 = T, y_varname = c("day_value", "night_value", "value_mean"), training, test, grepstring, ....
/man/cforest_LUR.Rd
no_license
mengluchu/APMtools
R
false
true
823
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cforest_LUR.R \name{cforest_LUR} \alias{cforest_LUR} \title{Random forest for LUR (using cforest)} \usage{ cforest_LUR( variabledf, vis1 = T, y_varname = c("day_value", "night_value", "value_mean"), training, test, grepstring, ....
## analysis of ColonCancer OncodriveCIS Input dataset using PLRS library(plrs) # load data load("/home/anita/Benchmarking/two_omics/ColonCancerCompleteDataAnalysis/ColonCancerRawDataset_OncodriveCISInput.Rdata") # Reading GISTIC 2.0 copy number data cnv_gistic <- read.table(gzfile("/home/anita/Integrated analysis in ...
/Multi-staged tools/ColorectalCancer/PLRS/PLRS_COAD_Analysis_OncodriveInput.R
no_license
AtinaSat/Evaluation-of-integration-tools
R
false
false
2,234
r
## analysis of ColonCancer OncodriveCIS Input dataset using PLRS library(plrs) # load data load("/home/anita/Benchmarking/two_omics/ColonCancerCompleteDataAnalysis/ColonCancerRawDataset_OncodriveCISInput.Rdata") # Reading GISTIC 2.0 copy number data cnv_gistic <- read.table(gzfile("/home/anita/Integrated analysis in ...
library(fitODBOD) ### Name: pTRI ### Title: Triangular Distribution bounded between [0,1] ### Aliases: pTRI ### ** Examples #plotting the random variables and probability values col<-rainbow(4) x<-seq(0.2,0.8,by=0.2) plot(0,0,main="Probability density graph",xlab="Random variable", ylab="Probability density values"...
/data/genthat_extracted_code/fitODBOD/examples/pTRI.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,249
r
library(fitODBOD) ### Name: pTRI ### Title: Triangular Distribution bounded between [0,1] ### Aliases: pTRI ### ** Examples #plotting the random variables and probability values col<-rainbow(4) x<-seq(0.2,0.8,by=0.2) plot(0,0,main="Probability density graph",xlab="Random variable", ylab="Probability density values"...
forward.adaptive <- function(data, params, logbeta.init, logomega.init, alpha, dcc.true) { ### Data: ## int<lower=0> T; // time periods ## int<lower=0> N; // population ## int<lower=0> K; // # weather preds ## matrix[T, K] weather; ## real ii_init; // usually 0, so provide as known ### Parameters...
/seir-model/old-versions/forward-0105-adaptive.R
no_license
openmodels/coronaclimate
R
false
false
4,860
r
forward.adaptive <- function(data, params, logbeta.init, logomega.init, alpha, dcc.true) { ### Data: ## int<lower=0> T; // time periods ## int<lower=0> N; // population ## int<lower=0> K; // # weather preds ## matrix[T, K] weather; ## real ii_init; // usually 0, so provide as known ### Parameters...
#' Locality Pursuit Embedding #' #' Locality Pursuit Embedding (LPE) is an unsupervised linear dimension reduction method. #' It aims at preserving local structure by solving a variational problem that models #' the local geometrical structure by the Euclidean distances. #' #' @param X an \eqn{(n\times p)} matrix or da...
/R/linear_LPE.R
no_license
rcannood/Rdimtools
R
false
false
3,639
r
#' Locality Pursuit Embedding #' #' Locality Pursuit Embedding (LPE) is an unsupervised linear dimension reduction method. #' It aims at preserving local structure by solving a variational problem that models #' the local geometrical structure by the Euclidean distances. #' #' @param X an \eqn{(n\times p)} matrix or da...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/choosePositions.BchronologyRun.R \name{choosePositions} \alias{choosePositions} \title{Compute positions to date next which result in maximal decrease of chronological uncertainty} \usage{ choosePositions( bchrRun, N = 1, newSds = 30, ...
/man/choosePositions.Rd
no_license
allisonstegner/Bchron
R
false
true
3,198
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/choosePositions.BchronologyRun.R \name{choosePositions} \alias{choosePositions} \title{Compute positions to date next which result in maximal decrease of chronological uncertainty} \usage{ choosePositions( bchrRun, N = 1, newSds = 30, ...
context("XML imports/exports") require("datasets") test_that("Export to XML", { expect_true(export(iris, "iris.xml") %in% dir()) }) test_that("Import from XML", { expect_true(is.data.frame(import("iris.xml"))) }) unlink("iris.xml")
/data/genthat_extracted_code/rio/tests/test_format_xml.R
no_license
surayaaramli/typeRrh
R
false
false
255
r
context("XML imports/exports") require("datasets") test_that("Export to XML", { expect_true(export(iris, "iris.xml") %in% dir()) }) test_that("Import from XML", { expect_true(is.data.frame(import("iris.xml"))) }) unlink("iris.xml")
/notes/EQG_2016/Day1/Exercise1.1/Exercise_1.1_instructions.R
no_license
nicolise/UW_EQG_2017
R
false
false
6,142
r
\name{pythTheo} \alias{pythTheo} \title{pythTheo} \description{pythTheo described} \usage{ pythTheo(x) } \arguments{ \item{pythTheo}{This formula figures out the third side of a triangle when you only 2 of the sides} } \value{ aSquared plus bSquared equals cSquared. return "Length of side a: " + aSquared + ", length ...
/man/pythTheo.Rd
no_license
jcarnes1/lis4370-finalProject
R
false
false
406
rd
\name{pythTheo} \alias{pythTheo} \title{pythTheo} \description{pythTheo described} \usage{ pythTheo(x) } \arguments{ \item{pythTheo}{This formula figures out the third side of a triangle when you only 2 of the sides} } \value{ aSquared plus bSquared equals cSquared. return "Length of side a: " + aSquared + ", length ...
train <- read.csv("../input/train.csv", stringsAsFactors = F) test <- read.csv("../input/test.csv", stringsAsFactors = F) head(train) head(test) test["Survived"] = 0 submission = test[, c("PassengerId", "Survived")] head(submission) write.csv(submission, file = "nosurvivors.csv", row.names = F) test[test$Sex == "male",...
/src/r/kernels/analyticsdojo-titanic-baseline-models-analyticsdojo-r/script/titanic-baseline-models-analyticsdojo-r.r
no_license
PRL-PRG/trustworthy-titanic
R
false
false
552
r
train <- read.csv("../input/train.csv", stringsAsFactors = F) test <- read.csv("../input/test.csv", stringsAsFactors = F) head(train) head(test) test["Survived"] = 0 submission = test[, c("PassengerId", "Survived")] head(submission) write.csv(submission, file = "nosurvivors.csv", row.names = F) test[test$Sex == "male",...
require(Cairo) require(ggplot2) #require(RColorBrewer) data <- read.delim("./xval/scores.tab", header=TRUE) p <- ggplot(data) + aes_string(x="reg", y="accuracy") + stat_summary(fun.data="mean_cl_boot") + scale_x_log10(name="Regularization") + scale_y_continuous(name="Accuracy") + theme_bw() ggsave("xval/sc...
/exp/02_2020-06-03_interpretation/21_2021-03-03_run/xval/scores.R
no_license
marjanfarahbod/interpretation
R
false
false
365
r
require(Cairo) require(ggplot2) #require(RColorBrewer) data <- read.delim("./xval/scores.tab", header=TRUE) p <- ggplot(data) + aes_string(x="reg", y="accuracy") + stat_summary(fun.data="mean_cl_boot") + scale_x_log10(name="Regularization") + scale_y_continuous(name="Accuracy") + theme_bw() ggsave("xval/sc...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 29374 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 29374 c c Input Parameter (command line, file): c input filename QBFLIB/Amendola-Ricca-Truszczynski/selection-hard/ctrl.e#1.a#...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Amendola-Ricca-Truszczynski/selection-hard/ctrl.e#1.a#3.E#136.A#48.c#.w#9.s#33.asp/ctrl.e#1.a#3.E#136.A#48.c#.w#9.s#33.asp.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
732
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 29374 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 29374 c c Input Parameter (command line, file): c input filename QBFLIB/Amendola-Ricca-Truszczynski/selection-hard/ctrl.e#1.a#...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FDboostLSS.R \name{cvrisk.FDboostLSS} \alias{cvrisk.FDboostLSS} \title{Cross-validation for FDboostLSS} \usage{ \method{cvrisk}{FDboostLSS}(object, folds = cvLong(id = object[[1]]$id, weights = model.weights(object[[1]])), grid = NULL, papp...
/man/cvrisk.FDboostLSS.Rd
no_license
AEBilgrau/FDboost
R
false
true
2,437
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FDboostLSS.R \name{cvrisk.FDboostLSS} \alias{cvrisk.FDboostLSS} \title{Cross-validation for FDboostLSS} \usage{ \method{cvrisk}{FDboostLSS}(object, folds = cvLong(id = object[[1]]$id, weights = model.weights(object[[1]])), grid = NULL, papp...
# 1. summary() ---- # INSTALL AND LOAD PACKAGES ################################ library(datasets) # Load/unload base packages manually # LOAD DATA ################################################ head(iris) # SUMMARY() ################################################ summary(iris$Species) # Categorical va...
/R01_4.R
no_license
benitairmadiani/summer2020
R
false
false
4,401
r
# 1. summary() ---- # INSTALL AND LOAD PACKAGES ################################ library(datasets) # Load/unload base packages manually # LOAD DATA ################################################ head(iris) # SUMMARY() ################################################ summary(iris$Species) # Categorical va...
### Jinliang Yang ### March 31, 2015 ### Run HAPMIX source("lib/hapmixPar.R") ###### run in the linux source("~/Documents/Github/zmSNPtools/Rcodes/setUpslurm.R") run_hapmix <- function(gen=1:10, pwd="largedata/hapmixrun", slurmsh_name="slurm-scripts/run_hapmix.sh"){ outsh <- paste0("cd ", pwd) for(geni in gen)...
/profiling/1.Introgression-redo/1.C.3_hapmix_par.R
no_license
yangjl/N2
R
false
false
2,954
r
### Jinliang Yang ### March 31, 2015 ### Run HAPMIX source("lib/hapmixPar.R") ###### run in the linux source("~/Documents/Github/zmSNPtools/Rcodes/setUpslurm.R") run_hapmix <- function(gen=1:10, pwd="largedata/hapmixrun", slurmsh_name="slurm-scripts/run_hapmix.sh"){ outsh <- paste0("cd ", pwd) for(geni in gen)...
\name{ProjectTemplate-package} \alias{ProjectTemplate-package} \alias{ProjectTemplate} \docType{package} \title{ Automates the creation of new statistical analysis projects. } \description{ ProjectTemplate provides functions to automatically build a directory structure for a new R project. Using this structure, Project...
/man/ProjectTemplate-package.Rd
no_license
rtelmore/ProjectTemplate
R
false
false
857
rd
\name{ProjectTemplate-package} \alias{ProjectTemplate-package} \alias{ProjectTemplate} \docType{package} \title{ Automates the creation of new statistical analysis projects. } \description{ ProjectTemplate provides functions to automatically build a directory structure for a new R project. Using this structure, Project...
\name{make_template} \alias{make_template} \title{Make a template that feeds into JASPAR databases} \usage{ make_template(x, PARAM = NA, TAG = NA, sep = "\t", outFpre = NULL) } \arguments{ \item{x}{matrix, the pfm} \item{PARAM}{a list, the PARAM(s)} \item{TAG}{a list, the TAG(s)} \item{sep}{a string, t...
/man/make_template.Rd
no_license
cran/JASPAR
R
false
false
1,210
rd
\name{make_template} \alias{make_template} \title{Make a template that feeds into JASPAR databases} \usage{ make_template(x, PARAM = NA, TAG = NA, sep = "\t", outFpre = NULL) } \arguments{ \item{x}{matrix, the pfm} \item{PARAM}{a list, the PARAM(s)} \item{TAG}{a list, the TAG(s)} \item{sep}{a string, t...
#load library library(data.table) #url of the data data_url='https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip' #download download.file(data_url,'./UCI HAR Dataset.zip', mode='wb') #unzip unzip("UCI HAR Dataset.zip", exdir=getwd()) #features features <- read.csv('./UCI HAR Data...
/run_analysis.R
no_license
jrgalia/cleaningdata
R
false
false
2,448
r
#load library library(data.table) #url of the data data_url='https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip' #download download.file(data_url,'./UCI HAR Dataset.zip', mode='wb') #unzip unzip("UCI HAR Dataset.zip", exdir=getwd()) #features features <- read.csv('./UCI HAR Data...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/apigateway_operations.R \name{apigateway_get_usage_plan_key} \alias{apigateway_get_usage_plan_key} \title{Gets a usage plan key of a given key identifier} \usage{ apigateway_get_usage_plan_key(usagePlanId, keyId) } \arguments{ \item{usagePlan...
/cran/paws.networking/man/apigateway_get_usage_plan_key.Rd
permissive
paws-r/paws
R
false
true
776
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/apigateway_operations.R \name{apigateway_get_usage_plan_key} \alias{apigateway_get_usage_plan_key} \title{Gets a usage plan key of a given key identifier} \usage{ apigateway_get_usage_plan_key(usagePlanId, keyId) } \arguments{ \item{usagePlan...
set.seed( 40 ) library(mvtnorm) library(fields) library(Rcpp) library(mclust) library(kernlab) library(ConsensusClusterPlus) simu=function(s){ prob_glcm<-function(c,s=s,mc=30000){ mu<-c(2+c,14-c) sigma<-matrix(s*c(1,-0.7,-0.7,1),nrow=2) elip<-rmvnorm(mc,mu,sigma) # par(xaxs='i',yaxs='i') ...
/s=12/simu_40.R
no_license
mguindanigroup/Radiomics-Hierarchical-Rounded-Gaussian-Spatial-Dirichlet-Process
R
false
false
9,293
r
set.seed( 40 ) library(mvtnorm) library(fields) library(Rcpp) library(mclust) library(kernlab) library(ConsensusClusterPlus) simu=function(s){ prob_glcm<-function(c,s=s,mc=30000){ mu<-c(2+c,14-c) sigma<-matrix(s*c(1,-0.7,-0.7,1),nrow=2) elip<-rmvnorm(mc,mu,sigma) # par(xaxs='i',yaxs='i') ...
library(parallel) simRep <- 5000 # Replication times in one simulation pvalue.true <- .05 # Testing type I error b.var <- c(0) # The set of varaince of random covariates b as random slope smooth <- 1 # measurement error is added to M if smooth = 0; no measurement error is added if sooth = 1 cores <- 1 r.sim <- b.var ...
/full simulation/03.13.2018/5000simu/seed3/pca_s_seed3_50_50.R
no_license
wma9/FMRI-project
R
false
false
9,143
r
library(parallel) simRep <- 5000 # Replication times in one simulation pvalue.true <- .05 # Testing type I error b.var <- c(0) # The set of varaince of random covariates b as random slope smooth <- 1 # measurement error is added to M if smooth = 0; no measurement error is added if sooth = 1 cores <- 1 r.sim <- b.var ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/download.R \name{doAPICall} \alias{doAPICall} \title{Perform an API call to the OpenML server.} \usage{ doAPICall( api.call, id = NULL, url.args = list(), post.args = list(), file = NULL, verbosity = NULL, method, ...
/man/doAPICall.Rd
no_license
cran/OpenML
R
false
true
1,593
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/download.R \name{doAPICall} \alias{doAPICall} \title{Perform an API call to the OpenML server.} \usage{ doAPICall( api.call, id = NULL, url.args = list(), post.args = list(), file = NULL, verbosity = NULL, method, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Circle.R \name{CircleOA} \alias{CircleOA} \title{Circle given by its center and a point} \usage{ CircleOA(O, A) } \arguments{ \item{O}{the center of the circle} \item{A}{a point of the circle} } \value{ A \code{Circle} object. } \description...
/man/CircleOA.Rd
no_license
stla/PlaneGeometry
R
false
true
393
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Circle.R \name{CircleOA} \alias{CircleOA} \title{Circle given by its center and a point} \usage{ CircleOA(O, A) } \arguments{ \item{O}{the center of the circle} \item{A}{a point of the circle} } \value{ A \code{Circle} object. } \description...
#load the data pokemon<-read.csv("Pokemon.csv",header=TRUE) attach(pokemon) View(pokemon) #Size of the data nrow(pokemon);ncol(pokemon) #I'm gonna make correlation plot and conduct Random Forest #Let's rename the variables colnames(pokemon) <- c("number", "name", "type1", "type2", "total", "hp", ...
/pokemon.R
no_license
amygko/R-programming
R
false
false
2,165
r
#load the data pokemon<-read.csv("Pokemon.csv",header=TRUE) attach(pokemon) View(pokemon) #Size of the data nrow(pokemon);ncol(pokemon) #I'm gonna make correlation plot and conduct Random Forest #Let's rename the variables colnames(pokemon) <- c("number", "name", "type1", "type2", "total", "hp", ...
##-------------------------------------------------------------------------------------- ## ## Update existing strds with new scenes in .tar.gz format ## Ben DeVries ## 19-02-14, updated 10-11-15 ## ## Usage: ## <from within GRASS session> ## Rscript update_strds_Landsat.R strds /path/to/scene(s)[.tar.gz]...
/Rscript/update_strds_Landsat.R
no_license
bendv/tgrass
R
false
false
3,657
r
##-------------------------------------------------------------------------------------- ## ## Update existing strds with new scenes in .tar.gz format ## Ben DeVries ## 19-02-14, updated 10-11-15 ## ## Usage: ## <from within GRASS session> ## Rscript update_strds_Landsat.R strds /path/to/scene(s)[.tar.gz]...
## Week 3 Assignment for R Programming ## Aim of the assignment is to write functions that can cache the inverse of a matrix to save time- ## consuming computations. ## Creates a special matrix that can cache its inverse - assuming the matrix is always invertible. makeCacheMatrix <- function(x = matrix()) { ...
/cachematrix.R
no_license
od13132/ProgrammingAssignment2
R
false
false
1,131
r
## Week 3 Assignment for R Programming ## Aim of the assignment is to write functions that can cache the inverse of a matrix to save time- ## consuming computations. ## Creates a special matrix that can cache its inverse - assuming the matrix is always invertible. makeCacheMatrix <- function(x = matrix()) { ...
div( wellPanel( h4(portal_txt$parag0_title), p(HTML(portal_txt$patag1_image), HTML(portal_txt$parag0_contents_1)), p(HTML(portal_txt$parag0_contents_2)) ), wellPanel( h4("Guidance for Users"), fluidRow( column(width = 4, h5("For Beginners"), ...
/inst/shiny-squid/source/pages/portal/ui_portal.R
no_license
cran/squid
R
false
false
1,739
r
div( wellPanel( h4(portal_txt$parag0_title), p(HTML(portal_txt$patag1_image), HTML(portal_txt$parag0_contents_1)), p(HTML(portal_txt$parag0_contents_2)) ), wellPanel( h4("Guidance for Users"), fluidRow( column(width = 4, h5("For Beginners"), ...
plot.weathermap <- function(x,y,dataset,filled=FALSE,interval=100) { ## This simple function will plot weather data on a map ## of the world. It will zoom to the particular region ## you desire and plot the weather data there. You can ## only plot a single variable in this version, although ## it is possible to plo...
/plot.weathermap.R
no_license
ChrisZarzar/data_exploration
R
false
false
2,247
r
plot.weathermap <- function(x,y,dataset,filled=FALSE,interval=100) { ## This simple function will plot weather data on a map ## of the world. It will zoom to the particular region ## you desire and plot the weather data there. You can ## only plot a single variable in this version, although ## it is possible to plo...
researchTable <- data.frame(read.table("/home/john/Database.csv", header=TRUE, sep=",")) #групи жени - 1, 2, 3, 4 groupTable <- table(researchTable$group) groupPercentage <- round(prop.table(groupTable)*100, 2) pie(groupTable, labels = groupPercentage, main = "Таргет трупи в %", col = rainbow(n = length(groupTable))...
/script.R
no_license
18ivan18/StatisticsProjectFMI
R
false
false
6,396
r
researchTable <- data.frame(read.table("/home/john/Database.csv", header=TRUE, sep=",")) #групи жени - 1, 2, 3, 4 groupTable <- table(researchTable$group) groupPercentage <- round(prop.table(groupTable)*100, 2) pie(groupTable, labels = groupPercentage, main = "Таргет трупи в %", col = rainbow(n = length(groupTable))...
load_packages = function() { suppressPackageStartupMessages(library(drake)) suppressPackageStartupMessages(library(rgdal)) suppressPackageStartupMessages(library(hsdar)) suppressPackageStartupMessages(library(dplyr)) suppressPackageStartupMessages(library(sf)) suppressPackageStartupMessages(library(purrr)) ...
/code/99-packages.R
permissive
cgpu/2019-feature-selection
R
false
false
1,925
r
load_packages = function() { suppressPackageStartupMessages(library(drake)) suppressPackageStartupMessages(library(rgdal)) suppressPackageStartupMessages(library(hsdar)) suppressPackageStartupMessages(library(dplyr)) suppressPackageStartupMessages(library(sf)) suppressPackageStartupMessages(library(purrr)) ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MetaNeighbor.R \name{MetaNeighbor} \alias{MetaNeighbor} \title{Runs MetaNeighbor} \usage{ MetaNeighbor( dat, i = 1, experiment_labels, celltype_labels, genesets, bplot = TRUE, fast_version = FALSE, node_degree_normalization = ...
/man/MetaNeighbor.Rd
permissive
bharris12/MetaNeighbor
R
false
true
2,633
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/MetaNeighbor.R \name{MetaNeighbor} \alias{MetaNeighbor} \title{Runs MetaNeighbor} \usage{ MetaNeighbor( dat, i = 1, experiment_labels, celltype_labels, genesets, bplot = TRUE, fast_version = FALSE, node_degree_normalization = ...
#' Ribbons and area plots. #' #' For each continuous x value, \code{geom_interval} displays a y interval. #' \code{geom_area} is a special case of \code{geom_ribbon}, where the #' minimum of the range is fixed to 0. #' #' An area plot is the continuous analog of a stacked bar chart (see #' \code{\link{geom_bar}}), and ...
/R/geom-ribbon-.r
no_license
bbolker/ggplot2
R
false
false
4,180
r
#' Ribbons and area plots. #' #' For each continuous x value, \code{geom_interval} displays a y interval. #' \code{geom_area} is a special case of \code{geom_ribbon}, where the #' minimum of the range is fixed to 0. #' #' An area plot is the continuous analog of a stacked bar chart (see #' \code{\link{geom_bar}}), and ...
dlaplacelike2 <- function(par,x) { p <- par[1] q <- par[2] sum(-log(ddlaplace2(x,p,q))) }
/DiscreteLaplace/R/dlaplacelike2.R
no_license
ingted/R-Examples
R
false
false
97
r
dlaplacelike2 <- function(par,x) { p <- par[1] q <- par[2] sum(-log(ddlaplace2(x,p,q))) }
/Source/sitelevel_humboldt.R
no_license
callum-lawson/Butterflies
R
false
false
39,579
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/single_markers_statistics.R \name{single_markers_statistics} \alias{single_markers_statistics} \title{Provide statistics for each marker.} \usage{ single_markers_statistics(data_long) } \arguments{ \item{data_long}{a data.frame in long format...
/man/single_markers_statistics.Rd
permissive
minghao2016/combiroc
R
false
true
1,206
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/single_markers_statistics.R \name{single_markers_statistics} \alias{single_markers_statistics} \title{Provide statistics for each marker.} \usage{ single_markers_statistics(data_long) } \arguments{ \item{data_long}{a data.frame in long format...
#This script will be used to run the F-test between the variables for zip codes with and without cases #Rather than use HW 7, I am going to do this using the built in var.test() function because it is simpler and provides #more organized output compared to the output we produced in class. #Now I will test whethe...
/z_gisResearchApps_FtestV2.R
no_license
ChrisZarzar/gis_research_apps_class
R
false
false
2,661
r
#This script will be used to run the F-test between the variables for zip codes with and without cases #Rather than use HW 7, I am going to do this using the built in var.test() function because it is simpler and provides #more organized output compared to the output we produced in class. #Now I will test whethe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/F_respFunScoreMat.R \name{respFunScoreMat} \alias{respFunScoreMat} \title{Derivative of the Lagrangian of the parametric response function} \usage{ respFunScoreMat( betas, X, reg, thetaMat, muMarg, psi, p, v, allowMissingnes...
/man/respFunScoreMat.Rd
no_license
CenterForStatistics-UGent/RCM
R
false
true
1,336
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/F_respFunScoreMat.R \name{respFunScoreMat} \alias{respFunScoreMat} \title{Derivative of the Lagrangian of the parametric response function} \usage{ respFunScoreMat( betas, X, reg, thetaMat, muMarg, psi, p, v, allowMissingnes...
context("test_soft.threshold") test_that("soft.threshold works", { x <- rnorm(10) out <- soft.threshold(x, 0.5) expect_equal(out, c(0, 0, 0, 0, 0, 0, 0, 1.34653177497057e-10, 0, 0)) })
/tests/testthat/test-soft.threshold.R
no_license
jimhester/RGCCA
R
false
false
192
r
context("test_soft.threshold") test_that("soft.threshold works", { x <- rnorm(10) out <- soft.threshold(x, 0.5) expect_equal(out, c(0, 0, 0, 0, 0, 0, 0, 1.34653177497057e-10, 0, 0)) })
#' Transform values of a vector #' #' @author Bruno Vilela #' #' @description Transform each element of a vector. #' #' @usage lets.transf(x, y, z, NUMERIC=TRUE) #' #' @param x A vector to be transformed. #' @param y levels to be transformed. #' @param z The value to be atributed to each level (same order as y). #'...
/R/lets_transf.R
no_license
SaraVarela/letsR-1
R
false
false
1,085
r
#' Transform values of a vector #' #' @author Bruno Vilela #' #' @description Transform each element of a vector. #' #' @usage lets.transf(x, y, z, NUMERIC=TRUE) #' #' @param x A vector to be transformed. #' @param y levels to be transformed. #' @param z The value to be atributed to each level (same order as y). #'...
library(tidyverse) library(Lahman) data("Batting") Batting %>% group_by(playerID) %>% summarise(HR = sum(HR)) %>% arrange(-HR) %>% head(10)
/quiz.R
no_license
chanyoung2da/data_analysis
R
false
false
155
r
library(tidyverse) library(Lahman) data("Batting") Batting %>% group_by(playerID) %>% summarise(HR = sum(HR)) %>% arrange(-HR) %>% head(10)
summary.meta <- function(object, comb.fixed=object$comb.fixed, comb.random=object$comb.random, prediction=object$prediction, backtransf=object$backtransf, bylab=object$bylab, ...
/meta/R/summary.meta.R
no_license
ingted/R-Examples
R
false
false
7,767
r
summary.meta <- function(object, comb.fixed=object$comb.fixed, comb.random=object$comb.random, prediction=object$prediction, backtransf=object$backtransf, bylab=object$bylab, ...
library(parallel) library(XML) #' @export VPC_XAXIS_T=1 #' @export VPC_XAXIS_TAD=2 #' @export VPC_XAXIS_PRED=3 #' @export VPC_XAXIS_OTHER=4 #' @export XAxisNames=c("t","TAD","PRED","Other") #' @export VPC_BIN_NONE=1 #' @export VPC_BIN_KMEANS=2 #' @export VPC_BIN_EXP_CENTERS=3 #' @export VPC_BIN_EXP_BOUNDARIES=4 #...
/Certara.NLME8/R/vpc.r
no_license
phxnlmedev/rpackages
R
false
false
17,088
r
library(parallel) library(XML) #' @export VPC_XAXIS_T=1 #' @export VPC_XAXIS_TAD=2 #' @export VPC_XAXIS_PRED=3 #' @export VPC_XAXIS_OTHER=4 #' @export XAxisNames=c("t","TAD","PRED","Other") #' @export VPC_BIN_NONE=1 #' @export VPC_BIN_KMEANS=2 #' @export VPC_BIN_EXP_CENTERS=3 #' @export VPC_BIN_EXP_BOUNDARIES=4 #...
make_frassp_conc_treatment_abs_effect_statistics <- function(inDF, var.col, return.outcome) { ### Pass in covariate values (assuming 1 value for each ring) cov2 <- lai_variable[lai_variable$Date<="2...
/modules/p_concentration_variables/frass_p_production/make_frasp_conc_treatment_abs_effect_statistics.R
no_license
mingkaijiang/EucFACE_modeling_2020_site_parameters
R
false
false
2,641
r
make_frassp_conc_treatment_abs_effect_statistics <- function(inDF, var.col, return.outcome) { ### Pass in covariate values (assuming 1 value for each ring) cov2 <- lai_variable[lai_variable$Date<="2...
library(rlist) ## This file requires an output list from many_holidays_filter_data.R. It calculates statistics for each Holiday and for each LIBOR rate. It creates a matrix called value_table. holidays <- filtered_LIBOR ## This should be your result from many_holidays_filter_data.R rates <- list("ON", "X1W...
/Libor_Rates/Linear_Model_Check_sp/finish.R
no_license
anthonynguyen2021/LiborRatesIMAProject
R
false
false
1,912
r
library(rlist) ## This file requires an output list from many_holidays_filter_data.R. It calculates statistics for each Holiday and for each LIBOR rate. It creates a matrix called value_table. holidays <- filtered_LIBOR ## This should be your result from many_holidays_filter_data.R rates <- list("ON", "X1W...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/h5delete.R \name{h5_deleteAttribute} \alias{h5_deleteAttribute} \alias{h5deleteAttribute} \title{Delete attribute} \usage{ h5deleteAttribute(file, name, attribute) } \arguments{ \item{file}{The filename (character) of the file in which the ob...
/man/h5_deleteAttribute.Rd
no_license
grimbough/rhdf5
R
false
true
580
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/h5delete.R \name{h5_deleteAttribute} \alias{h5_deleteAttribute} \alias{h5deleteAttribute} \title{Delete attribute} \usage{ h5deleteAttribute(file, name, attribute) } \arguments{ \item{file}{The filename (character) of the file in which the ob...
ensure_version <- function(pkg, ver = "0.0") { if (system.file(package = pkg) == "" || packageVersion(pkg) < ver) install.packages(pkg) } ensure_version("shiny", "1.2.0") ensure_version("ggplot2", "3.1.0") ensure_version("readxl", "1.2.0") library('shiny') library('ggplot2') library('readxl') # Define UI for...
/004-Ojivas/app.R
no_license
synergyvision/pe-apps
R
false
false
25,339
r
ensure_version <- function(pkg, ver = "0.0") { if (system.file(package = pkg) == "" || packageVersion(pkg) < ver) install.packages(pkg) } ensure_version("shiny", "1.2.0") ensure_version("ggplot2", "3.1.0") ensure_version("readxl", "1.2.0") library('shiny') library('ggplot2') library('readxl') # Define UI for...
library(tidyverse) library(completejourney) library(lubridate) ###Question 1 ggplot(data = transactions) + geom_histogram(mapping = aes(x = quantity)) #Only one bar that goes all the way up the entire plot ggplot(data = transactions %>% filter(quantity <= 10)) + geom_histogram(mapping = aes(x =quantity)) ...
/submissions/02_cj-data-visualization-bgc5kq.R
no_license
GCOM7140/r4ds-exercises
R
false
false
1,685
r
library(tidyverse) library(completejourney) library(lubridate) ###Question 1 ggplot(data = transactions) + geom_histogram(mapping = aes(x = quantity)) #Only one bar that goes all the way up the entire plot ggplot(data = transactions %>% filter(quantity <= 10)) + geom_histogram(mapping = aes(x =quantity)) ...
library(parallel) library(pracma) library(Rcpp) sourceCpp("approximation/count_distances_exdiag.cpp") mcc <- 4 count_acc <- function(counts, m = 1:length(counts)) { K <- length(counts) nbads <- counts + 1 p_i <- 1 - nbads/K rowMeans(dhyper(zeros(length(m), length(p_i)), repmat(nbads, length(...
/approximation/gaussian_identity_finsam2.R
no_license
snarles/fmri
R
false
false
1,346
r
library(parallel) library(pracma) library(Rcpp) sourceCpp("approximation/count_distances_exdiag.cpp") mcc <- 4 count_acc <- function(counts, m = 1:length(counts)) { K <- length(counts) nbads <- counts + 1 p_i <- 1 - nbads/K rowMeans(dhyper(zeros(length(m), length(p_i)), repmat(nbads, length(...
read.csv("E:/houses.csv")->houses str(houses) summary(houses) # Data Cleaning library(dplyr) houses %>% select(c(-1, -2))->houses houses $air_cond<-factor(houses$air_cond, labels = c("No", "Yes")) houses $construction<-factor(houses$construction, labels = c("No", "Yes")) houses $waterfront<-factor(houses$wate...
/RDataMining.r
no_license
priyankkumar218/MISC
R
false
false
1,881
r
read.csv("E:/houses.csv")->houses str(houses) summary(houses) # Data Cleaning library(dplyr) houses %>% select(c(-1, -2))->houses houses $air_cond<-factor(houses$air_cond, labels = c("No", "Yes")) houses $construction<-factor(houses$construction, labels = c("No", "Yes")) houses $waterfront<-factor(houses$wate...
context("Tidy functions") test_that("ordinary function calls are made as usual", { f <- function(x, y = x, ..., z = "z") list(x, y, z, ...) f_tidy <- tidy(f) expect_identical(f_tidy(1), f(1)) expect_identical(f_tidy(1, 2), f(1, 2)) expect_identical(f_tidy(1, 2, 3), f(1, 2, 3)) expect_identical(f_tidy(1, z...
/tests/testthat/test-tidy.R
permissive
egnha/nofrills
R
false
false
2,220
r
context("Tidy functions") test_that("ordinary function calls are made as usual", { f <- function(x, y = x, ..., z = "z") list(x, y, z, ...) f_tidy <- tidy(f) expect_identical(f_tidy(1), f(1)) expect_identical(f_tidy(1, 2), f(1, 2)) expect_identical(f_tidy(1, 2, 3), f(1, 2, 3)) expect_identical(f_tidy(1, z...
#setwd(as.character("C:/Users/miffka/Documents/!DataMining/RAnalysis")) setwd("/media/glycosylase/EC6A2F256A2EEBD0/Documents and Settings/miffka/Documents/!DataMining/RBasics") library(dplyr) # Датафреймы!!! # двумерная таблица с данными # стандартный способ хранения данных в формате наблюдения/переменные # строки - н...
/202_dataframes.R
no_license
Miffka/RBasics
R
false
false
10,222
r
#setwd(as.character("C:/Users/miffka/Documents/!DataMining/RAnalysis")) setwd("/media/glycosylase/EC6A2F256A2EEBD0/Documents and Settings/miffka/Documents/!DataMining/RBasics") library(dplyr) # Датафреймы!!! # двумерная таблица с данными # стандартный способ хранения данных в формате наблюдения/переменные # строки - н...
############################# # < Ziwei Meng > # STAT W4240 # Homework <HW 06> , Problem <Problem 6> # < Wednesday, December 9 > ############################# #set work path setwd("D:/Rworkspace") #clear workspace rm(list=ls()) ##################### X = matrix(c(1,1,0,5,6,4,4,3,4,1,2,0),6,2) plot(X[,1],X[,2],pch=4) ...
/hw06_q6.R
no_license
ZiweiMeng/W4240_DataMining
R
false
false
1,385
r
############################# # < Ziwei Meng > # STAT W4240 # Homework <HW 06> , Problem <Problem 6> # < Wednesday, December 9 > ############################# #set work path setwd("D:/Rworkspace") #clear workspace rm(list=ls()) ##################### X = matrix(c(1,1,0,5,6,4,4,3,4,1,2,0),6,2) plot(X[,1],X[,2],pch=4) ...