similar to: how to automatically create objects with names from a string list?

Displaying 20 results from an estimated 30000 matches similar to: "how to automatically create objects with names from a string list?"

2010 Nov 26
2
get list index
Hi R-users, I have a list mylist <- list(c(0.79, 0.92, 0.91, 0.86, 0.96, 0.96, 0.95, 0.94, 0.99), c(0.28, 0.45, 0.59, 0.69, 0.80, 0.87, 0.95, 0.94, 0.98), c(0.29, 0.39, 0.59, 0.69, 0.68, 0.80, 0.93, 0.95, 0.98)) Is there a way to find the index of the list element that contains the lowest value among all the other elements? As the lowest value in each element is the first, the
2018 Mar 16
3
cat(fill=N)
Hi all, I expect I'm getting something wrong, but cat("foo bar baz foo bar baz foo bar baz", fill = 10) should be broken into lines of width 10, whereas I get: > cat("foo bar baz foo bar baz foo bar baz", fill = 10) foo bar baz foo bar baz foo bar baz This is on R 3.4.3, but I don't see mentions of it fixed in 3.4.4 or r-devel NEWS. Cheers, David
2014 Jun 02
3
[LLVMdev] -fvisibility=hidden, and typeinfo, and type-erasure
[Was initially posted on cfe-users, sorry.] Hi, I'm sorry my message is quite long, the TL;DR version is "g++ and clang++ seem to have different opinions on how RTTI, templates, and ELF visibility should interact". I can't tell whether this is a bug or not: I have found no relevant documentation that could help me decide whether this behavior is meant, or not. All I can say
2008 Mar 20
3
create matrix
Hi all, I have a dataset consisting of 5 columns and over 5000 rows. Each row gives information about an individual animal, including longevity, i.e. at what age an animal died. For the model I use I need to create n rows for each animal, n being its longevity, and a new column 'survival' with a binary 0/1 outcome. When an animal died e.g. at age 5, there have to be 5 rows of identical
2010 May 28
3
how to create automatically names for vectors in a loop?
Hi, I want to generate a number of vectors and store them with different names, like this: x=1 while (x<100) { vector#x# = rnorm(100) x=x+1 } where each vector has, at its hand, instead of #x# a number which goes from 1 to 99. How can I do this? Thanks Gabriele Zoppoli, MD Ph.D. Fellow, Experimental and Clinical Oncology and Hematology, University of Genova, Genova, Italy Guest
2007 Dec 24
2
Build a cmdline for exec from optional parameters
How can I do this?: foo { name: $bar => "frob" } define foo( $bar = false, $baz = false ) { if #$bar and $baz both defined $cmd = "frobnicate --bar=$bar --baz=$baz ${name}" else if #$bar defined $cmd = "frobnicate --bar=$bar ${name}" else if #$baz defined $cmd = "frobnicate --baz=$baz ${name}" else
2009 Jul 26
1
Need help of exclusion options in rsync-3.0.6
Hi, I have a situation where I want to delete some of my excluded patterns but still want to preserve some other. For example consider below source and destination directory hierarchy. Source Dest ---------- --------- /foo/bar/ /foo/bar/ | -> baz | -> baz | -> xyz | -> xyz | ->
2006 May 02
2
Bug: invalid nesting of inline markup across link labels
Hi John, there?s a bug in Markdown.pl: [foo*bar](#) [baz*quux](#) This expands to the following: <p><a href="#">foo<em>bar</a> <a href="#">baz</em>quux</a></p> Those `*` should either be disregarded or the tags should nest correctly: 1. <p><a href="#">foo*bar</a> <a
2006 Sep 11
2
unexpected behaviour when defining a function
Hi, I know S manuals used to warn against using the same names for a variable and a function, but I have never seen that cause problems in R, so I usually don't pay much attention to it. Which is why the following behaviour came as a surprise: > bar <- function() 1 > foo <- function(bar = bar()) { + bar + } > foo(9) [1] 9 > foo() Error in foo() : recursive default
2009 May 02
1
The --relative option on remote machine to source machine ???
Hi, I read below lines in rsync v3.0.5 for --relative option. if you used this command: rsync -av /foo/bar/baz.c remote:/tmp/ ... this would create a file named baz.c in /tmp/ on the remote machine. If instead you used rsync -avR /foo/bar/baz.c remote:/tmp/ then a file named /tmp/foo/bar/baz.c would be created on the remote machine, preserving its full path It is also possible to limit the
2003 Sep 25
1
tkinsert (PR#4289)
In R-1.7.1, I used to be able to append a character vector to a 'tklistbox' with e.g. listio <- tklistbox( tktoplevel(), font='Courier', height=20, width=20, setgrid=TRUE) tkinsert( listio, 'end', letters[1:3]) tkpack( listio,side='left', expand=TRUE, fill='both') and three items would be added to 'listio'. This doesn't work in R-devel-- it
2007 May 23
2
Markdown generates invalid html for a list immediately followed by a quote
Howdy, [Please preserve the CC to 424919-forwarded at bugs.debian.org on any replies.] The following bug in Markdown was reported to the Debian bug tracking system. In short, running both the released version of Markdown and the latest beta on * foo > bar > baz produces invalid HTML. ----- Forwarded message from Joey Hess <joeyh at debian.org> ----- From: Joey Hess <joeyh
2014 Aug 26
2
[LLVMdev] llvm-objdump
Hi Kev, I'm glad to hear llvm-objdump is getting attention. I'm unclear on how much output specialization one could (or should) do for ELF vs. Mach-O. If you're game, let's compare an example: $ cat labeltest.s .text foo: nop bar: bum: nop jmp bar jmp bum jmp baz nop baz: nop Assembling for x86 and llvm-objdump'ing, i get $ llvm-mc
2000 Dec 15
1
Preserving argument splitting with SSH
I'm using: % ssh -V SSH Version OpenSSH-1.2.3, protocol version 1.5. Compiled with SSL. % uname -a Linux gellar 2.2.13 #1 SMP Wed Dec 29 14:07:41 PST 1999 i686 unknown and am wondering whether it's a fundamental shortcoming of the SSH protocol that argument splitting is not preserved from client to server, but instead the argument list is re-split on whitespace. E.g., from my machine
2012 Oct 13
1
[LLVMdev] Accessing merged globals through PointerType
Hi, I am trying to create a pass that is similar to the GlobalMerge code found here: http://llvm.org/docs/doxygen/html/GlobalMerge_8cpp_source.html I am concerned with lines 149-163 of the above file. From the documentation at the top of the file, it will convert this: static int foo[N], bar[N], baz[N]; for (i = 0; i < N; ++i) { foo[i] = bar[i] * baz[i]; } Into something like this
2013 Jan 08
0
[LLVMdev] LTO "bug" and Clang warnings
Hi Renato, On 08/01/13 17:16, Renato Golin wrote: > After looking at the Livermore for a while, we found the issue that was causing > LTO to produce a different result. > > Consider the code below [1]. setup() doesn't touch bar/baz, main() doesn't > reference foo. LTO finds, correctly, I don't think this is correct. At the LLVM IR level it is valid to write into bar
2007 Nov 08
3
Downloading a file into a directory that does not exist
Hello again, all: When downloading a file from the puppetmaster''s fileserver, like so: ==========SNIP========== define install_file ($mode = 0644, $owner = ''root'', $group = ''root'') { file { "${name}": source => [ "puppet://${puppetserver}/dist/files/${name}_${operatingsystem}",
2006 May 04
3
SQL like manipulations on data frames
Is there a cheat-sheet anywhere that describes how to do SQL-like manipulations on a data frame? My knowledge of R is rather limited. But from my experience it seems as though one can think of data frames as being similar to tables in a database: there are rows, columns, and values. Also, one can perform similar manipulations on a data frame as one can on a table. For example:
2013 Jan 08
1
[LLVMdev] LTO "bug" and Clang warnings
Hi Duncan, Ok, I found that even if main() does reference foo, setup() still gets chopped off and the results is the unexpected: Foo: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 Bar: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Baz: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 So, while there is the issue in LTO, I still think Clang could give a warning. This is a source of buffer overflow
2009 Sep 16
1
list of symbols to substitution
Hi, I'm trying to use a list of symbols as one of the values to be substituted in a substitute expression, but I can't figure out how to write the correct expression for my problem. Let me illustrate a simple example of what I'm trying to do. The following code snippet will evaluate to '5': symname <- 'foo' foo <- 5 expr <- substitute(c(expr), list(expr =