[R-es] PLOTEO DEL DATO MENSUAL DESDE EL ACUMULADO

Fernando Arce fernand_arce en yahoo.es
Dom Mayo 21 04:22:19 CEST 2017


 blockquote, div.yahoo_quoted { margin-left: 0 !important; border-left:1px #715FFA solid !important; padding-left:1ex !important; background-color:white !important; } Prueba con la función cut, yo la he usado con fechasSaludosFer 


Sent from my Delorean in 1789 using my iPhone

On Friday, May 19, 2017, 2:44 am, Javier Valdes Cantallopts (DGA) <javier.valdes en mop.gov.cl> wrote:

#yiv6627178906 #yiv6627178906 -- _filtered #yiv6627178906 {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;} _filtered #yiv6627178906 {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;} _filtered #yiv6627178906 {font-family:Verdana;panose-1:2 11 6 4 3 5 4 4 2 4;}#yiv6627178906 #yiv6627178906 p.yiv6627178906MsoNormal, #yiv6627178906 li.yiv6627178906MsoNormal, #yiv6627178906 div.yiv6627178906MsoNormal {margin:0cm;margin-bottom:.0001pt;font-size:12.0pt;}#yiv6627178906 a:link, #yiv6627178906 span.yiv6627178906MsoHyperlink {color:blue;text-decoration:underline;}#yiv6627178906 a:visited, #yiv6627178906 span.yiv6627178906MsoHyperlinkFollowed {color:purple;text-decoration:underline;}#yiv6627178906 p.yiv6627178906MsoAcetate, #yiv6627178906 li.yiv6627178906MsoAcetate, #yiv6627178906 div.yiv6627178906MsoAcetate {margin:0cm;margin-bottom:.0001pt;font-size:8.0pt;}#yiv6627178906 span.yiv6627178906EstiloCorreo17 {color:#1F497D;}#yiv6627178906 span.yiv6627178906TextodegloboCar {}#yiv6627178906 .yiv6627178906MsoChpDefault {} _filtered #yiv6627178906 {margin:70.85pt 3.0cm 70.85pt 3.0cm;}#yiv6627178906 div.yiv6627178906WordSection1 {}#yiv6627178906 
Interesante.
 
Cada uno de los valores de mi tabla tiene asociada una fecha.
 
Se le podría asignar un  tipo de “break” ,para que le “diff” sea asociado a cada mes? Por ejemplo?
 
  
 

 
  
 
De: Carlos Ortega [mailto:cof en qualityexcellence.es]
Enviado el: jueves, 18 de mayo de 2017 12:35
Para: Javier Valdes Cantallopts (DGA)
CC: r-help-es en r-project.org
Asunto: Re: PLOTEO DEL DATO MENSUAL DESDE EL ACUMULADO
 
  
 
Hola,
 
  
 
Hay una función en "R" que permite hacer ese cálculo "diff()".
 
  
 
#---------------------
 
> DF <- read.table(textConnection(val_cum),as.is = TRUE)
 
> DF
 
    V1
 
1    1
 
2    5
 
3    8
 
4   10
 
5   20
 
6   30
 
7   50
 
8   80
 
9  120
 
10 125
 
11 200
 
12 250
 
> diff(DF$V1, 1)
 
 [1]  4  3  2 10 10 20 30 40  5 75 50
 
#---------------------
 
  
 
Saludos,
 
Carlos Ortega
 
www.qualiytexcellence.es
 
  
 
El 18 de mayo de 2017, 16:57, Javier Valdes Cantallopts (DGA) <javier.valdes en mop.gov.cl> escribió:
 
Hola estimados:
 
He tratado de encontrar la mejor forma de automatizar un proceso de “datos mensuales de precipitación”.
 
El tema es que tengo solo laserie acumulada anual de Pp. Por ende, busco una forma de plotear un gráfico,extrayendo “los datos mensuales desde el acumulado”
 
Ejemplo;
 
| 
ene
  | 
feb
  | 
mar
  | 
abr
  | 
may
  | 
jun
  | 
jul
  | 
ago
  | 
sep
  | 
oct
  | 
nov
  | 
dic
  | 
 
  |
| 
1
  | 
5
  | 
8
  | 
10
  | 
20
  | 
30
  | 
50
  | 
80
  | 
120
  | 
125
  | 
200
  | 
250
  | 
Datos ACUMULADOS
  |
| 
1
  | 
4
  | 
3
  | 
2
  | 
10
  | 
10
  | 
20
  | 
30
  | 
40
  | 
5
  | 
75
  | 
50
  | 
DATOS A PLOTEAR
  |


 
 
He buscado por  time series y dapply, pero encuentro que son un poco engorrosos sus métodos.
 
Saludos a todos.
 
 
 

 
 
 
  
 

CONFIDENCIALIDAD: La información contenida en este mensaje y/o en los archivos adjuntos es de carácter confidencial o privilegiada y está destinada al uso exclusivo del emisor y/o de la persona o entidad a quien va dirigida. Si usted no es el destinatario, cualquier almacenamiento, divulgación, distribución o copia de esta información está estrictamente prohibido y sancionado por la ley. Si recibió este mensaje por error, por favor infórmenos inmediatamente respondiendo este mismo mensaje y borre todos los archivos adjuntos. Gracias.

CONFIDENTIAL NOTE: The information transmitted in this message and/or attachments is confidential and/or privileged and is intented only for use of the person or entity to whom it is addressed. If you are not the intended recipient, any retention, dissemination, distribution or copy of this information is strictly prohibited and sanctioned by law. If you received this message in error, please reply us this same message and delete this message and all attachments. Thank you.
 



 
  
 
-- 
 
Saludos,
Carlos Ortega
www.qualityexcellence.es


CONFIDENCIALIDAD: La información contenida en este mensaje y/o en los archivos adjuntos es de carácter confidencial o privilegiada y está destinada al uso exclusivo del emisor y/o de la persona o entidad a quien va dirigida. Si usted no es el destinatario, cualquier almacenamiento, divulgación, distribución o copia de esta información está estrictamente prohibido y sancionado por la ley. Si recibió este mensaje por error, por favor infórmenos inmediatamente respondiendo este mismo mensaje y borre todos los archivos adjuntos. Gracias.

CONFIDENTIAL NOTE: The information transmitted in this message and/or attachments is confidential and/or privileged and is intented only for use of the person or entity to whom it is addressed. If you are not the intended recipient, any retention, dissemination, distribution or copy of this information is strictly prohibited and sanctioned by law. If you received this message in error, please reply us this same message and delete this message and all attachments. Thank you.
_______________________________________________
R-help-es mailing list
R-help-es en r-project.org
https://stat.ethz.ch/mailman/listinfo/r-help-es


------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20170521/fee0c4c5/attachment-0001.html>
------------ próxima parte ------------
A non-text attachment was scrubbed...
Name: image001.png
Type: image/png
Size: 33786 bytes
Desc: no disponible
URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20170521/fee0c4c5/attachment-0001.png>


Más información sobre la lista de distribución R-help-es