[R] DateTime wrong when exporting to csv in R

2014-08-20 Thread Sneha Bishnoi
Hi All! This seems to be trival but I am not able to find a solution for it. I have a dataframe with datetime columns in form of (%d/%m/%y %H:%M:%OS). I write it to csv file. Whne i open the csv file the date time format are in some number form . So even if I use custome settings from excel to

Re: [R] DateTime wrong when exporting to csv in R

2014-08-20 Thread Sneha Bishnoi
Tried that..does not help :( On Wed, Aug 20, 2014 at 8:03 AM, Saurabh Agrawal sagra...@idrcglobal.com wrote: Maybe converting POSIXct to character string using format before writing to csv will help. On 20 August 2014 17:23, Sneha Bishnoi sneha.bish...@gmail.com wrote: Hi All! This

Re: [R] DateTime wrong when exporting to csv in R

2014-08-20 Thread Jeff Newmiller
This problem is in Excel or your use thereof, not in R, and is therefore not technically on topic here. FWIW I am aware that localization of Excel can change the default date formats for input. I suspect that your installation of Excel has a different default date format than you are using in

Re: [R] loading saved files with objects in same names

2014-08-20 Thread Barry Rowlingson
On Tue, Aug 19, 2014 at 1:30 AM, Jinsong Zhao jsz...@yeah.net wrote: Hi there, I have several saved data files (e.g., A.RData, B.RData and C.RData). In each file, there are some objects with same names but different contents. Now, I need to compare those objects through plotting. However, I

Re: [R] loading saved files with objects in same names

2014-08-20 Thread Duncan Murdoch
On 20/08/2014, 8:58 AM, Barry Rowlingson wrote: On Tue, Aug 19, 2014 at 1:30 AM, Jinsong Zhao jsz...@yeah.net wrote: Hi there, I have several saved data files (e.g., A.RData, B.RData and C.RData). In each file, there are some objects with same names but different contents. Now, I need to

Re: [R] DateTime wrong when exporting to csv in R

2014-08-20 Thread Duncan Mackay
Hi If you really need to have minutes and seconds etc in excel then use a package that can write datetime columns that excel can read eg. access rather that csv. Microsoft is well known for changing dates and date formats - remember excel is a worksheet application not a database - caveat emptor.

Re: [R] Negative values on output

2014-08-20 Thread John Kane
It appears you posted in HTML and what we get is an almost useles set of data. It is much better to supply it using dput() (and always post to the list in plain text not HTML. See https://github.com/hadley/devtools/wiki/Reproducibility of

[R] as.Date woes

2014-08-20 Thread Peter Langfelder
Hi all, I have recently started working with Date objects and find the experience unsettling, to put it mildly. The help for as.Date says, in part: ## S3 method for class 'character' as.Date(x, format = , ...) x: An object to be converted. format: A character string. If

Re: [R] as.Date woes

2014-08-20 Thread Peter Langfelder
Never mind... the solution was to read the source code of as.Date.character. It turns out the default format= is meaningless. If 'format' is not given in the call to as.Date, it is NOT assumed to be , and the function gives very different results from a call where the argument format= is given.

Re: [R] DateTime wrong when exporting to csv in R

2014-08-20 Thread Saurabh Agrawal
Maybe converting POSIXct to character string using format before writing to csv will help. On 20 August 2014 17:23, Sneha Bishnoi sneha.bish...@gmail.com wrote: Hi All! This seems to be trival but I am not able to find a solution for it. I have a dataframe with datetime columns in form of

Re: [R] DateTime wrong when exporting to csv in R

2014-08-20 Thread Saurabh Agrawal
Could you please post your code and some sample data? http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example On 20 August 2014 17:43, Sneha Bishnoi sneha.bish...@gmail.com wrote: Tried that..does not help :( On Wed, Aug 20, 2014 at 8:03 AM, Saurabh Agrawal

Re: [R] DateTime wrong when exporting to csv in R

2014-08-20 Thread David Winsemius
On Aug 20, 2014, at 4:53 AM, Sneha Bishnoi wrote: Hi All! This seems to be trival but I am not able to find a solution for it. I have a dataframe with datetime columns in form of (%d/%m/%y %H:%M:%OS). I write it to csv file. Whne i open the csv file the date time format are in some

[R] Euclidean Distance in 3 Dimensions

2014-08-20 Thread Patzelt, Edward
R Community - I am attempting to write a function that will calculate the distance between points in 3 dimensional space for unique regions (e.g. localized brain regions such as the frontal lobe). For example I'm looking to compare each point in region 45 to every other region in 45 to establish

Re: [R] Euclidean Distance in 3 Dimensions

2014-08-20 Thread Don McKenzie
?dist from the help dist {stats}R Documentation Distance Matrix Computation Description This function computes and returns the distance matrix computed by using the specified distance measure to compute the distances between the rows of a data matrix. Is this what you want? Computing

[R] ordinary kriging: the edges of the polygons are ignored

2014-08-20 Thread Federico Calboli
Hi All, I am trying to do some kriging of a floor, based on a number of heat sensors. My data looks like this: sensortempxy 1 1 1.25437406 390 2960 2 2 0.64384594 830 2960 3 3 1.52067733 1420 2960 4 4 1.21441928 3127 2920 5 5 1.04227694

[R] Fwd: DateTime wrong when exporting to csv in R

2014-08-20 Thread David Winsemius
The image file I prepared and attached did not make it through. Trying again. -- David Begin forwarded message: From: David Winsemius dwinsem...@comcast.net Subject: Re: [R] DateTime wrong when exporting to csv in R Date: August 20, 2014 1:48:14 PM PDT To: Sneha Bishnoi

Re: [R] DateTime wrong when exporting to csv in R

2014-08-20 Thread David Winsemius
On Aug 20, 2014, at 1:48 PM, David Winsemius wrote: On Aug 20, 2014, at 4:53 AM, Sneha Bishnoi wrote: Hi All! This seems to be trival but I am not able to find a solution for it. I have a dataframe with datetime columns in form of (%d/%m/%y %H:%M:%OS). I write it to csv file. Whne

[R] Installing RODBC

2014-08-20 Thread William Deese
I tried installing RODBC but got the following message: Checks were yes until the following checking sql.h usability... no checking sql.h presence... no checking for sql.h... no checking sqlext.h usability... no checking sqlext.h presence... no checking for sqlext.h... no configure: error: ODBC

Re: [R] Installing RODBC

2014-08-20 Thread Marc Schwartz
On Aug 20, 2014, at 5:43 PM, William Deese williamde...@gmail.com wrote: I tried installing RODBC but got the following message: Checks were yes until the following checking sql.h usability... no checking sql.h presence... no checking for sql.h... no checking sqlext.h usability... no

[R] Line Graph greater than 2 variables on plot

2014-08-20 Thread Waseq Ziaie
Hi all, I was wondering if anyone knew how to construct a multiple line graph on R, where there are 2 (or more) sets of data points plotted against some x axis of data, and you can draw a line on the graph connecting each set of data points. for example: time..years. incidence

Re: [R] Installing RODBC

2014-08-20 Thread Jeff Newmiller
My guess is that you do not have the appropriate ODBC development library for your operating system installed. It is not unusual that R packages that provide interfaces to outside APIs require that those resources be installed and configured in the operating system before the relevant R library

Re: [R] Line Graph greater than 2 variables on plot

2014-08-20 Thread Duncan Mackay
Hi Try something like (as you have not given a reproducible example) library(lattice) xyplot(y1 + y2+ y3 ... ~ x, data = your data.frame, type = b, allow.multiple = TRUE) Read ?xyplot CAREFULLY as there are many possibilities you may want to have a look at library(lattice) ?useOuterStrips

[R] ggplot2: how to jitter spaghetti plot so slopes are preserved

2014-08-20 Thread David Romano
Hi, Suppose I have a the data frame given by: dput(toy.df) structure(list(id = c(1, 2, 1, 2), time = c(1L, 1L, 2L, 2L), value = c(1, 2, 2, 3)), .Names = c(id, time, value), row.names = c(NA, 4L), class = data.frame) that is: toy.df id time value 1 11 1 2 21 2 3 12

Re: [R] ggplot2: how to jitter spaghetti plot so slopes are preserved

2014-08-20 Thread Jeff Newmiller
Do the jittering yourself before you give the data to ggplot. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...

[R] file.show() may have some bug?

2014-08-20 Thread PO SU
Dear Rusers, when i try file.show( xxx.h) in Rstudio which using R3.0.2, it doesn't show anything. But when i use file.edit(xxx.h),it shows the right file, It is the same thing happen to xxx.c file. May you explain it to me? -- PO SU mail: desolato...@163.com Majored in Statistics from

[R-es] pregunta

2014-08-20 Thread Dr. José A Betancourt Bethencourt
Estimados Estoy entrenando hacer funciones que respondan a comandos, en esta caso en la salida gráfica se observa que dice : Exposure=var3 y outcome=var 1 quisiéramos que se reflejan los nombres de la base de datos : var1=estado, var2=cake, var3=chocolate Espero haberme explicado

Re: [R-es] pregunta

2014-08-20 Thread Javier Marcuzzi
Estimado José Betancourt Copio y pego una forma donde anda, básicamente es lo mismo pero con una pequeña diferencia, es tan parecido que están los dos códigos a continuación. Javier Marcuzzi library(epicalc) #Comando que llama a una función rm(list=ls()) #setwd(D:/DEMO_new/demo_scripts/OR/)

Re: [R-es] pregunta

2014-08-20 Thread Jorge I Velez
Buenas noches Javier y Jos�, Estoy en contra de usar attach(), asi que propongo la siguiente alternativa con with(): # paquete require(epicalc) # los argumentos en ... pasan de epicalc:::cc # ver ?cc para mas informacion foo - function(var1, var2, var3, ...){ or1 - cc(var1, var2, ...) or2 -