similar to: Extract some character from a character vector of length 1

Displaying 20 results from an estimated 300 matches similar to: "Extract some character from a character vector of length 1"

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"),
2010 Jun 26
2
Recoding dates to session id in a longitudinal dataset
Hi, I'm fairly new to R but I have a large dataset (300000 obs) containing patient material. Some patients came 2-9 times during the three year observation period. The patients are identified by a unique idnr, the sessions can be distinguished using the session date. How can I recode the date of the session to a session id (1-9). This would be necessary to obtain information and do some
2009 Apr 21
3
Deleting rows or cols that do not meet cut off
How can I delete both rows and columns that do not meet a particular cut off value. Example: > d <- rbind(c(0, 1, 6, 4), + c(2, 5, 7, 5), + c(3, 6, 1, 6), + c(4, 4, 4, 4)) > f <- as.matrix(d) > f [,1] [,2] [,3] [,4] [1,] 0 1 6 4 [2,] 2 5 7 5 [3,] 3 6 1 6 [4,] 4 4 4 4 I would like to delete all
2010 Mar 29
1
how to prove that the factor makes no difference
Dear R-helper, Please suggest some methods for my question below. We measured the amount of protein A in patient blood in pre-treatment and post-treatment condition from 32 patients. -------------------------------------------- Pre-treatment Post-treatment Pat1 25 28 Pat2 19 15 Pat3 94
2004 Sep 06
5
Newby question. Basic structure
Hi all. I've being reading posts from the list since yesterday and I feel this question was answered a lot time ago, but the list archives are a mess (yet). I hope some one is willing to help me out. I want to set up this: caller ----- PSTN ---- (SOMETHING1) ------ VoIP --------- (SOMETHING2) ---- PSTN I think this must be a very basic architecture, but I'm not sure wat SOMETHING1
2017 Dec 13
4
Add vectors of unequal length without recycling?
I'm a newbie for R lang. And I recently came across the "Recycling Rule" when adding two vectors of unequal length. I learned from this tutor [ http://www.r-tutor.com/r-introduction/vector/vector-arithmetics ] that: """""" If two vectors are of unequal length, the shorter one will be recycled in order to match the longer vector. For example, the
2007 Nov 16
1
channels to destroy
Hello, In a couple of Asterisks, after type "sip show channels" we have a lot of these: IP_PEER dst_number something 00102/00103 unkn No (d) Rx: BYE IP_PEER dst_number2 something2 00102/00103 unkn No (d) Rx: BYE We are using ASterisk 1.2.x When I say "a lot" I mean more than 180, more than 230, etc. Is it normal? How we can remove it? Thank you very much, --
2013 Dec 31
1
Setting CDR variables for all linked channels
Hi, when one does "Set(CDR(var)=value)" in dialplan, the value is only set for one record in the cdr table, but not the linked ones (the ones with the same linkedid). E.g. if you do something like same => n, Set(CDR(var)=value) same => n,Dial(Local/something&Local/something2) like only the original CDR record with have "var" set to "value", but the
2008 Feb 12
1
RE: Delegation of authentication (S4U) and SAMBA
Hello, Does samba support the use of S4U? What do we need to configure in SAMBA or krb5 to support getting a ticket obtained by S4U. We are using 3.0.25 and krb5-1.4.1 We are getting the following error: decode_pac_data: Name in PAC [username@something1.something2.realmname] does not match principal name in ticket The ticket could be different than the PAC name because the
2017 Dec 13
0
Add vectors of unequal length without recycling?
Without recycling you would get: u <- c(10, 20, 30) u + 1 #[1] 11 20 30 which would be pretty inconvenient. (Note that the recycling rule has to make a special case for when one argument has length zero - the output then has length zero as well.) Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Dec 12, 2017 at 9:41 PM, Maingo via R-help <r-help at r-project.org> wrote:
2007 Mar 06
2
how to edit my R codes into a efficient way
Hello, Everyone, I am a student an a new learner of R and I am trying to do my homework in R. I have 10 files need to be read and process seperately. I really want to write the codes into something like "macro" to save the lines instead of repeating 10 times of similar work. The following is part of my codes and I only extracted three lines for each repeating section. data.1 <-
2010 Oct 21
2
nested anova
Hello all, Can any of you R gurus help me out? I?m not all that great at stats to begin with, and I?m also learning the R ropes (former SAS user). Here?s what I need help with? I have a nested sample design and ran a nested anova, but I don?t know how to interpret the results habitat (four different types) is nested in site (three types), and site is nested in gear (two types)
2007 Jan 24
2
keep track of selected observations over time
Dear all, Attached is a description of my data, graph and the problem which I need help with. Hope you have time to open the file and help me out. Many thanks, Jenny ---------------------------------
2005 Nov 16
1
PPC package-ppc.read.raw.nobatch (PR#8316)
Full_Name: Martin O'Gorman Version: OS: Submission from: (NULL) (84.176.63.149) I have been looking at the PPC package and have a question. As the input data is comma separated, shouldn?t the command to read in the raw (no batch) mass spec data indicate that sep=?,? (marked below) ? Otherwise, the data read in is the pair of values (m/z,intensity). It is not obvious why that should be.
2009 Oct 26
1
regular expressions
Dear list, I have the following text to parse (originating from readLines as some lines have unequal size), st = c("START text1 1 text2 2.3", "whatever intermediate text", "START text1 23.4 text2 3.1415") from which I'd like to extract the lines starting with "START", and group the subsequent fields in a data.frame in this format: text1 text2
2006 Aug 15
0
Help with workaround for: Function '`[`' is not in thederivatives table
Earl F. Glynn asks: > -----Original Message----- > From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Earl F. Glynn > Sent: Tuesday, 15 August 2006 8:44 AM > To: r-help at stat.math.ethz.ch > Subject: [R] Help with workaround for: Function '`[`' is not in thederivatives table > > # This works fine: > > a <- 1
2005 May 12
6
[Bug 1039] Incomplete application of HostKeyAlias in ssh
http://bugzilla.mindrot.org/show_bug.cgi?id=1039 Summary: Incomplete application of HostKeyAlias in ssh Product: Portable OpenSSH Version: 4.0p1 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: ssh AssignedTo: bitbucket at mindrot.org ReportedBy: cdmclain
2007 Jan 25
1
X-UID gaps cause Dovecot/IMAP to hang
Hi, When the Dovecot 1.0.rc19 IMAP server encounters X-UID headers with gaps in them, it hangs indefinitely. I've attached a sample mailbox (in mbox format) which repeatably exhibits this behavior. The mbox contains only three messages with the following X-UIDs in order: 774, 785, 787. If I remove the X-UID headers from each message, Dovecot handles the mailbox without any problems. UW-IMAP
2013 Dec 17
3
In-string variable/symbol substitution: What formats/syntax is out there?
Hi, I'm try to collect a list of methods/packages available in R for doing in-string variable/symbol substitution, e.g. someFcn("pi=${pi}"), anotherFcn("pi=@pi@") and so on becomes "pi=3.141593". I am aware of the following: ** gsubfn() in the 'gsubfn' package, e.g. > gsubfn( , , "pi = $pi, 2pi = `2*pi`") [1] "pi = 3.14159265358979,
2007 Sep 11
2
Function to get a sequence of months
Hi all, I am looking for a function for following calculation. start.month = "July" end.month = "January" months = f(start.month, end.month, by=1) * f is the function that I am looking for. Actually I want to get months = c("July", "August",.............."January") If start.month = 6 and end.month = 1 then I could use (not properly) seq()