[R] Efficient frontier

2014-09-15 Thread Aparna
Hi I need help for plotting efficient frontier, I have expected return and covariance matrix. I am using tseries and downloaded portfolio package too. The suggestion says to use efficient.frontier, but it looks you replaces it by something in R 3.1.1 as it says this is not available. At current

Re: [R] expression() and font.lab ?

2012-04-27 Thread Aparna Radhakrishnan
label is not in bold face or in "sans" font. Regards, Aparna. On 27 Apr 2012, at 19:36, David Winsemius wrote: > > On Apr 27, 2012, at 11:22 AM, aparna15 wrote: > >> Hi.. >> >> I managed to use expression() for superscripting and subscripting values in >

Re: [R] substituting own test statistics in a built-in function

2012-03-15 Thread Aparna Sampath
internal functions and say that these set of functions cannot be called by the user. and these functions perform the permutation part, so I need to somehow access them. Regards Ap On Thu, Mar 15, 2012 at 6:40 PM, Sarah Goslee wrote: > Hi, > On Mar 15, 2012 4:28 AM, "Aparna Sampat

[R] substituting own test statistics in a built-in function

2012-03-15 Thread Aparna Sampath
Hi All I would like to compute the raw p-value from permutation tests and I found mt.sample.rawp() from the package multtest almost similar to what I want to do. But in the function definition: mt.sample.rawp(V,classlabel,test="t",side="abs",fixed.seed.sampling="y",B=1,na=.mt.naNUM,nonpara="n

Re: [R] Error message: object of type 'closure' is not subsettable

2012-03-01 Thread Aparna Sampath
Dear Petr I am sorry about the code being incomplete. I also take note of not using R keywords and functions as variable names. I was able to overcome my problem using unlist(). Thanks. Regards Aparna On Thu, Mar 1, 2012 at 3:57 PM, Petr PIKAL wrote: > Hi > > If you want sensible res

Re: [R] Error message: object of type 'closure' is not subsettable

2012-02-28 Thread Aparna Sampath
[[4]] NULL [1] 3.897434 Any suggestions. Thanks for all the help. :) Regards Aparna On Tue, Feb 28, 2012 at 11:01 PM, Petr PIKAL wrote: > Hi > > Difficult to without knowing what objects you are operating your > functions. > > I get > > > test.functional.t(1:10,1:10

Re: [R] Error message: object of type 'closure' is not subsettable

2012-02-28 Thread Aparna Sampath
tStatistics["numerator",]) denominators <- unlist(testStatistics["denominator",]) } I get my error in the function above moderated.functional.t. testStatistics is shown to be a function(x) when I type it in R console. But there is no function definition for testStatistics i

Re: [R] Error message: object of type 'closure' is not subsettable

2012-02-28 Thread Aparna Sampath
Hi All I am trying to use the unlist() in R to a list variable. The following statements are within a function. { denominator <- sqrt(s1 / res.em1$n + s2 / res.em2$n) returnValue <- l2 / (denominator + 11) attr(returnValue,"numerator") <- l2 attr(returnValue,"denominator") <- denominator

[R] how to access values from functions

2012-02-06 Thread Aparna Sampath
)$AICc } Thanks in advance. Regards Ap -- Aparna Sampath Master of Science (Bioinformatics) Nanyang Technological University Mob no : +65 91601854 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do re

[R] Create simulated data's using mvrnorm

2011-07-06 Thread Aparna Sampath
Hi All This might be something very trivial but I seem to miss something in the syntax or logic which makes me keep wandering around the problem without arriving at a solution. What I want to do is to simulate a sample data for performing cluster analysis. I tried to use x1= mvrnorm(10,rep(0.8,

Re: [R] Ordering a matrix based on cluster no

2011-06-26 Thread Aparna Sampath
0 0. 20 Hyperdip.50.C9 1BCR.ABL.Hyperdip.R5 0 1. The results are not right! I want it to look for the gene TEL.AML1.C49 in the second matrix and group it accordingly. Aparna -- View this message in context: http://r.789695.n4.nabble.com/Orderin

[R] Ordering a matrix based on cluster no

2011-06-26 Thread Aparna Sampath
nly first element will be compared. But i want to check for each gene in the 100x100 matrix for its cluster number and then group it. I also tried the order() but it did not help either. Thanks for the help! :) Aparna -- Aparna Sampath Master of Science (Bioinformatics) Nanyang Technologi

Re: [R] How to create a numeric data.frame

2011-06-13 Thread Aparna
form of data.frame. But when I try to convert it to numeric using as.numeric(mydataset), it gives me an error saying Error: (list) object cannot be coerced to type 'double'. Could you tell me why this error occurs. Thanks Aparna _

Re: [R] How to create a numeric data.frame

2011-06-13 Thread Aparna
input data is numeric or not. Using this I could tell that my data is not numeric and that is why I was trying to convert it to numeric data. This forum is of great help since I am able to learn more and thanks for making this forum so helpful to people like us who are new to R. Aparna _

[R] How to create a numeric data.frame

2011-06-13 Thread Aparna
Hi All I am new to R and I am not sure of how this should be done. I have a matrix of 985x100 values and the class is data.frame. A sample of my dataset looks like this (Since its a huge dataset and it would make the screen look more complex, I am pasting only the first few rows and columns.

[R] Row and column normalization

2011-05-30 Thread aparna
Hi I am totally new to R and I would like to know how to perform both row and column normalization (so that both rows and columns sum to zero and have standard deviation of 1) using R on gene expression data. Thanks for the help. -- View this message in context: http://r.789695.n4.nabble.co

Re: [R] Fitting linear models

2009-04-21 Thread Vemuri, Aparna
want to develop a regression equation based on the current results I have. Also, I know the atmospheric chemistry model requires SO4, NO3 and NH4 to estimate PBW. So I am using the same as IVs for the regression model. Aparna -Original Message- From: Dimitri Liakhovitski [mailto:ld7

Re: [R] Fitting linear models

2009-04-21 Thread Vemuri, Aparna
NO3 NH4 PBW SO4 1 -0.0867 0.999 0.999 NO3 -0.0867 1 -0.0527 -0.0938 NH4 0.999 -0.0527 1 0.999 PBW 0.999 -0.0938 0.999 1 Aparna -Original Message- From: Dimitri Liakhovitski [mailto:ld7...@gmail.com] Sent: Tuesday, April 21, 2009

Re: [R] Fitting linear models

2009-04-21 Thread Vemuri, Aparna
f the variables to have coefficients in the regression equation or a at least a consistent result, irrespective of the order of input information. -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Tuesday, April 21, 2009 8:38 AM To: Vemuri, Aparna Cc: r-help@r-projec

Re: [R] Fitting linear models

2009-04-21 Thread Vemuri, Aparna
Yes, they are all of the same length. -Original Message- From: Dimitri Liakhovitski [mailto:ld7...@gmail.com] Sent: Tuesday, April 21, 2009 8:32 AM To: Vemuri, Aparna Cc: r-help@r-project.org Subject: Re: [R] Fitting linear models Are they of the same length? On Tue, Apr 21, 2009 at 11

Re: [R] Fitting linear models

2009-04-21 Thread Vemuri, Aparna
The variables are all in separate vectors. -Original Message- From: Dimitri Liakhovitski [mailto:ld7...@gmail.com] Sent: Tuesday, April 21, 2009 8:26 AM To: Vemuri, Aparna Cc: David Winsemius; r-help@r-project.org Subject: Re: [R] Fitting linear models Aparna, I should have been more

Re: [R] Fitting linear models

2009-04-21 Thread Vemuri, Aparna
gives me the same result as before. Bert: This is not homework. But I will remember to do my research before posting here. Aparna -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Monday, April 20, 2009 5:35 PM To: Vemuri, Aparna Cc: r-help@r-project.or

[R] Fitting linear models

2009-04-20 Thread Vemuri, Aparna
ay for me to force R to use all the variables? I checked the correlation matrices to makes sure there is no orthogonality between the variables. Thanks Aparna model1<-lm(formula = PBW ~ SO4 + NH4 +NO3) > model1 Call: lm(formula = PBW ~ SO4 + NH4 + NO3) Coefficients: (Intercept)

Re: [R] Controlling widths in write.fwf()

2009-04-15 Thread Vemuri, Aparna
I was trying to format and write each line while looping over the entire matrix; which made it terribly slow. Without the loop, it works fine. Thanks Duncan. -Original Message- From: Duncan Murdoch [mailto:murd...@stats.uwo.ca] Sent: Wednesday, April 15, 2009 10:04 AM To: Vemuri, Aparna

Re: [R] Controlling widths in write.fwf()

2009-04-15 Thread Vemuri, Aparna
Duncan I tried writeLines. But I need to print about 23 lines and it is really slow. Thanks Aparna -Original Message- From: Duncan Murdoch [mailto:murd...@stats.uwo.ca] Sent: Tuesday, April 14, 2009 4:34 PM To: Vemuri, Aparna Cc: r-help@r-project.org Subject: Re: [R] Controlling

Re: [R] Controlling widths in write.fwf()

2009-04-14 Thread Vemuri, Aparna
Thanks Brendan. write.table() doesn't seem to do it for me. The problem is that my data is not formatted as well as you show in the example. There are numbers and strings of varying sizes and write.table() misses the format. Aparna -Original Message- From: Brendan

[R] Controlling widths in write.fwf()

2009-04-14 Thread Vemuri, Aparna
specify this? Thanks in Advance Aparna [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

[R] Large 3d array manipulation

2009-02-27 Thread Vemuri, Aparna
script. for(i in 1:243) { for(j in 1:246) { for(k in 1:768) { newVar[i,j,k] <- mean( myVar[i,j,k:k+7]) } } } This works, but needless to mention it take a very long time to loop over all the rows, columns and time periods. I was wondering if there is a simpler way to do this. Thanks Apa

Re: [R] Tables in legend

2009-02-09 Thread Vemuri, Aparna
can share any ideas on how to do this. -Original Message- From: jim holtman [mailto:jholt...@gmail.com] Sent: Friday, February 06, 2009 4:52 PM To: Vemuri, Aparna Cc: r-help@r-project.org Subject: Re: [R] Tables in legend This will probably do what you need: plot(1)

[R] Tables in legend

2009-02-06 Thread Vemuri, Aparna
ven better to format the width of columns 2 and 3 in the legend and remove the blank spaces between them. I have tried rounding off the number values to 3 digits with no luck. I hope this is not too ambitious to ask. Thanks in advance! Aparna __ R-help@

[R] Boxplots by variable

2009-02-02 Thread Vemuri, Aparna
Dear R users, I have a matrix "final" which looks like this: final oSO4 oNO3 mSO4 mNO3 [1,] 3.3728 0.2110 1.9517421 1.01883602 [2,] 0.8249 0.0697 1.5970292 0.11368781 [3,] 0.2636 0.1004 0.6012445 0.24356332 [4,] 8.0072 0.3443 6.1016998 3.63207149 [5,] 13.5079 0

[R] Help with R software

2007-11-16 Thread aparna m
Hi Can anyone teall me how to perform matrix related operations using R like multiplication of a n*n matrix , finding transpose , inverse eigen values etc Thanks __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEA