Re: [R] How might I work with a data.frame where each physical row represents several logical rows?

2017-01-04 Thread Jeff Newmiller
Below is my interpretation of one way to achieve your stated goal. I don't know what analysis you plan to perform, but this seems unlikely to be be my preferred analysis format (I think I would probably analyze subsets of the records related to specific parts of the transactions). library(dply

Re: [R] How might I work with a data.frame where each physical row represents several logical rows?

2017-01-04 Thread David Winsemius
> On Jan 4, 2017, at 8:51 PM, David Wolfskill wrote: > > On Wed, Jan 04, 2017 at 08:33:46PM -0800, David Winsemius wrote: >> ... >> Perhaps something like this: >> >> # function to read the values in 'values': >> parse_values <- function(x) {scan(text= gsub( "\\[|\\]","",x), sep=",") } >> >> #

Re: [R] How might I work with a data.frame where each physical row represents several logical rows?

2017-01-04 Thread David Wolfskill
On Wed, Jan 04, 2017 at 08:33:46PM -0800, David Winsemius wrote: > ... > Perhaps something like this: > > # function to read the values in 'values': > parse_values <- function(x) {scan(text= gsub( "\\[|\\]","",x), sep=",") } > > # the apply function reads line-by-line > new_dat <- apply(test_d

Re: [R] How might I work with a data.frame where each physical row represents several logical rows?

2017-01-04 Thread David Winsemius
> On Jan 4, 2017, at 7:40 PM, David Wolfskill wrote: > > I have (time series) data extracted from a repository that is stored > such that each record is for an hour, but each record contains an > ordered set of values throughout the hour. In the following exmaple, > I'll show sets of 4, depicti

[R] How might I work with a data.frame where each physical row represents several logical rows?

2017-01-04 Thread David Wolfskill
I have (time series) data extracted from a repository that is stored such that each record is for an hour, but each record contains an ordered set of values throughout the hour. In the following exmaple, I'll show sets of 4, depicting 0, 15, 30, and 45 minutes after each "start" point (respectivel

Re: [R] Sweave: Incorporating warnings into a Sweave output chunck

2017-01-04 Thread Duncan Mackay
Hi Thierry Thank you for your comments. I had considered it in the past but decided against it. May think again about switching but would have to change a lot of macros in my text editor. Regards Duncan From: Thierry Onkelinx [mailto:thierry.onkel...@inbo.be] Sent: Thursday,

Re: [R] XML to CSV

2017-01-04 Thread Jeff Newmiller
Andrew... you really need to understand the outline/tree nature of your XML schema to understand why blanks might appear in your data when you try to squeeze it into a rectangular layout like CSV. Opening the file in a modern Web browser like Firefox can help you see the forest among the trees,

Re: [R] XML to CSV

2017-01-04 Thread Ben Tupper
Hi, You should keep replies on the list - you never know when someone will swoop in with the right answer to make your life easier. Below is a simple example that uses xpath syntax to identify (and in this case retrieve) children that match your xpath expression. xpath epxressions are sort of

Re: [R] Sweave: Incorporating warnings into a Sweave output chunck

2017-01-04 Thread Thierry Onkelinx
Dear Duncan, I'd recommend to switch from Sweave to knitr. Knitr has more options for handling warnings and errors than Sweave. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team Biometrie & Kwaliteitszorg / team Biometrics &

Re: [R] if zlib version >= 1.2.5... no

2017-01-04 Thread David Winsemius
> On Jan 4, 2017, at 8:09 AM, bastl73 wrote: > > Configuring R Which "R" would that be? > with zlib-1.2.10 I get this error: > > checking for zlib.h... yes > checking if zlib version >= 1.2.5... no > checking whether zlib support suffices... configure: error: zlib library and > headers > a

Re: [R] if zlib version >= 1.2.5... no

2017-01-04 Thread peter dalgaard
This was fixed (independently?) in r-devel today: Peter-Dalgaards-MacBook-Air:R pd$ svn log m4/R.m4 | head r71889 | lawrence | 2017-01-04 04:57:31 +0100 (Wed, 04 Jan 2017) | 4 lines R_ZLIB macro tests ZLIB_VERNUM to handle z

[R] xtractomatic v3.2.0

2017-01-04 Thread Roy Mendelssohn - NOAA Federal
Hi All: I am pleased to announce that xtractomatic v3.2.0 is now available on CRAN. The changes in this version will be invisible to the user - the major changes are the use of https instead of http, and some changes in the vignette so that multiple attempts are made to download the data (the

[R] if zlib version >= 1.2.5... no

2017-01-04 Thread bastl73
Configuring R with zlib-1.2.10 I get this error: checking for zlib.h... yes checking if zlib version >= 1.2.5... no checking whether zlib support suffices... configure: error: zlib library and headers are required So I asked Mark from zlib about this problem and he wrote back: > exit(strncmp(

Re: [R] Tobit Regression with unbalanced Panel Data

2017-01-04 Thread PIKAL Petr
Hi Although I cannot help you with your actual problem, you shall start with checking your data before doing any analysis. We do not have your data so it is hard to say what can be wrong. At least you shall provide result of str(T1) and/or str(mydata) The first message is not an error but a wa

Re: [R] Tobit Regression with unbalanced Panel Data

2017-01-04 Thread Arne Henningsen
Dear Vanessa Please provide a minimal *reproducible* example that illustrates your problem, e.g. using a data set that is included in an R package. Best regards, Arne On 4 January 2017 at 10:28, Vanessa Romero wrote: > Hello, > > I am doing Tobit Regression in R, because my dependent variable

[R] Tobit Regression with unbalanced Panel Data

2017-01-04 Thread Vanessa Romero
Hello, I am doing Tobit Regression in R, because my dependent variable is censored at 0. I have unbalanced panel data, for 6 years, 107 companies. I use package CensReg. I have imported my database(T1). I use pdata.frame to specify the structure of my panel data. Like: *mydata<- pdata.frame (T

[R] gls procedure in nlme

2017-01-04 Thread Steven Yen
I need help with gls{nlme}. Specifically, I am estimating an equation with AR(1) using maximum-likelihood. I am not understanding the correlationoption below. Help appreciated. === library(nlme) eq1<-log(chnimp)~log(chempi)+log(gas)+log(rtwex)+befile6+ affile6+afdec6 reg1<-gls(

Re: [R] Problems when trying to install and load package "rzmq"

2017-01-04 Thread PIKAL Petr
Hi I am not at all an expert in such task. However from documentation it seems to me that it is not possible without some deeper understanding of linux and windows core. rzmq NeedsCompilation: yes SystemRequirements: ZeroMQ >= 3.0.0 libraries and headers (see< http://www.zeromq.org/>; Debia