[R] Save a plot with a name given as an argument in a function

2015-02-09 Thread Evgenia
test<-function(data, TitleGraph){ pdf("TitleGraph.pdf",width=7,height=5) plot(data) dev.off() } test(cars <- c(1, 3, 6, 4, 9),TitleGraph="etc") My problem is that I want graph pdf being saved as etc and not as Titlegraph.pdf -- View this message in context: http://r.789695.n4.nabble.com/S

Re: [R] Save a plot with a name given as an argument in a function

2015-02-09 Thread Evgenia
Thanks alot -- View this message in context: http://r.789695.n4.nabble.com/Save-a-plot-with-a-name-given-as-an-argument-in-a-function-tp4702965p4702969.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing lis

[R] inverse lexicographical ordering

2010-02-19 Thread Evgenia
Evgenia -- View this message in context: http://n4.nabble.com/inverse-lexicographical-ordering-tp1561930p1561930.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] inverse lexicographical ordering

2010-02-20 Thread Evgenia
Thanks for your help. Finally I found the solution to this problem for any matrix without having to know its number of columns I write it down in case someone else needed it. #Creation of b matrix ncol<-3 b <- matrix(0, 2^ncol, ncol) for (i in 1:ncol) b[, ncol+1-i] <- rep(rep(c

[R] Select maximum subset

2012-12-23 Thread Evgenia
ve the smallest number of NA In my example, these would be column1 and 2 since they give me 4 3 2 2 1 1 My real example have alot of columns and I want to find and save all possible subsets Thanks, alot Evgenia -- View this message in context: http://r.789695.n4.na

[R] Results with name of dataset

2010-08-09 Thread Evgenia
t; but "exampledata_9810 Example" How can I do this? Thanks for your help Evgenia -- View this message in context: http://r.789695.n4.nabble.com/Results-with-name-of-dataset-tp2318328p2318328.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Results with name of dataset

2010-08-10 Thread Evgenia
Yes, this is exactly want I want. Thanks Michael -- View this message in context: http://r.789695.n4.nabble.com/Results-with-name-of-dataset-tp2318328p2319484.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mai

[R] Problems when Apply a script to a list

2010-08-26 Thread Evgenia
am, I receive this error message someError in sink("output.txt") : sink stack is full . How can I solve this problem, as I want to have results of my program for 1000 datasets. 3) Using for is the correct way to run my proram for a list Thanks alot Evgenia -- View this message in contex

[R] Export Results to a txt file applying a function to a list

2010-08-31 Thread Evgenia
ist these are (for some element of a list I can't have results due to invertibility or convergence problem) Thanks alot Evgenia -- View this message in context: http://r.789695.n4.nabble.com/Export-Results-to-a-txt-file-applying-a-function-to-a-list-tp2401218p2401218.html Sent from the R help m

[R] Function try and Results of a program

2010-09-04 Thread Evgenia
i]] <- ifelse(is(tmp,"try-error"),NA,tmp) } My problem is that results have only the 1st element of the result lists of fun (i.e. only although tmp gives me both s and d. Thanks Evgenia -- View this message in context: http://r.789695.n4.nabble.com/Function-try-and-Re

Re: [R] Function try and Results of a program

2010-09-04 Thread Evgenia
David, your suggestion about try works perfect for me. I still have a problem with sink. Could you explain me better your suggestion? Thanks alot Evgenia -- View this message in context: http://r.789695.n4.nabble.com/Function-try-and-Results-of-a-program-tp2526621p2526822.html Sent from

Re: [R] Function try and Results of a program

2010-09-05 Thread Evgenia
David, your example clarify me the use of sink. I really appreciate your help Evgenia -- View this message in context: http://r.789695.n4.nabble.com/Function-try-and-Results-of-a-program-tp2526621p2527227.html Sent from the R help mailing list archive at Nabble.com

[R] definition of meq at spg

2011-05-30 Thread Evgenia
For my problem I have #Constraints b11<-0 b21<-0 b12<-0 b22<-0 n1>=0 n2>=0 n1<=1 n1<=1 n1+n2=1 In order to use spg I set Amat<-matrix(rbind(c(rep(0,10)),c(rep(0,10)),c(rep(0,2),1,rep(0,7)), c(rep(0,3),1,rep(0,6)),c(rep(0,10)),c(rep(0,10)), c(rep(0,6),1,rep(0,3)),c(rep(0,7),1,rep(0,2)), c(rep(0,8)

[R] Faster process for creating a matrix based on matrix element comparison

2011-10-28 Thread Evgenia
I have matrix data data<-matrix(cbind(c(0,0,0),c(NA,0,1),c(1,1,1),c(0,1,1)),ncol=3) and I want to create a new matrix by checking each element of the data and put value 0 if i have NA and 1 otherwise. For this reason i made the function below pdata<-matrix(NA,ncol=ncol(data),nrow=nrow(data)) pdat

[R] library(qpcR) cbind.na

2011-11-10 Thread Evgenia
I want to use function cbind.na at library(qpcR) I install package qpcR and I can use functions such m1 <- pcrfit(reps, 1, 2, l5) > AICc(m1) [1] -102.5843 but when i try cbind.na(1, 1:7) i take message Error: could not find function "cbind.na" Thanks -- View this message in context: ht

Re: [R] library(qpcR) cbind.na

2011-11-10 Thread Evgenia
Yes, I dit it. I got the same error message > qpcR:::cbind.na(1, 1:7) Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : object 'cbind.na' not found -- View this message in context: http://r.789695.n4.nabble.com/library-qpcR-cbind-na-tp4023339p4023489.html Sent from the R help ma

Re: [R] library(qpcR) cbind.na

2011-11-10 Thread Evgenia
I have windows 7 and below is information about R and loading library(qpcR) R version 2.9.1 (2009-06-26) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain con

[R] Summing list with NA elements

2012-05-04 Thread Evgenia
1] [,2] [,3] [1,] NA 12 12 [2,] 15 15 15 [3,] 18 18 18 Thanks in advance Evgenia -- View this message in context: http://r.789695.n4.nabble.com/Summing-list-with-NA-elements-tp4608167.html Sent from the R help mailing list archive at Nabble.com. _

Re: [R] Summing list with NA elements

2012-05-04 Thread Evgenia
I agree with you. I used this "trick" to take the desired results but I posted wondering If there was any other solution. Thanks Evgenia -- View this message in context: http://r.789695.n4.nabble.com/Summing-list-with-NA-elements-tp4608167p4608955.html Sent from the R help ma

Re: [R] LCA (e1071 package): error

2009-02-16 Thread Evgenia
Before using lca, try data<-as.matrix(data). For example when I tried using lca " lca(LSAT,2,niter=100)" for known LSAT data (library ltm), I took error messages. But, when I use data<-as.matrix(LSAT) lca(data,2,niter=100) I took results for lca King Regards, Evgenia Tr

[R] Mixture of Distributions

2008-02-21 Thread Evgenia
probabilities? Evgenia -- View this message in context: http://www.nabble.com/Mixture-of--Distributions-tp15618948p15618948.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch

[R] Split a matrix for mixture distribution

2008-02-24 Thread Evgenia
matrices each one containes 1000 elements from a certain rule,since i want to a) choose between f1, f2, f3 and f4 at random according to the probabilities p1, p2, p3 ,p4 (it is assumed p1+p2+p3=1). b) sample 1 value from whichever of f1, f2, f3 ,f4 was chosen Thanks a lot Evgenia -- View this