[R] summing items within a row

2010-05-11 Thread Q
, perhaps, give me a vector something like this c(2, 8, ... 4, 10 ... 6, 12). Does anyone know of a simple way to do this? Thanks a lot, Q -- View this message in context: http://r.789695.n4.nabble.com/summing-items-within-a-row-tp2195458p2195458.html Sent from the R help mailing list archive at

Re: [R] summing items within a row

2010-05-13 Thread Q
Thank you Dennis. That was a great idea and it worked quite well! -- View this message in context: http://r.789695.n4.nabble.com/summing-items-within-a-row-tp2195458p2196793.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-pr

[R] Dealing with 1000+ sequentially named vectors

2010-05-18 Thread Q
Hello! I'm having trouble figuring out how to apply a function to a set of vectors or data frames, when that set is over 1000 large. I've created 1891 vectors named as follows: vector.names <- paste("vector",1:1891,sep="") These can be referred to easily by using get as follows: vector <

Re: [R] Dealing with 1000+ sequentially named vectors

2010-05-20 Thread Q
Thanks a lot! This has helped send me in the right direction. I'm not used to think outside of the loop. -- View this message in context: http://r.789695.n4.nabble.com/Dealing-with-1000-sequentially-named-vectors-tp2221942p2225360.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] SAP ABAP Consultant available

2012-06-18 Thread Q
Please DO NOT put ads for your services on this site. This is a violation of the R forum terms. I will be forwarding this issue to the appropriate moderator to take further action. On Tue, Jun 12, 2012 at 1:37 PM, Kanna wrote: > > [1]Click here to unsubscribe if you no longer wish to receive

[R] Create a data frame of all possible unique combinations of factors

2011-07-05 Thread Q
quot;: > 1> unique(pairs) > , but that doesn't do anything... I guess because it considers A,B to be different from B,A. The data frame I would like to end up with should look like this. >Var1 Var2 > 1 AA > 2 BA > 3 CA > 4 D

Re: [R] Create a data frame of all possible unique combinations of factors

2011-07-05 Thread Q
Ah! I like the idea. Thanks! jholtman wrote: > > Missed that you wanted to elim duplicated: > >> z <- expand.grid(test,test) >> # add 'unique' key >> z$key <- apply(z, 1, function(x)paste(sort(x), collapse='')) >> str(z) > 'data.frame': 16 obs. of 3 variables: > $ Var1: Factor w/ 4 level

[R] Find pattern in matrix

2011-07-21 Thread Q
ix[i,k] > matrix[j,k] && > matrix[j,l] > matrix[j,k] && > matrix[j,l] > matrix[i,l]]) > } > That didn't work. So I wonder if anyone has any ideas of another way to proceed or functions I could look up that would head me in the right direction. So

[R] Data frame to PostgreSQL without primary key

2013-10-18 Thread Bill Q
Hi, I just got started with R. I am trying to load some data into PostgreSQL using RPostgreSQL. Everything went quite smoothly except for that the table created by using dbWriteTable does not have a primary key. The ideal solution is to ask PostgreSQL to do a auto-increment with the rows I am goin

[R] Collecting output from terminal nodes in a recursion tree

2008-09-26 Thread B Q
I have a recursive function. The recursion forms a tree with many (millions) terminal nodes. The function must output a value (say, a number or a vector) from each terminal node. At the end, when all recursion is done, we want to collect all the output values. How can that be done cleanly and ef

[R] dumping data objects

2009-07-27 Thread William Q Meeker
;), class = "factor"), Weight = c(1L, 1L, 2L)), .Names = c("Kilocycles", "Status", "Weight"), class = "data.frame", row.names = c("1", "2", "3")) I have also tried a number of different combinations of options to .deparseO

Re: [R] dumping data objects

2009-07-28 Thread William Q Meeker
While > .deparseOpts(control="S_compatible") > dump("foo") did not work as I had expected, dump("foo",control="S_compatible") did work OK. Bill Meeker William Q. Meeker Department of Statistics 2109 Snedecor Hall Iowa State University Ame

[R] R Studio v3.0.3 for Windows 32bits is too slow

2014-07-09 Thread Phan, Truong Q
Hi R'er, I have a dataset which has a matrix of 7502 x 1426 (rows x columns). The data is in a CSV format which has a size around 68Mb. This dataset is less than 10% of our dataset. I have been adopting the Anomaly detection method as described by http://www.mattpeeples.net/kmeans.html . It has

Re: [R] R Studio v3.0.3 for Windows 32bits is too slow

2014-07-10 Thread Phan, Truong Q
stra.com W  www.telstra.com -Original Message- From: peter dalgaard [mailto:pda...@gmail.com] Sent: Thursday, 10 July 2014 10:08 AM To: Jeff Newmiller Cc: Bert Gunter; Phan, Truong Q; r-help@r-project.org Subject: Re: [R] R Studio v3.0.3 for Windows 32bits is too slow Grumpy today, Jeff? For the conc

[R] Passing (Optional) Arguments

2008-03-24 Thread Jason Q. McClintic
I understand as b is not defined within the function when I enter fun() lexical scoping means R looks for b up one level and, finding b, uses it. Thanks for any/all help. Sincerely, Jason Q. McClintic -- Jason Q McClintic UST MB 1945 2115 Summit Avenue St. Paul, MN 55105 [EMAIL PRO

Re: [R] Passing (Optional) Arguments

2008-03-25 Thread Jason Q. McClintic
sort of warning. Perhaps using ifelse? Thanks again for your assistance. Sincerely, Jason Q. McClintic - -- Jason Q McClintic UST MB 1945 2115 Summit Avenue St. Paul, MN 55105 [EMAIL PROTECTED] [EMAIL PROTECTED] "It is insufficient to protect ourselves with laws, we must protect ourselves

[R] Empty Set In a Set

2008-04-29 Thread Jason Q. McClintic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Dear List: I'm looking for a form of the empty set such that if ES is said representation, ~ES %in% c(1,2,3) evaluates to TRUE. Thank you in advance for your assistance. Sincerely, Jason Q. McClintic - -- Jason Q McClintic UST MB

Re: [R] Empty Set In a Set

2008-04-30 Thread Jason Q. McClintic
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Exactly what I needed. Thanks to everyone who replied. Sincerely, Jason Q. McClintic - -- MIDN 1/C Jason Q McClintic Battalion Commander Naval ROTC Battalion University of Minnesota UST MB 1945 2115 Summit Avenue Saint Paul, MN 55105 [EMAIL

[R] Error in optim while using fitdistr() function

2008-02-10 Thread Jason Q. McClintic
I get the digest, so I apologize if this is a little late. For your situation (based on the description and what I think your code is doing, more on that below), it looks like you are modeling a Poisson flow where the number of hits per unit time is a random integer with some mean value. If I

Re: [R] Error while using fitdistr() function or goodfit() function

2008-02-10 Thread Jason Q. McClintic
y from the example for goodfit: dummy <- rnbinom(200, size = 1.5, prob = 0.8) gf <- goodfit(dummy, type = "nbinomial", method = "MinChisq") and got back Warning messages: 1: In pnbinom(q, size, prob, lower.tail, log.p) : NaNs produced 2: In pnbinom(q, size, prob, lower.ta