[R] (no subject)
Hi, Browse[1] d4 EVDO_Rev Session_Setup FCA bin counts 50 NA 0 5 1 1 51 NA 0 5 2 1 52 NA 0 5 3 1 53 NA 0 5 4 1 54 NA 0 5 5 1 55 NA 0 5 6 1 56 NA 0 5 7 1 57 NA 0 5 8 1 58 NA 0 5 9 1 59 NA 0 5 10 1 60 NA 0 5 11 1 #logic for merging rows with FCA 4,5,6 into 4 d4n - aggregate(d4[,c(counts)], by=list(bin = d4$bin, EVDO_Rev=d4$EVDO_Rev, Session_Setup=d4$Session_Setup),sum) does the above instruction works or not ,if not why Thanks K.Ravichandra [[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] is there any way to apply mulitiple conditions in subset function
Hi All, Let say df Session_Setup DCT FwdDataVols_bin counts 761 0 1 1 87162 762 0 1 2 11495 763 0 1 3 3986 764 0 1 4 1583 765 0 1 5920 766 0 1 6920 767 0 1 8306 768 0 1 9966 769 0 1 12307 770 0 1 13305 771 0 1 14355 772 0 1 17308 773 0 1 19308 774 0 1 22616 775 0 1 23307 776 0 1 25307 777 0 1 26308 778 0 1 27306 779 0 1 86308 780 0 1 90 1 781 0 1 92306 782 0 1 296 1 783 0 1 298 1 784 0 1 300 1 785 0 1 304303 786 0 1 321306 787 0 12477 1 788 0 12490 2 789 0 12491 1 790 0 12492 1 791 0 12495266 792 0 17047 1 793 0 17052 1 794 0 17055 4 795 0 17057 1 796 0 17058 1 797 0 17059 1 798 0 17061 1 799 0 17064 1 800 0 17065 2 801 0 17066 1 802 0 17067293 803 0 1 30941 1 804 0 1 30942 1 805 0 1 30943 1 806 0 1 30946 1 807 0 1 30950 1 808 0 1 30953 1 809 0 1 30954 1 810 0 1 30958 1 811 0 1 30959 1 812 0 1 30964 2 813 0 1 30965 1 814 0 1 30966 1 815 0 1 30967 2 816 0 1 30968 1 817 0 1 30970 2 818 0 1 30972 3 819 0 1 30973 1 820 0 1 30976 1 821 0 1 30977203 Subset(df,df$ FwdDataVols_bin30 df$ FwdDataVols_bin100 ) but it doesn't work Is there any other way to retrieve data between range 30-100 Thanks K.Ravichandra [[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] is there any way to run R method as a background process from R interface
Hi , can some body tell to me how to run a R method /function as a background process from R interface Thanks K.Ravichandra [[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] need help in plotting barchart
Df contains Session_Setup DCT RevDataVols_bincounts comp 1Session_Setup RLL 1NA Session_Setup+RLL+1 2Session_Setup RLL 2NA Session_Setup+RLL+2 3Session_Setup RLL 3NA Session_Setup+RLL+3 4Session_Setup RLL 4NA Session_Setup+RLL+4 5Session_Setup RLL 5NA Session_Setup+RLL+5 6Session_Setup RLL 6NA Session_Setup+RLL+6 7Session_Setup RLL 7NA Session_Setup+RLL+7 8Session_Setup RLL 8NA Session_Setup+RLL+8 9Session_Setup RLL 9NA Session_Setup+RLL+9 10 Session_Setup RLL 10NA Session_Setup+RLL+10 11 Session_Setup RLL 11NA Session_Setup+RLL+11 12 Session_Setup RLL 12NA Session_Setup+RLL+12 13 Session_Setup RLL 13NA Session_Setup+RLL+13 14 Session_Setup RLL 14NA Session_Setup+RLL+14 15 Session_Setup RLL 15NA Session_Setup+RLL+15 16 Session_Setup RLL 16NA Session_Setup+RLL+16 17 Session_Setup RLL 17NA Session_Setup+RLL+17 18 Session_Setup RLL 18NA Session_Setup+RLL+18 19 Session_Setup RLL 19NA Session_Setup+RLL+19 20 Session_Setup RLL 20NA Session_Setup+RLL+20 21 Session_Setup RLL 21NA Session_Setup+RLL+21 22 Session_Setup RLL 22NA Session_Setup+RLL+22 23 Session_Setup RLL 23NA Session_Setup+RLL+23 24 Session_Setup RLL 24NA Session_Setup+RLL+24 25 Session_Setup RLL 25NA Session_Setup+RLL+25 26 Session_Setup RLL 26NA Session_Setup+RLL+26 27 Session_Setup RLL 27NA Session_Setup+RLL+27 28 Session_Setup RLL 28NA Session_Setup+RLL+28 29 Session_Setup RLL 29NA Session_Setup+RLL+29 30 Session_Setup RLL 30NA Session_Setup+RLL+30 31 User_Initiated RLL 1 8.487840 User_Initiated+RLL+1 32 User_Initiated RLL 2 6.066089 User_Initiated+RLL+2 33 User_Initiated RLL 3NA User_Initiated+RLL+3 34 User_Initiated RLL 4NA User_Initiated+RLL+4 35 User_Initiated RLL 5 5.906891 User_Initiated+RLL+5 36 User_Initiated RLL 6NA User_Initiated+RLL+6 37 User_Initiated RLL 7NA User_Initiated+RLL+7 38 User_Initiated RLL 8NA User_Initiated+RLL+8 39 User_Initiated RLL 9NA User_Initiated+RLL+9 40 User_Initiated RLL 10NA User_Initiated+RLL+10 41 User_Initiated RLL 11NA User_Initiated+RLL+11 42 User_Initiated RLL 12NA User_Initiated+RLL+12 43 User_Initiated RLL 13NA User_Initiated+RLL+13 44 User_Initiated RLL 14NA User_Initiated+RLL+14 45 User_Initiated RLL 15NA User_Initiated+RLL+15 46 User_Initiated RLL 16NA User_Initiated+RLL+16 47 User_Initiated RLL 17NA User_Initiated+RLL+17 48 User_Initiated RLL 18NA User_Initiated+RLL+18 49 User_Initiated RLL 19NA User_Initiated+RLL+19 50 User_Initiated RLL 20NA User_Initiated+RLL+20 51 User_Initiated RLL 21NA User_Initiated+RLL+21 52 User_Initiated RLL 22NA User_Initiated+RLL+22 53 User_Initiated RLL 23NA User_Initiated+RLL+23 54 User_Initiated RLL 24NA User_Initiated+RLL+24 55 User_Initiated RLL 25NA User_Initiated+RLL+25 56 User_Initiated RLL 26NA User_Initiated+RLL+26 57 User_Initiated RLL 27NA User_Initiated+RLL+27 58 User_Initiated RLL 28NA User_Initiated+RLL+28 59 User_Initiated RLL 29NA User_Initiated+RLL+29 60 User_Initiated RLL 30NA User_Initiated+RLL+30 61 Session_Setup NoRLL 1 8.906891 Session_Setup+NoRLL+1 62 Session_Setup NoRLL 2NA Session_Setup+NoRLL+2 63 Session_Setup NoRLL 3NA Session_Setup+NoRLL+3 64 Session_Setup NoRLL 4NA Session_Setup+NoRLL+4 65 Session_Setup NoRLL 5NA Session_Setup+NoRLL+5 66 Session_Setup NoRLL 6NA Session_Setup+NoRLL+6 67 Session_Setup NoRLL 7NA Session_Setup+NoRLL+7 68
[R] FW: need some help
Hi , df Session_Setup DCT FwdDataVols_bin countsComp 1 User_Initiated NoRLL 1 5058 User_Initiated+NoRLL+1 2 User_Initiated NoRLL 2584 User_Initiated+NoRLL+2 3 User_Initiated NoRLL 3191 User_Initiated+NoRLL+3 4 User_Initiated NoRLL 4128 User_Initiated+NoRLL+4 5 User_Initiated NoRLL 5 90 User_Initiated+NoRLL+5 6 User_Initiated NoRLL 6 43 User_Initiated+NoRLL+6 7 User_Initiated NoRLL 7 45 User_Initiated+NoRLL+7 8 User_Initiated NoRLL 8 35 User_Initiated+NoRLL+8 9 User_Initiated NoRLL 9 45 User_Initiated+NoRLL+9 10 User_Initiated NoRLL 10 20 User_Initiated+NoRLL+10 11 User_Initiated NoRLL 12 20 User_Initiated+NoRLL+12 12 User_Initiated NoRLL 13 15 User_Initiated+NoRLL+13 13 User_Initiated NoRLL 14 25 User_Initiated+NoRLL+14 14 User_Initiated NoRLL 15 5 User_Initiated+NoRLL+15 15 User_Initiated NoRLL 17 5 User_Initiated+NoRLL+17 16 User_Initiated NoRLL 18 10 User_Initiated+NoRLL+18 17 User_Initiated NoRLL 19 10 User_Initiated+NoRLL+19 18 User_Initiated NoRLL 21 5 User_Initiated+NoRLL+21 19 User_Initiated NoRLL 22 30 User_Initiated+NoRLL+22 20 User_Initiated NoRLL 23 10 User_Initiated+NoRLL+23 21 User_Initiated NoRLL 24 15 User_Initiated+NoRLL+24 22 User_Initiated NoRLL 25 5 User_Initiated+NoRLL+25 23 User_Initiated NoRLL 27 5 User_Initiated+NoRLL+27 24 User_Initiated NoRLL 28 10 User_Initiated+NoRLL+28 25 User_Initiated NoRLL 29 10 User_Initiated+NoRLL+29 26 User_Initiated NoRLL 30 5 User_Initiated+NoRLL+30 27 User_Initiated RLL 1 50User_Initiated+RLL+1 28 User_Initiated RLL 2 10User_Initiated+RLL+2 29 User_Initiated RLL 3 5User_Initiated+RLL+3 30 User_Initiated RLL 8 5User_Initiated+RLL+8 31 User_Initiated RLL 23 5 User_Initiated+RLL+23 32 Session_Setup NoRLL 1749 Session_Setup+NoRLL+1 Df contains Session_Setup DCT FwdDataVols_bin countsComp 1Session_Setup RLL 1 0 Session_Setup+RLL+1 2Session_Setup RLL 2 0 Session_Setup+RLL+2 3Session_Setup RLL 3 0 Session_Setup+RLL+3 4Session_Setup RLL 4 0 Session_Setup+RLL+4 5Session_Setup RLL 5 0 Session_Setup+RLL+5 6Session_Setup RLL 6 0 Session_Setup+RLL+6 7Session_Setup RLL 7 0 Session_Setup+RLL+7 8Session_Setup RLL 8 0 Session_Setup+RLL+8 9Session_Setup RLL 9 0 Session_Setup+RLL+9 10 Session_Setup RLL 10 0Session_Setup+RLL+10 11 Session_Setup RLL 11 0Session_Setup+RLL+11 12 Session_Setup RLL 12 0Session_Setup+RLL+12 13 Session_Setup RLL 13 0Session_Setup+RLL+13 14 Session_Setup RLL 14 0Session_Setup+RLL+14 15 Session_Setup RLL 15 0Session_Setup+RLL+15 16 Session_Setup RLL 16 0Session_Setup+RLL+16 17 Session_Setup RLL 17 0Session_Setup+RLL+17 18 Session_Setup RLL 18 0Session_Setup+RLL+18 19 Session_Setup RLL 19 0Session_Setup+RLL+19 20 Session_Setup RLL 20 0Session_Setup+RLL+20 21 Session_Setup RLL 21 0Session_Setup+RLL+21 22 Session_Setup RLL 22 0Session_Setup+RLL+22 23 Session_Setup RLL 23 0Session_Setup+RLL+23 24 Session_Setup RLL 24 0Session_Setup+RLL+24 25 Session_Setup RLL 25 0Session_Setup+RLL+25 26 Session_Setup RLL 26 0Session_Setup+RLL+26 27 Session_Setup RLL 27 0Session_Setup+RLL+27 28 Session_Setup RLL 28 0Session_Setup+RLL+28 29 Session_Setup RLL 29 0Session_Setup+RLL+29 30 Session_Setup RLL 30 0Session_Setup+RLL+30 31 User_Initiated RLL 1 0User_Initiated+RLL+1 32 User_Initiated RLL 2 0User_Initiated+RLL+2 33 User_Initiated RLL 3 0User_Initiated+RLL+3 34 User_Initiated RLL 4 0User_Initiated+RLL+4 35 User_Initiated
[R] need some help
Hi , df Session_Setup DCT FwdDataVols_bin countsComp 1 User_Initiated NoRLL 1 5058 User_Initiated+NoRLL+1 2 User_Initiated NoRLL 2584 User_Initiated+NoRLL+2 3 User_Initiated NoRLL 3191 User_Initiated+NoRLL+3 4 User_Initiated NoRLL 4128 User_Initiated+NoRLL+4 5 User_Initiated NoRLL 5 90 User_Initiated+NoRLL+5 6 User_Initiated NoRLL 6 43 User_Initiated+NoRLL+6 7 User_Initiated NoRLL 7 45 User_Initiated+NoRLL+7 8 User_Initiated NoRLL 8 35 User_Initiated+NoRLL+8 9 User_Initiated NoRLL 9 45 User_Initiated+NoRLL+9 10 User_Initiated NoRLL 10 20 User_Initiated+NoRLL+10 11 User_Initiated NoRLL 12 20 User_Initiated+NoRLL+12 12 User_Initiated NoRLL 13 15 User_Initiated+NoRLL+13 13 User_Initiated NoRLL 14 25 User_Initiated+NoRLL+14 14 User_Initiated NoRLL 15 5 User_Initiated+NoRLL+15 15 User_Initiated NoRLL 17 5 User_Initiated+NoRLL+17 16 User_Initiated NoRLL 18 10 User_Initiated+NoRLL+18 17 User_Initiated NoRLL 19 10 User_Initiated+NoRLL+19 18 User_Initiated NoRLL 21 5 User_Initiated+NoRLL+21 19 User_Initiated NoRLL 22 30 User_Initiated+NoRLL+22 20 User_Initiated NoRLL 23 10 User_Initiated+NoRLL+23 21 User_Initiated NoRLL 24 15 User_Initiated+NoRLL+24 22 User_Initiated NoRLL 25 5 User_Initiated+NoRLL+25 23 User_Initiated NoRLL 27 5 User_Initiated+NoRLL+27 24 User_Initiated NoRLL 28 10 User_Initiated+NoRLL+28 25 User_Initiated NoRLL 29 10 User_Initiated+NoRLL+29 26 User_Initiated NoRLL 30 5 User_Initiated+NoRLL+30 27 User_Initiated RLL 1 50User_Initiated+RLL+1 28 User_Initiated RLL 2 10User_Initiated+RLL+2 29 User_Initiated RLL 3 5User_Initiated+RLL+3 30 User_Initiated RLL 8 5User_Initiated+RLL+8 31 User_Initiated RLL 23 5 User_Initiated+RLL+23 32 Session_Setup NoRLL 1749 Session_Setup+NoRLL+1 Df contains Session_Setup DCT FwdDataVols_bin countsComp 1Session_Setup RLL 1 0 Session_Setup+RLL+1 2Session_Setup RLL 2 0 Session_Setup+RLL+2 3Session_Setup RLL 3 0 Session_Setup+RLL+3 4Session_Setup RLL 4 0 Session_Setup+RLL+4 5Session_Setup RLL 5 0 Session_Setup+RLL+5 6Session_Setup RLL 6 0 Session_Setup+RLL+6 7Session_Setup RLL 7 0 Session_Setup+RLL+7 8Session_Setup RLL 8 0 Session_Setup+RLL+8 9Session_Setup RLL 9 0 Session_Setup+RLL+9 10 Session_Setup RLL 10 0Session_Setup+RLL+10 11 Session_Setup RLL 11 0Session_Setup+RLL+11 12 Session_Setup RLL 12 0Session_Setup+RLL+12 13 Session_Setup RLL 13 0Session_Setup+RLL+13 14 Session_Setup RLL 14 0Session_Setup+RLL+14 15 Session_Setup RLL 15 0Session_Setup+RLL+15 16 Session_Setup RLL 16 0Session_Setup+RLL+16 17 Session_Setup RLL 17 0Session_Setup+RLL+17 18 Session_Setup RLL 18 0Session_Setup+RLL+18 19 Session_Setup RLL 19 0Session_Setup+RLL+19 20 Session_Setup RLL 20 0Session_Setup+RLL+20 21 Session_Setup RLL 21 0Session_Setup+RLL+21 22 Session_Setup RLL 22 0Session_Setup+RLL+22 23 Session_Setup RLL 23 0Session_Setup+RLL+23 24 Session_Setup RLL 24 0Session_Setup+RLL+24 25 Session_Setup RLL 25 0Session_Setup+RLL+25 26 Session_Setup RLL 26 0Session_Setup+RLL+26 27 Session_Setup RLL 27 0Session_Setup+RLL+27 28 Session_Setup RLL 28 0Session_Setup+RLL+28 29 Session_Setup RLL 29 0Session_Setup+RLL+29 30 Session_Setup RLL 30 0Session_Setup+RLL+30 31 User_Initiated RLL 1 0User_Initiated+RLL+1 32 User_Initiated RLL 2 0User_Initiated+RLL+2 33 User_Initiated RLL 3 0User_Initiated+RLL+3 34 User_Initiated RLL 4 0User_Initiated+RLL+4 35 User_Initiated RLL
[R] how to retrieve some records from a dataframe
Hi , Dataframe Df contains more than 30 no of records.but I want only first 30 rows of data. How can I retrieve it. Thanks K.Ravichandra [[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] doubt
Hi Lets say Main(){ Fcaproxy(user=ravi,password=db,database=oracle,host=10.0.0.3) } Fcaproxy -Function(...,importlimit=){ Dbproxy(...) } Dbproxy-function(...){ Initproxy(...) Initproxy -function(database,user,password,host){ print(database) } } What is the o/p of print statement? Thanks K.Ravichandra [[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 write a escape sequences in to a file
Hi Str1-hai Str2-hru I want to write these 2 strings in a file separated by newline. How can I get this. Thanks K.Ravichandra [[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] need help
Hi Dbfile contains bin TCC_TCA TCA_CRTCC_CRTime sn.rnc 1 301 38 365 (08/28/08 00:00:02) 50.20 2 302 39 358 (08/28/08 00:00:07) 50.20 3 319 43 377 (08/28/08 00:00:12) 50.20 4 312 37 367 (08/28/08 00:00:17) 50.20 5 332 40 382 (08/28/08 00:00:22) 50.20 6 312 39 362 (08/28/08 00:00:27) 50.20 7 303 47 368 (08/28/08 00:00:32) 50.20 8 296 42 361 (08/28/08 00:00:37) 50.20 9 299 43 353 (08/28/08 00:00:42) 50.20 10 301 42 361 (08/28/08 00:00:47) 50.20 I did Df-read.table(Dbfile,header=TRUE,sep=\t) I am getting Df bin TCC_TCA TCA_CRTCC_CRTime sn.rnc 1 301 38 365 (08/28/08 00:00:02) 50.2 2 302 39 358 (08/28/08 00:00:07) 50.2 3 319 43 377 (08/28/08 00:00:12) 50.2 4 312 37 367 (08/28/08 00:00:17) 50.2 5 332 40 382 (08/28/08 00:00:22) 50.2 6 312 39 362 (08/28/08 00:00:27) 50.2 7 303 47 368 (08/28/08 00:00:32) 50.2 8 296 42 361 (08/28/08 00:00:37) 50.2 9 299 43 353 (08/28/08 00:00:42) 50.2 10 301 42 361 (08/28/08 00:00:47) 50.2 I dnt know why I am getting in this way(0 is missing ) But I want exact values of sn.rnc. How can I get Thanks K.Ravichandra Thanks K.Ravichandra [[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] need help
Hi str-50.20 as.numeric(str) [1] 50.2 But I want 50.20 as o/p How can I get Thanks K.Ravichandra [[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] need some help on r
Hi Tdf bin TCC_TCA TCA_CR TCC_CR Timesn.rnc 117 117 258 27314 (08/28/08 00:09:42) 50.21 118 118 251 30291 (08/28/08 00:09:47) 50.21 119 119 247 28289 (08/28/08 00:09:52) 50.21 120 120 251 29282 (08/28/08 00:09:57) 50.21 121 121 276 39320 (08/28/08 00:10:02) 50.21 1221 301 38365 (08/28/08 00:00:02) 50.20 2102 302 39358 (08/28/08 00:00:07) 50.20 3103 319 43377 (08/28/08 00:00:12) 50.20 4104 312 37367 (08/28/08 00:00:17) 50.20 I want to retrieve 50.20 records How can I get ? Thanks K.Ravichandra [[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 no of pdf files in a particular directory
Hi Lets say, Dir-/var/www/html/celnet/users/cxadmin/FlowDuration_DataVolume/fld_01_ 08_18_08 There will be pdf and/or csv files. I want to know how many *.pdf files are there in that directory. How can I get using R commands. Thanks K.Ravichandra [[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 no of pdf files in a particular directory
Let's say, Dir-/var/www/html/celnet/users/cxadmin/FlowDuration_DataVolume/fld_0 1_ 08_18_08 There will be pdf and/or csv files. I want to know how many *.pdf and/or csv files are there in that directory. How can I get using R commands. Thanks K.Ravichandra [[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] need some help
Hi Can any body explain the meaning of the following R code if(interactive()) stop(msg, call. = FALSE) else quit() Thanks K.Ravichandra [[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 know the status of particular process
Hi I have the process id, How can I know whether it is in active state or not Thanks K.Ravichandra [[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] spliting a string
Hi String-130.5 Df-Strsplit(.,:,String) Then Df get But I want Df should contains Df 130 5 If any body knows how to do it.tel me Thanks K.Ravichandra [[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 split the string
Hi Str-130.1,2.2,3.1,... I want the o/p like Dataframe1 row 130 2 3 . . Dataframe2 Col 1 2 1 . . How can I get desired o/p. Thanks K.Ravichandra [[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] FW: RES: bug in axis.Date? was (Re: newbie needs help plottingtimeseries)
Instead of x-seq(as.Date(2004-01-01), as.Date(2008-06-01),by=month) from=iso2chron(2004-01-01) to= iso2chron(2008-06-01) from -chron2UTCsecs(from) to-chron2UTCsecs(to) delta##how many secs i.e month time in secs xx - seq(from=from, to=to, by=delta) x - UTCsecs2chron(xx) I think it will works -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Leandro Marino Sent: Wednesday, July 02, 2008 5:47 PM To: Petr PIKAL; Kathi Cc: [EMAIL PROTECTED] Subject: [R] RES: bug in axis.Date? was (Re: newbie needs help plottingtimeseries) You can do this plot saying to R that your file is a time series with the ts() function. serie=ts(x,) and then you use plot(serie) -Mensagem original- De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] nome de Petr PIKAL Enviada em: quarta-feira, 2 de julho de 2008 05:04 Para: Kathi Cc: [EMAIL PROTECTED] Assunto: [R] bug in axis.Date? was (Re: newbie needs help plotting timeseries) Hi Kathi [EMAIL PROTECTED] napsal dne 01.07.2008 18:48:47: On Tue, 1 Jul 2008 14:33:12 +0200, Petr PIKAL wrote Kathi [EMAIL PROTECTED] napsal dne 01.07.2008 13:39:18: Thanks, Petr. After fiddling around some more with my code I found out that this seems to have something to do with the number of records the table I'm reading (here: column B112). Somehow, changing the number of records for B112 changes the numbers in the error message - though I don't quite understand how the number of records influences the axis intervals or their labels, since I define those explicitly... Neither I. So I sent it to r-help maybe somebody else will know. If you debug code of axis.Date you find that after some computing there is this comparison where range is based on your input data (in your case x), and z is from defined at sequence of dates. z - z[z = range[1] z = range[2]] and this comparison results in character(0), when plotting with this artificial example. plot(1:100, seq(405,410,length=100), axes=FALSE, ylim=c(405,410), col=red, pch=15, type=o, ylab=metres above sea level, main=Main Plot Title) axis(2, at=405:410, tck=1, col=gray60) axis.Date(1, at=seq(as.Date(2004-01-01), as.Date(2008-06-01), by=month), labels=seq(as.Date(2004-01-01), as.Date(2008-06-01), by=month), tck=1, col=gray60) I presume, that your x is from different interval of dates or it is not a date. My data comes from a groundwater monitoring program. Once a month the water surface is measured in some 170 stations, and I've been using R to visualize these measurements. In this particular case, the water table ranges between approximately 406 and 408 metres above sea level, hence the y axis interval between 405 and 410. The values of my column x are dates of the format -MM-DD. If something were wrong there, then I guess I would not be able to plot my data at all. But using the limits of 2004-01-01 and 2008-06-01, I can plot all the timelines for my 170 measuring stations without any problem. But since it's now July, I wanted to shift the view by half a year. So I used search and replace in my code to change to 2004-07-01 and 2008-12-01 (plus six months in both cases). That's when I got the error. I almost have a feeling that R doesn't like the empty part of the graph for July-December... I don't understand why this happens, but maybe it has something to do with the comparison of ranges you mentioned. OK, It seems that you are right. Maybe you could add some expected x date/time values so that x axis will have no NA values. x-seq(as.Date(2004-01-01), as.Date(2008-06-01),by=month) y - seq(405,410,length=54) y[50:54] -NA plot(x, y, axes=FALSE, ylim=c(405,410),col=red, pch=15, type=o, ylab=metres above sea level, main=Main Plot Title) axis(2, at=405:410, tck=1, col=gray60) axis.Date(1, at=seq(as.Date(2004-01-01), as.Date(2008-06-01), by=month), labels=seq(as.Date(2004-01-01), as.Date(2008-06-01), by=month), tck=1, col=gray60) as you see, then everything works. However I think that it is pretty close to bug in axis.Date, maybe somebody can enlighten us both :-) Regards Petr Thanks for all your help! Kathi Regards Petr Kathi On Mon, 30 Jun 2008 11:48:43 +0200, Petr PIKAL wrote Hi [EMAIL PROTECTED] napsal dne 30.06.2008 11:14:48: Dear R help list I have recently started using R to visualize time series of water level measurements. The code I wrote does exactly what I want: plot(x, a$B112, axes=FALSE, ylim=c(405,410), col=red, pch=15, type=o, ylab=metres above sea level, main=Main Plot Title) axis(2, at=405:410, tck=1, col=gray60) axis.Date(1, at=seq(as.Date(2004-01-01), as.Date(2008-06-01), by=month), labels=seq(as.Date(2004-01-01), as.Date(2008-06-01), by=month), tck=1, col=gray60) Now I wanted to shift the data visualized by 6 months, so I replaced
[R] need some help in plotting xy graph
fdf dataframe contains the data as follows bin rate overlay x 1 90 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate (04/01/08 16:02:30) 2 93 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate (04/01/08 16:07:30) 1 90 Assign First/cc _from_SN_50 RNC_21_to_SN_53 RNC_20_Success Rate (04/01/08 16:02:30) 2 94 Assign First/cc _from_SN_50 RNC_21_to_SN_53 RNC_20_Success Rate (04/01/08 16:07:30) I want to plot a xygraph on xaxis-x on y-axis-rate groups=overlay formd-rate ~ as.numeric(x) groups-overlay lgnd.txt-levels(df$overlay) print(xyplot(formula(formd),data = fdf, groups = overlay, type = b, as.table = TRUE, cex=0.20,main = this is my first plot, xlab = Time, ylab = session transfer,scales = c(xscales,yscales),key = simpleKey(text = lgnd.txt, cex = 3/4,points = FALSE, lines = TRUE), layout = c(1,1))) but I didn't get any o/p so can u tel how can I get the desired xygraph from fdf dataframe -Original Message- From: Deepayan Sarkar [mailto:[EMAIL PROTECTED] Sent: Wednesday, May 21, 2008 10:43 AM To: Kurapati, Ravichandra (Ravichandra) Cc: [EMAIL PROTECTED] Subject: Re: [Rd] need some help in plotting xy graph On 5/20/08, Kurapati, Ravichandra (Ravichandra) [EMAIL PROTECTED] wrote: Dataframedf contains bin rate overlay 1 1 90 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate 2 2 93 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate 3 1 90 Assign First/cc _from_SN_50 RNC_21_to_SN_53 RNC_20_Success Rate 4 2 94 Assign First/cc _from_SN_50 RNC_21_to_SN_53 RNC_20_Success Rate time 1 (04/01/08 16:02:30) 2 (04/01/08 16:07:30) 3 (04/01/08 16:02:30) 4 (04/01/08 16:07:30) It would be more work to read in your data than I have time for. Could you post it in a more convenient format? (The output of dput(fdf) should be fine.) -Deepayan __ 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] need some help in plotting xy graph
Hi Dataframefdf contains bin rate overlay 1 1 90 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate 2 2 93 Assign First/cc _from_SN_53 RNC_20_to_SN_50 RNC_21_Success Rate 3 1 90 Assign First/cc _from_SN_50 RNC_21_to_SN_53 RNC_20_Success Rate 4 2 94 Assign First/cc _from_SN_50 RNC_21_to_SN_53 RNC_20_Success Rate time 1 (04/01/08 16:02:30) 2 (04/01/08 16:07:30) 3 (04/01/08 16:02:30) 4 (04/01/08 16:07:30) And then I write the following lines of code to plot a xygraph on a pdf file n - length(unique(fdf$time)) x -sort(unique(fdf$time)) y-UTCsecs2chron(x) xscales - computeTimeScales(y) yscales-NULL scales-c(xscales,yscales) ylab-session transfer rate xlab-time lgnd.txt-levels(fdf$overlay) celnet.trellis.device(device=pdf, file=ravi_st.pdf, width=10,height = 10) main-this is the first report formd=rate ~ as.numeric(time) print( xyplot(formula(formd), data = fdf, groups = overlay, type = b, as.table = TRUE, cex=0.20, #subset = ok, commented to show breaks in graph main = main, xlab = Time, ylab = ylab, scales = scales, key = simpleKey(text = lgnd.txt, cex = 3/4, points = FALSE, lines = TRUE), page = function(n) annotate(opts$ann), sub = , layout = c(1,1) ) ) computeTimeScales - function(z, rot=0) ## z is a chron object {browser() ## how many days do the data span? n.days - ceiling(diff(range(z, na.rm = TRUE))) ## compute x ticks, pretty labels x - as.numeric(z) r - range(x, na.rm = TRUE) at.x - seq(from = r[1], to = r[2], length = 7) two_digits - function(x){ x - paste(0, x, sep=) substring(x,nchar(x)-1) } ## heuristics: use hh:mm when range of data falls within one day, ## otherwise use MM-DD hh:mm. at.z - chron(at.x) hh - paste(two_digits(hours(at.z)), two_digits(minutes(at.z)), sep=:) if(0){## hh:ss # this is commented as for more than one day from/to time no date was printed at.lbls - hh } else { ## MM-DD\nhh:ss m - month.day.year(at.z) dd - paste(two_digits(m$month), two_digits(m$day), sep=-) at.lbls - paste(dd, hh, sep=\n) } list(x=list(at = at.x, rot=rot, labels = at.lbls)) } celnet.theme - function() { celnet.theme - canonical.theme(pdf, color = TRUE) if(tolower(.Device) ==png) celnet.theme$background$col - white else canonical.theme(pdf, color = TRUE) celnet.theme$background$col - transparent celnet.theme } celnet.trellis.device - function(device, file, width = NULL, height = NULL,...) { ## analogous to trellis.device() -- this is just tailored to Celnet if(is.null(width)) width - 8 if(is.null(height)) height - 6 if(tolower(device)==png){ if(missing(width)) width - 72 * width if(missing(height)) height - 72 * height } if(tolower(device)==x11) trellis.device(device, width=width, height=height, theme=celnet.theme()) if(tolower(device)==ps || tolower(device)==postscript) trellis.device(postscript, file=file, color = TRUE, width=width, height=height, theme=celnet.theme()) else trellis.device(device, file=file, width=width, height=height, theme=celnet.theme()) } annotate - function(str, ...) ## print a metadata message at the top-bottom of current trellis display { else if(n==1){ x - 0.95 hjust - right } else if(n==2){ x - c(0.05, 0.95) hjust - c(left, right) } else if(n==3){ x - c(0.05, 0.50, 0.95) hjust - c(left, center, right) } x - unit(x, npc) y - unit(1.5, lines)## at 0.5, 1.5, ... lines for(i in seq(along = x)){ grid.text(label = str[i], x = x[i], y = y, just = c(hjust[i], bottom), ...) } invisible(str) } n - length(str) ## one line per string if(n==0) return(invisible(str)) } But I did nt get any desired o/p on a file ravi_st.pdf Can any one tell how can I get the desired o/p [[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.