search for: tvars

Displaying 20 results from an estimated 22 matches for "tvars".

Did you mean: vars
2004 Dec 13
3
Advice on parsing formulae
Dear list I would like to be able to group terms in a formula using a function that I will call tvar(), eg. the formula Y ~ 1 + tvar(x:A) + tvar(z) + u + tvar(B) + tvar(poly(v,3)) where x,u and v are numeric and A and B are factors - binary, say. As output, I want the model.matrix as if tvar had not been there at all. In addition, I would like to have information on the grouping, as a vector
2000 Jul 19
1
How to use tcltk?
Hallo Tk experts, the Tcl/Tk package allows to define very nice widgets for starting R functions, for printing results and for interactive parameter input. tkdensity.R and tkttest.R demonstrate this and both demos explain how some of the tk functions can be used. For constructing new widgets I would like to see further examples showing Tcl/Tk package in action. Therefore my question: Is there a
2007 Nov 13
2
Plot segments with different colors
Hello Everybody, I'm trying to plot(x,y) using different colors. I have to cut (x,y) into sub intervals. And I want to plot this sub intervals using colors. But infortunally I don't know how to do this with R. Can any body help me please? My code is looking like : x<-c(tvar[1:t0],tvar[t0:(ts)],tvar[ts:n]) F<-c(var[1:t0],var[t0:(ts)],var[ts:n]) plot(x,F,xlab="Zeit
2008 Jul 04
2
create a zero matrix & fill
Dear R user, I have written a function which returns max,min and variation of a power (see below) Power is a given matrix(1,n) I call the function >Variation<-VAR(p,(n-deltat)) Now the problem is when I want plot(Results[1],Results[2]). Not possible! I become the following error (in english it means: Error in as.double.default(x) :Object cannot be transformed in double) >
2009 Jul 26
0
Version 0.7 of package tsDyn, nonlinear time series
Hi Version 0.7 of package tsDyn presented at useR! 2009 is now on CRAN, extended with several new features. The package tsDyn is aimed at estimating nonlinear time series models which exhibit regime specific properties. The regime switching dynamics can either be described by smooth transition (STAR and LSTAR) or threshold effects (SETAR). The package furthermore offers nonlinear models
2009 Jul 26
0
Version 0.7 of package tsDyn, nonlinear time series
Hi Version 0.7 of package tsDyn presented at useR! 2009 is now on CRAN, extended with several new features. The package tsDyn is aimed at estimating nonlinear time series models which exhibit regime specific properties. The regime switching dynamics can either be described by smooth transition (STAR and LSTAR) or threshold effects (SETAR). The package furthermore offers nonlinear models
2008 Jul 04
1
initialize a matrix
Dear R users, I'm trying to write a function which returns minimum,maximum,mean of a vector(power) I've done the following : VAR<-function(power,length){ for(i in tml:length)){ tvar[i]<-i pmean[i]<-mean(power[i:i+deltat]) pmin[i]<-min(power[i:i+deltat]) pmax[i]<-max(power[i:i+deltat]) varmax[i]<-100*(pmax[i]-pmean[i])/pmean[i]
2017 Jul 11
2
Extracting sentences with combinations of target words/terms from cancer patient text medical records
Hello All, I need some help figuring out how to extract combinations of target words/terms from cancer patient text medical records. I've provided some sample data and code below to illustrate what I'm trying to do. At the moment, I'm trying to extract sentences that contain the word "breast" plus either "metastatic" or "stage IV". It's been some
2008 Mar 03
3
Plot using colors
Dear R users, I have a problem since I try to plot my datas with different colors. plot(tvar, var, xlab="zeit [s]",ylab="Variation [%]", col = ifelse(var <= varstability, 'green','red')) this works well! But since I add a type="l" to my plot, it will color all the plot with green!!! Is there any solution? I avoid to use teachingDemos. Thanks. --
2017 Jul 12
0
Extracting sentences with combinations of target words/terms from cancer patient text medical records
Hi Paul, Sounds like you have your answer, but for fun I thought I'd try solving your problem using only a regular expression query and base R. I believe this works: > txt <- "Patient had stage IV breast cancer. Nothing matches this sentence. Metastatic and breast match this sentence. French bike champion takes stage IV victory in Tour de France." > pattern <-
2017 Jul 12
2
Extracting sentences with combinations of target words/terms from cancer patient text medical records
Hi Bert, Thanks for your reply. It appears that I didn't replace the variable name "sampletxt" with the argument "x" in my function. I've corrected that and now my code seems to be working fine. Paul ________________________________ From: Bert Gunter <bgunter.4567 at gmail.com> Cc: R-help <r-help at r-project.org> Sent: Tuesday, July 11, 2017 2:00 PM
2017 Jul 13
1
Extracting sentences with combinations of target words/terms from cancer patient text medical records
Hi Robert, Thank you for your reply. An attempt to solve this via a regular expression query is particularly helpful. Unfortunately, I don't have much time to play around with this just now. Ultimately though, I think I would like to implement a solution something along the lines of what you have done. I have a book on regular expressions that I am now starting to read. In the meantime, the
2008 Jul 04
0
RES: initialize a matrix
You have to put the tml in the function and deltat too. like VAR<-function(power,length,deltat,tml){ -----Mensagem original----- De: r-help-bounces em r-project.org [mailto:r-help-bounces em r-project.org]Em nome de mysimbaa Enviada em: sexta-feira, 4 de julho de 2008 11:22 Para: r-help em r-project.org Assunto: [R] initialize a matrix Dear R users, I'm trying to write a function
2017 Jul 11
0
Extracting sentences with combinations of target words/terms from cancer patient text medical records
Have you looked at the CRAN Natural Language Processing Task View? If not, why not? If so, why were the resources described there inadequate? Bert On Jul 11, 2017 10:49 AM, "Paul Miller via R-help" <r-help at r-project.org> wrote: > Hello All, > > I need some help figuring out how to extract combinations of target > words/terms from cancer patient text medical
2017 Jul 13
0
Extracting sentences with combinations of target words/terms from cancer patient text medical records
Hi Paul, No need to collapse the information into a single text string, gregexpr() can take a vector of strings (sentences in your case). You can split your sentences up, number them how you want, then search for your pattern either via regex or via these extra packages you use which probably use the PCRE regex library anyway. However, as this is basically what you did, I'm not sure why
2011 May 24
2
Apply or Tapply to Build Set of Tables
Dear R Helpers, First, I apologize for asking for help on the first of my topics. I have been looking at the posts and pages for apply, tapply etc, and I know that the solution to this must be ridiculously easy, but I just can't seem to get my brain around it. If I want to produce a set of tables for all the variables in my data, how can I do that without having to type them into the table
2008 Aug 12
1
Threshold vector error correction models
Hi, is anyone aware of estimation functions for threshold vector error correction / threshold cointegration models? I didn't find anything for R using RSeek or Google. Thanks a lot for any pointers, Werner __________________________________________________ Do You Yahoo!? hutz gegen Massenmails. http://mail.yahoo.com
2010 Mar 01
0
MASS::loglm - exploring a collection of models with add1, drop1
...ot;5", "6", "7" ), Sex = c("Male", "Female")), .Names = c("Status", "Rank", "Occupation", "Sex")), class = c("xtabs", "table"), call = xtabs(formula = as.formula(paste("freq ~", paste(tvars, collapse = "+"))), data = table)) > str(Hoyt1) xtabs [1:2, 1:3, 1:7, 1:2] 87 125 216 136 256 65 72 233 159 269 ... - attr(*, "dimnames")=List of 4 ..$ Status : chr [1:2] "College" "Non-College" ..$ Rank : chr [1:3] "Low" "Middle" &quo...
2002 Apr 24
1
pooling categories in a contingency table
...Here's what I tried: collapse.table <- function(table, ...) { nargs <- length(args <- list(...)) if (!nargs) return(table) if (inherits(table, "table")) { table <- as.data.frame.table(table) freq <- table[,"Freq"] tvars <- dimnames(table) } names <- names(args) print(cat("names: ", names, "\n")) for (i in 1:nargs) { vals <- args[[i]] nm <- names[[i]] print(cat("vals: ", vals, "\n")) print(cat("nm: ", n...
2009 May 29
0
possible bug in "sspir" package?
Greetings, I sent the message below to the developer of the contributed R package "sspir", but have yet to receive any response. I would be very grateful for any advice people have on the matter. Thanks, Mark -------- Original Message -------- Subject: possible bug in sspir? Date: Tue, 19 May 2009 16:08:41 -0700 From: Mark Scheuerell <mark.scheuerell at noaa.gov> To: