search for: varn

Displaying 15 results from an estimated 15 matches for "varn".

Did you mean: var
2003 May 01
4
var[i]
Dear all, How could I use variables in a loop that their names are in a vector? For example: aaa <- 1:10 bbb <- aaa*2 ccc <- aaa+bbb varn <- c("aaa", "bbb", "ccc") m <- rep(NA, 3) for (i in 1:length(varn)) m[i] <- mean(varn[i]) # wrong thanks in advance Juli -- "Wars do not solve problems, wars generate even more problems"
2009 Nov 12
1
Reading a data file one record at a time [SEC=UNCLASSIFIED]
Dear r-help, I have a radar data file in the following format: nrays for (1 to n_rays) { some_data_info for (1 to n_gates) { some_data_info} } N_rays=360 and n_gates=950 The data looks something like: Header line1 Ray1 header gate1 var1, var2,.....,varN ... gate950 var1, var2,.....,varN Ray2 header gate1 var1, var2,.....,varN ... gate950 var1, var2,.....,varN ... ... ... Ray360 header gate1 var1, var2,.....,varN ... gate950 var1, var2,.....,varN I am having trouble r...
2011 Apr 02
4
help
Dear R Help group I need to run a command line script from within R session. I am not clear how i can acheive this. I tried shell and system function, but i am missing something critical.can someone provide help? My intention is to create a pdf file of a plot in R and then attach existing files from my system as attachment into the newly created pdf file. Any help would be greatly appreciated..
2003 May 20
1
Extracting elements from an reStruct
...S skills aren't great and I haven't been able to find it documented anywhere. I want to write a new function for use with lme objects; the function will simply calculate an ICC (aka "rho") for each level of a mixed-effects model. What I need for this is pretty simple: (c(var1..varn, residual)) / sum(c(var1..varn, residual)) where var1..varn are the variances of the intercepts of each level's equation, and residual is the residual variance. The problem is getting access to var1..varn (or, as R generally reports it, sd1..sdn) programmatically. I can get the residual stan...
2003 Apr 09
3
How to count the number of parameters in a function
I have the following function: Myfunc <- function(var1,var2,.....,varN) { ..... } In the above function I have a variable number of parameters (N>2). How can I count how many parameters have been entered? Any help appreciated Thanks Arno
2010 Aug 02
1
Convert an expression to a function
Hi John, Here is my code practicing. Please give me some advises. Thank you. Wu Gong # Extract the function string f.str <- sub("y~","",exprtext) # Get arglist from the text sp1 <- paste("\\",c(getGroupMembers(Arith),"(",")"),sep="") sp2 <- getGroupMembers(Math) sps <-
2016 Oct 11
3
Colapsar una matriz con NA en una única fila
Javier Muchas gracias por su respuesta Aunque no está funcionando, pues si ejecuto: EncDTE1<- t.EncDTE1[ !is.na(t.EncDTE1$Var1),] obtengo Var1, Var2, Var3,...Varn con datos "texto", NA, NA....NA Pero al ejecutar EncDTE1<- t.EncDTE1[ !is.na(t.EncDTE1$Var2),] obtengo Var1, Var2, Var3,...Varn con datos NA,"texto", NA....NA Estoy tratando de dar la vuelta con el loop otra vez, pero aún no lo consigo... Muchas gracias El 11 de octu...
2011 Jun 07
2
What is wrong in m
Hi everyone, What is wrong in below asterisk application? The output should be content of field booth_status from table booths: [extension-status] exten => _X.,1,MYSQL(Connect connid 127.0.0.1 root password my-extensions) exten => _X.,n,MYSQL(Query allow_call ${connid} SELECT extension_status FROM mytable WHERE extension=${CALLERID(num)} ORDER BY id DESC LIMIT 1) exten =>
2011 Jun 17
4
profile plot in R
Hi friends, I have a matrix with following format. group var1 var2 .......varN c1 group1 1.2399 1.4990....-1.4829 c2 group4 0.8989 0.7849.....1.8933 ... ... c100 group10 ..... I want to draw a profile plot of each condition c1 to c100, which rows in above matrix and each line representing a row should be uniquely colored according to the group(1 to 10). I think this...
2001 Apr 03
2
Still need help w/ making a table
Greetings again. I'm still trying to coerce a pile of data into a frequency table format. I've managed to do so using perl, so I now have a tab-delimited file that contains the contingency table I'm trying to use: Group var1 var2 ... varn B 42 11 3 C 44 1 12 ... X 12 0 19 I can read the table in using read.table(), but I end up with a data frame, and when I try to use as.table() it says: Error in as.table.default(df) : cannot coerce into a table What I need is a table object upo...
2012 Aug 06
0
GAM and interpolation?
Hello fellow R users, I would need your help on GAM/GAMM models and interpolation on a marked spatial point process (cases and controls). I use the mgcv package to fit a GAMM model with a binary outcome, a parametric part (var1+..+varn), a spline used for the spatial variation, and a random effect coded through another spline in this form: gam(outcome~var1+.+varn+s(xlong+ylat)+s(var, bs="re"), data=MyData, family=binomial(link=logit)) My purpose is to calculate a risk map adjusted on my covariates to look for co...
2016 Oct 11
2
Colapsar una matriz con NA en una única fila
Hola Consulto por un problema que no consigo resolver. Tengo un dataframe con muchas columnas todas de texto. Cada columna tiene solamente un valor válido y el resto son NAs. También cada fila tiene un único valor válido. Quiero colapsar ese data frame en uno que tenga solamente una fila y todas las columnas. Intenté con loops, while, apply y otros parecidos pero no lo logro El ejemplo del
2007 Dec 09
1
List comprehensions for R
...allowances for two shapes of f: ## ## (1) (`<-` (`~` expr ## var) ## seq) ## and ## ## (2) (`~` expr ## (`{` (`<-` var1 seq1) ## (`<-` var2 seq2) ## ... ## (`<-` varN <- seqN))) ## ## In the former case, we set gens <- list(var <- seq), unifying the ## treatment of both shapes under the latter, more general one. syntax.error <- "Comprehension expects 'expr ~ {x1 <- seq1; ... ; xN <- seqN}'." if(!is.call(f) || (f[[1]...
2000 Mar 08
3
Reading data for discriminant analysis
Dear R users, I want to do discriminant analysis on my data. I have successfully followed the discriminant analysis in V & R on the iris data: > ir <- rbind (iris3[,,1],iris3[,,2],iris3[,,3]) > ir.species <- c(rep("s",50),rep("c",50),rep("v",50)) > a <- lda(log(ir),ir.species) > a$svd^2/sum(a$svd^2) [1] 0.996498601 0.003501399 > a.x <-
2001 Jun 21
0
factors in model.frame.default
..."vbss","vbsn","vbsi","vasg","vast","vass", "vasn","vasi","vbrg","vbrt","vbrs","vbrn","vbri","varg","vart", "vars","varn","vari","mdg","mdt","mds","mdn","mdi","tmg","tmt", "tms","tmn","tmi","mr","rnf","mdic","emd","mv", "rh",...