I download a csv extract from a database and use read.csv to read it
from R and when there are large character fields with embedded blanks,
slashes etc. - R often sees one line as two lines (or more).
I verfied with readLines that an embedded blank in a character field
causes a spurious new line
the csv files are downloaded from a database and it looks like some
character fields contain the CR-LF sequence within them.
This causes R to see a new record/row and the number of rows it sees
is different (usually higher) from the number of rows actually
extracted.
Any suggestions?
Thanks.
__
On Feb 5, 8:57 am, Barry Rowlingson
wrote:
> On Fri, Feb 5, 2010 at 10:23 AM, analys...@hotmail.com
>
> wrote:
> > the csv files are downloaded from a database and it looks like some
> > character fields contain the CR-LF sequence within them.
>
> > This causes
On Feb 5, 7:16 pm, Jim Lemon wrote:
> On 02/06/2010 09:05 AM, analys...@hotmail.com wrote:
>
>
>
>
>
> > On Feb 5, 8:57 am, Barry Rowlingson
> > wrote:
> >> On Fri, Feb 5, 2010 at 10:23 AM, analys...@hotmail.com
>
> >> wrote:
> >>
Is there a way to use read.csv() on such a file without deleting one
of the header rows?
Thanks.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.ht
On Apr 26, 8:17 pm, David Winsemius wrote:
> On Apr 25, 2013, at 6:35 PM, analys...@hotmail.com wrote:
>
> > Is there a way to use read.csv() on such a file without deleting one
> > of the header rows?
>
> What do you mean by "one of the header rows"?
> --
&
I have a data frame that reads
client ID date transcations
323232 11/1/2010 22
323232 11/2/2010 0
323232 11/3/2010 missing
121212 11/10/2010 32
12121211/11/2010 15
.
I want to order the rows by client ID and date and using a black-box
forecasting meth
On Dec 25, 10:17 am, David Winsemius wrote:
> On Dec 25, 2010, at 8:08 AM, analys...@hotmail.com wrote:
>
>
>
>
>
> > I have a data frame that reads
>
> > client ID date transcations
>
> > 323232 11/1/2010 22
> > 323232 11/2/2010 0
> >
On Dec 25, 1:36 pm, Gabor Grothendieck
wrote:
> On Sat, Dec 25, 2010 at 8:08 AM, analys...@hotmail.com
>
>
>
>
>
> wrote:
> > I have a data frame that reads
>
> > client ID date transcations
>
> > 323232 11/1/2010 22
> > 323232 11/2/2010
I have a data frame with three columns
client ID | date | value
For each cilent ID I want to determine Min date and Max date and for
any dates in between that are missing I want to insert a row
Client ID | date| NA
Any help would be appreciated.
__
but
> that should not matter.
>
> Bill Venables.
>
>
It is of course a great honor to receive a reply from you (but please
allow me to continue to be an anonymous source of bits and bytes over
the net).
This is a neat solution, but please watch this space to see my dumber
versi
an example available on the net goes like
> df
identifier quantity
1 1 10
2 1 20
3 2 30
4 1 15
5 2 10
6 3 20
> aggregate(df$quantity, by=list(df$identifier), sum)
Group.1 x
1 1 45
2 2 40
3
I have a dataframe with columns "ID",'date","estimate","actual" (but
not necessarily in that order - I do a merge somewhere and that
somehow messes up the order of the columns).
How can I output it to a csv file with the columns in the order that I
want?
Thanks.
_
I tried a date by date forecast of a time series and it seems to be
too wild. How can I aggregate the date into weeks or months as
required?
Thanks.
The input looks like
ID datadate("-MM-DD") value_for_day
-- ----
-- --
Thanks to all who responded.
On Jan 12, 10:34 am, Peter Ehlers wrote:
> On 2011-01-12 07:16, analys...@hotmail.com wrote:
>
> > I have a dataframe with columns "ID",'date","estimate","actual" (but
> > not necessarily in that order - I do
I have a function called plotID(ID) that would generate a plot for
customerID = "ID". I can run it repeatedly from within R without any
problems.
Would it be possible to run this function from the O/S command prompt;
each time you enter an ID , it would open a graphics window with the
plot for th
I am coming to R from Fortran and I used to use fixed size arrays in
named common. common /name1/array(100)
The contents of array can be accessed/modified if and only if this
line occurs in the function. Very helpful if different functions need
different global data (can have name2, name3 etc. fo
(1) I have a master data frame that reads
ClientID |date |value
(2) I also have a control data frame that reads
Client ID| Min date| Max date| control parameters
The control data set may not have all client IDs .
I want to use the control data frame on the master data frame to
remove client ID
(1)
> a = c("a","b")
> mode(a)
[1] "character"
> b = c(1,2)
> mode(b)
[1] "numeric"
> c = data.frame(a,b)
> mode(c$a)
[1] "numeric"
(2)
> a = c("a","a","b","b","c")
> levels(as.factor(a))
[1] "a" "b" "c"
> levels(as.factor(a[1:3]))
[1] "a" "b"
> a = as.factor(a)
> levels(a)
[1] "a" "b" "c"
> le
On Jan 22, 9:50 am, Berwin A Turlach wrote:
> On Sat, 22 Jan 2011 06:16:43 -0800 (PST)
>
> "analys...@hotmail.com" wrote:
> > (1)
>
> > > a = c("a","b")
> > > mode(a)
> > [1] "character"
> > > b = c(1,2)
> Moritz Grenkehttp://www.360mix.de
>
> -Ursprüngliche Nachricht-
> Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im
> Auftrag von analys...@hotmail.com
> Gesendet: Freitag, 21. Januar 2011 03:02
> An: r-h...@r-project.org
> Betreff: [R] data
I have
> df
quantity branch client date name
110 1 1 2010-01-01 one
220 2 1 2010-01-01 one
330 3 2 2010-01-01 two
415 4 1 2010-01-01 one
510 5 2 2010-01-01 two
620 6 3 20
Have
> actualsdf
ID Name datadate val
1 23 Acme Corp1 23
2 23 Acme Corp2 43
3 23 Acme Corp3 54
4 23 Acme Corp4 65
5 23 Acme Corp5 23
6 23 Acme Corp6 43
7 23 Acme Corp7 NA
8 23 Acme Corp8 43
9 23 Acme Corp
I have a data set whose rows look like
Item date variable_1 variable_2 variable_3 variable_4
Different items may occur over different dates.
During any single study, I might select a subset of the four variables
or some function of them to be plotted against time (date).
For each item, I would
I have a data set that has some comma separated strings in each row.
I'd like to create a vector consisting of all distinct strings that
occur. The number of strings in each row may vary.
Thanks for any help.
__
R-help@r-project.org mailing list
https:
On May 25, 4:46 am, Stefan wrote:
> analyst41 hotmail.com hotmail.com> writes:
>
>
>
> > I have a data set that has some comma separated strings in each row.
> > I'd like to create a vector consisting of all distinct strings that
> > occur. The number of strings in each row may vary.
>
> > Th
On May 25, 7:23 am, "analys...@hotmail.com"
wrote:
> On May 25, 4:46 am, Stefan wrote:
>
>
>
>
>
> > analyst41 hotmail.com hotmail.com> writes:
>
> > > I have a data set that has some comma separated strings in each row.
> > > I
27 matches
Mail list logo