Re: [R] Installing quantstrat

2013-11-26 Thread Ira Fuchs
Thanks for your help! I got quantstrat working after building it along with the 
FinancialInstrument and blotter packages (as well as foreach).

Ira


On Nov 26, 2013, at 12:59 PM, Joshua Ulrich wrote:

> On Tue, Nov 26, 2013 at 11:55 AM, Ira Fuchs  wrote:
>> Thanks. Since quantstrat showed a Last change date of only 6 days ago and a 
>> Build status of "Current", I blithely assumed that the command that is shown 
>> for installing it would work:
>> 
>> install.packages("quantstrat", repos="http://R-Forge.R-project.org";)
>> Installing package into ‘/Users/ihf/Library/R/3.0/library’
>> (as ‘lib’ is unspecified)
>> Warning: unable to access index for repository 
>> http://R-Forge.R-project.org/bin/macosx/contrib/3.0
>> 
>>   package ‘quantstrat’ is available as a source package but not as a binary
>> 
>> Warning message:
>> package ‘quantstrat’ is not available (for R version 3.0.1)
>> 
>> Based on the posting you referred to on stackoverflow, I need to download 
>> the SVN version and then see if I can build it. Although, I presume that if 
>> it were that simple, why would the version crated a week ago not work?
>> 
> I don't know; that's a question for the R-Forge maintainers.  It looks
> like they're building with 3.0.2, but I'm not sure that matters.  The
> easiest thing to do it just check out the source and build it
> yourself.
> 
>> On Nov 26, 2013, at 12:41 PM, Joshua Ulrich wrote:
>> 
>>> On Tue, Nov 26, 2013 at 11:34 AM, Ira Fuchs  wrote:
>>>> I would like to try to run the quantstrat package (located here: 
>>>> https://r-forge.r-project.org/R/?group_id=316). However, if I try to load 
>>>> quantstrat, I get a warning that it is not available for R v3.0.1, so 
>>>> perhaps that is the end of it.
>>>> Does anyone know if it is possible to run quantstrat with the current 
>>>> version of R?
>>> 
>>> Yep, see here: http://stackoverflow.com/q/11105131/271616
>>> 
>>> Best,
>>> --
>>> Joshua Ulrich  |  about.me/joshuaulrich
>>> FOSS Trading  |  www.fosstrading.com
>> 

__
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 commented, minimal, self-contained, reproducible code.


Re: [R] Installing quantstrat

2013-11-26 Thread Ira Fuchs
Thanks. Since quantstrat showed a Last change date of only 6 days ago and a 
Build status of "Current", I blithely assumed that the command that is shown 
for installing it would work:

install.packages("quantstrat", repos="http://R-Forge.R-project.org";)
Installing package into ‘/Users/ihf/Library/R/3.0/library’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository 
http://R-Forge.R-project.org/bin/macosx/contrib/3.0

   package ‘quantstrat’ is available as a source package but not as a binary

Warning message:
package ‘quantstrat’ is not available (for R version 3.0.1) 

Based on the posting you referred to on stackoverflow, I need to download the 
SVN version and then see if I can build it. Although, I presume that if it were 
that simple, why would the version crated a week ago not work?

On Nov 26, 2013, at 12:41 PM, Joshua Ulrich wrote:

> On Tue, Nov 26, 2013 at 11:34 AM, Ira Fuchs  wrote:
>> I would like to try to run the quantstrat package (located here: 
>> https://r-forge.r-project.org/R/?group_id=316). However, if I try to load 
>> quantstrat, I get a warning that it is not available for R v3.0.1, so 
>> perhaps that is the end of it.
>> Does anyone know if it is possible to run quantstrat with the current 
>> version of R?
> 
> Yep, see here: http://stackoverflow.com/q/11105131/271616
> 
> Best,
> --
> Joshua Ulrich  |  about.me/joshuaulrich
> FOSS Trading  |  www.fosstrading.com

__
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 commented, minimal, self-contained, reproducible code.


[R] Installing quantstrat

2013-11-26 Thread Ira Fuchs
I would like to try to run the quantstrat package (located here: 
https://r-forge.r-project.org/R/?group_id=316). However, if I try to load 
quantstrat, I get a warning that it is not available for R v3.0.1, so perhaps 
that is the end of it. 
Does anyone know if it is possible to run quantstrat with the current version 
of R?
__
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 commented, minimal, self-contained, reproducible code.


Re: [R] Sending a matrix in an email

2013-11-18 Thread Ira Fuchs
I understand what you are saying. I just didn't think that showing a sendmailR 
with a matrix as the body of the message would have been very helpful since it 
is the fact that the received email has no content that is the problem and that 
would not have shown up in the R console output. 
On Nov 18, 2013, at 10:47 AM, Jeff Newmiller wrote:

> You provided examples of what you wanted, but not examples where the same 
> code in a different context failed to provide the result you wanted. 
> "Reproducible" means "reproduces the problem".
> ---
> Jeff NewmillerThe .   .  Go Live...
> DCN:Basics: ##.#.   ##.#.  Live Go...
>  Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
> /Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
> --- 
> Sent from my phone. Please excuse my brevity.
> 
> Ira Fuchs  wrote:
>> I thought that I had provided an example of what I wanted to do but in
>> any case, capture.output seems to work, as in
>> 
>> sendmailR(to,from, capture.output(matrix_to_send))
>> 
>> I'm sure that there are myriad other ways (I tried print, which is
>> mentioned in FAQ 7.16 but it doesn't work in this context)
>> 
>> Thanks for your help.
>> On Nov 18, 2013, at 10:04 AM, Jeff Newmiller wrote:
>> 
>>> You have not provided the minimal reproducible code that the footer
>> of this email asks for, so we are playing 20 questions.
>>> 
>>> Perhaps you should convert the matrix to a data frame? Or is this an
>> example of FAQ 7.16?
>>> 
>> ---
>>> Jeff NewmillerThe .   .  Go
>> Live...
>>> DCN:Basics: ##.#.   ##.#.  Live
>> Go...
>>> Live:   OO#.. Dead: OO#.. 
>> Playing
>>> Research Engineer (Solar/BatteriesO.O#.       #.O#.  with
>>> /Software/Embedded Controllers)   .OO#.   .OO#. 
>> rocks...1k
>>> 
>> ---
>> 
>>> Sent from my phone. Please excuse my brevity.
>>> 
>>> Ira Fuchs  wrote:
>>>> Thanks for the suggestion. I just tried dput and it did not produce
>>>> what sendmailR requires for the body parameter. Here is a simplified
>>>> version of what I need to do:
>>>> 
>>>>> x=matrix(c(1,2,3),1,3)
>>>>> x
>>>>   [,1] [,2] [,3]
>>>> [1,]123
>>>>> colnames(x)=c("a","b","c")
>>>>> x
>>>>   a b c
>>>> [1,] 1 2 3
>>>> 
>>>>> dput(x)
>>>> structure(c(1, 2, 3), .Dim = c(1L, 3L), .Dimnames = list(NULL, 
>>>>  c("a", "b", "c")))
>>>> 
>>>> I want to send x in sendmailR(to,from,x) and have it look more or
>> less
>>>> like the output above. Simple, right?
>>>> 
>>>> 
>>>> On Nov 18, 2013, at 9:13 AM, Sarah Goslee wrote:
>>>> 
>>>>> What about dput()?
>>>>> 
>>>>> On Mon, Nov 18, 2013 at 8:35 AM, Ira Fuchs 
>>>> wrote:
>>>>>> I have a matrix which has colnames and I would like to send this
>>>> matrix using sendmailR. How can I convert this simple matrix to a
>>>> format which can be used as the body variable in sendmailR? I see
>> how I
>>>> can create a file attachment using mime_part but I would like to
>> send
>>>> the matrix in the body of the email.
>>>>>> 
>>>>>> The matrix looks like:
>>>>>> 
>>>>>>ABD  DEF  GHI  JKL MNO   TOT
>>>>>> [1,] 0.44 0.81 1.67 0.37 0.31 -1.18
>>>>>> 
>>>>>> 
>>>>>> All the conversions I have tried end up sending the matrix without
>>>> the colnames.
>>>>>> 
>>>>>> Thanks.
>>>>>> 
>>>> 
>>>> __
>>>> 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 commented, minimal, self-contained, reproducible code.
>>> 
> 

__
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 commented, minimal, self-contained, reproducible code.


Re: [R] Sending a matrix in an email

2013-11-18 Thread Ira Fuchs
I thought that I had provided an example of what I wanted to do but in any 
case, capture.output seems to work, as in

sendmailR(to,from, capture.output(matrix_to_send))

I'm sure that there are myriad other ways (I tried print, which is mentioned in 
FAQ 7.16 but it doesn't work in this context)

Thanks for your help.
On Nov 18, 2013, at 10:04 AM, Jeff Newmiller wrote:

> You have not provided the minimal reproducible code that the footer of this 
> email asks for, so we are playing 20 questions.
> 
> Perhaps you should convert the matrix to a data frame? Or is this an example 
> of FAQ 7.16?
> ---
> Jeff NewmillerThe .   .  Go Live...
> DCN:Basics: ##.#.   ##.#.  Live Go...
>  Live:   OO#.. Dead: OO#..  Playing
> Research Engineer (Solar/BatteriesO.O#.   #.O#.  with
> /Software/Embedded Controllers)   .OO#.   .OO#.  rocks...1k
> --- 
> Sent from my phone. Please excuse my brevity.
> 
> Ira Fuchs  wrote:
>> Thanks for the suggestion. I just tried dput and it did not produce
>> what sendmailR requires for the body parameter. Here is a simplified
>> version of what I need to do:
>> 
>>> x=matrix(c(1,2,3),1,3)
>>> x
>>[,1] [,2] [,3]
>> [1,]123
>>> colnames(x)=c("a","b","c")
>>> x
>>a b c
>> [1,] 1 2 3
>> 
>>> dput(x)
>> structure(c(1, 2, 3), .Dim = c(1L, 3L), .Dimnames = list(NULL, 
>>   c("a", "b", "c")))
>> 
>> I want to send x in sendmailR(to,from,x) and have it look more or less
>> like the output above. Simple, right?
>> 
>> 
>> On Nov 18, 2013, at 9:13 AM, Sarah Goslee wrote:
>> 
>>> What about dput()?
>>> 
>>> On Mon, Nov 18, 2013 at 8:35 AM, Ira Fuchs 
>> wrote:
>>>> I have a matrix which has colnames and I would like to send this
>> matrix using sendmailR. How can I convert this simple matrix to a
>> format which can be used as the body variable in sendmailR? I see how I
>> can create a file attachment using mime_part but I would like to send
>> the matrix in the body of the email.
>>>> 
>>>> The matrix looks like:
>>>> 
>>>> ABD  DEF  GHI  JKL MNO   TOT
>>>> [1,] 0.44 0.81 1.67 0.37 0.31 -1.18
>>>> 
>>>> 
>>>> All the conversions I have tried end up sending the matrix without
>> the colnames.
>>>> 
>>>> Thanks.
>>>> 
>> 
>> __
>> 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 commented, minimal, self-contained, reproducible code.
> 

__
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 commented, minimal, self-contained, reproducible code.


Re: [R] Sending a matrix in an email

2013-11-18 Thread Ira Fuchs
That's the ticket!  So many functions…so little time.  Thanks to everyone.
On Nov 18, 2013, at 9:47 AM, David Winsemius wrote:

> 
> On Nov 18, 2013, at 8:30 AM, Ira Fuchs wrote:
> 
>> Thanks for the suggestion. I just tried dput and it did not produce what 
>> sendmailR requires for the body parameter. Here is a simplified version of 
>> what I need to do:
>> 
>>> x=matrix(c(1,2,3),1,3)
>>> x
>>[,1] [,2] [,3]
>> [1,]123
>>> colnames(x)=c("a","b","c")
>>> x
>>a b c
>> [1,] 1 2 3
>> 
>>> dput(x)
>> structure(c(1, 2, 3), .Dim = c(1L, 3L), .Dimnames = list(NULL,
>>   c("a", "b", "c")))
>> 
>> I want to send x in sendmailR(to,from,x) and have it look more or less like 
>> the output above. Simple, right?
> 
> After this at the console:
> 
> sink("myfile.txt")
> > x=matrix(c(1,2,3),1,3)
> > x
> > colnames(x)=c("a","b","c")
> > x
> > sink()
> 
> I get this in myfile.txt:
> 
> [,1] [,2] [,3]
> [1,]123
> a b c
> [1,] 1 2 3
> 
> There is also a capture.output function.
> 
> -- 
> David
> 
>> 
>> 
>> On Nov 18, 2013, at 9:13 AM, Sarah Goslee wrote:
>> 
>>> What about dput()?
>>> 
>>> On Mon, Nov 18, 2013 at 8:35 AM, Ira Fuchs  wrote:
>>>> I have a matrix which has colnames and I would like to send this matrix 
>>>> using sendmailR. How can I convert this simple matrix to a format which 
>>>> can be used as the body variable in sendmailR? I see how I can create a 
>>>> file attachment using mime_part but I would like to send the matrix in the 
>>>> body of the email.
>>>> 
>>>> The matrix looks like:
>>>> 
>>>>ABD  DEF  GHI  JKL MNO   TOT
>>>> [1,] 0.44 0.81 1.67 0.37 0.31 -1.18
>>>> 
>>>> 
>>>> All the conversions I have tried end up sending the matrix without the 
>>>> colnames.
>>>> 
>>>> Thanks.
>>>> 
>> 
>> __
>> 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 commented, minimal, self-contained, reproducible code.
> 
> David Winsemius, MD
> Alameda, CA, USA
> 

__
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 commented, minimal, self-contained, reproducible code.


Re: [R] Sending a matrix in an email

2013-11-18 Thread Ira Fuchs
Thanks for the suggestion. I just tried dput and it did not produce what 
sendmailR requires for the body parameter. Here is a simplified version of what 
I need to do:

> x=matrix(c(1,2,3),1,3)
> x
 [,1] [,2] [,3]
[1,]123
> colnames(x)=c("a","b","c")
> x
 a b c
[1,] 1 2 3

> dput(x)
structure(c(1, 2, 3), .Dim = c(1L, 3L), .Dimnames = list(NULL, 
c("a", "b", "c")))

I want to send x in sendmailR(to,from,x) and have it look more or less like the 
output above. Simple, right?


On Nov 18, 2013, at 9:13 AM, Sarah Goslee wrote:

> What about dput()?
> 
> On Mon, Nov 18, 2013 at 8:35 AM, Ira Fuchs  wrote:
>> I have a matrix which has colnames and I would like to send this matrix 
>> using sendmailR. How can I convert this simple matrix to a format which can 
>> be used as the body variable in sendmailR? I see how I can create a file 
>> attachment using mime_part but I would like to send the matrix in the body 
>> of the email.
>> 
>> The matrix looks like:
>> 
>>  ABD  DEF  GHI  JKL MNO   TOT
>> [1,] 0.44 0.81 1.67 0.37 0.31 -1.18
>> 
>> 
>> All the conversions I have tried end up sending the matrix without the 
>> colnames.
>> 
>> Thanks.
>> 

__
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 commented, minimal, self-contained, reproducible code.


[R] Sending a matrix in an email

2013-11-18 Thread Ira Fuchs
I have a matrix which has colnames and I would like to send this matrix using 
sendmailR. How can I convert this simple matrix to a format which can be used 
as the body variable in sendmailR? I see how I can create a file attachment 
using mime_part but I would like to send the matrix in the body of the email. 

The matrix looks like:

  ABD  DEF  GHI  JKL MNO   TOT 
[1,] 0.44 0.81 1.67 0.37 0.31 -1.18


All the conversions I have tried end up sending the matrix without the colnames.

Thanks.

__
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 commented, minimal, self-contained, reproducible code.


[R] Sending a matrix in an email

2013-11-17 Thread Ira Fuchs
I have a matrix which has colnames and I would like to send this matrix using 
sendmailR. How can I convert this simple matrix to a format which can be used 
as the body variable in sendmailR? I see how I can create a file attachment 
using mime_part but I would like to send the matrix in the body of the email. 

The matrix looks like:

  ABD  DEF  GHI  JKL MNO   TOT 
[1,] 0.44 0.81 1.67 0.37 0.31 -1.18

All the conversions I have tried end up sending the matrix without the colnames.

Thanks.


[[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 commented, minimal, self-contained, reproducible code.