similar to: Selecting obs within groups defined by 2 variables

Displaying 20 results from an estimated 9000 matches similar to: "Selecting obs within groups defined by 2 variables"

2009 Mar 26
4
same value in column-->delete
Hi Readers, I have a question. I have a large dataset and want to throw away columns that have the same value in the column itself and I want to know which column this was. For example > x<-data.frame(id=c(1,2,3), snp1=c("A","G", "G"),snp2=c("G","G","G"),snp3=c("G","G","A"))
2009 Apr 09
5
data.fram zero's
Hi all, A simple question which I don???t seem to be able to solve: I want to make a data.frame of 360 rows and 94228 column with only zero???s without having to type all these zero???s ;-) What is the easiest method? Thanks, Naomi Disclaimer: De informatie opgenomen in dit bericht (en bijlagen) kan vertrouwelijk zijn en is uitsluitend bestemd voor
2005 Jun 20
1
(no subject)
R friends, I am using R 2.1.0 in a Win XP . I have a problem working with lists, probably I do not understand how to use them. Lets suppose that a set of patients visit a clinic once a year for 4 years on each visit a test, say 'eib' is performed with results 0 or 1 The patients do not all visit the clinic the 4 times but they missed a lot of visits. The test is considered positive if it
2011 May 09
3
asterisk syntax highlighting for gedit
Hi, Apologies if this is a duplicate - been having mail server issues and I don't think I managed to send it when I tried this morning. It seems there is no .conf syntax highlighting script available for gedit. I'm thinking of putting one together myself, but don't want to reinvent the wheel. So I'm just enquiring if anyone knows of one that already exists that i've missed.
2005 Oct 20
2
information about Loess
Hello, I'm currently using a tool that provides a Loess fitting, but I obtained results that are slightly different from those provided by R implementation of the Loess. That's why I would like to know if you could give me a source (bibliography or web) that explains in a clear way each step of the algorithm, with the possible options to choose, etc.. in order for me to understand those
2009 Feb 13
2
select on letter
Hi, I was wondering if anybody can help me. In the small data set below I would like to select the index which doesn't contain the letter 'N' in the variable 'letters'. How can I discard these rows when the letter has a different position everytime (but the same letter for the whole column)? index<-c(1,2,3) letters<-c("CCTTGGAA", "NNTTGGAAT",
2010 Apr 13
2
transpose but different
Hi all, I want to make extra columns in my datafile where the id of every groupmember is mentioned in separate columns. To explain it better see the example: id<-c(1,2,3,4,5,6,7,8,9,10,11,12) group<-c(1,1,1,1,2,2,3,3,3,3,3,3) a<-as.data.frame(cbind(id,group)) a id group 1 1 1 2 2 1 3 3 1 4 4 1 5 5
2011 Mar 21
2
1.8 realtime - segfault
Hi, I have installed Asterisk 1.8 and am using realtime dialplan contexts from a mysql table. Asterisk keeps segfaulting. When I trace the thread ids associated with the segfaults in the full log, all they have in common is netsock2.c: == Using SIP RTP CoS mark 5 which is probably a red herring since it appears so often in threads that do not segfault. When compiling, I ticked all the
2009 Mar 20
1
reshape dataframe
Hi, I have a large dataset on which I would like to do the following: x<-data.frame(id=c(1,2,3), snp1=c("AA","GG", "AG"),snp2=c("GG","AG","GG"),snp3=c("GG","AG","AA")) > x id snp1 snp2 snp3 1 1 AA GG GG 2 2 GG AG AG 3 3 AG GG AA And then
2012 Oct 20
2
Help with programming a tricky algorithm
Hi All, I'm a little stumped by the following problem. I've got a dataset with the following structure: idxy ix iy country (other variables) 1 1 1 c1 x1 2 1 2 c1 x2 3 1 3 c1 x3 . . . . . 3739 55 67 c7 x3739 3740 55 68 c7 x3740 where ix and
2009 Jun 03
1
strsplit for multiple columns
Hi, I am trying to split multiple columns. One column works just fine, but I want to do it for multiple columns??? Example > a ID V2 V3 V4 V5 V6 V7 V8 V9 V10 1 PBBA0644 -- GG AA -- AA -- AA GG GG 2 PBBA1010 -- GG AA -- AA -- AA GG GG 3 0127ATPR -- GG AA -- AA -- AA GG GG 4 0128EHAB -- GG AA -- AG -- AA AG GG 5 PBBA0829 -- GG AA -- AA -- AA GG AG
2011 Jul 21
4
squared "pie chart" - is there such a thing?
Hello! It's a shoot in the dark, but I'll try. If one has a total of 100 (e.g., %), and three components of the total, e.g., mytotal=data.frame(x=50,y=30,z=20), - one could build a pie chart with 3 sectors representing x, y, and z according to their proportions in the total. I am wondering if it's possible to build something very similar, but not on a circle but in a square - such that
2010 Jul 17
5
Help with a problem
Hello R users, I am a researcher at the University of Michigan looking for a solution to an R problem. I have loaded my data in from a mysql database and it looks like this > data ds c1 c2 1 2010-04-03 100 0 2 2010-04-30 11141 15 3 2010-05-01 3 16 4 2010-05-02 7615 14 5 2010-05-03 6910 17 6 2010-05-04
2010 Nov 22
1
Problem setting the number of digits in xtable
DEar list members, I am currently using Sweave with LaTeX which is great. I can use xtable for formatting outp of tables but I have a problem setting the number of decimals in xtables when used with dataframe. I have found an example on the net ith matrix and it works. For example this works : > > tmp <- matrix(rnorm(9), 3, 3) > > xtmp <- xtable(tmp) > > digits(xtmp)
2008 Jul 07
2
Colour clusters in a 2d plot
R experts, I have three columns. c1 and c2 are numeric variables whereas c3 are the clusters classes (nominal variable, 10 different: cluster1, cluster2, cluster3, cluster4, cluster5 ....). I'd like to plot c1 against c2 (easy!) in a 2D plot and put different color depending to the cluster class automatically regardless the number of clusters. Could anyone give a hand? Josep Maria, matrix
2009 Mar 20
4
how to make aggregation in R ?
Hi, I am trying to aggregate the sum of my test data.frame as follow: testDF <- data.frame(v1 = c("a", "a", "a", "a", "a", "b", "b", "b", "b", "b", "c", "c", "c", "c", "c", "d", "d", "d", "d",
2011 Apr 08
6
Variable inheritance with dialplan command Originate
Hi, I would have thought that when spawning a channel using the Originate() dialplan command, variables prefixed with two underscores would be preserved. However this does not work in the following case. Dialplan code: [intern] exten => 200,1,Set(__myvar="foo") exten => 200,n,Originate(Local/123 at test_orig,exten,dummy) [test_orig] exten => 123,1,NoOp(${myvar}) exten =>
2004 May 03
1
Setting up contrasts
I am using the following model: lm <- lm(mydata[[variableName]] ~ Age + Gender + Group, data=mydata) There are 5 groups in "Group": nonc (the control), c1,c2,c3 and c4. How do I contrast nonc vs the others? and How do I contrast c1 vs other c's (ie c2,c3,c4 as a subgroup)? I have looked at the contrasts option in lm and model.matrix and am really none the wiser. Though it
2009 Nov 27
1
problem tick marker and text
Hi R-ers, I am struggling with my x-axis in a association plot. What I would like is to place the labels of the x-axis between the tick markers and normally the labels are printed at the place where the tick marker is placed. I don???t want to move the tick marker (it gives the switch between one chromosome and the next) but I just want to put the chromosome number in between the
2000 Jan 17
2
Newbie help: Samba 2.0.3 & SCO 5.0.5
Hi, I've just installed a binary version of Samba 2.0.3 on SCO 5.0.5 and am having some problems. I'm basically following "SAMS Teach yourself Samba in 24 hrs" book. On a Win98 machine I can see the SCO machine in the Network Neighborhood. When I try to connect it asks for a passwd and says that the passwd is incorrect when I enter it. It also displays