Re: [R] as.Date and ylim in empty plot: RESOLVED

2018-09-19 Thread Ogbos Okike
Hi David,
That's it!!! The outcome is attached.

Many thanks please.

Best
Ogbos

On Wed, Sep 19, 2018 at 11:34 PM David Winsemius 
wrote:

>
> > On Sep 19, 2018, at 7:55 AM, Ogbos Okike 
> wrote:
> >
> > Dear Experts,
> > I generated the plot attached. Every other thing is OK except the black
> > horizontal lines which should appear like points or dots as the coloured
> > ones. I can't understand why.
> >
> > I tried to change it to look like dots by calling empty plots so that I
> > will add them as points.
> >
> > Since I have a range of date that can fall any where within 2005, I
> tried:
> >
> > plot(1, type="n", xlab="", ylab="",
> > xlim=c(as.Date("2005-01-01"),as.Date("2005-12-31")), ylim=c(-.5, -10))
> >
> > ylim worked fine but xlim instead of appearing like date as indicated on
> > the x-axes of the attached plot, translated to ordinary numbers (12800,
> > 12900,13000, 13100).
> >
> > All the data is of the same format:
> > 2005-01-04 -2.76105935648091
> > 2005-01-19 -9.60813496025994
> > 2005-01-22 -7.92101965866777
> > 2005-02-19 -1.61308152604905
> > 2005-02-24 -1.51497015807712
> > 2005-05-09 -2.06465797304654
> > 2005-05-11 -1.14840389007051
> > 2005-05-16 -3.85281900888504
> > 2005-06-13 -1.18659683796617
> > 2005-06-17 -3.48787712566258
> > 2005-06-22 -1.14223758296308
> > 2005-07-18 -4.96013018907366
> > 2005-08-03 -1.24313324914368
> > 2005-08-07 -2.96672894841722
> > 2005-08-10 -1.11868063781156
> > 2005-08-25 -1.46453734930983
> > 2005-09-13 -8.00895215754776
> > 2005-09-15 -6.63439065989452
> > 2005-10-13 -2.25054996925846
> > 2005-12-15 -1.08933890547705
>
> You did not succeed in creating a plot that the rhelp mail server would
> accept. My guess is that the first column is a factor variable and that you
> did not use colClasses when doing your data input.
>
> dd <- read.table(text="2005-01-04 -2.76105935648091
> 2005-01-19 -9.60813496025994
> 2005-01-22 -7.92101965866777
> 2005-02-19 -1.61308152604905
> 2005-02-24 -1.51497015807712
> 2005-05-09 -2.06465797304654
> 2005-05-11 -1.14840389007051
> 2005-05-16 -3.85281900888504
> 2005-06-13 -1.18659683796617
> 2005-06-17 -3.48787712566258
> 2005-06-22 -1.14223758296308
> 2005-07-18 -4.96013018907366
> 2005-08-03 -1.24313324914368
> 2005-08-07 -2.96672894841722
> 2005-08-10 -1.11868063781156
> 2005-08-25 -1.46453734930983
> 2005-09-13 -8.00895215754776
> 2005-09-15 -6.63439065989452
> 2005-10-13 -2.25054996925846
> 2005-12-15 -1.08933890547705", colClasses=c("Date","numeric")
> )
>
>
> No problems with:
>
>  plot(dd[[1]], dd[[2]],
> xlim=c(as.Date("2005-01-01"),as.Date("2005-12-31")))
>
>
> (Not a particularly good test of the use of an xlim argument since nothing
> was excluded.)
>
> PDF's are accepted. PNGs are not.
>
> --
> David.
> >
> > Thank you so much for your input.
> >
> > Best regards
> > Ogbos
> > __
> > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> > 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
> Alameda, CA, USA
>
> 'Any technology distinguishable from magic is insufficiently advanced.'
>  -Gehm's Corollary to Clarke's Third Law
>
>
>
>
>
>


Ogbos.pdf
Description: Adobe PDF document
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] as.Date and ylim in empty plot

2018-09-19 Thread David Winsemius

> On Sep 19, 2018, at 7:55 AM, Ogbos Okike  wrote:
> 
> Dear Experts,
> I generated the plot attached. Every other thing is OK except the black
> horizontal lines which should appear like points or dots as the coloured
> ones. I can't understand why.
> 
> I tried to change it to look like dots by calling empty plots so that I
> will add them as points.
> 
> Since I have a range of date that can fall any where within 2005, I tried:
> 
> plot(1, type="n", xlab="", ylab="",
> xlim=c(as.Date("2005-01-01"),as.Date("2005-12-31")), ylim=c(-.5, -10))
> 
> ylim worked fine but xlim instead of appearing like date as indicated on
> the x-axes of the attached plot, translated to ordinary numbers (12800,
> 12900,13000, 13100).
> 
> All the data is of the same format:
> 2005-01-04 -2.76105935648091
> 2005-01-19 -9.60813496025994
> 2005-01-22 -7.92101965866777
> 2005-02-19 -1.61308152604905
> 2005-02-24 -1.51497015807712
> 2005-05-09 -2.06465797304654
> 2005-05-11 -1.14840389007051
> 2005-05-16 -3.85281900888504
> 2005-06-13 -1.18659683796617
> 2005-06-17 -3.48787712566258
> 2005-06-22 -1.14223758296308
> 2005-07-18 -4.96013018907366
> 2005-08-03 -1.24313324914368
> 2005-08-07 -2.96672894841722
> 2005-08-10 -1.11868063781156
> 2005-08-25 -1.46453734930983
> 2005-09-13 -8.00895215754776
> 2005-09-15 -6.63439065989452
> 2005-10-13 -2.25054996925846
> 2005-12-15 -1.08933890547705

You did not succeed in creating a plot that the rhelp mail server would accept. 
My guess is that the first column is a factor variable and that you did not use 
colClasses when doing your data input.

dd <- read.table(text="2005-01-04 -2.76105935648091
2005-01-19 -9.60813496025994
2005-01-22 -7.92101965866777
2005-02-19 -1.61308152604905
2005-02-24 -1.51497015807712
2005-05-09 -2.06465797304654
2005-05-11 -1.14840389007051
2005-05-16 -3.85281900888504
2005-06-13 -1.18659683796617
2005-06-17 -3.48787712566258
2005-06-22 -1.14223758296308
2005-07-18 -4.96013018907366
2005-08-03 -1.24313324914368
2005-08-07 -2.96672894841722
2005-08-10 -1.11868063781156
2005-08-25 -1.46453734930983
2005-09-13 -8.00895215754776
2005-09-15 -6.63439065989452
2005-10-13 -2.25054996925846
2005-12-15 -1.08933890547705", colClasses=c("Date","numeric")
)


No problems with:

 plot(dd[[1]], dd[[2]], xlim=c(as.Date("2005-01-01"),as.Date("2005-12-31")))


Rplots.pdf
Description: Adobe PDF document


(Not a particularly good test of the use of an xlim argument since nothing was 
excluded.)

PDF's are accepted. PNGs are not.

-- 
David.
> 
> Thank you so much for your input.
> 
> Best regards
> Ogbos
> __
> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
> 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
Alameda, CA, USA

'Any technology distinguishable from magic is insufficiently advanced.'   
-Gehm's Corollary to Clarke's Third Law





__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] as.Date and ylim in empty plot

2018-09-19 Thread MacQueen, Don via R-help
I'm a little surprised at some of what happens, but you can get date labels on 
the x axis like this:

drng <- as.Date( c('2005-1-1' , '2005-12-31') )
plot(1, type="n", xlab="", ylab="", xaxt='n', xlim=drng, ylim=c(-.5, -10))
axis(1, at= pretty(drng), lab=format(pretty(drng)))

and if you prefer some other date format, specify it in the call to format()

Did you intend to reverse the direction of your  y axis?

-Don
--
Don MacQueen
Lawrence Livermore National Laboratory
7000 East Ave., L-627
Livermore, CA 94550
925-423-1062
Lab cell 925-724-7509
 
 

On 9/19/18, 7:55 AM, "R-help on behalf of Ogbos Okike" 
 wrote:

Dear Experts,
I generated the plot attached. Every other thing is OK except the black
horizontal lines which should appear like points or dots as the coloured
ones. I can't understand why.

I tried to change it to look like dots by calling empty plots so that I
will add them as points.

Since I have a range of date that can fall any where within 2005, I tried:

plot(1, type="n", xlab="", ylab="",
xlim=c(as.Date("2005-01-01"),as.Date("2005-12-31")), ylim=c(-.5, -10))

ylim worked fine but xlim instead of appearing like date as indicated on
the x-axes of the attached plot, translated to ordinary numbers (12800,
12900,13000, 13100).

All the data is of the same format:
2005-01-04 -2.76105935648091
2005-01-19 -9.60813496025994
2005-01-22 -7.92101965866777
2005-02-19 -1.61308152604905
2005-02-24 -1.51497015807712
2005-05-09 -2.06465797304654
2005-05-11 -1.14840389007051
2005-05-16 -3.85281900888504
2005-06-13 -1.18659683796617
2005-06-17 -3.48787712566258
2005-06-22 -1.14223758296308
2005-07-18 -4.96013018907366
2005-08-03 -1.24313324914368
2005-08-07 -2.96672894841722
2005-08-10 -1.11868063781156
2005-08-25 -1.46453734930983
2005-09-13 -8.00895215754776
2005-09-15 -6.63439065989452
2005-10-13 -2.25054996925846
2005-12-15 -1.08933890547705

Thank you so much for your input.

Best regards
Ogbos
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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 -- To UNSUBSCRIBE and more, see
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] as.Date and ylim in empty plot

2018-09-19 Thread Ogbos Okike
Dear Experts,
I generated the plot attached. Every other thing is OK except the black
horizontal lines which should appear like points or dots as the coloured
ones. I can't understand why.

I tried to change it to look like dots by calling empty plots so that I
will add them as points.

Since I have a range of date that can fall any where within 2005, I tried:

plot(1, type="n", xlab="", ylab="",
xlim=c(as.Date("2005-01-01"),as.Date("2005-12-31")), ylim=c(-.5, -10))

ylim worked fine but xlim instead of appearing like date as indicated on
the x-axes of the attached plot, translated to ordinary numbers (12800,
12900,13000, 13100).

All the data is of the same format:
2005-01-04 -2.76105935648091
2005-01-19 -9.60813496025994
2005-01-22 -7.92101965866777
2005-02-19 -1.61308152604905
2005-02-24 -1.51497015807712
2005-05-09 -2.06465797304654
2005-05-11 -1.14840389007051
2005-05-16 -3.85281900888504
2005-06-13 -1.18659683796617
2005-06-17 -3.48787712566258
2005-06-22 -1.14223758296308
2005-07-18 -4.96013018907366
2005-08-03 -1.24313324914368
2005-08-07 -2.96672894841722
2005-08-10 -1.11868063781156
2005-08-25 -1.46453734930983
2005-09-13 -8.00895215754776
2005-09-15 -6.63439065989452
2005-10-13 -2.25054996925846
2005-12-15 -1.08933890547705

Thank you so much for your input.

Best regards
Ogbos
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] frequent-pattern tree

2018-09-19 Thread Sarah Goslee
A quick search on the incredibly useful rseek.org turns up a couple of
possibilities, including the rCBA package, and

https://stackoverflow.com/questions/38240190/frequent-pattern-growth-in-r-or-python

This is out of my area, but the searching suggests that FP tree and FP
growth are closely linked algorithms, at least.

With more knowledgeable search terms you can likely do a better job on
rseek.org yourself.

Sarah
On Wed, Sep 19, 2018 at 9:08 AM Jeff Reichman  wrote:
>
> r-help
>
>
>
> Is there a r-package that will construct a frequent-pattern (FP) tree ?
>
>
>
> Jeff Reichman
>


-- 
Sarah Goslee
http://www.functionaldiversity.org

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] frequent-pattern tree

2018-09-19 Thread Jeff Reichman
r-help

 

Is there a r-package that will construct a frequent-pattern (FP) tree ?

 

Jeff Reichman


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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] New to R

2018-09-19 Thread Bill Poling
Hello Jim, as new use"R" myself, 1.5 years I HIGHLY recommend emersion.

Subscribe to :
https://www.r-bloggers.com/

https://stackoverflow.com

http://blog.revolutionanalytics.com/

Anything Hadley Wickam, he has several free e-books.

Depending on  r-help (r-help@r-project.org) is a 
tough way to go, they can be hard on new users without the formality of:
PLEASE do read the posting guide 
http://www.R-project.org/posting-guide.html

Be prepared for partial suggestions that depend on your further research, trial 
and error!

WHP



From: R-help  On Behalf Of Jim Blackburn
Sent: Friday, September 14, 2018 2:00 PM
To: r-help@r-project.org
Subject: [R] New to R

I am newly subscribed to r-project.


I have recently plunged into R on a totally self-taught basis (may not have 
been the smartest decision!)



I am attempting to download tickers as a time series. I can successfully create 
RDA files but I want to convert them to CVS. Following is the code I have 
created so far.



if (!require(BatchGetSymbols)) install.packages('BatchGetSymbols')

library(BatchGetSymbols)

tickers <- c('SPY','VCR', 'RPG')

first.date <- Sys.Date()-365

last.date <- Sys.Date

l.out <- BatchGetSymbols(tickers = tickers,

first.date = first.date,

last.date = last.date,

cache.folder = file.path("c://Users/Owner/Documents/R",

+ 'BGS_Cache') )

print(l.out$df.control)

print(l.out$df.tickers)







I can print(l.out) and see that it contains all the data, but it is not a 
data.frame



Can anyone help with creating a data.frame and then converting to CSV?



Any help is GREATLY appreciated!



Thanks



Jim


Sent from 
Mail>
 for Windows 10


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To 
UNSUBSCRIBE and more, see
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.

Confidentiality Notice This message is sent from Zelis. ...{{dropped:15}}

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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-es] Dos variables con el mismo nombre, cambiar nombre

2018-09-19 Thread Fer Arce via R-help-es
Hola Miriam:

Elige que columna quieres cambiar y usa names,  por ejempko si la columa a 
renombrar es la cuarta:

Names(Datos)[4] <- 'nuevonombre'

Saludos
Fer

⁣Sent from my Delorean in 1789 using a phone

Sent from BlueMail ​

On 19 Sep. 2018, 21:29, at 21:29, Miriam Alzate  
wrote:
>Buenos días,
>
>Tengo en un mismo data frame dos variables con el mismo nombre, ha sido
>
>un error pero ahora para cambiar sólo el nombre a una, ¿cómo tengo que
>hacer? Al ejecutar rename() me cambia el nombre a las dos.
>
>Un saludo y gracias
>
>___
>R-help-es mailing list
>R-help-es@r-project.org
>https://stat.ethz.ch/mailman/listinfo/r-help-es

[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


[R-es] Dos variables con el mismo nombre, cambiar nombre

2018-09-19 Thread Miriam Alzate

Buenos días,

Tengo en un mismo data frame dos variables con el mismo nombre, ha sido 
un error pero ahora para cambiar sólo el nombre a una, ¿cómo tengo que 
hacer? Al ejecutar rename() me cambia el nombre a las dos.


Un saludo y gracias

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


[R] Smallest Space Analysis (SSA) in R

2018-09-19 Thread Andrew
Hi

As part of my forensics psych course, we have been introduced to 
Guttman's smallest space analysis (SSA). I want to explore this approach 
using R, but despite finding some queries on the web about this same 
thing, have yet to find any answers. The MASS package doesn't seem to do 
the job, and the only thing I have been able to find is some proprietary 
software HUDAP  (Hebrew University Data Analysis Package) which may/ not 
be compatible with R (or GNU/Linux for that matter).

Does anyone have information on how to do SSA using R?

Many thanks

Andrew


[[alternative HTML version deleted]]

__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
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-es] Abiertas las inscripciones de las X Jornadas de Usuarios de R

2018-09-19 Thread Antonio Maurandi López

22-23/nov de 2018

sorry


El 19/09/18 a las 10:45, Antonio Maurandi López escribió:

*¡Desde hoy te puedes inscribir en las “X Jornadas de Usuarios de R” en
Murcia!*

   * Fechas : 22-23/nov de 2017
   * Lugar: Universidad de Murcia
   * Precios reducidos para socios y socias de RHispano y UMUR 35€ ,
 resto de colectivos 45€.
   * Precios a partir del 1 de noviembre 10€ más cada tipo.

Enlace para la inscripción:
https://cursos.um.es/cursos/alumnos.cursos.inscripcionlogin.do?a=FDB606086652E5D125EFDC56AD567B6A==

*¡Animate a presentar tu trabajo!*

Como en años anteriores, la presentación de trabajos en las Jornadas
puede ser en forma de:

   * /Presentación oral/, en distintas sesiones paralelas, que reflejen
 el amplio abanico de análisis de datos mediante R
   * /Póster/, en una sesión específica
   * /Taller/, que permita profundizar en aspectos interesantes y menos
 conocidos de R

¡Contribuye!, Envía tu propuesta a través del siguiente formulario
http://r-es.org/XjuR/

Queremos agradecer la colaboración de nuestros patrocinadores
 sin los que las Jornadas no serían posible. Si
tú o tu institución
estáis interesados en patrocinar las Jornadas, ¡aún estas a tiempo!
consultar cómo hacerlo en http://r-es.org/XjuR/

Nos vemos!!

Síguenos en twitter:: #XJRes



--
Antonio Maurandi López
Secretario del Departamento Didáctica de las Ciencias Matemáticas y Sociales
Área de Didáctica de la Matemática
Planta 3ª, pasillo 3º. Despacho 3.22
Facultad de Educación
Universidad de Murcia
30110 Campus de Espinardo
Murcia

@. amaura...@um.es
T. 868 88 4594
http://gauss.inf.um.es/
http://gauss.inf.um.es/umur/
http://www.um.es/web/didactica-matematicas/
Blog: www.sae.saiblogs.inf.um.es
X JORNADAS DE USUARIOS DE R: http://r-es.org/XjuR/
---
Audentes fortuna iuva

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


[R-es] Abiertas las inscripciones de las X Jornadas de Usuarios de R

2018-09-19 Thread Antonio Maurandi López
*¡Desde hoy te puedes inscribir en las “X Jornadas de Usuarios de R” en 
Murcia!*

  * Fechas : 22-23/nov de 2017
  * Lugar: Universidad de Murcia
  * Precios reducidos para socios y socias de RHispano y UMUR 35€ ,
resto de colectivos 45€.
  * Precios a partir del 1 de noviembre 10€ más cada tipo.

Enlace para la inscripción: 
https://cursos.um.es/cursos/alumnos.cursos.inscripcionlogin.do?a=FDB606086652E5D125EFDC56AD567B6A==

*¡Animate a presentar tu trabajo!*

Como en años anteriores, la presentación de trabajos en las Jornadas 
puede ser en forma de:

  * /Presentación oral/, en distintas sesiones paralelas, que reflejen
el amplio abanico de análisis de datos mediante R
  * /Póster/, en una sesión específica
  * /Taller/, que permita profundizar en aspectos interesantes y menos
conocidos de R

¡Contribuye!, Envía tu propuesta a través del siguiente formulario 
http://r-es.org/XjuR/

Queremos agradecer la colaboración de nuestros patrocinadores 
 sin los que las Jornadas no serían posible. Si 
tú o tu institución
estáis interesados en patrocinar las Jornadas, ¡aún estas a tiempo! 
consultar cómo hacerlo en http://r-es.org/XjuR/

Nos vemos!!

Síguenos en twitter:: #XJRes

-- 
Antonio Maurandi López
Secretario del Departamento Didáctica de las Ciencias Matemáticas y Sociales
Área de Didáctica de la Matemática
Planta 3ª, pasillo 3º. Despacho 3.22
Facultad de Educación
Universidad de Murcia
30110 Campus de Espinardo
Murcia

@.amaura...@um.es
T. 868 88 4594
http://gauss.inf.um.es/
http://gauss.inf.um.es/umur/
http://www.um.es/web/didactica-matematicas/
Blog:www.sae.saiblogs.inf.um.es
X JORNADAS DE USUARIOS DE R:http://r-es.org/XjuR/
---
Audentes fortuna iuva


[[alternative HTML version deleted]]

___
R-help-es mailing list
R-help-es@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es