similar to: for loop problem

Displaying 20 results from an estimated 8000 matches similar to: "for loop problem"

2013 Jan 18
5
reading multiple key=value pairs per line
Hi, Thanks for a great environmentfor statistical computing :-) I have some input data in a file ("input_kvpairs.csv") of the form key1=23, key2=67, key3="hello there" key1=7, key2=22, key3="how are you" key1=2, key2=77, key3="nice day, thanks" Now in my head I wish it was of the form ("input.csv") #key1, key2, key3 23, 67, "hello
2015 May 30
3
Using two agents
On 30/05/15 08.34, Nico Kadel-Garcia wrote: > On Sat, May 30, 2015 at 8:00 AM, Kasper Dupont > <kasperd at kdxdx.23.may.2015.kasperd.net> wrote: > > As far as I can tell when the ssh command uses an agent to > > authenticate to a server and then forwards an agent to that > > server, it will always use the same agent for both purposes. > > > > Has there
2012 Aug 14
1
Can we interlink these three if conditions?
key1.=c(1, 2, 3) key2.=c(2) if (identical(key1.,key2.) == "TRUE") { cat("No Errors found") } if (length(setdiff(key1., key2.)) !=0) {
2009 Mar 04
3
Table Transformation
Dear R-experts, recently, I started to discover the world of R. I came across a problem, that I was unable to solve by myself (including searches in R-help, etc.) I have a flat table similar to key1 key2 value1 abcd_1 BP 10 abcd_1 BSMP 1A abcd_1 PD 25 abcd_2 BP 20 abcd_3 BP 80 abcd_4 IA 30 abcd_4 PD 70 abcd_4 PS N I wish to transform this table to obtain the following result: key2 key1 BP
2011 May 02
2
INSERT OR UPDATE
I'm trying to insert rows of a data.frame into a database table, or update where the key fields of a record already exist in the table. I've come up with a possible solution below, but would like to hear if anyone has a better solution. # The problem demonstrated: # Create a data.frame with test values library(RODBC) tbl <- data.frame( key1 = rep(1:3, each = 2), key2 =
2009 Jul 08
1
[PATCH: host-browser replacement 0/3] replacement of host-browser on ovirt-server
The purpose of this patch is to replace the identify function in host-browser.rb with a new script, host-register.rb. host-register.rb is a qmf ruby console that interfaces with the newly added matahari qmf agent on the ovirt node. While it stores node data in the database with the same behavior as the original host-browser implementation, it acquires the data using the amqp protocol (and
2005 Feb 24
1
Place more than one key with xyplot
Dear R-users I have some trouble to generate more than one key with xyplot using the legend argument. I would like one key with rectangles: library(lattice) library(grid) key1 <- list(rectangles = list(col= c(rev(heat.colors(5))[1:5], rev(heat.colors(5))[4:1])), title="Percentiles", space="right",
2005 Aug 08
1
php_serialize-1.0.2.1.rb questions
Has anyone used this to get data out of PHP sessions? I can get data out using the php_unserialize function however I am getting a array of strings that looks like this: ["key1: data1","key2: data2"] I would rather get RoR session style of associative arrays ["key1"=>"data", "key2"=>"data2"] Am I just being dense and there is an
2009 May 22
3
Parsing Asterisk's .conf files from Perl, Java or PHP file
Hi, To a large extend, Asterisk's /etc/asterisk/*.conf configuration files conform to a format such as: [section1] key1=value1 key2=value2 [section2] key1=value1 key2=value2 ... To increase coherence when running custom-made application in Perl, Java, PHP, ...) and Asterisk on the same platform, I'm wondering if could extend a bit Asterisk's config files instead of duplicating data
2010 Aug 23
1
Sort ordering
Using MultiValueSorter, I can sort by key1, key2, relevance; or relevance, key1, key2. But AFAIK, I can't sort by key1, relevance, key2. Unless I spool out the entire result set or write some C++. I wonder if we need a new 'sort by' function that accepts any combination of keys and relevance in any order? The function would make it's own optimisations (ie is relevance first or
2018 Jul 02
3
subset con los casos presentes en otra df
Buenas, una vez más. Utilizo: data <- subset(data,data$Key %in% data2$Key) para quedarme con los casos de data que están también en data2, de acuerdo a la variable Key. ¿Cómo sería si quiero que sean los que coinciden en Key1 y Key2? Pense hacer un collapse con Key1 y key2, tanto en data como data2, y usarlo como uso key en el ejemplo de arriba, pero debe haber una forma más
2009 Jul 30
7
arrays, loops, etc
Inspired by the recent thread titled "Array input of dirs, ensuring their existence" I thought I''d write up the problem I''m running into. I was chatting on irc about it, I don''t think puppet has a clean solution. Like the other poster, I''m defining an object that takes an array. In my case, I''m defining gpg keystore, which can contain a
2009 Jul 10
2
[PATCH: server 0/3] Add host-register.rb (replaces host-browser.rb in part)
Removes node identification functionality from host-browser.rb and adds a new script, host-register.rb, that takes over that functionality. The chief difference is that host-browser used a simple TCP server setup to get data from the node, while host-register uses the qpid bus to do so. Specifically, it communicates with the matahari qmf agent added to the node in two related patchsets to node
2011 Sep 01
1
Background fill and border for a legend in dotplot
Dear R help group I've been working on this plot for a while now and now getting around to the minor adjusments. I would like to be able to put a border and background fill around the legend in this plot. I understand the legend 'bty' should do this have this capablity but not sure how the syntax works in this case ###### initalise library("lattice")
2010 Nov 08
2
Fuzzy merge using timestamps
Greetings Supreme Council of R Masters, Like toddler, I have gotten my head stuck in the banisters of R ... again. Let it be know I am still a neophyte in the R-community forum world, so please don't flame me too bad. I have two sets of data, each with a set of timestamps. I would like to somehow merge the datasets based on the timestamps and an individual identifier. That is there are
2015 May 30
5
Using two agents
As far as I can tell when the ssh command uses an agent to authenticate to a server and then forwards an agent to that server, it will always use the same agent for both purposes. Has there been any attempt to make it possible for the ssh command to use two different agents, such that I can use one agent to authenticate and then forward a different agent to the server? -- Kasper Dupont --
2019 Nov 15
2
Re: [PATCH 2/2] options: Allow multiple --key parameters and default keys.
On Tuesday, 12 November 2019 19:35:12 CET Richard W.M. Jones wrote: > This allows multiple --key parameters on the command line to match a > single device. This could either be specified as: > > tool --key /dev/sda1:key:trykey1 --key /dev/sda1:key:trykey2 > > which would try "trykey1" and "trykey2" against /dev/sda1. This seems OK for me, so you can
2010 Mar 03
1
data.table evaluating columns
Hi everyone, I have the following code that works in data frames taht I would like tow ork in data.tables . However, I'm not really sure how to go about it. I basically have the following names = c("data1", "data2") frame = data.frame(list(key1=as.integer(c(1,2,3,4,5,6)), key2=as.integer(c(1,2,3,2,5,6)),data1 = c(3,3,2,3,5,2), data2= c(3,3,2,3,5,2))) for(i in
2007 Jun 06
2
lookup in CSV recipe
I await Luke''s node settings implementation with interest. At the moment however, I have this sort of ugliness: $site = $hostname ? { fred => "opsera", barney => "bedrock", default => "unknown site", ... } So I''ve knocked up this little function to use CSV files instead. Now I can just do: $site =
2009 Sep 08
1
Function to query ASTDB families
Hi, Asterisk database is made of <family><key> records such as: fam key1 val1 fam key2 val2 ... fam key100 val100 I'm looking for the smartest way to iterate among different keys associated to a given family. One way to do this is to parse "database show fam" response. Is there something smarter ? Something like ${DBKEYS(fam)} which would evaluate to "key1