search for: new_names

Displaying 20 results from an estimated 69 matches for "new_names".

Did you mean: new_name
2019 Feb 14
1
Proposed function file.backup
Dear R Core: In the kutils package, I wrote a function that is so handy that I would like to ask you put it in R itself. file.backup() will look at a file, find its last modification time, and create a new backup with a name that appends YYYYMMDD-HHMM to the file name. So now, whenever I worry that running write.csv or saving a graph might destroy something valuable, I use an idiom like fn
2015 Oct 20
1
[PATCH v3 01/13] v2v: factor out opening input VM
Opening the source VM and amending the properties in its internal representation in accordance with command-line options fit nicely into two isolated functions. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> --- v2v/v2v.ml | 124 ++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 65 insertions(+), 59 deletions(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index
2023 Jul 05
1
textual analysis - transforming several pdf to txt - naming the files
...;- list.files(dirpath, 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) Tha...
2015 Aug 11
0
[PATCH v2 02/17] v2v: factor out opening input VM
Opening the source VM and amending the properties in its internal representation in accordance with command-line options fit nicely into two isolated functions. Signed-off-by: Roman Kagan <rkagan@virtuozzo.com> --- v2v/v2v.ml | 71 +++++++++++++++++++++++++++++++++----------------------------- 1 file changed, 38 insertions(+), 33 deletions(-) diff --git a/v2v/v2v.ml b/v2v/v2v.ml index
2008 Mar 06
1
dictionary lookup
...; dict$V2, but some values may be undefined (NA). I suppose this is a very basic task, but I tried in vain to make it more efficient than below. In particular I would like to avoid the explicit (and slow) loop Any help is very much welcome. Thank you, TM ============================================ new_names = old_names m = match(old_names, dict$V3) N = length(old_names) for (i in 1:N) { if (is.na(m[i])) { next ; } nn = as.vector(dict$V2)[m[i]]; if (nn == "" ) { next; } new_names[i] = nn }
2011 Nov 17
2
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
Nick, Thanks for this info, though this didn't help my problem at all. On Wed, Nov 16, 2011 at 7:21 PM, Nick Lewycky <nicholas at mxc.ca> wrote: > Never create a Twine as a local variable. > > V->setName(Twine("new_name")); > > should work fine, however. Note that Twine itself has an implicit > constructor from const char *, so this code: > >
2011 Nov 17
2
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
Basically I have two separate passes (first is a loop pass) which are two different files and two different opts but I need to keep the data consistent (ie, I want the changes to show up the resulting .bc output file from the first (loop) pass so the second pass can use these new names. Currently, when I print out "BB->getName().str()" after the code below, I get the correct renaming
2011 Nov 17
0
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
Never create a Twine as a local variable. V->setName(Twine("new_name")); should work fine, however. Note that Twine itself has an implicit constructor from const char *, so this code: V->setName("new_name"); should also work fine. Nick Ryan Taylor wrote: > Basically I have two separate passes (first is a loop pass) which are > two different files and
2011 Nov 17
0
[LLVMdev] Fwd: Problem getting LoopInfo inside non-LoopPass
So is this simply not possible? On Thu, Nov 17, 2011 at 10:31 AM, Ryan Taylor <ryta1203 at gmail.com> wrote: > Nick, > > Thanks for this info, though this didn't help my problem at all. > > > On Wed, Nov 16, 2011 at 7:21 PM, Nick Lewycky <nicholas at mxc.ca> wrote: > >> Never create a Twine as a local variable. >> >>
2024 Apr 11
1
[External] Re: Repeated library() of one package with different include.only= entries
...ace() with a new include.only specification. This is the "quite hard to accomplish" I alluded to, admittedly I hadn't forced myself to write it all out -- maybe it's not as bad as all that. After some iterations, today I think we'd want to do... modify_attach = function(pkg, new_names) { if (!startsWith(pkg, "package:")) pkg <- paste0("package:", pkg) old <- tryCatch(ls(pkg, all.names=TRUE), error=\(c) character()) if (length(old)) detach(pkg) attachNamespace(.rmpkg(pkg), include.only=c(new_names, old)) } Perhaps detach() could invisibly return...
2016 Apr 11
0
[PATCH] v2v: Reject duplicate -b/-n parameters on the command line (RHBZ#1325825).
--- v2v/Makefile.am | 3 +- v2v/cmdline.ml | 31 ++++++++++++++------ v2v/cmdline.mli | 16 ++++++++++- v2v/test-v2v-bad-networks-and-bridges.sh | 49 ++++++++++++++++++++++++++++++++ v2v/v2v.ml | 4 +-- 5 files changed, 91 insertions(+), 12 deletions(-) create mode 100755
2024 Apr 15
1
[External] Re: Repeated library() of one package with different include.only= entries
...ion. > This is the "quite hard to accomplish" I alluded to, admittedly I hadn't > forced myself to write it all out -- maybe it's not as bad as all that. > After some iterations, today I think we'd want to do... > modify_attach <- function(pkg, new_names) { > if (!startsWith(pkg, "package:")) pkg <- paste0("package:", pkg) > old <- tryCatch(ls(pkg, all.names=TRUE), error=\(c) character()) > if (length(old)) detach(pkg) > attachNamespace(.rmpkg(pkg), include.only=c(new_names, old)) &g...
2020 Aug 25
2
Re: [RFC nbdkit PATCH] protocol: Alter .list_exports, add .default_export
On Tue, Aug 25, 2020 at 06:16:17AM -0500, Eric Blake wrote: > On 8/25/20 5:00 AM, Richard W.M. Jones wrote: > > >>>+=head2 C<.default_export> > >>>+ > >>>+ const char *default_export (int readonly, int is_tls); > >> > >>Oh fun. For some plugins (like ondemand), this is trivial: return a > >>compile-time constant string.
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
2023 Jan 30
2
[PATCH libnbd v2 3/4] generator: Add APIs to get/set the socket activation socket name
To allow us to name the socket passed down to the NBD server when calling nbd_connect_systemd_socket_activation(3), we need to add the field to the handle and add access functions. --- generator/API.ml | 49 ++++++++++++++++++++++++++++++++++++++++++ lib/handle.c | 56 ++++++++++++++++++++++++++++++++++++++++++++++++ lib/internal.h | 1 + 3 files changed, 106 insertions(+) diff --git
2012 Nov 02
10
[PATCH 0/9] elflink fixes
From: Matt Fleming <matt.fleming at intel.com> Here are the patches that I've got queued up based on the very helpful feedback I received from people testing Syslinux 5.00-pre9. Unless anyone has any concerns these will make it into Syslinux 5.00-pre10. Matt Fleming (9): pxe: Don't call open_config() from the pxe core ldlinux: Print a warning if no config file is found
2012 May 15
2
Renaming names in R matrix
....7574657 0.2104075 0.02922241 0.002705617 foo 0.0000000 0.0000000 0.00000000 0.000000000 foo 0.0000000 0.0000000 0.00000000 0.000000000 foo 0.0000000 0.0000000 0.00000000 0.000000000 foo 0.0000000 0.0000000 0.00000000 0.000000000 foo 0.0000000 0.0000000 0.00000000 0.000000000 and given this: > new_names <- c("k0","k1","k2,"k3","k4","k5"); How can I get this? [,1] [,2] [,3] [,4] k0 0.7574657 0.2104075 0.02922241 0.002705617 k1 0.0000000 0.0000000 0.00000000 0.000000000 k2 0.0000000 0.0000000 0.0000...
2006 Aug 15
5
Hard time understanding the differences between "def self.foo" and "def foo"
Hi guys, I''m having a little trouble understanding the differences and knowing when to use "def foo" and "def self.foo" in my models. I don''t quite understand them and was hoping someone could explain or give me examples on how to use the "self." properly. For example, I had "def foo" in my model "Account" and in one of
2007 Jun 17
2
Branch 'as' - libswfdec/swfdec_as_interpret.c
libswfdec/swfdec_as_interpret.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-) New commits: diff-tree 38fbc1389267e593b44041018cbb1750bdcce0fb (from aaca94203d8a0ccb8feb32c0d57df3401fca0350) Author: Benjamin Otte <otte at gnome.org> Date: Sun Jun 17 14:19:45 2007 +0200 actually convert the values to a string when comparing strings diff --git
2020 Aug 25
0
Re: [RFC nbdkit PATCH] protocol: Alter .list_exports, add .default_export
On 8/25/20 7:21 AM, Richard W.M. Jones wrote: > On Tue, Aug 25, 2020 at 06:16:17AM -0500, Eric Blake wrote: >> On 8/25/20 5:00 AM, Richard W.M. Jones wrote: >> >>>>> +=head2 C<.default_export> >>>>> + >>>>> + const char *default_export (int readonly, int is_tls); >>>> >>>> Oh fun. For some plugins (like