[R] Return Misalignment in Return.portfolio function in PerformanceAnalytics Package

2016-05-31 Thread Suphajak Ngamlak
Dear R users, I am trying to calculate NAV of portfolio using Return.portfolio function in PerformanceAnalytics Package. I am having difficulties with how I should specify weight in the function. I tried to replicate using fixed weights with rebalance_on = "months" by specifying weights

[R] R Premanently Occupy Server Memory

2012-11-11 Thread Suphajak Ngamlak
can clear the occupied memory without restarting. Best Regards, Suphajak Ngamlak __ 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

[R] Weight in Function RM

2011-09-06 Thread Suphajak Ngamlak
~IndSub1+IndSub2+IndSub3-1, data = Data, weight = Weight) summary(Result) Data2 - Data*Weight Result2- lm(formula = MatY~IndSub1+IndSub2+IndSub3-1, data = Data2) summary(Result2) Best Regards, Suphajak Ngamlak Asset Management (Hedge Fund) Phatra Securities Public Company Limited Tel: (66)2

[R] Execute SQL Stored Procedure in R

2010-11-24 Thread Suphajak Ngamlak
Regards, Suphajak Ngamlak Equity and Derivatives Trading Phatra Securities Public Company Limited Tel: (66)2-305-9179 Email: supha...@phatrasecurities.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https

[R] Calculate Mean from List

2010-11-09 Thread Suphajak Ngamlak
. How could I get this efficiently? Thank you Best Regards, Suphajak Ngamlak Equity and Derivatives Trading Phatra Securities Public Company Limited Tel: (66)2-305-9179 Email: supha...@phatrasecurities.com [[alternative HTML version deleted

[R] Get File Names in Folder, Read Files, Update, and Write

2010-09-15 Thread Suphajak Ngamlak
you Best Regards, Suphajak Ngamlak Equity and Derivatives Trading Phatra Securities Public Company Limited Tel: +662-305-9179 Email: supha...@phatrasecurities.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

[R] SQLDF from Variable Matrix

2010-08-03 Thread Suphajak Ngamlak
(select A, avg(B) as Average, median(B) as Median from $Input group by $Bygroup) return(AVG) } Result-GetAvg(Test,'A') The only difference is with $Input. How can I refer to this variable in sqldf. Thank you Best Regards, Suphajak Ngamlak Equity and Derivatives Trading Phatra

[R] Apply function to two variables

2010-08-02 Thread Suphajak Ngamlak
are large so I would like to avoid loop as much as possible. Thank you Best Regards, Suphajak Ngamlak Equity and Derivatives Trading Phatra Securities Public Company Limited Tel: +662-305-9179 Email: supha...@phatrasecurities.com [[alternative HTML version deleted

[R] Sequence from 2 Vectors

2010-07-19 Thread Suphajak Ngamlak
Best Regards, Suphajak Ngamlak Equity and Derivatives Trading Phatra Securities Public Company Limited Tel: +662-305-9179 Email: supha...@phatrasecurities.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https