search for: leng

Displaying 18 results from an estimated 18 matches for "leng".

Did you mean: len
2013 Mar 07
2
Copying a dataframe
Hi, I am trying to create a data frame using the dimensions of another data frame that I have input. This is the code I am using: tab is the data frame that is input. c.leng<-length(tab[,1]); r.leng<-length(tab[1,]); opdf<-data.frame(ncol=c.leng, nrow=r.leng); a<-1; while(a<=c.leng) { opdf[[1]][a]<-tab[[1]][a]; a<-a+1; } This is the error message I am getting: Error in `[[<-.data.frame`(`*tmp*`, 1, value = c(4626L, 1L)) : replacement has 2 rows...
2013 Mar 12
2
Troubleshooting code
...le understanding where I went wrong with my code. It seems to logically be "all there" but the output says otherwise. I know this is a bit long but I can't seem to find the errors so I would appreciate your help :) This is my program : files<-Sys.glob("*.rescount.txt");length<-length(files);* #selecting all files of a particular extension, saving in a list* a<-1; while(a<=length) *#going through every element of the list* { df1<-read.table(files[a]); c.leng<-length(files[,1]); r.leng<-length(files[1,]); *#creating data frame for output with the...
2010 Jun 03
2
deduplication
Colleagues, I am trying to de-duplicate a large (long) database (approx 1mil records) of diagnostic tests. Individuals in the database can have up-to 25 observations, but most will have only one. IDs for de-duplication (names, sex, lab number...) are patchy. In a first step, I am using Andreas Borg's excellent record linkage package (), that leaves me with a list of 'pairs' looking
2003 Sep 14
1
reading in a file with multiple data types
...y do not seem to yield the appropriate structure that allows the extraction of the numeric blocks correctly (due to the line spaces, tabs and spaces). I gratefully appreciate any advice and suggestion on how to obtain the desired data matrices/ dataframes from this data file in R. Thank you, Siew-Leng *Using R1.7.1. on windows ME, and on Unix. ------------------------------------ My data file contains data in the following block structure : 1) block of a summary (char) 2) line spaces 3) text line 4) Data : stored as : number \t number (spc) number (spc) number (spc) ... and so on. [the number...
2003 Aug 04
1
Error in calling stepAIC() from within a function
...g a baffling behaviour of stepAIC(), and I hope to get any advice/help on what went wrong or I'd missed. I greatly appreciate any advice given. I am using stepAIC() to, say, select a model via stepwise selection method. R Version : 1.7.1 Windows ME Many thanks and best regards, Siew-Leng ***Issue : When stepAIC() is placed within a function, it seems that stepAIC() cannot detect the data matrix, and the program is halted as a result. However, when the same codes are copied, paste and run in R workspace, stepAIC can execute and R is able to produce the desired output....
2004 Dec 12
2
Help : generating correlation matrix with a particular structure
Hi, I would like to generate a correlation matrix with a particular structure. For example, a 3n x 3n matrix : A_(nxn) aI_(nxn) bI_(nxn) aI_(nxn) A_(nxn) cI_(nxn) aI_(nxn) cI_(nxn) A_(nxn) where - A_(nxn) is a *specified* symmetric, positive definite nxn matrix. - I_(nxn) is an identity matrix of order n - a, b, c are (any) real numbers Many attempts have been unsuccessful because a
2004 May 16
2
Error in using coxph()
Hi, I am getting errors of the following kind. I can't seem to point the source of the error. I would greatly appreciate any advice. Many thanks and good day, -Melinda Error message : ---------------- "Ran out of iterations and did not converge in: fitter(X, Y, strats, offset, init, control, weights = weights,..." Details : --------- E is a vector of survival times (or censored
2004 Dec 13
1
Re: Help : generating correlation matrix with a particular
...rs London EC3N 2PH phone: +44 (0)20 7528 4702 fax: +44 (0)20 7558 3785 >Message: 2 >Date: 12 Dec 2004 14:58:38 +0100 >From: Peter Dalgaard <p.dalgaard at biostat.ku.dk> >Subject: Re: [R] Help : generating correlation matrix with a > particular structure >To: Siew Leng TENG <siewlengteng at yahoo.com> >Cc: r-help at stat.math.ethz.ch >Message-ID: <x2sm6bd3e9.fsf at biostat.ku.dk> >Content-Type: text/plain; charset=us-ascii > >Siew Leng TENG <siewlengteng at yahoo.com> writes: > >> Hi, >> >> I would like to ge...
2009 Apr 25
0
incorrect output and segfaults from sprintf with %*d (PR#13675)
...zyk <Waclaw.Marcin.Kusnierczyk at idi.ntnu.no> wrote: > maechler at stat.math.ethz.ch wrote: >> >> =A0 =A0 vQ> sprintf has a documented limit on strings included in the ou= tput using the >> =A0 =A0 vQ> format '%s'. =A0It appears that there is a limit on the leng= th of strings included >> =A0 =A0 vQ> with, e.g., the format '%d' beyond which surprising things h= appen (output >> =A0 =A0 vQ> modified for conciseness): >> =A0 =A0 >>> >> >> =A0 =A0 vQ> ... and this limit is *not* documented. >> >...
2011 Mar 25
2
Preserving the class of POSIXt objects
...;t just figure out? Thanks in advance for any suggestions. A reproducible example: foo <- as.list(Sys.time()+1:10) sapply(foo, "[", 1) I've also noticed that trunc.POSIXt does something unexpected (to me) in some cases: foo <- as.POSIXct("2011-03-25 21:03:20")+1:10 length(foo) ## obviously 10 length(trunc(foo, "day")) # 1! This makes it impossible to use [ and length() with trunc'ed POSIXct vectors (and it is a little unexpected too that the result of using trunc with a POSIX_ct_ object is a POSIX_lt_ object) but the cure seems easy: in the code of...
2005 Jan 17
0
Bull's Eye Investing (PR#7530)
...ong distance charges. We deve|op software to run VoIP networks, and sel|, insta|l and service our own branded VoIP gateways and gatekeeper control software. We a|so |icense our software to customers who want to brand their own VoIP so|utions. VocalScape is committed to making great techno|ogy; cha|lenging the status quo, and bui|ding a 21st Century company that changes the way businesses communicate and interact through the Internet. Current Price: $0.175 Projected Specu|ative Price in next 5 days: $0.42 Projected Speculative Price in next 15 days: $O.55 Check out the breaking news for VCSC a...
2010 Sep 03
2
Interactions in GAM
Hello R users, I am working with the GAM to inspect the effect of some factors (year, area) and continuous variables (length, depth, latitude and longitude) on the intensity and prevalence of the common parasite Anisakis. I would like introduce interaction in my models, both "continuous variables-continuous variables" and "continuous variables-factor". I have read some questions-answers regard to th...
2002 Nov 17
2
2nd POSTING: Samba PDC shares causing errors in MS Word 97 SR2
Hi, I support around 15 Windows 2000 Clients who log into and have home directories on a Samba PDC running under RedHat 7.3. The version of samba I am using is 2.5.5. All the clients use Word97 SR2 and they all get the following error while working on documents stored on their home directories on the PDC: Word failed reading from this file (filename.doc). Please restore the network
2005 Jan 27
4
self-written function
...s.e. from arcsine-transformed data: backsin<-function(x,y,...){ backtransf<-list() backtransf$back<-((sin(x[x!="NA"]))^2)*100 backtransf$mback<-tapply(backtransf$back,y[x!="NA"],mean) backtransf$sdback<-tapply(backtransf$back,y[x!="NA"],stdev)/sqrt(length(y[x!="NA"])) backtransf } I would like to apply this function to whole datasets, such as tapply(variable,list(A,B,C,D),backsin) Of course, this doesn?t work with the way in which the backsin() function is specified. Does anyone have suggestions on how I could improve my function?...
2009 Aug 17
2
Accessing to ekiga.net through Asterisk
...t;;tag=uucwz Call-ID: mrsyiysrdkwmkeg at defiant.freesoftware.org CSeq: 183 INVITE Contact: <sip:201 at 10.1.0.65> Content-Type: application/sdp Allow: INVITE,ACK,BYE,CANCEL,OPTIONS,PRACK,REFER,NOTIFY,SUBSCRIBE,INFO,MESSAGE Supported: replaces,norefersub,100rel User-Agent: Twinkle/1.2 Content-Length: 247 v=0 o=twinkle 2122879389 441437466 IN IP4 10.1.0.65 s=- c=IN IP4 10.1.0.65 t=0 0 m=audio 8000 RTP/AVP 8 0 3 101 a=rtpmap:8 PCMA/8000 a=rtpmap:0 PCMU/8000 a=rtpmap:3 GSM/8000 a=rtpmap:101 telephone-event/8000 a=fmtp:101 0-15 a=ptime:20 <-------------> - --- (13 headers 12 lines) --- S...
2012 Nov 29
2
[LLVMdev] problem trying to write an LLVM register-allocation pass
I have a new problem: Register RBP is used in a function foo. (I am not allocating RBP to any virtual register, the instances of RBP in function foo are in the machine code when my register allocator starts.) Function foo calls function bar. Register RBP is not saved across the call, though it is live after the call. Function bar includes a virtual register. The code that I'm using to
2012 Dec 01
0
[LLVMdev] problem trying to write an LLVM register-allocation pass
...prefix, "_load_buffer_state" ); out_str3( "#define yy%s %s%s\n", "_switch_to_buffer", prefix, "_switch_to_buffer" ); out_str3( "#define yy%s %s%s\n", "in", prefix, "in" ); out_str3( "#define yy%s %s%s\n", "leng", prefix, "leng" ); out_str3( "#define yy%s %s%s\n", "lex", prefix, "lex" ); out_str3( "#define yy%s %s%s\n", "out", prefix, "out" ); out_str3( "#define yy%s %s%s\n", "restart", prefix, "res...
2003 Jul 30
0
stepAIC()
Hi, I am experiencing a baffling behaviour of stepAIC(), and I hope to get any advice/help on this. Greatly appreciate any kind advice given. I am using stepAIC() to, say, select a model via stepwise selection method. R Version : 1.7.1 Windows ME Many thanks! ***Issue : When stepAIC() is placed within a function, it seems that stepAIC() cannot detect the data matrix, and the program is