similar to: subset with variable number of subset arguments

Displaying 20 results from an estimated 800 matches similar to: "subset with variable number of subset arguments"

2006 Mar 25
7
Regexp subexpression
I can't get the PERL subexpression translated to R. Following, for example, B. Ripley's http://finzi.psych.upenn.edu/R/Rhelp02a/archive/58984.html I am using sub, but it looks like an ugly substitute. Assume I want to extract the first alpha part and the first numeric part, but only if they are in sequence. Do I really have to use the sub twice, first extracting the first variable, then
2005 May 18
1
from list to dataframe
I was wondering if someone can help me figure out the following: I have two patient datasets, ds1 and ds2. ds1 has fields "patid", "date", and "lab1". ds2 has "patid", "date", and "lab2". I want to find all the patids that have at least 2 dated records for each lab. I started by splitting each dataset by patid, to create ds1.list
2004 Sep 22
1
impenetrable warning
Dear R-help, Can anyone explain the meaning of the warning, Singular precision matrix in level -1, block 1 ? Or how to track down where it comes from? More precisely, using the nlme package, I'm issued with the warning itt2 <- lme(lrna~rx.nrti+lbrna, random=~1|patid, cor=corExp(form=~days|patid,nugget=T), weights=varPower( form=~lbrna),data=rna3) Warning messages: 1: Singular
2012 Nov 17
3
manipulating longitudinal data in r
Dear list member, I have the following data example ke <- data.frame(patid=c(1,1,1,2,3,3),a=c(1,2,2,1,1,2)) I want to add another variable b, such that the max of 'a' by id is returned i.e data ke becomes ke <- data.frame(patid=c(1,1,1,2,3,3),a=c(1,2,2,1,1,2),b=c(2,2,2,1,2,2)) Any help will be appreciated. Oluwakemi [[alternative HTML version deleted]]
2003 May 14
2
number of patients in a hospital on a given date
Dear R-users! I am using R 1.7.0, under Windows XP. Having some hospital discharge data (admission date and discharge date for each patient), I want to get the number of patients in the hospital on a given date. My data look like (simple example): > x <- data.frame(patid=c("pat1", "pat2"), adm.date = c("15.03.2002", "16.03.2002"),
2005 May 24
3
obtaining first and last record for rows with same identifier
I have a dataframe that contains fields such as patid, labdate, labvalue. The same patid may show up in multiple rows because of lab measurements on multiple days. Is there a simple way to obtain just the first and last record for each patient, or do I need to write some code that performs that. Thanks, Steven
2007 Mar 27
1
basic handling of data.frame
Hello, I'm new to R but wan't to use it to compute the statistics of my medical study. The study includes several parameters for a number of patients. Each parameter was assessed by a number of readers, once with a special condition, once without. Now I have a data.frame with colums like: PatientID, ReaderID, SpecialCond(yes/no), Parameter1, Parameter2..... the rows are not sorted, and
2004 May 27
4
extract columns using their names
Hello, Is there a way to extract multiple columns from a dataframe using their names instead of their numbers? Currently I use: data2 <- data1[, c(1,3,9)] And I am looking for something like data2 <- data1[, c("XX","YY","ZZ")] I use the same dataframe for many purposes, and I run codes that change the order of the columns every time. Many thanks, Adrian
2012 May 02
2
How can a function in R handle different types of input?
Hi, How can a function in R handle different types of input? I have written a function, which should calculate the slope from several 3-time-point measurements by linear regression 4 three-time-point-measurements: x<-cbind(c(1,2,3,4),c(2,3,4,5),c(3,4,5,6)) time points: time<-c(1,3,9) function for calculating the slope by linear regression: fit<-function(xx,t){slope <-
2006 Oct 21
2
problem with mode of marginal distriubtion of rdirichlet{gtools}
Hi all, I have a problem using rdirichlet{gtools}. For Dir( a1, a2, ..., a_n), its mode can be found at $( a_i -1)/ ( \sum_{i}a_i - n)$; The means are $a_i / (\sum_{i} a_i ) $; I tried to study the above properties using rdirichlet from gtools. The code are: ############## library(gtools) alpha = c(1,3,9) #totoal=13 mean.expect = c(1/13, 3/13, 9/13) mode.expect = c(0, 2/10, 8/10) #
2000 Feb 21
0
Kernel Error due to long filenames??
We're running a PIII550, 128 MB, 3com 3c905b-TX with SuSE Linux 6.3; Kernel 2.2.14 (see file kernelconfig) and Samba 2.0.6 as PDC & Fileserver in a hospital. Now we got the following error: Feb 18 14:39:54 file kernel: Unable to handle kernel paging request at virtual address 00110004 Feb 18 14:39:54 file kernel: current->tss.cr3 = 040ab000, %cr3 = 040ab000 Feb 18 14:39:54 file kernel:
2002 Apr 20
1
rsync breaks on FreeBSD without -O2?(fwd from grog@FreeBSD.org) PR 36998
Apparently rsync breaks on FreeBSD if you turn off -O2 (which is the default.) The breakage is apparently inside zlib. You'd have to think it was a compiler bug, but perhaps not. I haven't tried to reproduce it yet. -- Martin ----- Forwarded message from grog@FreeBSD.org ----- Date: Fri, 19 Apr 2002 23:14:46 -0700 (PDT) From: <grog@FreeBSD.org> To: mbp@samba.org Subject: PR
2002 Feb 27
1
anyone compile source on Mac OS X?
Did anyone have any luck compiling rsync 2.5.2, from source, on Mac OS X? Doing a straight ./configure && make, I get the error below. I've searched the lists here with no luck. Any pointers, or any URL with more info would be great. Thanks! RSYNC 2.5.2 COMPILING ERROR ON MAC OS X: root# make Please ignore warnings below about mktemp -- it is used in a safe way cc -g -O2
2012 Oct 20
1
Trouble returning 2D array into R from Fortran
Hello, I have been trying to use a collection of Fortran subroutines to return a 2D array of calculated values to my R code, calling a Fortran wrapper subroutine from R. I've done this successfully before with C & C++ code. The Fortran wrapper subroutine which is to be called by R takes a set of input arguments & then should return an array of 2 columns & the specified number of
2003 Jun 21
2
rsync 2.5.6 for NCR MP-RAS
Hi: After compiling rsync2.5.6 using on SVR4 on Intel HW, Please help # ./rsync --version rsync: --version: unknown option rsync error: syntax or usage error (code 1) at main.c(994) # ./rsync --help Segmentation Fault - core dumped Here is log of compilation. Script started on Sat Jun 21 05:56:15 2003 # make cc -I. -I. -g -DHAVE_CONFIG_H -I./popt -c rsync.c -o rsync.o NCR High
2002 Mar 20
4
rsync 2.5.4 on win2k machine
Hi, i have downloaded rsync 2.5.4 source and was trying to compile it on win2k machine. is it supported on win2k machine ? Please ignore warnings below about mktemp -- it is used in a safe way gcc -g -O2 -DHAVE_CONFIG_H -Wall -W -o rsync rsync.o generator.o receiver.o cle anup.o sender.o exclude.o util.o main.o checksum.o match.o syscall.o log.o backu p.o options.o flist.o io.o compat.o hlink.o
2002 Apr 21
3
ports/36998: rsync requires -O2 on BSD to avoid segv?
On 21 Apr 2002, Anders Nordby <anders@fix.no> wrote: > # rsync -azv \ > rsync://sunsite.dk/ftp//mirrors/mysql/Downloads/Contrib/MyAccess.mda . Works fine for me using rsync's upstream HEAD and 2.5.5 release. So it seems like it must be either something in BSD's patches, or something about your compiler, or possibly something else. Could you please try building from upstream
2002 Feb 20
1
Errors compiling rsync 2.5.2 on Solaris 8
When I compile on Solaris * I get the foillowing errors: bash-2.03# gmake gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c rsync.c -o rsync.o gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c generator.c -o generator.o gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c receiver.c -o receiver.o gcc -I. -I. -g -O2 -DHAVE_CONFIG_H -Wall -W -I./popt -c cleanup.c -o cleanup.o gcc
2002 Jan 13
1
rsynd-2.5.1 / hlink.c patches
Platform: Compaq OpenVMS Alpha 7.3 Compiler: Compaq C T6.5 The following patch resolves compile problems with the HLINK.C module. The cast on function argument for the qsort() routine was wrong, and not allowing the compile to complete. When the function definiton of the hlink_compare() is corrected to have the const qualifiers, the cast inside the qsort() function call is no longer
2004 Aug 04
3
[LLVMdev] Compiler Driver Decisions
On Wed, 2004-08-04 at 07:38, Misha Brukman wrote: > On Wed, Aug 04, 2004 at 01:17:24AM -0500, Chris Lattner wrote: > > On Tue, 3 Aug 2004, Reid Spencer wrote: > > > I'm not thrilled with llvm-gen because it has overtones of "code > > > generation" (which actually isn't far from the truth). But, it > > > conjures up the wrong kind of tool ..