search for: file_path_sans_ext

Displaying 9 results from an estimated 9 matches for "file_path_sans_ext".

2012 Jul 24
1
Acceso a la opcion demo()
...base'': as.Date, as.Date.numeric Loading required package: sandwich Loading required package: strucchange Loading required package: survival Loading required package: splines > library("AER") > demo(Ch-Basics, package="AER", ask=TRUE) Aviso en topic == tools::file_path_sans_ext(files) : longitud de objeto mayor no es mĂșltiplo de la longitud de uno menor Error en demo(Ch - Basics, package = "AER", ask = TRUE) : c("No demo found for topic ''-''", "No demo found for topic ''Ch''", "No demo found for topic...
2017 Aug 29
1
BUG: HMTL-based help.search() on vignettes may generate error (with PATCH)
....R (working copy) @@ -43,7 +43,7 @@ base[, "LibPath"] <- path id <- as.character(1:nrow(vDB) + NROW(hDB[[1L]])) base[, "ID"] <- id - base[, "Name"] <- sub("\\.[^.]*$", "", basename(vDB$File)) + base[, "Name"] <- tools::file_path_sans_ext(basename(vDB$PDF)) base[, "Topic"] <- base[, "Name"] base[, "Title"] <- vDB$Title base[, "Type"] <- "vignette" I have verified that the above patch solves the problem. I thought it is ok to use tools::file_path_sans_ext() since othe...
2019 Feb 14
1
Proposed function file.backup
...se, keep old copy. ##' @param verbose If TRUE, list the files in the output directory ##' @author Shadi Pirhosseinloo <shadi@@ku.edu> Paul Johnson <pauljohn@@ ku.edu> ##' @return The name of the newly created file. ##' @importFrom tools file_ext ##' @importFrom tools file_path_sans_ext ##' @export ##' @examples ##' tdir <- tempdir() ##' owd <- getwd() ##' ##' setwd(tdir) ##' system("touch test.1.txt") ##' system("touch test.2.txt") ##' system("touch test.3.txt") ##' system("touch test.4.txt") ##...
2023 Jul 05
1
textual analysis - transforming several pdf to txt - naming the files
...pattern = "Consoli.*\\.pdf$", full.names = TRUE) files <- chartr("\\", "/", files) x <- lapply(files, function(x){ pdftools::pdf_text(x) %>% paste0(collapse = " ") %>% stringr::str_squish() }) new_names <- tools::file_path_sans_ext(files) new_names <- paste(new_names, "txt", sep = ".") setNames(x, new_names) } # apply function # note that my test files are in "~/Temp" txts <- convertpdf2txt(here::here("~", "Temp")) names(txts) Thank you very much, but the follow...
2008 Feb 27
1
Bug in help(). (PR#10859)
...pops up to permit one to select the package to be referred to. However if one does help(gam,offline=TRUE) then the message about multiple packages appears, immediately followed by Error in titles[i] <- if (inherits(tmp, "try-error")) "unknown title" else tmp[tools::file_path_sans_ext(tmp$File) == : nothing to replace with (and no chooser-menu window pops up). Session info: R version 2.6.2 (2008-02-08) i386-apple-darwin8.10.1 locale: C attached base packages: [1] splines stats graphics grDevices utils datasets methods [8] base other attached packages: [1] m...
2023 Jul 05
1
textual analysis - transforming several pdf to txt - naming the files
I am taking my first steps in textual analysis with R. I have pdf files consisting of company reports for several years (1 file corresponds to 1 company and 1 year). My idea is to start by transforming all my pdf files into txt files for further treatment and analysis (this will allow me to group the files by company or by year, depending on the future analysis to be performed). I do not have
2020 Oct 21
1
how do I remove entries in data frame from a vector
Hello, To remove the file extension it's much easier to use base R filename <- tools::file_path_sans_ext(basename(celFiles)) Hope this helps, Rui Barradas ?s 22:41 de 21/10/20, Rui Barradas escreveu: > Hello, > > This is probably because basename keeps the file extension, try instead > > > filename <- sub("(^[^\\.]*)\\..+$", "\\1", basename(celFiles)) &g...
2020 Oct 21
0
how do I remove entries in data frame from a vector
Hello, This is probably because basename keeps the file extension, try instead filename <- sub("(^[^\\.]*)\\..+$", "\\1", basename(celFiles)) celFiles[!filename %in% as.character(remove$V1)] Hope this helps, Rui Barradas ?s 22:15 de 21/10/20, Ana Marija escreveu: > Hello, > > I have a data frame with one column: > >> remove > >
2020 Oct 21
4
how do I remove entries in data frame from a vector
Hello, I have a data frame with one column: > remove V1 1 ABAFT_g_4RWG569_BI_SNP_A10_35096 2 ABAFT_g_4RWG569_BI_SNP_B12_35130 3 ABAFT_g_4RWG569_BI_SNP_E09_35088 4 ABAFT_g_4RWG569_BI_SNP_E12_35136 5 ABAFT_g_4RWG569_BI_SNP_F11_35122 6 ABAFT_g_4RWG569_BI_SNP_F12_35138 7 ABAFT_g_4RWG569_BI_SNP_G07_35060 8 ABAFT_g_4RWG569_BI_SNP_G12_35140 I want to remove these 8