Re: [R] how to plot the spectrum by log-log axis

2014-01-07 Thread Jie Tang
I use

windlog=log10(windspec)
plot(windlog)
it seems good but stupid

is there any better method ?




2014/1/7 Jie Tang 

> Futher more
>
> When I write as below :,the result is still not satisfied .
>  asp=spectrum(ww_spec)
>  windspec=data.frame(asp)
>  plot(windspec,log="dB")
>
>
> 2014/1/7 Jie Tang 
>
>> hi
>> I have a wind dataset and I want to analze its spectrum with
>> the x-axis and y-axis in log .But I found that
>> when I set log="dB" in spectrum as shown below,what I can get
>> is a figure by log y-axis.
>> How could I get a log-axis figure both in x-axis and y-axis ?
>> thank you .
>>
>> yylab<-c("Wind Spectrum(db) ")
>> YY=c(-40,40)
>> spectrum(ww_spec,log = "dB",ylim=YY,main=maininfo,ylab=yylab)
>>
>> --
>> TANG Jie
>>
>>
>
>
> --
> TANG Jie
> Email: totang...@gmail.com
> Tel: 0086-2154896104
> Shanghai Typhoon Institute,China
>



-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


Re: [R] how to plot the spectrum by log-log axis

2014-01-07 Thread Jie Tang
Futher more

When I write as below :,the result is still not satisfied .
 asp=spectrum(ww_spec)
 windspec=data.frame(asp)
 plot(windspec,log="dB")


2014/1/7 Jie Tang 

> hi
> I have a wind dataset and I want to analze its spectrum with
> the x-axis and y-axis in log .But I found that
> when I set log="dB" in spectrum as shown below,what I can get
> is a figure by log y-axis.
> How could I get a log-axis figure both in x-axis and y-axis ?
> thank you .
>
> yylab<-c("Wind Spectrum(db) ")
> YY=c(-40,40)
> spectrum(ww_spec,log = "dB",ylim=YY,main=maininfo,ylab=yylab)
>
> --
> TANG Jie
>
>


-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to plot the spectrum by log-log axis

2014-01-07 Thread Jie Tang
hi
I have a wind dataset and I want to analze its spectrum with
the x-axis and y-axis in log .But I found that
when I set log="dB" in spectrum as shown below,what I can get
is a figure by log y-axis.
How could I get a log-axis figure both in x-axis and y-axis ?
thank you .

yylab<-c("Wind Spectrum(db) ")
YY=c(-40,40)
spectrum(ww_spec,log = "dB",ylim=YY,main=maininfo,ylab=yylab)

-- 
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] what is wrong with for and if cycle in R

2013-12-19 Thread Jie Tang
hi
 I used a two nested cycle by if and for by such code

for(ity in 1:4)
{
if (ity==1£©
{
print(ity)
}
}

when I run the code it failed and R tell me that
"error: unrespected '}' in "}""

and when I reduce a }

for(ity in 1:4)
{
if (ity==2£©
{
print(ity)
}

R will print 4 but not 2 as what I repect

Could anyone tell me what is the matter with R and how to modify it?

thank you .
-- 
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to analysisi spectrum of a dataset with NA value

2013-12-17 Thread Jie Tang
hi R users

I have a large 1D dataset and some of them is NA value .

I found I cound get the spectrum by such a command.

ua=c£¨10£¬30 £¬40£¬50£¬NA£©
spectrum(ua)
 and I could not use na.rm just like mean or sd function

How could I get the spectrum of ua ?

 thank you .

-- 
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to resolve the install problem in redhat linux

2013-07-16 Thread Jie Tang
I try to install a R resource package (in R.2.15 or R 3.0)
But when I run the command "configure",the Makefile does not

generated succefully as error information shown as below

--with-readline=yes (default) and headers/libs are not available

my linux sysem is "Red Hat Enterprise Linux Client release 5.3 (Tikanga)"

How could I install R?
-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to output the data array without colname and row number

2013-06-14 Thread Jie Tang
hi r users:
  I have a datadset and want to write into a file .

when i use :
write.table(u_bar, file = "u_test.txt")

the data in the outpuf file is shown as below which included the
row number from "1" to "14" and colname .e.g."X32N"

How could I output the numbers and excluded the colname and row number?

thank you .

"X32N" "X60N" "X89N" "X139N" "X179N" "X212N" "X263N" "X298N" "X32S" "X60S"
"X89S" "X139S" "X179S" "X212S" "X263S" "X298S"
"1" 5 4.3 4.3 5.9 7.8 4.9 6.4 4.4 5.4 5 4.7 5 " NAN" 7.4 2.3 4.4
"2" 4.7 4.3 4.3 5.9 9.4 4.8 6.4 4.4 7 5 5.5 5 " NAN" 4.6 2.3 5
"3" 4.7 4.6 5.2 4.9 9.4 4.8 5.2 5 7 5.1 5.5 5.9 " NAN" 4.6 2 5
"4" 5 4.6 5.2 4.9 9.4 5.4 5.2 5 6.3 5.1 6.7 5.9 " NAN" 5.3 2 6.3
"5" 5 5 6.2 4.2 9.4 5.4 7 6.3 6.3 2.4 6.7 6.2 " NAN" 5.3 5.2 6.3
"6" 5.4 5 6.2 4.2 9.8 5.3 7 6.3 5.1 2.4 6.5 6.2 " NAN" 4.8 5.2 5.6
"7" 5.4 3.9 6.5 5.4 9.8 5.3 7.3 5.6 5.1 1.7 6.5 6.2 " NAN" 4.8 2.3 5.6
"8" 5.1 3.9 6.5 5.4 9.8 6.2 7.3 5.6 1.9 1.7 5.9 6.2 " NAN" 7.1 2.3 6.5
"9" 5.1 3.8 7 5.9 9.8 6.2 6.3 6.5 1.9 1.9 5.9 5.8 " NAN" 7.1 -0.4 6.5
"10" 5.3 3.8 7 5.9 9.4 6.1 6.3 6.5 7 1.9 6.4 5.8 " NAN" 2 -0.4 6.7
"11" 5.3 5.2 5.6 6.6 9.4 6.1 5.9 6.7 7 7.8 6.4 4.6 " NAN" 2 0.4 6.7
"12" 5.4 5.2 5.6 6.6 9.4 6.7 5.9 6.7 7.4 7.8 6.4 4.6 " NAN" 5.2 0.4 5.6
"13" 5.4 5.9 5.3 5.8 9.4 6.7 7.4 5.6 7.4 5.6 6.4 4.4 " NAN" 5.2 0.2 5.6
"14" 5.6 5.9 5.3 5.8 7.8 7 7.4 5.6 5.9 5.6 7.6 4.4 " NAN" 4.3 0.2 7.6

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


Re: [R] How to get a running mean result by R?

2013-06-13 Thread Jie Tang
yes ,Ma in forecast package does works but when the data included NA,NAN or
INF ,it could not go on calculating the running


2013/6/12 Rui Barradas 

> Hello,
>
> You can use, for instance, function ma() in package forecast.
>
> # if not yet installed
> #install.packages('forecast', dependencies = TRUE)
> library(forecast)
>
> ?ma
>
>
> Hope this helps,
>
> Rui Barradas
>
>
> Em 12-06-2013 08:21, Jie Tang escreveu:
>
>  Hi R users:
>>I have a big data and want to calculate the running mean of this data .
>> How can I get this kind of result ? I have check the command "mean"
>> it seems "mean" could not get the running mean?
>>
>>


-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] How to get a running mean result by R?

2013-06-12 Thread Jie Tang
Hi R users:
  I have a big data and want to calculate the running mean of this data .
How can I get this kind of result ? I have check the command "mean"
it seems "mean" could not get the running mean?

-- 
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] How to read a file including strings and numbers.

2013-06-01 Thread Jie Tang
hi R-users,
  I have a file as shown below,and the first column is time information.

"2012-08-07 00:00:00",4174830,5,8.1,34.5,9.5,32,14
"2012-08-07 00:00:01",4174831,4.7,8.6,34.5,9.9,29,14
"2012-08-07 00:00:02",4174832,4.7,8.6,34.5,9.9,29,14
"2012-08-07 00:00:03",4174833,5,8.5,34.5,9.8,30,14
"2012-08-07 00:00:04",4174834,5,8.5,34.5,9.8,30,14
"2012-08-07 00:00:05",4174835,5.4,8.3,34.6,9.9,33,14
"2012-08-07 00:00:06",4174836,5.4,8.3,34.6,9.9,33,14
"2012-08-07 00:00:07",4174837,5.1,7.8,34.5,9.3,33,14
"2012-08-07 00:00:08",4174838,5.1,7.8,34.5,9.3,33,14
"2012-08-07 00:00:09",4174839,5.3,7.8,34.5,9.4,34,14
"2012-08-07 00:00:10",4174840,5.3,7.8,34.5,9.4,34,14
"2012-08-07 00:00:11",4174841,5.4,8.3,34.5,9.9,33,14
"2012-08-07 00:00:12",4174842,5.4,8.3,34.5,9.9,33,14
"2012-08-07 00:00:13",4174843,5.6,8.3,34.5,10,34,14
"2012-08-07 00:00:14",4174844,5.6,8.3,34.5,10,34,14
"2012-08-07 00:00:15",4174845,5.5,8.1,34.5,9.8,34,14
"2012-08-07 00:00:16",4174846,5.5,8.1,34.5,9.8,34,14
"2012-08-07 00:00:17",4174847,4.3,7.4,34.4,8.6,30,14

I want to read them into a array by such command

wnd_data<-scan("obs.dat",sep=",",what=list(TIME="",rec=0,U=0,V=0,T=0,WS=0,WD=0,ST=0,TA=0,RH=0),na.strings
= "NAN")

but R could not excute sucefully and says that :
error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,
 :
  scan() require 'a real', but not "2012-08-0700:00:01"'

How could I resolve this problem ?
Thanks.
-- 
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to plot u-v wind by R?

2013-03-18 Thread Jie Tang
hi R users:
   I have a dataset including u wind in x-axis and v wind in y-axis.
 How can I plot the u,v wind data in vector or  barb figure?
 which command ?
thank you .

-- 
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to change the plot from X-axis to Y-axis

2013-02-18 Thread Jie Tang
hello ,Rusers:
 I have a dataset for example
totdata=c(8.020 7.412 8.110 8.270)
plot(totdata[1:4],type='l',pch=1,lty=1,col='blue',lwd=1)

and the data could be plotted as the attachment figure.

now I want to exchange its x-axis and y-axis in the figure  .How could I
modify the plot command ?

thank you
-- 
TANG Jie
__
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, self-contained, reproducible code.


[R] how to give a lengend in symbols functions

2013-01-21 Thread Jie Tang
hi Rusers

  I am trying to use symbos in gtools package
symbols(data1,data3,circle=data1/data3,inches=0.1,bg="lightgreen")

Now I want to give a lengend to tell the reader the meaning or magnitude of
these  circle.
How can I add these information in symbols plot just like legend in plot ?
 thank you .
-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


Re: [R] hwo to subtract a child array from the big array?

2013-01-14 Thread Jie Tang
Actually, I find a method. The function reshape" OR  array
data_5m<-array(data,c(5,length(data)/5))
and
data_5m[1,] is what I wanted ,but I donot think it is a good method.
2013/1/14 Jeff Newmiller 

> ab <- AA[(1:10)*10]





-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] hwo to subtract a child array from the big array?

2013-01-13 Thread Jie Tang
hi R users
  I have a data set with the name AA
AA<-1:100
Now I want to get a child array from AA every 10 numbers
e.g.
ab =c(10,20,30,40,50,60,70,80,100)

How could I subtract aa from AA?
thank you .
-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to subset the data frame by lines

2012-08-01 Thread Jie Tang
I defined a data.frame by a two-dimensional array.
> aa = data.frame(rbind(  11:20,   1:10))
> aa
  X1 X2 X3 X4 X5 X6 X7 X8 X9 X10
1 11 12 13 14 15 16 17 18 19  20
2  1   2   3 45  6   78  9  10

Now I want to use the data in the second line of aa which from 1 to 10 to

output.But I find that when I use the aa[[1]][1:10] and it seems be mistake.
aa[[1]][1:10]
 [1] 11  1 NA NA NA NA NA NA NA NA

But when I just indice one element of the dataframe .e.g.aa[[1]][2]
It will be ok. How could I subset the data.frame data by lines?

Thank you ?

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how can I show the xlab and ylab information while using layout

2012-07-10 Thread Jie Tang
hi  R-users:
  I want to draw three plot into one figure by layout and the script has
been shown below.
 But I find R does  not show  the xlab and ylab information  completely as
shown the figure attached.
How can I midify the script.? thank you .

xxlab<-paste(cpmd," (",ro,"%)",sep=" ")
yylab<-paste(rfmd," (",co,"%)",sep=" ")
par(mar=c(3,3,1,1))
#layout(matrix(c(2,0,1,3),2,2,byrow=TRUE),widths=lcm(30),
heights=lcm(25),TRUE)
layout(matrix(c(2,0,1,3),2,2,byrow=TRUE),c(5,1),c(1,5),TRUE)
layout.show(3)
plot(data_cpmd,data_rfmd,xlab=xxlab,ylab=yylab,xlim=XX,ylim=YY,asp=1)
abline(1,1)
#rug(side=1,jitter(data_cpmd,5))
#rug(side=2,jitter(data_rfmd,5))
#plot(homo_ana$dism16cpmd,homo_ana$dism16rfmd,main=mtitle,xlab=xxlab,ylab=yylab,xlim=XX,ylim=YY,asp=1)

par(mar=c(0,3,1,1))
barplot(data_cpmd, axes=FALSE, ylim=YY, space=0)
par(mar=c(3,0,1,1))
barplot(data_rfmd, axes=FALSE,main=mtitle, xlim=XX, space=0, horiz=TRUE)

#boxplot(data_cpmd,horizontal = TRUE,xlim=XX,ylim=YY,outline=ifout, xaxt =
"n")
#par(mar=c(3,0,1,1))
#boxplot(data_rfmd,xlim=XX,ylim=YY,outline=ifout,yaxt = "n")
<>__
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, self-contained, reproducible code.


[R] is it possible to insert a figure into into another new figure by r script

2012-07-09 Thread Jie Tang
hi R-users
   Now I have a figure in emf or png or tiff format  that have been drawn
by other tool and I want to insert this figure into
 my new figure by R script. I wonder if is possible ?

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to plot the data in a map?

2012-07-02 Thread Jie Tang
hi R-users:
  I have some data related with geographical information.
   I wonder how to plot some data  (in contour,shaded or scatter) on a map.
  Could anyone tell me which package or reference or examples  I can learn
 ?
 thank you .

-- 
TANG Jie
Email: totang...@gmail.com

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to add the sample number in the hist figure

2012-06-29 Thread Jie Tang
hi,R-users:
Now I plot some data with the name(aveobsdata) in column , How can I add
the
some number(e,g. the sample number) in each of the column?
plot(aveobsdata,type='h',lwd=line_width,col=line_col,main=titleinfo,xlab=xxlab,ylab=yylab,xaxt
= "n")
axis(1, at = 1:nums, label = name)


--
__
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, self-contained, reproducible code.


[R] how to skip from some null file and go on reading?

2012-06-27 Thread Jie Tang
hi ,
 I am reading a series of files by the command shown as below.
cop_x_data<-read.table(flnm(i)
,skip=2,allowEscapes=TRUE,blank.lines.skip=TRUE)
the first two line of the files are headfile and I skip them by skip=2.
and sometimes the data file is null and there is no any data
in the file except for the  head information.
At this situation,my command would be in the error and tell me that
there is not data in the file and can not go on.
How can I skip out from the null file and go on reading the files while
reading ?

I can not use to try and tryCatch ,can anyone tell me ?
thank you

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to skip out and go on read while the read.table meet with a null file

2012-06-11 Thread Jie Tang
hi ,R users
 I read a series of file by the command shown as below.
cop_x_data<-read.table(flnm,skip=2)
the first two line of the files are headfile and I skip them.
and sometimes the original data file is null and there is no any data
in the file except for the  head information.
At this situation,my command would be in the error and tell me that
there is not data in the file and can not go on.
How can I go on read the files even if the file is null?
thank you
-- 
TANG Jie

__
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, self-contained, reproducible code.


Re: [R] how to modify the tickment of x-axis

2012-03-17 Thread Jie Tang
I have found that  the dimension number of label must be equal with the
dimension of the plot data by your this method.
if we have two data in every hour,it seems can not show the correct
tickment?
.plot(1:20, xaxt = "n")
axis(1, at = 1:10, label = paste(1:10, "h", sep = "")) # Happy axis!



2012/3/17 R. Michael Weylandt 

> Did you look at the example I gave you when you asked this question 10
> days ago? I'll repeat for completeness
>
> op <- par()
> par(ask = TRUE)
> plot(1:10) # Unhappy axis
>
> plot(1:10, xaxt = "n")
> axis(1, at = 1:10, label = paste(1:10, "h", sep = "")) # Happy axis!
> par(ask = op$ask)
>
> The (good) advice to use dput() was to help us help you. Reread what was
> said.
>
> Michael
>
> On Sat, Mar 17, 2012 at 10:22 AM, Jie Tang  wrote:
> > hi
> >  I plot a series of observation data every minutes in a day as the
> > attachment below
> >
> > plot(wnd,type='l',lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY)
> > In the figure, the x-axis tickment is the number of data   How can I
> change
> > it
> > fore example 1h 2h 3h 4h and so on ?
> > someone has told me that use dput but it seems useless.
> >
> > Can anyone tell me how to use axis or at ?thank you .
> >
> >
> > --
> >> TANG Jie
> >> Email: totang...@gmail.com
> >> Tel: 0086-2154896104
> >> Shanghai Typhoon Institute,China
> >>
> >>
> >>
> >> --
> >> TANG Jie
> >> Email: totang...@gmail.com
> >> Tel: 0086-2154896104
> >> Shanghai Typhoon Institute,China
> >>
> >
> >[[alternative HTML version deleted]]
> >
> > __
> > 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, self-contained, reproducible code.
>



-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] Fwd: how to modify the tickment of x-axis

2012-03-17 Thread Jie Tang
hi
 I plot a series of observation data every minutes in a day as the
attachment below

plot(wnd,type='l',lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY)
In the figure, the x-axis tickment is the number of data   How can I change
it
fore example 1h 2h 3h 4h and so on ?
someone has told me that use dput but it seems useless.

Can anyone tell me how to use axis or at ?thank you .

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China



-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China
__
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, self-contained, reproducible code.


Re: [R] how to modify the tickment of x-axis

2012-03-17 Thread Jie Tang
> I am plotting several lines in one figure by such codes. But it is strange
> that
>
> only this first tickment of x-axis is shown.
>
> plot(winddata$v1,type='l',
> lty=1,col='black',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY, xaxt = "n")
> par(new=T)
> plot(winddata$v2,type='l',
> lty=1,col='blue',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY, xaxt = "n")
>
> par(new=T)
> plot(winddata$v3,type='l',
> lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY, xaxt = "n")
>
> par(new=T)
> plot(winddata$v4,type='l',
> lty=1,col='green',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY, xaxt = "n")
> #axis(1, at = seq_along(winddata$v4), labels =
> paste(seq_along(winddata$v4), "h")
> par(new=T)
> plot(winddata$v5,type='l',
> lty=1,col='grey',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY, xaxt = "n")
>
> axis(1, at = 1:4,  label = paste(1:4, "h", sep = "") )# Happy axis!
>
> here is some of the dataset  by dput
>
c(12.9, 13, 14.1, 16.2, 16.1, 16.8, 15.8, 15.9, 15.8, 15.6, 15.3,
15, 14.9, 14, 13.3, 14.3, 14.7, 14.3, 12.6, 11.4, 11.7, 12, 11.9,
12.4, 13.3, 13.4, 14.1, 14.1, 13.6, 14.1, 13.8, 14, 14.3, 14.3,
13.8, 13.6, 13.2, 12.2, 12.7, 12.9, 13.2, 12.5, 12.6, 13.6, 13.9,
13.3, 13.6, 13.7, 12.8, 12, 12.7, 12.6, 13.4, 14, 15.3, 14.5,
13.2, 11.2, 11.2, 12.6, 12.8, 12.1, 11.6, 11.8, 11.8, 12.8, 11.8,
11.6, 12, 12.3, 12.7, 12.9, 12.8, 12.8, 12.3, 12.1, 11.7, 11.4,
11.1, 10.7, 11.3, 12.8, 12.7, 12.3, 13.9, 14.8, 13.1, 12.6, 12.4,
12.7, 12.1, 13.7, 13.8, 14.1, 14.1, 14.2, 13.7, 12.9, 11.7, 11.9,
12.5, 12.7, 12.1, 12.5, 12.7, 12.7, 12.6, 13.1, 13.4, 12.3, 11.6,
10.9, 10.8, 10, 9.5, 10.1, 10.4, 10.3, 11.9, 12, 12.1, 12.4,
11.4, 11, 12.9, 13.2, 13.8, 13.9, 13.4, 13.3, 12.8, 12.5, 12.2)

>
>
2012/3/17 R. Michael Weylandt 
>
> Did you look at the example I gave you when you asked this question 10
>> days ago? I'll repeat for completeness
>>
>> op <- par()
>> par(ask = TRUE)
>> plot(1:10) # Unhappy axis
>>
>> plot(1:10, xaxt = "n")
>> axis(1, at = 1:10, label = paste(1:10, "h", sep = "")) # Happy axis!
>> par(ask = op$ask)
>>
>> The (good) advice to use dput() was to help us help you. Reread what was
>> said.
>>
>> Michael
>>
>> On Sat, Mar 17, 2012 at 10:22 AM, Jie Tang  wrote:
>> > hi
>> >  I plot a series of observation data every minutes in a day as the
>> > attachment below
>> >
>> > plot(wnd,type='l',lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY)
>> > In the figure, the x-axis tickment is the number of data   How can I
>> change
>> > it
>> > fore example 1h 2h 3h 4h and so on ?
>> > someone has told me that use dput but it seems useless.
>> >
>> > Can anyone tell me how to use axis or at ?thank you .
>> >
>> >
>> > --
>> >> TANG Jie
>> >> Email: totang...@gmail.com
>> >> Tel: 0086-2154896104
>> >> Shanghai Typhoon Institute,China
>> >>
>> >>
>> >>
>> >> --
>> >> TANG Jie
>> >> Email: totang...@gmail.com
>> >> Tel: 0086-2154896104
>> >> Shanghai Typhoon Institute,China
>> >>
>> >
>> >[[alternative HTML version deleted]]
>> >
>> > __
>> > 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, self-contained, reproducible code.
>>
>
>
>
> --
> TANG Jie
> Email: totang...@gmail.com
> Tel: 0086-2154896104
> Shanghai Typhoon Institute,China
>



-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


Re: [R] how to modify the tickment of x-axis

2012-03-17 Thread Jie Tang
hi
 I plot a series of observation data every minutes in a day as the
attachment below

plot(wnd,type='l',lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY)
In the figure, the x-axis tickment is the number of data   How can I change
it
fore example 1h 2h 3h 4h and so on ?
someone has told me that use dput but it seems useless.

Can anyone tell me how to use axis or at ?thank you .


-- 
> TANG Jie
> Email: totang...@gmail.com
> Tel: 0086-2154896104
> Shanghai Typhoon Institute,China
>
>
>
> --
> TANG Jie
> Email: totang...@gmail.com
> Tel: 0086-2154896104
> Shanghai Typhoon Institute,China
>

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to call functions with same name but in different package?

2012-03-17 Thread Jie Tang
hi everyone .

I am trying to use some packages but there are some functions have the same
name in different package.
for example

dwt function

both in packages wavelets and waveslim

dwt(X, filter="la8", n.levels, boundary="periodic")

How can I avoid mixing them up ?


-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] can anyone tell me what is the meaning of the x and y axis ?

2012-03-15 Thread Jie Tang
hi ,I am trying to using wavelet package.

require(wavelets)
wt <- dwt(aa, n.levels=4, boundary="reflection", fast=TRUE)
plot(wt)

and we can get the figure as the attachment.


aa is a data array that came from the one day obvervation in 1HZ and has
the length of 86400 .

Can anyone tell me what is the meaning of the information of x-axis and
y-axis .

Which one is the space scale ?

thank you .


-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China
<>__
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, self-contained, reproducible code.


[R] where I can find more color names or color definition?

2012-03-14 Thread Jie Tang
hi everyone .
  Now I want to draw several lines in one frame.And it seems needs more
colors except for blue red,black .Where can i found these color name or
define some new color ?thank you .

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to modify the tickment of x-axis

2012-03-07 Thread Jie Tang
hi
 I plot a series of observation data every minutes in a day as the
attachment below

plot(wnd,type='l',lty=1,col='red',lwd=1,xlab=xxlab,ylab=yylab,ylim=YY)
In the figure, the x-axis tickment is the number of data   How can I change
it
fore example 1h 2h 3h 4h and so on ?


-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China
__
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, self-contained, reproducible code.


Re: [R] how to read a file containing a series filename

2012-03-07 Thread Jie Tang
thank you all. it seems  what='' can works while what = " " does not .:)
thank you all.

2012/3/7 kees duineveld 

> Hi Jie,
>
> Are you looking for this construction?
>
> mydata <- apply(c("H20100902.TXT", "H20100903.TXT" ,"H20100904.TXT"
> ,"H20100905.TXT", "H20100906.TXT",
> "H20100907.TXT","H20100908.TXT"),function(x) scan(x, other options))
>
> Kees
>
> On Wed, Mar 7, 2012 at 3:44 PM, Jie Tang  wrote:
> > there is something wrong :
> >
> > scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  :
> >  scan() needs 'a real', but not 'H20100903.TXT'
> >
> > 2012/3/7 jim holtman 
> >
> >> This works fine for me; look at your options on 'scan':
> >>
> >>
> >> > x <- scan(text = "H20100902.TXT
> >> + H20100903.TXT
> >> + H20100904.TXT
> >> + H20100905.TXT
> >> + H20100906.TXT
> >> + H20100907.TXT
> >> + H20100908.TXT", what = '')
> >> Read 7 items
> >> > cat(x, file = 'file.txt', sep = '\n')  # create the 'file.txt'
> >> >
> >> > files <- scan('file.txt', what = '')  # read names from the file
> >> Read 7 items
> >> > files  # display the names
> >> [1] "H20100902.TXT" "H20100903.TXT" "H20100904.TXT" "H20100905.TXT"
> >> "H20100906.TXT"
> >> [6] "H20100907.TXT" "H20100908.TXT"
> >> >
> >>
> >>
> >> On Wed, Mar 7, 2012 at 8:49 AM, Jie Tang  wrote:
> >> > hi everyone .
> >> > I have a group of files that needs to be read in .
> >> > And I put their filename into one file with the name "file.txt"
> >> >
> >> > And in the file.txt,the filename are shown as below :
> >> > H20100902.TXT
> >> > H20100903.TXT
> >> > H20100904.TXT
> >> > H20100905.TXT
> >> > H20100906.TXT
> >> > H20100907.TXT
> >> > H20100908.TXT
> >> >
> >> > Now I want to read these file from the file.txt by such  codes:
> >> >
> >> >
> >> > filename <-("file.txt")
> >> >
> >> > pp <- scan(filename,what=list(""),sep=" ")
> >> >
> >> > but R shows  that :
> >> >> pp
> >> > [[1]]
> >> >
> >> > that is pp is just one dimension data?
> >> >
> >> > but when I type
> >> >>pp[1]
> >> > the filenames are shown.
> >> >
> >> > How could I read these filenames into one array
> >> > and so that .I can read the data by such a command ?
> >> >
> >> > ddata<-scan(pp[2],what=datalist,na.strings = 999)
> >> >
> >> > thank you .
> >> > --
> >> > TANG Jie
> >> > Email: totang...@gmail.com
> >> > Tel: 0086-2154896104
> >> > Shanghai Typhoon Institute,China
> >> >
> >> >[[alternative HTML version deleted]]
> >> >
> >> > __
> >> > 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, self-contained, reproducible code.
> >>
> >>
> >>
> >> --
> >> Jim Holtman
> >> Data Munger Guru
> >>
> >> What is the problem that you are trying to solve?
> >> Tell me what you want to do, not how you want to do it.
> >>
> >
> >
> >
> > --
> > TANG Jie
> > Email: totang...@gmail.com
> > Tel: 0086-2154896104
> > Shanghai Typhoon Institute,China
> >
> >[[alternative HTML version deleted]]
> >
> > __
> > 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, self-contained, reproducible code.
>



-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


Re: [R] how to read a file containing a series filename

2012-03-07 Thread Jie Tang
here is my file.txt that generated by other command "ls "

2012/3/7 Jie Tang 

> there is something wrong :
>
> scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  :
>   scan() needs 'a real', but not 'H20100903.TXT'
>
> 2012/3/7 jim holtman 
>
>> This works fine for me; look at your options on 'scan':
>>
>>
>> > x <- scan(text = "H20100902.TXT
>> + H20100903.TXT
>> + H20100904.TXT
>> + H20100905.TXT
>> + H20100906.TXT
>> + H20100907.TXT
>> + H20100908.TXT", what = '')
>> Read 7 items
>> > cat(x, file = 'file.txt', sep = '\n')  # create the 'file.txt'
>> >
>> > files <- scan('file.txt', what = '')  # read names from the file
>> Read 7 items
>> > files  # display the names
>> [1] "H20100902.TXT" "H20100903.TXT" "H20100904.TXT" "H20100905.TXT"
>> "H20100906.TXT"
>> [6] "H20100907.TXT" "H20100908.TXT"
>> >
>>
>>
>> On Wed, Mar 7, 2012 at 8:49 AM, Jie Tang  wrote:
>> > hi everyone .
>> > I have a group of files that needs to be read in .
>> > And I put their filename into one file with the name "file.txt"
>> >
>> > And in the file.txt,the filename are shown as below :
>> > H20100902.TXT
>> > H20100903.TXT
>> > H20100904.TXT
>> > H20100905.TXT
>> > H20100906.TXT
>> > H20100907.TXT
>> > H20100908.TXT
>> >
>> > Now I want to read these file from the file.txt by such  codes:
>> >
>> >
>> > filename <-("file.txt")
>> >
>> > pp <- scan(filename,what=list(""),sep=" ")
>> >
>> > but R shows  that :
>> >> pp
>> > [[1]]
>> >
>> > that is pp is just one dimension data?
>> >
>> > but when I type
>> >>pp[1]
>> > the filenames are shown.
>> >
>> > How could I read these filenames into one array
>> > and so that .I can read the data by such a command ?
>> >
>> > ddata<-scan(pp[2],what=datalist,na.strings = 999)
>> >
>> > thank you .
>> > --
>> > TANG Jie
>> > Email: totang...@gmail.com
>> > Tel: 0086-2154896104
>> > Shanghai Typhoon Institute,China
>> >
>> >[[alternative HTML version deleted]]
>> >
>> > __
>> > 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, self-contained, reproducible code.
>>
>>
>>
>> --
>> Jim Holtman
>> Data Munger Guru
>>
>> What is the problem that you are trying to solve?
>> Tell me what you want to do, not how you want to do it.
>>
>
>
>
> --
> TANG Jie
> Email: totang...@gmail.com
> Tel: 0086-2154896104
> Shanghai Typhoon Institute,China
>



-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China
H20080728.TXT
H20090808.TXT
H20090809.TXT
H20100830.TXT
H20100831.TXT
H20100901.TXT
H20100902.TXT
H20100903.TXT
H20100904.TXT
H20100905.TXT
H20100906.TXT
H20100907.TXT
H20100908.TXT
H20100909.TXT
H20100910.TXT
H20100911.TXT
H20100912.TXT
H20100913.TXT
H20100914.TXT
H20100915.TXT
H20100916.TXT
H20100917.TXT
H20100918.TXT
H20100919.TXT
H20100920.TXT
H20100921.TXT
H20100922.TXT
H20100923.TXT
H20100924.TXT
H20100925.TXT
H20100926.TXT
H20100927.TXT
H20100928.TXT
H20100929.TXT
H20100930.TXT
H20101001.TXT
H20101002.TXT
H20101003.TXT
H20101004.TXT
H20101005.TXT
H20101006.TXT
H20101007.TXT
H20101008.TXT
H20101009.TXT
H20101010.TXT
H20101011.TXT
H20101012.TXT
H20101013.TXT
H20101014.TXT
H20101015.TXT
H20101016.TXT
H20101017.TXT
H20101018.TXT
H20101019.TXT
H20101020.TXT
H20101021.TXT
H20101022.TXT
H20101023.TXT
H20101024.TXT
__
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, self-contained, reproducible code.


Re: [R] how to read a file containing a series filename

2012-03-07 Thread Jie Tang
there is something wrong :

scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  :
  scan() needs 'a real', but not 'H20100903.TXT'

2012/3/7 jim holtman 

> This works fine for me; look at your options on 'scan':
>
>
> > x <- scan(text = "H20100902.TXT
> + H20100903.TXT
> + H20100904.TXT
> + H20100905.TXT
> + H20100906.TXT
> + H20100907.TXT
> + H20100908.TXT", what = '')
> Read 7 items
> > cat(x, file = 'file.txt', sep = '\n')  # create the 'file.txt'
> >
> > files <- scan('file.txt', what = '')  # read names from the file
> Read 7 items
> > files  # display the names
> [1] "H20100902.TXT" "H20100903.TXT" "H20100904.TXT" "H20100905.TXT"
> "H20100906.TXT"
> [6] "H20100907.TXT" "H20100908.TXT"
> >
>
>
> On Wed, Mar 7, 2012 at 8:49 AM, Jie Tang  wrote:
> > hi everyone .
> > I have a group of files that needs to be read in .
> > And I put their filename into one file with the name "file.txt"
> >
> > And in the file.txt,the filename are shown as below :
> > H20100902.TXT
> > H20100903.TXT
> > H20100904.TXT
> > H20100905.TXT
> > H20100906.TXT
> > H20100907.TXT
> > H20100908.TXT
> >
> > Now I want to read these file from the file.txt by such  codes:
> >
> >
> > filename <-("file.txt")
> >
> > pp <- scan(filename,what=list(""),sep=" ")
> >
> > but R shows  that :
> >> pp
> > [[1]]
> >
> > that is pp is just one dimension data?
> >
> > but when I type
> >>pp[1]
> > the filenames are shown.
> >
> > How could I read these filenames into one array
> > and so that .I can read the data by such a command ?
> >
> > ddata<-scan(pp[2],what=datalist,na.strings = 999)
> >
> > thank you .
> > --
> > TANG Jie
> > Email: totang...@gmail.com
> > Tel: 0086-2154896104
> > Shanghai Typhoon Institute,China
> >
> >[[alternative HTML version deleted]]
> >
> > __
> > 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, self-contained, reproducible code.
>
>
>
> --
> Jim Holtman
> Data Munger Guru
>
> What is the problem that you are trying to solve?
> Tell me what you want to do, not how you want to do it.
>



-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to read a file containing a series filename

2012-03-07 Thread Jie Tang
hi everyone .
I have a group of files that needs to be read in .
And I put their filename into one file with the name "file.txt"

And in the file.txt,the filename are shown as below :
H20100902.TXT
H20100903.TXT
H20100904.TXT
H20100905.TXT
H20100906.TXT
H20100907.TXT
H20100908.TXT

Now I want to read these file from the file.txt by such  codes:


filename <-("file.txt")

pp <- scan(filename,what=list(""),sep=" ")

but R shows  that :
> pp
[[1]]

that is pp is just one dimension data?

but when I type
>pp[1]
the filenames are shown.

How could I read these filenames into one array
and so that .I can read the data by such a command ?

ddata<-scan(pp[2],what=datalist,na.strings = 999)

thank you .
-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to read a freetext line ?

2011-11-17 Thread Jie TANG
hi everyone .
 Here I have a text where there are some integer and string variables.But I
can not read them by readLines and scan

the text is :

weight ;30;130
food:2;1;12
color:white;black

the first column is the names of the variables and others are the value of
them.
 the column in different line are different.
Can anyone help me ?
-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] Fwd: how can I install the latest version of r in linux?

2011-10-24 Thread Jie TANG
-- Forwarded message --
From: Jie TANG 
Date: 2011/10/25
Subject: how can I install the latest version of r in linux?
To: r-help@r-project.org


HI R-users
  I downloaded the latest version of R with the name R-latest.tar.gz from
the website
 But when I tar the package and configure the package,
 some error message showed that
configure: error: --with-readline=yes (default) and headers/libs are not
available

and  I run make command:
error message says;
user@gateway R-2.13.2]$ make
make: *** No targets specified and no makefile found.  Stop.

and when I download the RPM package for redhat, there are still some errors
rpm -ivh R-core-2.10.0-2.el5.i386.rpm
warning: R-core-2.10.0-2.el5.i386.rpm: Header V3 DSA signature: NOKEY, key
ID 97d3544e
error: Failed dependencies:
libXmu.so.6 is needed by R-core-2.10.0-2.el5.i386
libgfortran.so.1 is needed by R-core-2.10.0-2.el5.i386
libtcl8.4.so is needed by R-core-2.10.0-2.el5.i386
libtk8.4.so is needed by R-core-2.10.0-2.el5.i386
perl(File::Copy::Recursive) is needed by R-core-2.10.0-2.el5.i386
tetex-latex is needed by R-core-2.10.0-2.el5.i386
xdg-utils is needed by R-core-2.10.0-2.el5.i386
How could I install the R package or is there any binary version of R so
that I can tar the
 compressed package and use R directly?
 thank you .
-- 




-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how can I install the latest version of r in linux?

2011-10-24 Thread Jie TANG
HI R-users
  I downloaded the latest version of R with the name R-latest.tar.gz from
the website
 But when I tar the package and configure the package,
 some error message showed that
configure: error: --with-readline=yes (default) and headers/libs are not
available

and  I run make command:
error message says;
user@gateway R-2.13.2]$ make
make: *** No targets specified and no makefile found.  Stop.

How could I install the R package or is there any binary version of R so
that I can tar the
 compressed package and use R directly?
 thank you .
--

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to return back to go on my cycle while read my files

2011-09-01 Thread Jie TANG
hi ,when i read a lots of files

for (i in 1:totnum)
{
cop_x_data<-read.table(flnm[i],skip=2)
if(i==1) {cop_data=cop_x_data}
else {cop_data=rbind(cop_data,cop_x_data)}
}

some of the files are missing . so this loop can not go on .I wonder how can
I go on
 the loop cycle while reading the files just like the command
read(unit,err=linenum) in fortran ?

thank you .

-- 
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] two question about plot

2011-09-01 Thread Jie TANG
1) how to modify the the tickment of x-axis or y-axis.
   boxplot(data[,1:5])
  the tickment in x-axis in V1 V2 V3 V4 V5 ,I want to be some name for
example
  name<-c("1day","2day","3day","4day","5day")

2) how to overlap two plot into one figure?
 plot(data[1:5])
 boxplot(newdata[,1:5])
?

-- 
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to plot a series of data in a dataframe?

2011-09-01 Thread Jie TANG
hi

i have a dataframe with the name "obsdata"
   V1 V2 V3 V4V5V6V7V8 V9   V10   V11   V12   V13
11001  3 24 12  24.7  44.4  70.1  49.3   33.7   3.0   6.8   2.7NA
21001  3 25  0  70.1  49.3  33.7 138.2  152.5NA   4.2   6.9  17.5
31001  3 25 12  33.7 187.7 286.5 386.7 NA  16.2  46.0  48.8  43.1
41001  3 26  0  88.6 129.4NANA NA  55.5  26.5NANA
51001  3 24 12  24.7  24.1  44.3 109.1   96.3   3.0   6.8   9.3  17.2

not i want to boxplot the data from V5 to V11 ,what can i do ?

it seems that boxplot(obsdata$V5) can only plot one group of data ?

-- 
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


Re: [R] how to get the varifying character with two variables?

2011-09-01 Thread Jie TANG
nice. thank you all.
R is a great tool and R users are also so kind .

2011/9/1 David Winsemius 

>
> On Sep 1, 2011, at 3:45 AM, Jie TANG wrote:
>
>  thank you. it works.
>> but further question is that if we  can let the " flnm" to be a
>> 2-dimension
>> matrix [3,5]?
>> since
>> mtdno<-paste("data",1:3,sep=""**)
>> tyno<-paste("obs",1:5,sep="")
>> flnm<-paste(mtdno,tyno,"_err.**dat",sep="")
>> flnm would be a 1-dimension with 15 elements?
>>
>
> Just take out the c() call that converted the matrix from outer into a
> vector.
>
> --
> David
>
>
>
>> thankyou
>>
>> 2011/9/1 Jorge I Velez 
>>
>>  Hi Jie,
>>>
>>> Try
>>>
>>> c(outer(mtdno, tyno, FUN = paste, "_err.dat", sep = ""))
>>>
>>> HTH,
>>> Jorge
>>>
>>>
>>> On Thu, Sep 1, 2011 at 3:11 AM, Jie TANG <> wrote:
>>>
>>>  hi R user
>>>> mtdno<-paste("data",1:3,sep=""**)
>>>> tyno<-paste("obs",1:5,sep="")
>>>> flnm<-paste(mtdno,tyno,"_err.**dat",sep="")
>>>>
>>>> flnm  is
>>>> [1] "data1obs1_err.dat" "data2obs2_err.dat" "data3obs3_err.dat"
>>>> [4] "data1obs4_err.dat" "data2obs5_err.dat"
>>>>
>>>> but actually what i want is data from 1 to  3 and obs from 1 to 5. thus
>>>> ,I
>>>> can read 15 files but not 5 files
>>>>
>>>> how could I  do?
>>>> thanks.
>>>> --
>>>> TANG Jie
>>>>
>>>>  [[alternative HTML version deleted]]
>>>>
>>>> __**
>>>> R-help@r-project.org mailing list
>>>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>>>> PLEASE do read the posting guide
>>>> http://www.R-project.org/**posting-guide.html<http://www.R-project.org/posting-guide.html>
>>>> and provide commented, minimal, self-contained, reproducible code.
>>>>
>>>>
>>>
>>>
>>
>> --
>> TANG Jie
>> Email: totang...@gmail.com
>> Tel: 0086-2154896104
>> Shanghai Typhoon Institute,China
>>
>>[[alternative HTML version deleted]]
>>
>> __**
>> R-help@r-project.org mailing list
>> https://stat.ethz.ch/mailman/**listinfo/r-help<https://stat.ethz.ch/mailman/listinfo/r-help>
>> PLEASE do read the posting guide http://www.R-project.org/**
>> posting-guide.html <http://www.R-project.org/posting-guide.html>
>> and provide commented, minimal, self-contained, reproducible code.
>>
>
> David Winsemius, MD
> West Hartford, CT
>
>


-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


Re: [R] how to get the varifying character with two variables?

2011-09-01 Thread Jie TANG
thank you. it works.
but further question is that if we  can let the " flnm" to be a 2-dimension
matrix [3,5]?
since
mtdno<-paste("data",1:3,sep="")
tyno<-paste("obs",1:5,sep="")
flnm<-paste(mtdno,tyno,"_err.dat",sep="")
flnm would be a 1-dimension with 15 elements?

thankyou

2011/9/1 Jorge I Velez 

> Hi Jie,
>
> Try
>
> c(outer(mtdno, tyno, FUN = paste, "_err.dat", sep = ""))
>
> HTH,
> Jorge
>
>
> On Thu, Sep 1, 2011 at 3:11 AM, Jie TANG <> wrote:
>
>> hi R user
>> mtdno<-paste("data",1:3,sep="")
>> tyno<-paste("obs",1:5,sep="")
>> flnm<-paste(mtdno,tyno,"_err.dat",sep="")
>>
>> flnm  is
>> [1] "data1obs1_err.dat" "data2obs2_err.dat" "data3obs3_err.dat"
>> [4] "data1obs4_err.dat" "data2obs5_err.dat"
>>
>> but actually what i want is data from 1 to  3 and obs from 1 to 5. thus ,I
>> can read 15 files but not 5 files
>>
>> how could I  do?
>>  thanks.
>> --
>> TANG Jie
>>
>>[[alternative HTML version deleted]]
>>
>> __
>> 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, self-contained, reproducible code.
>>
>
>


-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to get the varifying character with two variables?

2011-09-01 Thread Jie TANG
hi R user
mtdno<-paste("data",1:3,sep="")
tyno<-paste("obs",1:5,sep="")
flnm<-paste(mtdno,tyno,"_err.dat",sep="")

flnm  is
[1] "data1obs1_err.dat" "data2obs2_err.dat" "data3obs3_err.dat"
[4] "data1obs4_err.dat" "data2obs5_err.dat"

but actually what i want is data from 1 to  3 and obs from 1 to 5. thus ,I
can read 15 files but not 5 files

how could I  do?
 thanks.
-- 
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


Re: [R] how to referee a dimension name via a variable?

2011-08-29 Thread Jie TANG
thank you , it works .

another problem is if can could define a variable to express the data.frame?
for example :
datanam<-c("newdata","newdata2")
plot(datanam[1][[newnam[1]]])


2011/8/30 Justin Haynes 

> try:
>
> newnam<-paste('newdatadat',dayno,sep='')
>
> plot(test[[newnam[1]]])
>
>
> On Mon, Aug 29, 2011 at 12:29 PM, Jie TANG  wrote:
>
>> hi, R-users
>>   I have a data.frame for example  test$newdataday24 and test$newdataday48
>> I can plot them by
>> plot(test$newdataday24)
>> but now i want to plot different data by define a variable to describe
>> them
>> dayno<-c(24,48)
>> newnam<-paste("test$newdataday",dayno,sep="")
>> plot(newnam[1])
>>
>> but i failed,the error message said that something wrong with plot.window
>>
>> what can i do to fix my script ? thanks
>> -
>> TANG Jie
>>
>>[[alternative HTML version deleted]]
>>
>> __
>> 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, self-contained, reproducible code.
>>
>
>


-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to referee a dimension name via a variable?

2011-08-29 Thread Jie TANG
hi, R-users
   I have a data.frame for example  test$newdataday24 and test$newdataday48
I can plot them by
plot(test$newdataday24)
but now i want to plot different data by define a variable to describe them
dayno<-c(24,48)
newnam<-paste("test$newdataday",dayno,sep="")
plot(newnam[1])

but i failed,the error message said that something wrong with plot.window

what can i do to fix my script ? thanks
-
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to read a group of files into one dataset?

2011-08-25 Thread Jie TANG
for example : I have files with the name
 "ma01.dat","ma02.dat","ma03.dat","ma04.dat",I want to read the data in
these files into one data.frame

flnm<-paste("obs",101:114,"_err.dat",sep="")
newdata<-read.table(flnm,skip=2)
data<-(flnm,skip=2)
but the data only contains data from the flnm[1]
I  also tried as below :
for (i in 1:9) {
data<-read.table(flnm[i],skip=2)
}


but i failed how could I modified my script?

is there any advices?
--

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


Re: [R] how to compare two dataset with same sampling

2011-08-24 Thread Jie TANG
thanks.
 Merge? I am just looking for a method to comparison on homogeneous sample
between two dataset.


2011/8/25 Jeff Newmiller 

> ?merge may be what you are looking for. If not, you should clarify what you
> want to do.
> ---
> Jeff Newmiller The . . Go Live...
> DCN: Basics: ##.#. ##.#. Live Go...
> Live: OO#.. Dead: OO#.. Playing
> Research Engineer (Solar/Batteries O.O#. #.O#. with
> /Software/Embedded Controllers) .OO#. .OO#. rocks...1k
> ---
>
> Sent from my phone. Please excuse my brevity.
>
> Jie TANG  wrote:
>
>> hi ,
>> Now I have two dataset and want to compare them with same sample.
>> Dataset A:
>>  year  mon  day  obs
>>  2010 03 1212
>>  2010 03 1822
>>  2010 04 1262
>>  2010 07  24   29
>>
>> Dataset B:
>>  year  mon  day  obs
>>  2010 03 1215
>>  2010 04 1257
>>  2010 07 2432
>>  2010 08 2315
>>
>>
>> As you see,dataset A and B have several observation data but their obs data
>> is not same everyday.
>> Now I want to compare the data from two dataset in the same time.
>> How could I write the R script?
>>
>> errdata<-subset(A,A$V11==Bdata$V11 & A$V12==B$V12)
>>
>> this command seems failed.How could I?
>>
>> --
>>
>>  [[alternative HTML version deleted]]
>>
>> --
>>
>> 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, self-contained, reproducible code.
>>
>>


-- 
TANG Jie
Email: totang...@gmail.com

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to compare two dataset with same sampling

2011-08-24 Thread Jie TANG
hi ,
Now I have two dataset and want to compare them with same sample.
Dataset A:
 year  mon  day  obs
 2010 03 1212
 2010 03 1822
 2010 04 1262
 2010 07  24   29

Dataset B:
 year  mon  day  obs
 2010 03 1215
 2010 04 1257
 2010 07 2432
 2010 08 2315


As you see,dataset A and B have several observation data but their obs data
is not same everyday.
Now I want to compare the data from two dataset in the same time.
How could I write the R script?

errdata<-subset(A,A$V11==Bdata$V11 & A$V12==B$V12)

this command seems failed.How could I?

--

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to analysis a dataset with some missing value?

2011-08-18 Thread Jie TANG
my qustion is if my miss value in my dataset is -
for example :
  1 3 21 33 -  23  33  -
how can I plot or analysis this dataset ignoring the missing value ?  thanks
.

-- 
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] can i use a variable to describe the dimension name of a data.frame?

2011-08-17 Thread Jie TANG
for example:
  a data.frame
  data
  V1  V2 V3
  1 2   3
  4 5   6

If I want to calculate the V2
 I can get data$V2
 But now I want to calculate the dimension name and then analysis the data.
for example
No=3*x ;x=1,2,3,...n
 anadata=data$VNo
How could I do?
-- 
TANG Jie

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to plot equalprobable error ellipse?

2011-02-23 Thread Jie TANG
hi,R users,
  Now  I have some scatter figures, is there some method can plot equalprobable
error ellipse ?

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to learn more from R

2011-02-03 Thread Jie TANG
hi ,R USERS:
  I am a new R user. I have study some basic R syntax and get some
interesting results.
 Now I want to know how much R can do .where can i get some examples or demo
resource to study advanced function of R ?
-- 
thank your


TANG Jie
Email: totang...@gmail.com

Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to draw the probability ellipse circle figure?

2010-06-08 Thread Jie TANG
hi ,R user folks .

Nowadays I read a paper which draw a probability ellipse circle  figure
shown in the appendix.
 I wonder how to draw this figure by R ?
the x-axis and y-axis both express the error but in different direction .
-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China
__
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, self-contained, reproducible code.


Re: [R] two questions about PLOT

2010-06-01 Thread Jie TANG
thanks for your reply.
 I have tried to use rseek.org.But still some problems.
When I add "axis(4)" and axis(1,at=1:6,labels=gradeinfo$gradenam),the old
tick or labels still
are there as shown in the figure,how could I delete them( the old tick
information in x-axis and left y axis )
My script is shown as below :

plot(avegrp,type='l',lty=1,col='black',lwd=4,xlab=xxlab,ylab=yylab,labels=TRUE)
axis(2)
axis(1,at=1:6,labels=gradeinfo$gradenam, tick=FALSE)
par(new=T)

plot(sdgrp,type='l',lty=3,col='red1',xlab=xxlab,ylab=yylab,lwd=4,labels=TRUE)
axis(1,at=1:6,labels=gradeinfo$gradenam, tick=FALSE)
#axis(2, col = "gold", lty = 2, lwd = 0.5)
axis(4)
legend("topright", legend,   lty=llty, lwd=llwd,col =lgcol)



2010/6/1 Jannis 

> I would wote this question one of the most often asked questions here on
> that list ;-). Try searching the help archiwe (www.rseek.org) and you will
> find solutions. I would guess that you need to use something like:
>
> axis(4)
>
> as the sides of the plot are always numbered from bottom,left,top,right
>
> HTH
> Jannis
> Jie TANG schrieb:
>
>> here ,I want to plot two lines in one figure.But I have two problems
>> 1) how to move one of the y-axis to be the right ? I tried to the
>> command"axis(2)",But I failed.
>> 2) how to add the axis information correctly.Since I have use the cmommand
>> "axis(1,at=1:6,labels=gradeinfo$gradenam)"
>>   but it seems that the correct information that I want is superposition
>> with the old axis information.What can i do ?
>> the script and figure is shown as below .thanks .:)
>>
>> outflnm<-paste(Outdic,"meansd.jpg",sep="/")
>> jpeg(file=outflnm, bg="transparent")
>> legend<-c("average error","stand quare error")
>> lgcol<-c("black","red1")
>> par(las=1)
>> yylab<-c("forecast error")
>> xxlab<-c("typhoon class")
>> llty<-c(1,3)
>> llwd<-c(4,4)
>> #par(bg='yellow')
>>
>>
>> plot(avegrp,type='l',lty=1,col='black',lwd=4,xlab=xxlab,ylab=yylab)
>> par(new=T)
>> plot(sdgrp,type='l',lty=3,col='red1',xlab=xxlab,ylab=yylab,lwd=4)
>> #axis(2, col = "gold", lty = 2, lwd = 0.5)
>> legend("topright", legend,   lty=llty, lwd=llwd,col =lgcol)
>> axis(1,at=1:6,labels=gradeinfo$gradenam)
>> dev.off()
>>
>>  
>>
>> __
>> 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, self-contained, reproducible code.
>>
>>
>
>


-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China
__
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, self-contained, reproducible code.


[R] two questions about PLOT

2010-05-31 Thread Jie TANG
here ,I want to plot two lines in one figure.But I have two problems
1) how to move one of the y-axis to be the right ? I tried to the
command"axis(2)",But I failed.
2) how to add the axis information correctly.Since I have use the cmommand
"axis(1,at=1:6,labels=gradeinfo$gradenam)"
   but it seems that the correct information that I want is superposition
with the old axis information.What can i do ?
the script and figure is shown as below .thanks .:)

outflnm<-paste(Outdic,"meansd.jpg",sep="/")
jpeg(file=outflnm, bg="transparent")
legend<-c("average error","stand quare error")
lgcol<-c("black","red1")
par(las=1)
yylab<-c("forecast error")
xxlab<-c("typhoon class")
llty<-c(1,3)
llwd<-c(4,4)
#par(bg='yellow')


plot(avegrp,type='l',lty=1,col='black',lwd=4,xlab=xxlab,ylab=yylab)
par(new=T)
plot(sdgrp,type='l',lty=3,col='red1',xlab=xxlab,ylab=yylab,lwd=4)
#axis(2, col = "gold", lty = 2, lwd = 0.5)
legend("topright", legend,   lty=llty, lwd=llwd,col =lgcol)
axis(1,at=1:6,labels=gradeinfo$gradenam)
dev.off()

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China
__
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, self-contained, reproducible code.


[R] how to run the R script in windows in background mode or script mode?

2010-05-29 Thread Jie TANG
Hello,everyone .
 Now I write some R scripts to calculate some variables and I run them in  C
shell script command in linux..
Now my some new R scripts had to be moved in someother's  computer with
windows system.
How to run these R scripts easily without installing many soft package?


-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] help about cluster package

2010-03-11 Thread Jie TANG
hello,everyone.
 I tried to use cluster analysis package by reading the manual "chapter 15
cluster package"
.But when I tried to use the function "agnes",the R said :there is no
function.Can
you tell me which package I should load? Can anyone give me some sample
scripts about
clustering analysis ?Thank you .

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to change the tick character of x-axis ?

2010-01-26 Thread Jie TANG
Hello,
Now I draw a figure by boxplot ,but I am fail to add the tick information in
the axis? How could I ?

https://mail.google.com/mail/?ui=2&ik=c88089ec0a&view=att&th=1266e2c8dff41fcb&attid=0.1&disp=attd

now  I want to add the tick information in the x-axis as Class1
,Class2,Class3 instead of "X5,X12,V3,V4,V5,V6"
What can I do to achieve my goal?thanks


TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China
<>__
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, self-contained, reproducible code.


[R] how to make the tick character in Y-axis to be horizontal?

2009-10-09 Thread Jie TANG
hello ,every one ,
 I draw a figure as shown in appendix A,
  The tick characters in the Y-axis is arranged in the vertical
direction.Now I want to arranged the Y-axis tick in the horizontal
direction.

How could I do ,then?

Thank you .

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China
<>__
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, self-contained, reproducible code.


[R] how use the subset?

2009-07-30 Thread Jie TANG
hi ,everyone

I  want subtract some dataset by subset.

>From the help running  help(subset),  ths information is "*subset(airquality,
Day == 1, select = -Temp)* "



while  I running my script written as "*g1data<-subset(errdata, fac>12) *"
,it is wrong with the error information "*subset.default(newerrdata,
fac>12),can not find fac*"


and g1 in read from the file as shown below
*errdata<-scan("err.dat",what = list(mon=0,day=0,err=0,fac=0))*

While I changed to *g1data<-subset(errdata, errdata$fac>12)*, there is no
error message any more  but it seems that *g1data* dooes be selected.

who can help me to subset the dataset?

thank you .:)

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] ask help about boxplot , different list variation into the tick of x-axis?

2009-07-30 Thread Jie TANG
 Hi ,everyone.

I want to draw a boxplot figure, main script shown as below. when I
run the command "boxplot(bjavee~yearname)",it is wrong with the error
information " model.frame.default(formula = bjavee ~ yearname) :
  variation 'bjavee' list is wrong".

I want to add the yearname as the x-axis tick. And yearname is a array
with the length 12,while bjavee is a 5*12 matrix. How could I get what
I want? thanks.

bjerr1<-bjerrdata$tyerr[1:bjyearnum[2]]
bjerr2<-bjerrdata$tyerr[(bjyearnum[2]+1):bjyearnum[3]]
bjerr3<-bjerrdata$tyerr[(bjyearnum[3]+1):bjyearnum[4]]
bjerr4<-bjerrdata$tyerr[(bjyearnum[4]+1):bjyearnum[5]]
bjerr5<-bjerrdata$tyerr[(bjyearnum[5]+1):bjyearnum[6]]
bjerr6<-bjerrdata$tyerr[(bjyearnum[6]+1):bjyearnum[7]]
bjerr7<-bjerrdata$tyerr[(bjyearnum[7]+1):bjyearnum[8]]
bjerr8<-bjerrdata$tyerr[(bjyearnum[8]+1):bjyearnum[9]]
bjerr9<-bjerrdata$tyerr[(bjyearnum[9]+1):bjyearnum[10]]
bjerr10<-bjerrdata$tyerr[(bjyearnum[10]+1):bjyearnum[11]]
bjerr11<-bjerrdata$tyerr[(bjyearnum[11]+1):bjyearnum[12]]
bjerr12<-bjerrdata$tyerr[(bjyearnum[12]+1):length(bjerryear)]

bjavee<-data.frame(5,12)
cprob=c(0.05,0.25,0.5,0.75,0.95)
bjavee[1:5,1]<-quantile(bjerr1,prob=cprob)
bjavee[1:5,2]<-quantile(bjerr2,prob=cprob)
bjavee[1:5,3]<-quantile(bjerr3,prob=cprob)
bjavee[1:5,4]<-quantile(bjerr4,prob=cprob)
bjavee[1:5,5]<-quantile(bjerr5,prob=cprob)
bjavee[1:5,6]<-quantile(bjerr6,prob=cprob)
bjavee[1:5,7]<-quantile(bjerr7,prob=cprob)
bjavee[1:5,8]<-quantile(bjerr8,prob=cprob)
bjavee[1:5,9]<-quantile(bjerr9,prob=cprob)
bjavee[1:5,10]<-quantile(bjerr10,prob=cprob)
bjavee[1:5,11]<-quantile(bjerr11,prob=cprob)
bjavee[1:5,12]<-quantile(bjerr12,prob=cprob)


yearname<-(1997:2008)

png(file=".\\png\\jptrkfivenum24.png", bg="transparent")

bjbox<-data.frame(bjavee[1:5,1],bjavee[1:5,2],bjavee[1:5,3],bjavee[1:5,4],bjavee[1:5,5],bjavee[1:5,6],bjavee[1:5,7],bjavee[1:5,8],bjavee[1:5,9],bjavee[1:5,10],bjavee[1:5,11],bjavee[1:5,12])
boxplot(bjavee~yearname)

__
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, self-contained, reproducible code.


[R] how to add the x-axis information

2009-07-30 Thread Jie TANG
Hi ,everyone.

I want to draw a boxplot figure, main script shown as below. when I run the
command "boxplot(bjavee~yearname)",it is wrong with the error information "
model.frame.default(formula = bjavee ~ yearname) :
  variation 'bjavee' list is wrong".

I want to add the yearname as the x-axis tick. And yearname is a array with
the length 12,while bjavee is a 5*12 matrix. How could I get what I want?
thanks.

bjerr1<-bjerrdata$tyerr[1:bjyearnum[2]]
bjerr2<-bjerrdata$tyerr[(bjyearnum[2]+1):bjyearnum[3]]
bjerr3<-bjerrdata$tyerr[(bjyearnum[3]+1):bjyearnum[4]]
bjerr4<-bjerrdata$tyerr[(bjyearnum[4]+1):bjyearnum[5]]
bjerr5<-bjerrdata$tyerr[(bjyearnum[5]+1):bjyearnum[6]]
bjerr6<-bjerrdata$tyerr[(bjyearnum[6]+1):bjyearnum[7]]
bjerr7<-bjerrdata$tyerr[(bjyearnum[7]+1):bjyearnum[8]]
bjerr8<-bjerrdata$tyerr[(bjyearnum[8]+1):bjyearnum[9]]
bjerr9<-bjerrdata$tyerr[(bjyearnum[9]+1):bjyearnum[10]]
bjerr10<-bjerrdata$tyerr[(bjyearnum[10]+1):bjyearnum[11]]
bjerr11<-bjerrdata$tyerr[(bjyearnum[11]+1):bjyearnum[12]]
bjerr12<-bjerrdata$tyerr[(bjyearnum[12]+1):length(bjerryear)]

bjavee<-data.frame(5,12)
cprob=c(0.05,0.25,0.5,0.75,0.95)
bjavee[1:5,1]<-quantile(bjerr1,prob=cprob)
bjavee[1:5,2]<-quantile(bjerr2,prob=cprob)
bjavee[1:5,3]<-quantile(bjerr3,prob=cprob)
bjavee[1:5,4]<-quantile(bjerr4,prob=cprob)
bjavee[1:5,5]<-quantile(bjerr5,prob=cprob)
bjavee[1:5,6]<-quantile(bjerr6,prob=cprob)
bjavee[1:5,7]<-quantile(bjerr7,prob=cprob)
bjavee[1:5,8]<-quantile(bjerr8,prob=cprob)
bjavee[1:5,9]<-quantile(bjerr9,prob=cprob)
bjavee[1:5,10]<-quantile(bjerr10,prob=cprob)
bjavee[1:5,11]<-quantile(bjerr11,prob=cprob)
bjavee[1:5,12]<-quantile(bjerr12,prob=cprob)


yearname<-(1997:2008)

png(file=".\\png\\jptrkfivenum24.png", bg="transparent")

bjbox<-data.frame(bjavee[1:5,1],bjavee[1:5,2],bjavee[1:5,3],bjavee[1:5,4],bjavee[1:5,5],bjavee[1:5,6],bjavee[1:5,7],bjavee[1:5,8],bjavee[1:5,9],bjavee[1:5,10],bjavee[1:5,11],bjavee[1:5,12])
boxplot(bjavee~yearname)




-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


Re: [R] quetions about dimensions

2009-07-29 Thread Jie TANG
interting ,

when I modified

bj2=bjerrdata$tyerr[bjyearnum[2]:bjyearnum[3]]

the length of bj2 is correct .

It seems that can not put a fomula in the dimension description .
2009/7/29 Jie TANG 

> hi ,everyone,
>
> I have a script shown as below:
>
> > bj2=bjerrdata$tyerr[bjyearnum[2]+1:bjyearnum[3]]
> > length(bj2)
> [1] 448
>
> while
>
> > b=bjyearnum[3]
> > a=bjyearnum[2]+1
> > bj1=bjerrdata$tyerr[a:b]
> > length(bj1)
> [1] 169
>
>
> it is different with bj2 and bj1 . and the array  bjyearnum is
>  [1]0  279  448  633 1021 1365 1813 2237 2839 3314 3798 4157   12
>
> why bj1 is 169 while bj2 is 448 ?
>
> how to let bj2 is also array with the length 169 ?
>
> thank you .
> --
>
>
> TANG Jie
> Email: totang...@gmail.com
> Tel: 0086-2154896104
> Shanghai Typhoon Institute,China
>



-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] quetions about dimensions

2009-07-29 Thread Jie TANG
hi ,everyone,

I have a script shown as below:

> bj2=bjerrdata$tyerr[bjyearnum[2]+1:bjyearnum[3]]
> length(bj2)
[1] 448

while

> b=bjyearnum[3]
> a=bjyearnum[2]+1
> bj1=bjerrdata$tyerr[a:b]
> length(bj1)
[1] 169


it is different with bj2 and bj1 . and the array  bjyearnum is
 [1]0  279  448  633 1021 1365 1813 2237 2839 3314 3798 4157   12

why bj1 is 169 while bj2 is 448 ?

how to let bj2 is also array with the length 169 ?

thank you .
--


TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to initial the R script

2009-07-28 Thread Jie TANG
hi everyone,

 I am wondering if I can inintial all of the varibles and vectors at the
begining part of my R script to make clear all the meanning defined

in another script runned before It is just similiar with the command " close
all " in Matlab or "reinit " in grads.How can I do?



thank you.:)

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] what is meaning of the bubbles in boxplots?

2009-07-19 Thread Jie TANG
Hi ,everyone ,
  I draw some boxplot figure with the command "boxplot".But in the
figure,there are some bubbles at the top part of the figure.

 Can anyone tell me what the correct meaning of these bubbles?and how to
remove it?

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.


[R] how to run the R script in background in Windows XP?

2009-07-17 Thread Jie TANG
Hello ,everyone.

 I am a fresh user of R. I wrote several several R script in   R with the
version 2.9.1 in Windows XP. But I only can run these scrpit via R-GUI.

 Can anyone tell me how to run the scripts in background  without openning
R-gui.In another word, run the R-script and get the result via

some batch proceesing files or shell scripts directly?

Thanks.
 .

-- 
TANG Jie
Email: totang...@gmail.com
Tel: 0086-2154896104
Shanghai Typhoon Institute,China

[[alternative HTML version deleted]]

__
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, self-contained, reproducible code.