Thanks and with
datlines <- as.data.frame(inp[( grep("", inp)[1]+5 ):(grep("",
inp)[1]-1)]);
I get the data as needed.
Thanks again
H.
- Original Message -
On Jun 14, 2012, at 10:23 AM, Halldór Björnsson wrote:
> Hi,
>
> I am trying to read in weather balloon data, where each file
Thanks,
even better
- Original Message -
On Jun 14, 2012, at 12:18 PM, Halldór Björnsson wrote:
> Thanks and with
>
> datlines <- as.data.frame(inp[( grep("", inp)[1]+5 ):(grep(" PRE>", inp)[1]-1)]);
>
I suggest this instead.
> read.fwf(textConnection(datlines), widths=rep(7,11))
V1
On Jun 14, 2012, at 12:18 PM, Halldór Björnsson wrote:
Thanks and with
datlines <- as.data.frame(inp[( grep("", inp)[1]+5 ):(grep("PRE>", inp)[1]-1)]);
Er, ... are you sure? I got a factorized mess when I did that.
> str(datlines)
'data.frame': 98 obs. of 1 variable:
$ inp[(grep("", i
On Jun 14, 2012, at 12:18 PM, Halldór Björnsson wrote:
Thanks and with
datlines <- as.data.frame(inp[( grep("", inp)[1]+5 ):(grep("PRE>", inp)[1]-1)]);
I suggest this instead.
> read.fwf(textConnection(datlines), widths=rep(7,11))
V1V2V3V4 V5 V6 V7 V8V9 V10
On Jun 14, 2012, at 10:23 AM, Halldór Björnsson wrote:
Hi,
I am trying to read in weather balloon data, where each file has a
header of fixed length and
a trailing section of a fixed length. The data section (the table)
is of variable length.
An example of the data is on:
http://weather
Hi,
I am trying to read in weather balloon data, where each file has a header of
fixed length and
a trailing section of a fixed length. The data section (the table) is of
variable length.
An example of the data is on:
http://weather.uwyo.edu/cgi-bin/sounding?region=naconf&TYPE=TEXT%3ALIST&YEAR
6 matches
Mail list logo