[R] graph label greek symbol failure

2009-08-17 Thread e-letter
Readers, Previous questions about this requirement have been for m$ users, my failure occurs using linux. I have tried to add the delta (δ) symbol to the y axis label and the result is &D, using the command: ...ylab="δt"... Any advice please? rh...@conference.jabber.org mandriva 2008 r 251 (27

[R] postscript, options

2009-08-18 Thread e-letter
Readers, I am not able to create a postscript file with the following command: postscript("/pathto/filename.eps,horizontal=FALSE,onefile="FALSE") A file is not created, instead the command terminal shows the plus sign(+) on a new line: + What does this mean please? rh...@conference.jabber.org

Re: [R] graph label greek symbol failure

2009-08-18 Thread e-letter
On 17/08/2009, Patrick Connolly wrote: > On Mon, 17-Aug-2009 at 11:51AM +0100, e-letter wrote: > > |> Readers, > |> > |> Previous questions about this requirement have been for m$ users, my > |> failure occurs using linux. > |> > |> I have tried to add th

Re: [R] graph label greek symbol failure

2009-08-18 Thread e-letter
On 17/08/2009, Michael Knudsen wrote: > On Mon, Aug 17, 2009 at 12:51 PM, e-letter wrote: > >> I have tried to add the delta (δ) symbol to the y axis label and the >> result is &D, using the command: >> >> ...ylab="δt"... > > Try ylab = expr

Re: [R] graph label greek symbol failure

2009-08-18 Thread e-letter
On 18/08/2009, Gavin Simpson wrote: > On Mon, 2009-08-17 at 11:51 +0100, e-letter wrote: >> Readers, >> >> Previous questions about this requirement have been for m$ users, my >> failure occurs using linux. >> >> I have tried to add the delta (δ) symbol to t

Re: [R] postscript, options

2009-08-18 Thread e-letter
On 18/08/2009, Rodrigo Aluizio wrote: > I'm not shure but I guess that you miss a " and putted it in the wrong > place! > Try this: postscript("/pathto/filename.eps",horizontal=FALSE,onefile=FALSE) > > Hope It helps. Thank you, that did help a little, but the eps file was faulty and I could not o

Re: [R] postscript, options

2009-08-18 Thread e-letter
On 18/08/2009, Stefan Grosse wrote: > On Tue, 18 Aug 2009 13:52:58 +0100 e-letter wrote: > > EL> On 18/08/2009, Rodrigo Aluizio wrote: > EL> > I'm not shure but I guess that you miss a " and putted it in the > EL> > wrong place! > EL> > T

Re: [R] graph label greek symbol failure

2009-08-19 Thread e-letter
On 18/08/2009, Gavin Simpson wrote: > On Tue, 2009-08-18 at 13:06 +0100, e-letter wrote: >> On 17/08/2009, Michael Knudsen wrote: >> > On Mon, Aug 17, 2009 at 12:51 PM, e-letter wrote: >> > >> >> I have tried to add the delta (δ) symbol to the y axis labe

Re: [R] graph label greek symbol failure

2009-08-19 Thread e-letter
On 19/08/2009, Gavin Simpson wrote: > On Wed, 2009-08-19 at 14:20 +0100, e-letter wrote: >> On 18/08/2009, Gavin Simpson wrote: >> > On Tue, 2009-08-18 at 13:06 +0100, e-letter wrote: >> >> On 17/08/2009, Michael Knudsen wrote: >> >> > On M

[R] change default measurement unit to millimetre

2009-08-20 Thread e-letter
Readers, How do I configure R so that all units of measurement are in millimetres? For example if I want to set the width of a graph, I want to write: width=100 and R interprets this value as millimetres. Yours, rh...@conference.jabber.org r 251 mandriva 2008 ___

Re: [R] postscript, options

2009-08-20 Thread e-letter
On 18/08/2009, Stefan Grosse wrote: > On Tue, 18 Aug 2009 16:08:36 +0100 e-letter wrote: > > EL> > > postscript("/pathto/filename.eps",horizontal=FALSE,onefile=FALSE,paper="special") > EL> > > EL> This command created a small blank eps f

Re: [R] change default measurement unit to millimetre

2009-08-21 Thread e-letter
On 20/08/2009, Patrick Connolly wrote: > On Thu, 20-Aug-2009 at 10:25PM +1000, Jim Lemon wrote: > >> e-letter wrote: >>> Readers, >>> >>> How do I configure R so that all units of measurement are in >>> millimetres? For example if I want to set the

[R] linear regression, exclude a datum

2009-09-14 Thread e-letter
Readers, I have been reading the r book (Crawley) and tried to use the influence measures function for linear regression, as described. I have one datum that I wish to show in the graph but exclude from the regression and ab line. x y 0 5 10 9 20 10 30 19 40 4 Wit

Re: [R] linear regression, exclude a datum

2009-09-14 Thread e-letter
On 14/09/2009, Steve Lianoglou wrote: > Hi, > > On Sep 14, 2009, at 9:47 AM, e-letter wrote: > >> Readers, >> >> I have been reading the r book (Crawley) and tried to use the >> influence measures function for linear regression, as described. I >> have

Re: [R] linear regression, exclude a datum

2009-09-15 Thread e-letter
On 15/09/2009, Uwe Ligges wrote: > > > e-letter wrote: >> On 14/09/2009, Steve Lianoglou wrote: >>> Hi, >>> >>> On Sep 14, 2009, at 9:47 AM, e-letter wrote: >>> >>>> Readers, >>>> >>>> I have been readin

[R] margin text warning message NAs coercion

2010-02-16 Thread e-letter
Readers, I tried to the following commands: plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) mtext(expression(A[1]~B[2]),"additional text",side=3,line=1) I receive the text that I want, but the command terminal shows the following response: Warning message: NAs introduced by coercion in

Re: [R] margin text warning message NAs coercion

2010-02-16 Thread e-letter
On 16/02/2010, Peter Ehlers wrote: > On 2010-02-16 9:21, e-letter wrote: >> Readers, >> >> I tried to the following commands: >> >> plot(y~x,ylab=expression(A[1]~B[2],xlab=expression(C~D)) >> mtext(expression(A[1]~B[2]),"additional text",side=3

[R] assessing data variation

2009-07-10 Thread e-letter
I have data like so: timedatum 30 12 60 24 90 37 120 41 150 8 In addition to standard deviation, I want to measure the average of the differences in data for each time interval, i.e. average of 24-12, 37-24, 41-37, 8-41. Is there a statistical term for this task? Which

[R] Merge failure using zoo package

2010-04-02 Thread e-letter
Readers, Please refer to attached example data files. It seems that the merge function fails for the latter section of the data set. Command terminal output: > library(chron) > library(zoo) > x<-read.zoo("test1.csv",header=TRUE,sep=",",FUN=times) > y<-read.zoo("test2.csv",header=TRUE,sep=",",FUN=

Re: [R] Merge failure using zoo package

2010-04-02 Thread e-letter
Data files test1, ...2, ...3, ...4 respectively. time1,dataset1 01:01:00,0.73512097 01:01:30,0.34860813 01:02:00,0.61306418 01:02:30,0.01495898 01:03:00,0.27035612 01:03:30,0.69513898 01:04:00,0.46451758 01:04:30,0.61672569 01:05:00,0.82496122 01:05:30,0.34766154 01:06:00,0.69618714 01:06:30,0.390

Re: [R] Merge failure using zoo package

2010-04-02 Thread e-letter
On 02/04/2010, Gabor Grothendieck wrote: > The files only have one data column. What is the meaning of x[,2], > etc. ? What is z1? > I only want to merge one column from one file with one column from another file. With [x,2], I am trying to select the column of data. > Please provide reproduci

Re: [R] Merge failure using zoo package

2010-04-02 Thread e-letter
On 02/04/2010, Gabor Grothendieck wrote: > The code does not run with the files. I need the requested > information, namely a single file containing code and data and that I > can just copy into a session without editing and see the result you > see. I don't understand how I can combine the four

Re: [R] Merge failure using zoo package

2010-04-07 Thread e-letter
I tried your instructions, as shown. > library(chron) > library(zoo) > z1<-read.zoo("test1.csv",header=TRUE,sep=",",FUN=times) > z2<-read.zoo("test2.csv",header=TRUE,sep=",",FUN=times) > z12<-merge(z1,z2) > z3<-na.approx(z12,xout=time(z1)) Error in approx(along[!na], y[!na], along[na], ...) :

[R] How to specify only minimum ylim parameter for boxplot

2010-04-07 Thread e-letter
Readers, For a command: x<-a data matrix y<-another data matrix z<-and another data matrix boxplot(c(x,y,z),las=1,xaxt="n",ylab="text",xlab="text",ylim=c(0,..?)) is it possible to specify only that the boxplot graph starts with value 0 at the bottom of the ordinate (y axis) and the maximum value

[R] synchronisation of time series data using interpolation

2009-09-24 Thread e-letter
Readers, I have data with different time stamps that I wish to plot (for example): data set 1 time(hh:mm:ss),datum 01:00:00,500 01:00:15,600 01:00:30,750 01:00:45,720 01:01:00,700 01:01:15,725 01:01:30,640 01:01:45,710 data set 2 time,datum 01:00:12,20 01:01:01,55 01:01:55,22 The time interval i

Re: [R] synchronisation of time series data using interpolation

2009-09-26 Thread e-letter
I created separate text files for the 2 data sets. I enter the following comands: library(zoo) library(chron) z1<-read.zoo(textConnection("/path/to/test1.txt"),header=FALSE,sep=",",FUN=times) z2<-read.zoo(textConnection("/path/to/test2.txt"),header=FALSE,sep=",",FUN=times) z3<-window(na.approx(mer

Re: [R] synchronisation of time series data using interpolation

2009-09-26 Thread e-letter
Test1 file contained data set 1, test2 contained data set 2 __ 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.html and provide commented, minimal, sel

Re: [R] synchronisation of time series data using interpolation

2009-09-28 Thread e-letter
I saved the data sets as files and then tried to refer to those files. Therefore the instruction: > z1<-read.zoo(textConnection("/path/to/test1.txt") means that I wanted to replace the manual data entry for Lines1 with a file containing the data. It seems that your instructions only work when dat

[R] plot ᵒ C in graph axis label

2009-10-01 Thread e-letter
Readers, I have tried to use a plotmath command to add the temperature degree sign (i.e. ᵒ C) to the axis label of a graph: > x<-(1:10) > y<-(200:191) > plot(x~y,ylab=expression(*degree~C)) Error: syntax error, unexpected '*', expecting ',' in "plot(x~y,ylab=expression(*" According to plotmath m

[R] plot subscript text and percentage symbol in graph label axis

2009-10-02 Thread e-letter
Readers, I am unable to plot a label consisting of both subscript text and percentage (%) symbol: x<-(1:10) y<-(200:191) plot(x~y,ylab=expression(~degree~C),xlab=expression(x[2]~%)) Error: syntax error, unexpected ERROR in "plot(x~y,ylab=expression(~degree~C),xlab=expression(x~%)" It seems that

[R] exclude data for boxplot stats using mathematical operator

2009-10-26 Thread e-letter
Readers, I have a data set as follows: 1,1 2,2 3,3 4,4 5,3 6,2 7,-10 8,-9 9,-3 10,2 11,3 12,4 13,5 14,4 15,3 16,2 17,1 I entered this data set using the command 'read.csv'. I want to exclude values fewer than zero in column 2 so then I tried the following command: boxplot.stats(x[>0,2],do.conf=

[R] whitespace with subscript text

2009-10-30 Thread e-letter
Readers, I have the following command: expression(A[1]B~"%") but that causes an error so I changed to: expression(A[1]~B~"%") but the result is too much whitespace between subscript and B. Is there a way to reduce this whitespace? Yours, rhelp at conference.jabber.org r 251 mandriva 2008 __

[R] unable to use coplot function with zoo package

2009-11-23 Thread e-letter
Readers, I have tried to use the zoo package to merge datasets and then use the coplot function, but the graph is not fully created. Only the panel data is shown. Command terminal output below, with csv files. What is the meaning of the warning message? Can anyone help please? rhelpatconference.j

[R] write to file append by column

2009-11-24 Thread e-letter
Readers, Scenario: data x consists of one column; 1 2 3 data y; 4 5 6 Is it possible to write to file such that the file is: 1,4 2,5 3,6 using the write.file function? I have tried the command: write(x,file="file.csv",ncolumns=1,append=TRUE,sep=",") write(y,file="file.csv",ncolumns=1,append=TR

Re: [R] write to file append by column

2009-11-24 Thread e-letter
On 24/11/2009, jim holtman wrote: > You can not append a column. Best bet, read the old file in, do a > 'cbind', write the object back out. > > On Tue, Nov 24, 2009 at 5:59 AM, e-letter wrote: >> Readers, >> >> Scenario: data x consists of one column; >

[R] selection of multiple subscripts

2010-01-13 Thread e-letter
Readers, For a data set 'x': 1 a 2 b 3 c 4 d 5 e 6 f 7 g 8 h 9 i How to select multiple subscripts to plot? For example to plot values 1:3 and 9:10: plot(x[1:3,1],x[,2]) and plot(x[9:10,1],x[,2]) into one plot? Yours, rhelpatconference.jabber.org r251 _

Re: [R] selection of multiple subscripts

2010-01-13 Thread e-letter
On 13/01/2010, Duncan Murdoch wrote: > On 13/01/2010 7:36 AM, e-letter wrote: >> Readers, >> >> For a data set 'x': >> >> 1 a >> 2 b >> 3 c >> 4 d >> 5 e >> 6 f >> 7 g >> 8 h >> 9 i >> >> How t

Re: [R] selection of multiple subscripts

2010-01-13 Thread e-letter
On 13/01/2010, e-letter wrote: > On 13/01/2010, Duncan Murdoch wrote: >> On 13/01/2010 7:36 AM, e-letter wrote: >>> Readers, >>> >>> For a data set 'x': >>> >>> 1 a >>> 2 b >>> 3 c >>> 4 d >>> 5

[R] use zoo package with multiple column data sets

2010-01-29 Thread e-letter
Readers, I am trying to use the zoo package with an array of data: file1: hh:mm:ss1 hh:mm:ss2 hh:mm:ss3 hh:mm:ss4 file2: hh:mm:ss11 55 hh:mm:ss22 66 hh:mm:ss33 77 hh:mm:ss44 88 I wanted to merge these data set s

Re: [R] use zoo package with multiple column data sets

2010-01-29 Thread e-letter
Assuming my documentation is correct, my version shows faq 1 to refer to duplicate times but if file2 is: 01:01:0111 55 01:01:0422 66 01:01:0733 77 01:01:1044 88 I cannot see what is duplicate? If I create two new files: file3: 01:01:01

Re: [R] use zoo package with multiple column data sets

2010-01-30 Thread e-letter
> library(chron) > library(zoo) > z1<-read.zoo("~/path/to/test1.csv",header=TRUE,sep=",",FUN=times) > z2<-read.zoo("~/path/to/test2.csv",header=TRUE,sep=",",FUN=times) > z3<-(na.approx(merge(z1,z2),time(z1))) Error in approx(along[!na], y[!na], along[na], ...) : need at least two non-NA val

[R] syntax for very simple derivative function

2012-12-18 Thread e-letter
Readers, Two variables 'M', 'T', each contain a column of numbers. Have tried to create a derivative function to see how 'M' varies with respect to 'T': dm<-D(m)(dm/dt)~dt dm(m=M,t=T) but R returns an error: Error: could not find function "dm" What is my mistake please? -- R2151 ___

[R] function approx interpolation of time series data sets

2013-01-16 Thread e-letter
Readers, Am trying to use the function 'approx' to interpolate time series data sets: data1: 01:23:40 5 01:23:45 10 01:23:50 12 01:23:55 7 data2: 01:23:42 01:23:47 01:23:51 01:23:54 The objective is to obtain interpolated values of 'data1' column 2 (5, 10, 12, 7) for the times shown in data2. T

Re: [R] Can strptime handle milliseconds or AM/PM?

2013-01-17 Thread e-letter
Readers, Responding to an old post (http://tolstoy.newcastle.edu.au/R/e2/help/07/06/18850.html), and using the example in the manual: monthextract<-strptime("20/2/06 11:16:16.683", "%m") monthextract [1] NA Why is the result 'NA' and not '2'? -- r2151 __

Re: [R] function approx interpolation of time series data sets

2013-01-18 Thread e-letter
On 16/01/2013, Rui Barradas wrote: > Hello, > > Like this? > > > data1 <- read.table(text = " > 01:23:40 5 > 01:23:45 10 > 01:23:50 12 > 01:23:55 7 > ") > > data2 <- read.table(text = " > 01:23:42 > 01:23:47 > 01:23:51 > 01:23:54 > ") > > approx(as.POSIXct(data1$V1, format = "%H:%M:%S"), y = data1

Re: [R] function approx interpolation of time series data sets

2013-01-18 Thread e-letter
On 18/01/2013, Gabor Grothendieck wrote: > On Fri, Jan 18, 2013 at 7:31 AM, e-letter wrote: >> On 16/01/2013, Rui Barradas wrote: >>> Hello, >>> >>> Like this? >>> >>> >>> data1 <- read.table(text = " >>>

Re: [R] function approx interpolation of time series data sets

2013-01-18 Thread e-letter
On 18/01/2013, Gabor Grothendieck wrote: > On Fri, Jan 18, 2013 at 7:31 AM, e-letter wrote: >> On 16/01/2013, Rui Barradas wrote: >>> Hello, >>> >>> Like this? >>> >>> >>> data1 <- read.table(text = " >>>

[R] remove margin between plot and axis

2013-01-29 Thread e-letter
Readers, Am trying to plot a graph with type 'h' and want to remove the white space between the plot lines and the x axis. The help section 'par' suggests that the option 'mai' controls this feature, but the syntax plot(...mai=c(0,1,1)) is ineffective Any advice please? -- r2151 _

Re: [R] remove margin between plot and axis

2013-01-29 Thread e-letter
On 29/01/2013, Pascal Oettli wrote: > Hi, > > Please provide a reproducible example. > test<-seq(10:50) plot(test,type='h',mai=c(0,1,1)) Tried plot(test,type='h',yaxs='i') but this has the non-wanted effect of removing white space from between the highest peak and the upper (top) axis ___

[R] remove label from specific axis

2013-01-30 Thread e-letter
Readers, For a graph plot instruction: plot(seq(10:50),type='h',yaxt='n',yaxs='i',lab=c(20,2,2),xlab='x axis label',bty='l',main='graph title') how to remove y-axis label and keep the x-axis label? _ r2151 __ R-help@r-project.org mailing list https:/

[R] convert 12 time stamp to 24 hour

2013-02-08 Thread e-letter
Readers, For a 12 hour time stamp: > testtime<-("2013-01-01 01:00:01 PM") > testtime [1] "2013-01-01 01:00:01 PM" > testtime24hour<-strftime(testtime,'%H:%M:%S') > testtime24hour [1] "01:00:01" how to convert to 24 hour format so that the object 'testtime24hour' is: '13:00:01' Thanks. -- r215

[R] add data symbol to axis label

2013-02-08 Thread e-letter
Readers, Is it possible to add a data symbol (e.g. pch='21') to an axis label? The objective is to plot a graph with two (2) y-axes and the plotting character for data set 1 is added to the label of y1 axis (left); plot character for data set 2 is added to label of y2 (right) axis. Thanks. -- r2

Re: [R] convert 12 time stamp to 24 hour

2013-02-11 Thread e-letter
On 08/02/2013, e-letter wrote: > Readers, > > For a 12 hour time stamp: > >> testtime<-("2013-01-01 01:00:01 PM") >> testtime > [1] "2013-01-01 01:00:01 PM" >> testtime24hour<-strftime(testtime,'%H:%M:%S') >> testtime24h

Re: [R] convert 12 time stamp to 24 hour

2013-02-11 Thread e-letter
Readers, Have since tried to plot converted 24 hour data: testtimedataset V1 1 13:01:41 2 13:02:10 3 13:02:38 4 13:03:05 5 13:03259 > testdata<-seq(1:5) > plot(testdata~testtimedataset) Error in function (formula, data = NULL, subset = NULL, na.action = na.fail, : invalid type (list)

Re: [R] convert 12 time stamp to 24 hour

2013-02-11 Thread e-letter
On 11/02/2013, PIKAL Petr wrote: > > str(testtimedataset) With my real data set, revealed that after conversion, the time series data consists of 'chr' which I guess means character type data, reporting the following error: Error in plot.window(...) : need finite 'xlim' values In addition: Warni

[R] approxfun values

2013-02-14 Thread e-letter
Readers, According to the help '?approxfun', the function can be used to obtain the interpolated values. The following test was tried: > testinterpolation<-read.csv('test.csv',header=FALSE) > testinterpolation V1 V2 1 10 2 2 20 NA 3 30 5 4 40 7 5 50 NA 6 60 NA 7 70 2 8 80

[R] plot custom x axis ticks values

2013-02-14 Thread e-letter
Readers, For this data set: testvalues<-c(10,20,30,40) How to amend the plot instruction: plot(testvalues,ann=FALSE,type='l',yaxt='n',xaxt='n') so that x axis ticks labels can be added to existing graph with arbitrary value such as 0,100,200,300)? Thanks in advance. -- r2151 ___

Re: [R] plot custom x axis ticks values

2013-02-14 Thread e-letter
On 14/02/2013, PIKAL Petr wrote: > Hi > > much quicker and better for you is to inspect help pages. > > ?axis > > axis(1, at=1:4, labels=c(letters[1:4])) Had tried, but noticed that the labels created were not positioned equally across the entire axis, but occupied about 50 % (the left half) of t

Re: [R] plot custom x axis ticks values

2013-02-15 Thread e-letter
On 14/02/2013, MacQueen, Don wrote: >> plot(testvalues,ann=FALSE,type='l',yaxt='n',xaxt='n') >> par()$usr > [1] 0.88 4.12 8.80 41.20 > > The x axis range is from 0.88 to 4.12, so tick labels at 0, 100, 200, 300 > makes no sense. > True per se, but the purpose of the tick labels is to indicate

Re: [R] plot custom x axis ticks values

2013-02-15 Thread e-letter
On 15/02/2013, Jim Lemon wrote: > On 02/14/2013 09:41 PM, e-letter wrote: >> Readers, >> >> For this data set: >> >> testvalues<-c(10,20,30,40) >> >> How to amend the plot instruction: >> >> plot(testvalues,ann=FALSE,type='l'

Re: [R] plot custom x axis ticks values

2013-02-15 Thread e-letter
On 15/02/2013, Duncan Murdoch wrote: > On 13-02-15 3:28 AM, e-letter wrote: >> On 15/02/2013, Jim Lemon wrote: >>> On 02/14/2013 09:41 PM, e-letter wrote: >>>> Readers, >>>> >>>> For this data set: >>>> >>>> testvalu

[R] mtext unicode failure

2013-02-18 Thread e-letter
Readers, How to solve this unicode input error please? > postscript("~/tmp/test.eps",width=100/25.4,height=100/25.4,horizontal=FALSE,onefile=TRUE,paper="special") > testx<-seq(1:5) > testy<-seq(1:5) > plot(testy~testx) > mtext('text (O₂)\n more text',side=3,line=1) Warning messages: 1: In mtext("

Re: [R] mtext unicode failure

2013-02-19 Thread e-letter
On 19/02/2013, r-help-requ...@r-project.org wrote: > -- > > Message: 22 > Subject: Re: [R] mtext unicode failure > > On 18/02/2013 14:15, e-letter wrote: >> Readers, >> >> How to solve this unicode input error please? > > On

[R] create vector from indices interpolated values

2013-03-06 Thread e-letter
Readers, Is it possible to create a plot command based upon the indices of missing values in a data set? dataset1<-read.table(text=' 10 2 20 NA 30 5 40 7 50 NA 60 NA 70 2 80 6 90 NA 100 9 ') dataset2<-read.table(text=' 0.2 0.4 0.1 0.9 0.2 0.3 1.1 0.7 0.9 0.6 0.4 ') The 'approx' function is used

Re: [R] create function to solve derivative

2012-11-16 Thread e-letter
On 16/11/2012, Rolf Turner wrote: > > Your question makes little sense. Functions have derivatives --- at > least some of them do. Data sets do not have derivatives. The > functions D(), deriv() etc. work on specified analytic expressions > for functions --- data sets do not come into the pictu

[R] apply calculations to elements in a vector

2012-11-16 Thread e-letter
Readers, If a vector consists of: 10 20 30 how to create a new vector based upon the results of calculations to the elements, e.g. addition of successive elements, so that a new vector would be: 30 50 i.e. 10+20, then 20+30, etc.? __ R-help@r-projec

[R] column name prefix 'x' after data import via read.delim

2012-11-23 Thread e-letter
Readers, The function 'read.delim' was used to import data into R: columnnamea columnnameb columnnamec 1 2 3 2 3 4 3 4 5 After import, the column names were: X.columnnamea columnnameb columnnamec Why did this occur? -- r2151 __ R-help@r-project.org

[R] remove last row of a data frame

2012-12-11 Thread e-letter
Readers, For a data set 'a': 1 2 3 4 Please what is the syntax to remove the last row and create a new object 'b': 1 2 3 Thanks. -- R2151 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting g

Re: [R] remove last row of a data frame

2012-12-12 Thread e-letter
On 12/12/2012, Daniel Nordlund wrote: >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] >> On Behalf Of e-letter >> Sent: Tuesday, December 11, 2012 11:45 PM >> To: r-help@r-project.org >> Subject:

[R] abbreviate function using 'with'

2014-02-13 Thread e-letter
Readers, A csv file was created: column1,column2,column3,column4 1,10,3,2 2,20,6,4 3,30,12,16 4,40,24,256 The csv was imported: testcsv<-read.csv('/path/to/test.csv') testsum<-testcsv[2,2]+testcsv[2,3]+testcsv[2,4] What is the correct syntax to abbreviate the following command using the functi

Re: [R] abbreviate function using 'with'

2014-02-13 Thread e-letter
On 13/02/2014, Rolf Turner wrote: > > What you've written is simply not (anything like!) R syntax. You should > learn to speak R if you are going to use R. > Agree; was reviewing the help text examples invoked by '?with'. > In this particular instance > > testsum <- sum(testcsv[2,2:4]) >

[R] Use generalised additive model to plot curve

2010-12-14 Thread e-letter
Readers, I have been reading 'the r book' by Crawley and think that the generalised additive model is appropriate for this problem. The package 'gam' was installed using the command (as root) install.package("gam") ... library(gam) > library(gam) Loading required package: splines Loading require

[R] dotchart for matrix data

2010-12-18 Thread e-letter
Readers, I am trying to use the function dotchart. The data is: > testdot category values1 values2 values3 values4 1a 10 27 56 709 2b 4 46 47 208 3c 5 17 18 109 4d 6 50 49 308 The fol

Re: [R] dotchart for matrix data

2010-12-18 Thread e-letter
On 18/12/2010, David Winsemius wrote: > > On Dec 18, 2010, at 7:01 AM, e-letter wrote: > >> Readers, >> >> I am trying to use the function dotchart. The data is: >> >>> testdot >> category values1 values2 values3 values4 >> 1a 10

Re: [R] dotchart for matrix data

2010-12-18 Thread e-letter
>Ben Bolker >Sat, 18 Dec 2010 07:07:24 -0800 >David Winsemius comcast.net> writes: > >> >> >> On Dec 18, 2010, at 7:01 AM, e-letter wrote: >> >> > Readers, >> > >> > I am trying to use the function dotchart. The data is: >&g

Re: [R] dotchart for matrix data

2010-12-18 Thread e-letter
On 18/12/2010, Peter Ehlers wrote: > On 2010-12-18 07:50, e-letter wrote: >>> Ben Bolker >>> Sat, 18 Dec 2010 07:07:24 -0800 > > [... snip ...] > >> I am trying to create a chart like this >> (http://www.b-eye-network.com/images/content/Fig4_3.jpg); so

Re: [R] dotchart for matrix data

2010-12-18 Thread e-letter
On 18/12/2010, Peter Ehlers wrote: > On 2010-12-18 07:50, e-letter wrote: >>> Ben Bolker >>> Sat, 18 Dec 2010 07:07:24 -0800 > > [... snip ...] > >> I am trying to create a chart like this >> (http://www.b-eye-network.com/images/content/Fig4_3.jpg); so

Re: [R] dotchart for matrix data

2010-12-20 Thread e-letter
On 18/12/2010, e-letter wrote: > On 18/12/2010, Peter Ehlers wrote: >> On 2010-12-18 07:50, e-letter wrote: >>>> Ben Bolker >>>> Sat, 18 Dec 2010 07:07:24 -0800 >> >> [... snip ...] >> >>> I am trying to create a chart like this >

Re: [R] dotchart for matrix data

2010-12-22 Thread e-letter
On 20/12/2010, e-letter wrote: > On 18/12/2010, e-letter wrote: >> On 18/12/2010, Peter Ehlers wrote: >>> On 2010-12-18 07:50, e-letter wrote: >>>>> Ben Bolker >>>>> Sat, 18 Dec 2010 07:07:24 -0800 >>> >>> [... snip ...] >&

Re: [R] dotchart for matrix data

2011-01-05 Thread e-letter
Readers, The following commands were applied, to create a dot chart with black dots and blue squares for data: > library(lattice) > testdot category values 1b 44 2c 51 3d 65 4a 10 5b 64 6c 71 7d 49 8a

[R] percentage sign in expression

2010-08-24 Thread e-letter
Readers, According to the documentation for the function 'plotmath' there is no apparent possibility to add the percent sign (%) to a plot function, e.g. plot(a[,1]~b[,2],ylab=expression(x~%),xlab=expression(z)) How to achieve this please? yours, rh...@conference.jabber.org r251 mandriva2009

Re: [R] percentage sign in expression

2010-08-24 Thread e-letter
On 24/08/2010, Henrique Dallazuanna wrote: > You've tried: > > plot(a[,1]~b[,2],ylab=expression(x~'%'),xlab=expression(z)) ? > This is successful for me, thank you. This instruction should be added to the documentation for 'plotmath'. __ R-help@r-projec

Re: [R] percentage sign in expression

2010-08-25 Thread e-letter
On 24/08/2010, David Winsemius wrote: > > On Aug 24, 2010, at 9:37 AM, e-letter wrote: > >> Readers, >> >> According to the documentation for the function 'plotmath' there is no >> apparent possibility to add the percent sign (%) to a plot functi

Re: [R] percentage sign in expression

2010-08-26 Thread e-letter
>On Wed, 2010-08-25 at 09:32 +0100, e-letter wrote: >> On 24/08/2010, David Winsemius wrote: >> > >> > On Aug 24, 2010, at 9:37 AM, e-letter wrote: >> > >> >> Readers, >> >> >> >> According to the documentation for the funct

Re: [R] percentage sign in expression

2010-08-26 Thread e-letter
>It's possible that my help page is different than yours. Right after >the syntax/meaning description on mine (which is a Mac OSX system) is >a paragraph: > >"The symbol font uses Adobe Symbol encoding so, for example, a lower >case mu can be obtained either by the special symbol mu or by >symbol("

[R] accessing a data frame with row names

2010-05-31 Thread e-letter
Readers, I have entered a file into r: ,column1,column2 row1,0.1,0.2 row2,0.3,0.4 using the command: dataframe<-read.table("/path/to/file.csv",header=T,row.names=1) When I try the command: dataframe[,2] I receive the response: NULL I was expecting: row1 0.2 row2 0.4 What is my error with

Re: [R] accessing a data frame with row names

2010-06-01 Thread e-letter
On 31/05/2010, Gabor Grothendieck wrote: > Use read.csv or read.table(..., sep = ","). Also note that if you > delete the first comma of the header (as in the second example below) > you won't have to specify row.names since it can figure it out from > the fact that there is one fewer column name

[R] data extrapolation function

2011-01-29 Thread e-letter
Readers, Data was imported using the read csv command: dataimport<-read.csv("/path/to/dataimport.csv") 10,2000 12,2001 13,2002 15,2003 17,2004 Using the help contents for 'predict.lm' (i.e. ?predict.lm) a new data frame was created dataimportextra<-data.frame(x=seq(1990,2010,1)) predict(lm(dat

[R] create data set from selection of rows

2011-03-15 Thread e-letter
Readers, For a data set: text1,23,text2,45 text1,23,text3,78 text1,23,text3,56 text1,23,text2,45 The following command was entered: datasubset<-data.frame(dataset[,3]=="text3") The result of datasubset is TRUE TRUE The required result is text1,23,text3,78 text1,23,text3,56 What is the co

Re: [R] create data set from selection of rows

2011-03-17 Thread e-letter
On 15/03/2011, Francisco Gochez wrote: > Hi, > > What you are after is: > > datasubset <- dataset[ dataset[,3] == "text3", ] Thank you. For the set text1,23,text2,45 text1,23,text3,78 text1,23,text3,56 text1,23,text2,45 Is it possible to write a function that selects rows containing 'text3' and

[R] histogram of time-stamp data

2012-07-16 Thread e-letter
Readers, A data set consists of time-stamp values: 00:00:00 23:11:00 06:22:00 The data set was imported: timestamps<-read.table("path/to/timestampsvalues") hist(timestamps) ...error... x must be numeric Then tried: plot(timestamps). How to adjust the graph to create a histogram where the in

Re: [R] histogram of time-stamp data

2012-07-16 Thread e-letter
On 16/07/2012, r-help-requ...@r-project.org wrote: > -- > > Message: 77 > Date: Mon, 16 Jul 2012 10:48:39 +0100 > From: Rui Barradas > To: e-letter > Cc: r-help@r-project.org > Subject: Re: [R] histogram of time-stamp data >

Re: [R] R-help Digest, Vol 113, Issue 19

2012-07-16 Thread e-letter
On 16/07/2012, r-help-requ...@r-project.org wrote: > -- > > Message: 77 > Date: Mon, 16 Jul 2012 10:48:39 +0100 > From: Rui Barradas > To: e-letter > Cc: r-help@r-project.org > Subject: Re: [R] histogram of time-stamp data > Message-ID

Re: [R] histogram of time-stamp data

2012-07-16 Thread e-letter
On 16/07/2012, Rui Barradas wrote: > Hello, > > Em 16-07-2012 22:45, e-letter escreveu: >> On 16/07/2012, r-help-requ...@r-project.org >>wrote: >> > -- >> > >> > Message: 77 >> > Date: Mon, 16 Jul 20

Re: [R] histogram of time-stamp data

2012-07-17 Thread e-letter
On 17/07/2012, Rui Barradas wrote: > Hello, > > That's not the error I've had. You must be aware that read.table creates > a data.frame and therefore the object 'timestamps' is NOT holding time > stamps, it's holding a vector, 'V1', of time stamps. > Was not aware of the significance of the data

[R] knapsack problem limitation

2011-07-06 Thread e-letter
Readers, Attempting to solve the knapsack problem (e.g. see: http://rosettacode.org/wiki/Knapsack_problem/Unbounded), the following error occurred: ... result would be too long a vector Is this indicative that R is not suitable to solve this problem when combinations are large? Is there a known

[R] how to solve a power series linear coefficient equation

2008-04-29 Thread e-letter
Readers, I am having difficulty understanding how to enter commands into r. I have data arranged as: 100, 200, 300 5.6, 6.7, 7.8 8.9, 9.0, 0.1 1.2, 2.3, 3.4 The data is saved in csv format and I use the command 'read.table' to import into r. The values 5.6...3.4 are a function of values 100,..

[R] Inconsistent linear model calculations

2008-05-15 Thread e-letter
Readers, Using version 251 I tried the following command: lm(y~a+b,data=datafile) Resulting in, inter alia: ... coefficients (intercept) a 1.2 3.4 Packages installed: acepack ace() and avas() for selecting regression transformations adlift

Re: [R] Inconsistent linear model calculations

2008-05-15 Thread e-letter
2008/5/15 Douglas Bates <[EMAIL PROTECTED]>: > Did you happen to notice the part at the bottom of every message about > "provide commented, minimal, self-contained, reproducible code"? > Sorry, don't understand what that statement means in my context. > Considering that the result you quote from "

[R] Inconsistent linear model calculations

2008-05-15 Thread e-letter
Professor Kubovy As you instructed, below is the command terminal output: sessionInfo() R version 2.5.1 (2007-06-27) i586-mandriva-linux-gnu locale: LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;L

  1   2   >