[R] R: package plotrix
I got plotrix running after updating R. My problem is now solved. Thank you. Maura -Messaggio originale- Da: Jim Lemon [mailto:j...@bitwrit.com.au] Inviato: lun 19/07/2010 10.58 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: package plotrix On 07/19/2010 01:59 AM, mau...@alice.it wrote: I installed package plotrix because reading its vignette it looks like it can help me solve a legend problem. The package instaleed correctly on my Mac OS/X 10.5.8 But I cannot reproduce the examples centered on function lgendg. library(plotrix) plot(0.5,0.5,xlim=c(0,1),ylim=c(0,1),type=n, + main=Test of grouped legend function) legendg(0.5,0.8,c(one,two,three),pch=list(1,2:3,4:6), + col=list(2,3:4,5:7)) Error: could not find function legendg My problem with the regular R legend function is that I cannot indicate in the legend the line plotted by the command abline Here is the code. Attached is the plot. Any suggestion is welcome. Thank you. Hi Maura, The legendg function is fairly new, so you probably have an older version of plotrix. From your example, I suspect that the second last line (split into two lines below) should read: col = c(red4,green,magenta1,cyan,black), text.col = black,lty=c(-1,-1,-1,1,1), and thus I don't think you really need legendg. Jim tutti i telefonini TIM! [[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] package plotrix
I installed package plotrix because reading its vignette it looks like it can help me solve a legend problem. The package instaleed correctly on my Mac OS/X 10.5.8 But I cannot reproduce the examples centered on function lgendg. library(plotrix) plot(0.5,0.5,xlim=c(0,1),ylim=c(0,1),type=n, + main=Test of grouped legend function) legendg(0.5,0.8,c(one,two,three),pch=list(1,2:3,4:6), + col=list(2,3:4,5:7)) Error: could not find function legendg My problem with the regular R legend function is that I cannot indicate in the legend the line plotted by the command abline Here is the code. Attached is the plot. Any suggestion is welcome. Thank you. Maura x11(width=10,heigh=8) plot(NN,LB,xlim=c(1,300),ylim=c(0,3), main=Intrinsic Dimensionality of 1D Helix,font.main=2,cex.main=2,col.main=red, xlab=Number of Nearest-Neighbors,ylab=Estimated Dimension,col.lab=red,cex.lab=1,font.lab=2, xaxt=n,yaxt=n,pch=19,col=red4) axis(1,at=NN[1:40],labels=NN[1:40],cex.lab=1,cex.axis=0.8,col.axis=blue,lwd.ticks=0.5,col.ticks =gray3) axis(2,at=c(0,0.5,1,1.5,2,2.5,3,3.5,4),labels=c(0,0.5,1,1.5,2,2.5,3,3.5,4),cex.lab=1,cex.axis=0.8, col.axis=blue,lwd.ticks=0.5,col.ticks =gray3) lines(NN,McG,pch=18,col=green) lines(NN,PBJD,pch=20,col=magenta1) points(NN,GRPR,pch=18,col=cyan) abline(h=1,pch= 1,lty=1,col=black) legend(topright,legend = c(Levina-Bickel,MacKay-Ghahramani,Pettis-Bailey-Jain-Dubes,Grassberger-Procaccia,Helix Dimension), text.width = strwidth(Pettis-Bailey-Jain-Dubes),pch = c(19,18,20,18,1), col = c(red4,green,magenta1,cyan,black),text.col = black,lty=c(-1,-1,-1,1), bg =snow) e tutti i telefonini TIM! Vai su __ 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] R: package plotrix
-Messaggio originale- Da: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Inviato: dom 18/07/2010 18.58 A: mau...@alice.it Cc: j...@bitwrit.com.au; r-h...@stat.math.ethz.ch Oggetto: Re: [R] package plotrix On 18.07.2010 17:59, mau...@alice.it wrote: I installed package plotrix because reading its vignette it looks like it can help me solve a legend problem. The package instaleed correctly on my Mac OS/X 10.5.8 But I cannot reproduce the examples centered on function lgendg. You mean legendg. Yes. Sorry for my typo. library(plotrix) plot(0.5,0.5,xlim=c(0,1),ylim=c(0,1),type=n, + main=Test of grouped legend function) legendg(0.5,0.8,c(one,two,three),pch=list(1,2:3,4:6), + col=list(2,3:4,5:7)) Error: could not find function legendg That works for me. Try to upgrade bopth R and plotrix if you have not already. I am running R 2.9.2 on my Mac OS/X 10.5.8 I always feel uncomfortable with upgrades. Shall I uninstall R 2.9.2 in advance of instaling the ew bversion for Mac ? I ave no reason for keeping two versions. My problem with the regular R legend function is that I cannot indicate in the legend the line plotted by the command abline Here is the code. Attached is the plot. Any suggestion is welcome. Thank you. Maura x11(width=10,heigh=8) plot(NN,LB,xlim=c(1,300),ylim=c(0,3), main=Intrinsic Dimensionality of 1D Helix,font.main=2,cex.main=2,col.main=red, xlab=Number of Nearest-Neighbors,ylab=Estimated Dimension,col.lab=red,cex.lab=1,font.lab=2, xaxt=n,yaxt=n,pch=19,col=red4) axis(1,at=NN[1:40],labels=NN[1:40],cex.lab=1,cex.axis=0.8,col.axis=blue,lwd.ticks=0.5,col.ticks =gray3) axis(2,at=c(0,0.5,1,1.5,2,2.5,3,3.5,4),labels=c(0,0.5,1,1.5,2,2.5,3,3.5,4),cex.lab=1,cex.axis=0.8, col.axis=blue,lwd.ticks=0.5,col.ticks =gray3) lines(NN,McG,pch=18,col=green) lines(NN,PBJD,pch=20,col=magenta1) points(NN,GRPR,pch=18,col=cyan) abline(h=1,pch= 1,lty=1,col=black) legend(topright,legend = c(Levina-Bickel,MacKay-Ghahramani,Pettis-Bailey-Jain-Dubes,Grassberger-Procaccia,Helix Dimension), text.width = strwidth(Pettis-Bailey-Jain-Dubes),pch = c(19,18,20,18,1), col = c(red4,green,magenta1,cyan,black),text.col = black,lty=c(-1,-1,-1,1), bg =snow) We do not have the data nor do we see the figure, hence this is not reproducible for us. Actually I attached the TIFF plot that I am attaching again. Thank you . Maura Uwe Ligges e tutti i telefonini TIM! Vai su __ 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] removing a non empty directory
I'd like to remove automatically a directory that may be non empty. I tried: file.remove(NewDir, recursive=TRUE) [1] FALSE Warning message: In file.remove(NewDir, recursive = TRUE) : cannot remove file 'Prostate_Validated_mirWalk', reason 'Directory not empty' Is there another command to remove entire directories including their contents ? Thank you. Maura tutti i telefonini TIM! [[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] selecting and excluding files through a pattern
I have the following files list: list.files() [1] Prostate-Cancer_cvs_Dir [2] Prostate_Cancer-miRNAsGenes.Pathway.xml [3] Prostate_Cancer_Pathways-miRNAs-GeneTargets-Dir [4] Prostate_Cancer_Pathways-miRNAs-GeneTargets-Dir.zip [5] Prostate-miRNAs.OrganTargets.txt [6] Prostate_Organ-miRNAs-GenesTargets-Dir [7] Prostate_Organ-miRNAs-GenesTargets-Dir.zip [8] Prostate_Organ-miRNAs-Targets.xml [9] Prostatic_Neoplasm-miRNAs.DiseaseTargets.csv-KO [10] Prostatic_Neoplasm-miRNAs.DiseaseTargets.txt [11] Prostatic_Neoplasms-miRNAs-GeneTargets-Dir [12] Prostatic_Neoplasms-miRNAs-GeneTargets-Dir.zip [13] Prostatic_Neoplasms-miRNAs.xml I'd like to find the pattern expression which selects only the directories excluding the one whose pathname contains csv. I tried: list.files(pattern=Prostate*Dir) But I do not know how to exclude the names containing the string csv at the same time. Thank you for any help, Maura ; tutti i telefonini TIM! [[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] R: selecting and excluding files through a pattern
Actually this pattern will select the files whose name contains csv. Whereas I'd like to exscude them. Maura -Messaggio originale- Da: Jorge Ivan Velez [mailto:jorgeivanve...@gmail.com] Inviato: gio 10/06/2010 17.30 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] selecting and excluding files through a pattern Hi Maura, Try list.files(pattern = 'csv') HTH, Jorge On Thu, Jun 10, 2010 at 11:24 AM, wrote: I have the following files list: list.files() [1] Prostate-Cancer_cvs_Dir [2] Prostate_Cancer-miRNAsGenes.Pathway.xml [3] Prostate_Cancer_Pathways-miRNAs-GeneTargets-Dir [4] Prostate_Cancer_Pathways-miRNAs-GeneTargets-Dir.zip [5] Prostate-miRNAs.OrganTargets.txt [6] Prostate_Organ-miRNAs-GenesTargets-Dir [7] Prostate_Organ-miRNAs-GenesTargets-Dir.zip [8] Prostate_Organ-miRNAs-Targets.xml [9] Prostatic_Neoplasm-miRNAs.DiseaseTargets.csv-KO [10] Prostatic_Neoplasm-miRNAs.DiseaseTargets.txt [11] Prostatic_Neoplasms-miRNAs-GeneTargets-Dir [12] Prostatic_Neoplasms-miRNAs-GeneTargets-Dir.zip [13] Prostatic_Neoplasms-miRNAs.xml I'd like to find the pattern expression which selects only the directories excluding the one whose pathname contains csv. I tried: list.files(pattern=Prostate*Dir) But I do not know how to exclude the names containing the string csv at the same time. Thank you for any help, Maura ; tutti i telefonini TIM! [[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. tutti i telefonini TIM! [[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 control the x-axis tick labels
I am trying to generate a plot whose x-axis values are the following: data_out[,1] [1] 1979 1958 1937 1916 1895 1874 1853 1832 1811 1790 1769 1748 1727 1706 1685 1664 1643 1622 1601 1580 1559 [22] 1538 1517 1496 1475 1454 1433 1412 1391 1370 1349 1328 1307 1286 1265 1244 1223 1202 1181 1160 1139 1118 [43] 1097 1076 1055 1034 1013 992 971 950 929 908 887 866 845 824 803 782 761 740 719 698 677 [64] 656 635 614 593 572 551 530 509 488 467 446 425 404 383 362 341 320 299 278 257 236 [85] 215 194 173 152 131 110 89 68 47 26 25 24 23 22 21 20 19 18 17 16 15 [106] 14 13 12 11 10987654321 The y-axis values are: data_out[,2] [1] 1.01709 1.09454 1.16331 1.21673 1.26098 1.30297 1.33905 1.37466 1.40690 1.43407 1.46022 [12] 1.48497 1.50939 1.53382 1.55764 1.58068 1.60422 1.62692 1.64918 1.67210 1.69456 1.71653 [23] 1.73706 1.75634 1.77562 1.79505 1.81393 1.83259 1.85197 1.87105 1.88949 1.90792 1.92649 [34] 1.94479 1.96263 1.98029 1.99677 2.01212 2.02692 2.04183 2.05648 2.07071 2.08329 2.09510 [45] 2.10593 2.11636 2.12563 2.13423 2.14317 2.15116 2.15739 2.16426 2.17121 2.17796 2.18490 [56] 2.19103 2.19751 2.20357 2.21056 2.21642 2.22264 2.22861 2.23448 2.24007 2.24601 2.25113 [67] 2.25593 2.25842 2.26077 2.26183 2.26223 2.26224 2.26133 2.25868 2.25493 2.25130 2.24704 [78] 2.24123 2.23236 2.22251 2.20842 2.19076 2.17490 2.15480 2.13716 2.11967 2.10428 2.08815 [89] 2.07497 2.06104 2.05527 2.05412 2.06270 2.08828 2.09092 2.09158 2.09290 2.09495 2.09370 [100] 2.09703 2.10551 2.10771 2.10916 2.11557 2.12741 2.13782 2.14946 2.16577 2.18978 2.21518 [111] 2.25129 2.27978 2.32903 2.40820 2.50683 2.64452 3.06182 3.97841 35.81950 I cannot get my ploy start with the tick label 1. Surprisingly it keeps starting from 0 regardless of the usage of the graphic parameter xlim. I tried many different combinations of the parameters appearing in the plot instruction. I also tried to sort the x-axis value in increasing order. plot(sort(data_out[,1]),sort(data_out[,2],decreasing=T),xlim=c(1,1979),ylim=c(1,35),main=Intrinsic Dimensionality of 2D Swiss Roll,font.main=2,cex.main=1.5,col.main=red,xlab=Number of Nearest-Neighbors,ylab=Dimension,type=l,lab=c(10,10,3)) How can I get the x-axis tick labels to be (a subset of) the x-axis values, that is: 123456789 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 47 68 89 110 131 152 173 194 215 236 257 278 299 320 341 362 383 404 425 446 467 488 509 530 551 572 593 614 635 656 677 698 719 740 761 782 803 824 845 866 887 908 929 950 971 992 1013 1034 1055 1076 1097 1118 1139 1160 1181 1202 1223 1244 1265 1286 1307 1328 1349 1370 1391 1412 1433 1454 1475 1496 1517 1538 1559 1580 1601 1622 1643 1664 1685 1706 1727 1748 1769 1790 1811 1832 1853 1874 1895 1916 1937 1958 1979 Thank you in advance, Maura tutti i telefonini TIM! [[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] after updating biomaRt cannot connect any more
I recently updated R 2.10.1 Patched (2010-02-20 r51163) This morning I reinstalled biomaRt using biocLite. Now I can no more connect to biomaRt and even the following instruction is hanging for a while until the same error message pops up. listMarts() Error in value[[3L]](cond) : Request to BioMart web service failed. Verify if you are still connected to the internet. Alternatively the BioMart web service is temporarily down. I checked my command syntax and got the following message: library(help=biomaRt) Warning messages: 1: package 'JavaGD' was built under R version 2.9.0 and help may not work correctly 2: package 'Biobase' was built under R version 2.9.0 and help may not work correctly 3: package 'Biostrings' was built under R version 2.9.0 and help may not work correctly 4: package 'IRanges' was built under R version 2.9.0 and help may not work correctly 5: package 'CORNA' was built under R version 2.9.0 and help may not work correctly 6: package 'GEOquery' was built under R version 2.9.0 and help may not work correctly 7: package 'microRNA' was built under R version 2.9.0 and help may not work correctly 8: package 'Rlibstree' was built under R version 2.9.0 and help may not work correctly I am stuck. Which packages am I supposed to install again ? Maybe shall I get rid of R 2.10.1 Patched and restart from scratch ? Thank you in advance. Maura tutti i telefonini TIM! [[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] why biomaRt cannot extract 3UTR sequences for 1941 ENSGxxxxx ?
I executed the following lines several times from a script as well as pasting them in an R shell. Systematically biomaRt is failing. The problem is to extract the 3UTR sequences corresponding to a vector containing 1941 Ensembl Transcript numbers (some are duplicated ... is this s problem ?) Please, find the failing instructions in the following including the ENST vector Any suggestion is welcome. Thank you, Maura hmart - useMart('ensembl', dataset='hsapiens_gene_ensembl') Checking attributes ... ok Checking filters ... ok genes_map[,ensembl_transcript_id] [1] ENST0262187 ENST0296271 ENST0346166 ENST0381570 [5] ENST0381588 ENST0399762 ENST0270357 ENST0283646 [9] ENST0314915 ENST0356660 ENST0395978 ENST0395980 [13] ENST0395981 ENST0395983 ENST0395986 ENST0418212 [17] ENST0420794 ENST0438929 ENST0439476 ENST0273064 [21] ENST0296084 ENST0355481 ENST0359596 ENST0355794 [25] ENST0389232 ENST0373537 ENST0397131 ENST0397134 [29] ENST0397135 ENST0397137 ENST0432507 ENST0451676 [33] ENST0261714 ENST0302190 ENST0372733 ENST0260130 [37] ENST0413219 ENST0424270 ENST0447182 ENST0343575 [41] ENST0374426 ENST0374429 ENST0307712 ENST0398844 [45] ENST0396425 ENST0396426 ENST0239944 ENST0479209 [49] ENST0484761 ENST0258962 ENST0423765 ENST0374580 [53] ENST0229390 ENST0344528 ENST0392011 ENST0409212 [57] ENST0389589 ENST0425436 ENST0483851 ENST0262461 [61] ENST0316341 ENST0369626 ENST0276033 ENST0392339 [65] ENST0392340 ENST0392341 ENST0355773 ENST0234256 [69] ENST0448784 ENST0380379 ENST0245407 ENST0215882 [73] ENST0265631 ENST0416240 ENST0367001 ENST0489447 [77] ENST0295736 ENST0380752 ENST0280612 ENST0236877 [81] ENST0191922 ENST0424542 ENST0432365 ENST0020945 [85] ENST0396822 ENST0262188 ENST0356800 ENST0392811 [89] ENST0348513 ENST0324856 ENST0457599 ENST0249647 [93] ENST0349777 ENST0397138 ENST0215730 ENST0329565 [97] ENST0337404 ENST0367054 ENST0367055 ENST0327443 [101] ENST0426431 ENST0222584 ENST0262554 ENST0337841 [105] ENST0216484 ENST0360718 ENST0389805 ENST0265354 [109] ENST0332118 ENST0256015 ENST0320370 ENST0431877 [113] ENST0322310 ENST0339775 ENST0348354 ENST0218089 [117] ENST0371144 ENST0371145 ENST0371157 ENST0371160 [121] ENST0264657 ENST0389272 ENST0404395 ENST0300134 [125] ENST0300737 ENST0316199 ENST0372806 ENST0263918 [129] ENST0242770 ENST0367568 ENST0367941 ENST0448348 [133] ENST0225777 ENST0011473 ENST0455385 ENST0371225 [137] ENST0320307 ENST0368096 ENST0368097 ENST0040877 [141] ENST0267811 ENST0333725 ENST0343827 ENST0438423 [145] ENST0246912 ENST0346833 ENST0435881 ENST0309134 [149] ENST0361905 ENST0361985 ENST0204517 ENST0310282 [153] ENST0397991 ENST0467072 ENST0486111 ENST0442011 [157] ENST0260356 ENST0265460 ENST0278836 ENST0266085 [161] ENST0265384 ENST0348208 ENST0377245 ENST0314888 [165] ENST0346501 ENST0397396 ENST0397397 ENST0397404 [169] ENST0397406 ENST0397408 ENST0397411 ENST0399778 [173] ENST0409531 ENST0421676 ENST0322019 ENST0379384 [177] ENST0377044 ENST0377066 ENST0412275 ENST0226225 [181] ENST0333007 ENST0221132 ENST0276431 ENST0347739 [185] ENST0245817 ENST0374080 ENST0445275 ENST0269305 [189] ENST0359597 ENST0396473 ENST0419024 ENST0420246 [193] ENST0445888 ENST0455263 ENST0267996 ENST0288398 [197] ENST0317516 ENST0334895 ENST0358278 ENST0403994 [201] ENST0360958 ENST0378292 ENST0312970 ENST0323144 [205] ENST0330188 ENST0368527 ENST0368533 ENST0300933 [209] ENST0344824 ENST0267622 ENST0166345 ENST0223208 [213] ENST0231238 ENST0234831 ENST0256997 ENST0444355 [217] ENST0323274 ENST0367926 ENST0252108 ENST0262999 [221] ENST0310836 ENST0394511 ENST0260187 ENST0313870 [225] ENST0054666 ENST0263559 ENST0373382 ENST0395098 [229] ENST0382882 ENST0225512 ENST0264634 ENST0474267 [233] ENST0216037 ENST0344347 ENST0297857 ENST0395571 [237] ENST0300823 ENST0337433 ENST0413984 ENST0454662 [241] ENST0358704 ENST0366538 ENST0263095 ENST0373953 [245] ENST0318522 ENST0402711 ENST0321027 ENST0345514 [249] ENST0357195
[R] R: why biomaRt cannot extract 3UTR sequences for 1941 ENSGxxxxx ?
-Messaggio originale- Da: Steve Lianoglou [mailto:mailinglist.honey...@gmail.com] Inviato: ven 28/05/2010 17.06 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] why biomaRt cannot extract 3UTR sequences for 1941 ENSGx ? Hi, Two things: 1. You mistakenly posted this to the R-help list, when you should have (and probably meant to) send to the bioconductor list. You might want to repost there if you can't figure out the problem. That's right. I apologize for my mistake. I will repost to the right list 2. I just tried your query with 4 transcript IDs (one of them was a duplicate) and it worked fine. Maybe the error you are receiving is actually informative of what your problem is: Error in value[[3L]](cond) : Request to BioMart web service failed. Verify if you are still connected to the internet. Alternatively the BioMart web service is temporarily down. and for some reason you're just having a problem talking to the biomart service itself ... Why not try your query with a small number of ensemble transcript id's to see if that'll work? Actually, the same query has worked with a smaller number of ENST...many times. But if the length of the filtering vector is really the problem then I feel confused. Some months ago I was extracting one UTR sequence at a time, thus keeping the connection to biomaRt opened for several hours. At that time biomaRt was cutting me off after some time (of variable length). I posted my question to Bioconductor asking why biomaRt was kicking me out. I was strongly adviced to downloasd all needed data all together with one single query and then parse the downloaded stuff off-line. If I got it right now you suggest downloading a few data at a time. I'd really appreciate knowing whether there are limits in the amount of data that can be requested in a query and, if so, the upper boud. Thank you, Maura -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact tutti i telefonini TIM! [[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 extract the 1st field from a vector of strings
I have the following vector of strings (shown only the first 3 elements) desc[1:3] [1] hsa-let-7a MIMAT062 Homo sapiens let-7a [2] hsa-let-7a* MIMAT0004481 Homo sapiens let-7a* [3] hsa-let-7a-2* MIMAT0010195 Homo sapiens let-7a-2* is.vector(desc) [1] TRUE A - unlist(strsplit(desc[1:3], )) A [1] hsa-let-7a MIMAT062 Homo sapiens let-7a [2] hsa-let-7a* MIMAT0004481 Homo sapiens let-7a* [3] hsa-let-7a-2* MIMAT0010195 Homo sapiens let-7a-2* as.vector(A) [1] hsa-let-7a MIMAT062 Homo sapiens let-7a [2] hsa-let-7a* MIMAT0004481 Homo sapiens let-7a* [3] hsa-let-7a-2* MIMAT0010195 Homo sapiens let-7a-2* I would like to extract only the first field (of variable length). That is I need a vector containing hsa-let-7a hsa-let-7a* hsa-let-7a-2* The operator [[]][] works only on the single vector element. I would like to extract the 1st field with one single instruction rather than a loop as traditional programming languages request. Thank you in advance for you help. Maura tutti i telefonini TIM! [[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] PROBLEM SOLVED: how to extract the 1st field from a vector of strings
-Messaggio originale- Da: mau...@alice.it Inviato: gio 27/05/2010 16.37 A: r-h...@stat.math.ethz.ch Oggetto: how to extract the 1st field from a vector of strings I have the following vector of strings (shown only the first 3 elements) desc[1:3] [1] hsa-let-7a MIMAT062 Homo sapiens let-7a [2] hsa-let-7a* MIMAT0004481 Homo sapiens let-7a* [3] hsa-let-7a-2* MIMAT0010195 Homo sapiens let-7a-2* is.vector(desc) [1] TRUE A - unlist(strsplit(desc[1:3], )) A [1] hsa-let-7a MIMAT062 Homo sapiens let-7a [2] hsa-let-7a* MIMAT0004481 Homo sapiens let-7a* [3] hsa-let-7a-2* MIMAT0010195 Homo sapiens let-7a-2* as.vector(A) [1] hsa-let-7a MIMAT062 Homo sapiens let-7a [2] hsa-let-7a* MIMAT0004481 Homo sapiens let-7a* [3] hsa-let-7a-2* MIMAT0010195 Homo sapiens let-7a-2* I would like to extract only the first field (of variable length). That is I need a vector containing hsa-let-7a hsa-let-7a* hsa-let-7a-2* The operator [[]][] works only on the single vector element. I would like to extract the 1st field with one single instruction rather than a loop as traditional programming languages request. Thank you in advance for you help. Maura tutti i telefonini TIM! tutti i telefonini TIM! [[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 avoid a subset of a matrix to become a column vector
I am assigning subset of a matrix A [n,3] where n1 to a temporary matrix TMP I do not know how many rows of A will be assigned to TMP because this is established by a run-time test. I expect TMP to be a matrix [m,3], m =1 But when 1 row only is transferred from A to TMP then TMP becomes [3,1] rather than [1,3] How can I avoid this unwanted transpose operation ? THank you in advance, Maura tutti i telefonini TIM! [[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 read a non-standard XLS file
I have attached a file downloaded from database mirWalk. Apparently it is in XLS format (this is the extension of the downloaded file). However, I cannot open it with OpenOffife spreadsheet program and Excel itself cannot separate the columns as it does when a true XLS file is loaded. I tried to read the attached downloaded file through R function read.xls and got the following message read.xls(Prostatic_Neoplasm-miRNAs.Disease-GenesTargets.xls) Error in xls2sep(xls, sheet, verbose = verbose, ..., method = method, : Unable to read translated csv file '/tmp/RtmpPIe3vo/file15d9580e.csv'. Error in file.exists(tfn) : invalid 'file' argument I have tried reading the file through read.table which has now been hanging for more than 15 minutes. Please, advice. Thank you in advance. Maura e tutti i telefonini TIM! Vai su __ 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] Follow-up: how can I read a non-standard XLS file
I am uploading 2 XLS-similar files to server www.alice.it. I expect many people in this mailing list won't understand the instructions for grabbing the files because of the different language (sorry I do not have control on that. Telecom has). But it's really very simple. The message you receive will contain a wet site address which should even appear highlighted (on my computer it does). Please, just click on the provided web site address then you'll have the option of downloading one file at a time (clicking of the single icon) or the 2 files compressed in a zip archive. Thank you so much, Maura Benvenuto in Alice Giga Mail! mau...@alice.it tramite il servizio Giga Mail ha messo a tua disposizione i seguenti allegati: * Prostatic_Neoplasm-miRNAs.DiseaseTargets.xls ( 22773 bytes ) * Prostate-miRNAs.OrganTargets.xls ( 49711 bytes ) per scaricarli, fai click sul seguente link che ti portera' su una pagina dove troverai i comandi per visualizzare o scaricare gli allegati sul tuo PC: http://gigamail.rossoalice.alice.it/messages/readMessageFrameset.aspx?De liveryID=ba40cf18-29db-4404-a3ce-af26f760ecf9 Ti ricordiamo che gli allegati saranno a tua disposizione fino al 30-05-2010 alle ore 13.50.23 e che il mittente potrebbe ricevere le informazioni relative alla tua apertura della Giga Mail e all'avvenuto download degli allegati. GigaMail è il nuovo servizio gratuito di Alice che ti permette di inviare a chi vuoi, allegati di grandi dimensioni, fino a 2GB, in modo semplice e veloce, senza occupare spazio utile nella tua casella di posta. Per saperne di più visita il sito www.alice.it Ti ringraziamo per aver utilizzato il servizio Alice GIGA MAIL. [[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] website address for the pseuso-XLS files
http://gigamail.rossoalice.alice.it/messages/readMessageFrameset.aspx?DeliveryID=ba40cf18-29db-4404-a3ce-af26f760ecf9 Please, paste the website address above shown in your web browser address field. Make sure the whole string is pasted with no space or any other character. Telecom couldn't generate more clumsy website addresses Sorry for that. Thank you in advance, Maura tutti i telefonini TIM! [[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] R: website address for the pseuso-XLS files
Thank you. May I know the version of your OO and the operating system it runs on ? I use Linux/SuSE 11.1 running OO 3.0.0.9-1.9 Maura -Messaggio originale- Da: ted.hard...@manchester.ac.uk [mailto:ted.hard...@manchester.ac.uk] Inviato: mar 25/05/2010 15.22 A: r-h...@stat.math.ethz.ch Cc: mau...@alice.it Oggetto: Re: [R] website address for the pseuso-XLS files To be more precise: These seem to be files in XML (Extended Markup Language) format, or a variant thereof, not HTML. This is understood by recent versions of Excel. The xls extension is deceptive here! Maura: You originally wrote Apparently it is in XLS format (this is the extension of the downloaded file). However, I cannot open it with OpenOffife spreadsheet program and Excel itself cannot separate the columns as it does when a true XLS file is loaded. I had no problem myself opening them with oocalc (the OpenOffice spreadsheet program), and I get a table (which looks just like similar tables I was able to view earlier, in a browser, on the mirWalk website). However, this would not allow me to save/export in (say) CSV format. But, by highlighting and them pasting into a text file, I was then able to convert to CSV format. I shall send the results privately to Maura. Ted. On 25-May-10 12:47:45, Peter Ehlers wrote: Maura, These are html files. Rename the downloaded file(s) to *.html and open with your favourite browser. Follow links from there. -Peter Ehlers On 2010-05-25 6:24, mau...@alice.it wrote: http://gigamail.rossoalice.alice.it/messages/readMessageFrameset.aspx?D eliveryID=ba40cf18-29db-4404-a3ce-af26f760ecf9 Please, paste the website address above shown in your web browser address field. Make sure the whole string is pasted with no space or any other character. Telecom couldn't generate more clumsy website addresses Sorry for that. Thank you in advance, Maura __ 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. E-Mail: (Ted Harding) ted.hard...@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 25-May-10 Time: 14:21:51 -- XFMail -- tutti i telefonini TIM! [[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] R: R: website address for the pseuso-XLS files
Through clicking on the xls file oocalc (OpenOffice spreadsheet module) is automatically launched. But in my case it cannot load it correctly regardless of my choices (separator, etc..). Maybe I should switch to another Linux distribution. Thank you very much. Maura -Messaggio originale- Da: ted.hard...@manchester.ac.uk [mailto:ted.hard...@manchester.ac.uk] Inviato: mar 25/05/2010 16.09 A: r-h...@stat.math.ethz.ch Cc: mau...@alice.it Oggetto: RE: R: [R] website address for the pseuso-XLS files It is OpenOffice 2.0 (as updated to openoffice.org-core, dfsg.2-7etch9 Sat Jan 16 2010) running on Linux (Debian Etch, originally installed Sept 2007), so none of it is particularly recent. The command to view the files is like: oocalc Prostatic_Neoplasm-miRNAs.DiseaseTargets.xls Ted. On 25-May-10 13:54:06, mau...@alice.it wrote: Thank you. May I know the version of your OO and the operating system it runs on ? I use Linux/SuSE 11.1 running OO 3.0.0.9-1.9 Maura -Messaggio originale- Da: ted.hard...@manchester.ac.uk [mailto:ted.hard...@manchester.ac.uk] Inviato: mar 25/05/2010 15.22 A: r-h...@stat.math.ethz.ch Cc: mau...@alice.it Oggetto: Re: [R] website address for the pseuso-XLS files To be more precise: These seem to be files in XML (Extended Markup Language) format, or a variant thereof, not HTML. This is understood by recent versions of Excel. The xls extension is deceptive here! Maura: You originally wrote Apparently it is in XLS format (this is the extension of the downloaded file). However, I cannot open it with OpenOffife spreadsheet program and Excel itself cannot separate the columns as it does when a true XLS file is loaded. I had no problem myself opening them with oocalc (the OpenOffice spreadsheet program), and I get a table (which looks just like similar tables I was able to view earlier, in a browser, on the mirWalk website). However, this would not allow me to save/export in (say) CSV format. But, by highlighting and them pasting into a text file, I was then able to convert to CSV format. I shall send the results privately to Maura. Ted. On 25-May-10 12:47:45, Peter Ehlers wrote: Maura, These are html files. Rename the downloaded file(s) to *.html and open with your favourite browser. Follow links from there. -Peter Ehlers On 2010-05-25 6:24, mau...@alice.it wrote: http://gigamail.rossoalice.alice.it/messages/readMessageFrameset.aspx? D eliveryID=ba40cf18-29db-4404-a3ce-af26f760ecf9 Please, paste the website address above shown in your web browser address field. Make sure the whole string is pasted with no space or any other character. Telecom couldn't generate more clumsy website addresses Sorry for that. Thank you in advance, Maura __ 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. E-Mail: (Ted Harding) ted.hard...@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 25-May-10 Time: 14:21:51 -- XFMail -- Alice Messenger ;-) chatti anche con gli amici di Windows Live Messenger e tutti i telefonini TIM! Vai su E-Mail: (Ted Harding) ted.hard...@manchester.ac.uk Fax-to-email: +44 (0)870 094 0861 Date: 25-May-10 Time: 15:09:53 -- XFMail -- tutti i telefonini TIM! [[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] looking for Variable selections models, techniques, methods
We still have a long way to go with the data we were given by some drug discovery scientists. The problem is to select the few variables (Collective Variables), from a set of variables sampled during a Molecular Dynamics simulation, which exhibit a consistent and coherent relationship with the given minimum-work curve, all over the time it takes the molecule to migrate from the initial configuration to the final configuration. I have already tried and ruled out a simple correlation. Someone here has suggested looking for correlation of variables and the work curve in a time window, for example 20 time steps wide (everty step is equal to 50 fs). But this meaningless (on my view) because it would dig out a transient relationship. Whereas what we need is a relationship that lasts consistently all over the configurational transformation period. I made some progress with techniques for Dimensionality Reduction. The problem is that such techniques do not select variables. For instance, if I can reduce the dimensionality, say from 100 to 8, still I am not likely to be able to find the 8 independent variables which carry most of the information. Very likely the basis of the 8-D embedding space will be obtained as functions (most probably non-linear) of the original 100 variable or anyhow a big subset of them. Bottom-line: Dimensionality Reduction does not directly achieve the problem goal which is to decimate the number of variables sampled during MD simulations leaving out the ones that are unimportant for the chemical-physical reaction in question. I would greatly appreciate suggestions advice concerning techniques, methods, models to perform Variable Selection other than simple linear regression Thank you very much. Best regards, Maura Edelweiss M. tutti i telefonini TIM! [[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] errors returned upon trying to update JGR
I have upgraded R and am currently running the following version: R version 2.10.1 Patched (2010-02-20 r51163) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 The characteristics of my system are the following: OS: Linux 2.6.27.29-0.1-default x86_64 Current user: mau...@linux-326k System: openSUSE 11.1 (x86_64) KDE: 4.1.3 (KDE 4.1.3) release 4.10.4 JGR upgrading attempt generated the following errors On-line help files cannot be found from JGR. JGR(update=TRUE) trying URL 'http://www.rforge.net/src/contrib/JGR_1.7-2.tar.gz' Content type 'application/x-gzip' length 528295 bytes (515 Kb) opened URL == downloaded 515 Kb trying URL 'http://cran.r-project.org/src/contrib/rJava_0.8-4.tar.gz' Content type 'application/x-gzip' length 520037 bytes (507 Kb) opened URL == downloaded 507 Kb trying URL 'http://www.rforge.net/src/contrib/JavaGD_0.5-3.tar.gz' Content type 'application/x-gzip' length 101898 bytes (99 Kb) opened URL == downloaded 99 Kb trying URL 'http://cran.r-project.org/src/contrib/iplots_1.1-3.tar.gz' Content type 'application/x-gzip' length 331100 bytes (323 Kb) opened URL == downloaded 323 Kb The downloaded packages are in /tmp/RtmpXEkgtp/downloaded_packages Warning messages: 1: In install.packages(c(JGR, rJava, JavaGD, iplots), lt, c(cran, : installation of package 'rJava' had non-zero exit status 2: In install.packages(c(JGR, rJava, JavaGD, iplots), lt, c(cran, : installation of package 'JavaGD' had non-zero exit status 3: In install.packages(c(JGR, rJava, JavaGD, iplots), lt, c(cran, : installation of package 'JGR' had non-zero exit status Any suggestion is welcome. Thank you, Maura tutti i telefonini TIM! tutti i telefonini TIM! tutti i telefonini TIM! [[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 remove one row at a time from a matrix keeping its nrow consistent
After some headache with debugging my script, I finally isolated the problem taht I am going to illustrate in the following example. I expected matrix nrow to decrease consistently till 1. Instead, when the matrix is left with one row only, its nrow jumps to 2 because the matrix gets transposed. How come ? Thank you, Maura B - c(1,2) B - rbind(B,c(3,4)) B - rbind(B,c(5,6)) B [,1] [,2] B12 34 56 dim(B) [1] 3 2 nrow(B) [1] 3 #REMOVE ROW-1 OUT OF 3 B - as.matrix(B[-1,]) B [,1] [,2] 34 56 dim(B) [1] 2 2 nrow(B) [1] 2 #REMOVE ROW-2 OUT OF 3 B - as.matrix(B[-1,]) B [,1] [1,]5 [2,]6 dim(B) [1] 2 1 nrow(B) [1] 2 tutti i telefonini TIM! [[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] WMTSA wavCWTPeaks : Error in if (time.start times.range[1]) time.start - times.range[1]
I have attached the signal that causes the error message in this email subject. Only columns 1 and 3 have to be considered. It is the work trajectory of a molecule migrating between two equilibrium conformations. The curve has 2 peaks, as shown in its plot. But I keep missing the 2nd one. Here is my short script: library(wmtsa) setwd(C:/Documents and Settings/Monville/Alanine Dipeptide/Work_curves-Dir) work - as.ts(read.table (calc_work_332)[,c(1,3)]) plot(work[,1],work[,2]) work.wt - wavCWT(work, n.scale=1000) scales - attr(work.wt, scale) work.tree - wavCWTTree(work.wt,tolerance=0.5/sqrt(scales)) work.peak - wavCWTPeaks(work.tree) summary(work.tree) End Time Length Octaves Min Max Mean SD Var MAD 1 1043 79 11.78 -6.46e-09 1.96e+06 3.58e+05 6.24e+05 3.89e+11 0.102 2 NA 171.95 6.30e-01 1.26e+01 8.09e+00 3.13e+00 9.81e+00 3.249 work.peak - wavCWTPeaks(work.tree) Error in if (time.start times.range[1]) time.start - times.range[1] : missing value where TRUE/FALSE needed The above error appears for all tolerances less than 0.95/sqrt(scales) when only the 1st peak is found. work.tree - wavCWTTree(work.wt,tolerance=0.95/sqrt(scales)) summary(work.tree) End Time Length Octaves Min Max Mean SD VarMAD 1 1043 7811.7 -6.4e-09 1957560 362197 626303 3.92e+11 0.0533 work.peak - wavCWTPeaks(work.tree) attr(work.peak,peaks) branch itime iscale time scale extrema iendtime 1 1 1238 64 1238 995 1957560 1043 What am I doing wrong ? Please, explain Thank you very much. Maura e tutti i telefonini TIM! Vai su __ 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 update JGR
I recently updated R on Linus/SuSE 11.1 I complained because no on-line help was available from JGR after R update. I was told to update JGR as well. How can I do that ? I installed JGR on SuSE three times in the past with different R versions.Every time it's been a nightmare. I am afraid to have to spend a whole day, maybe longer, to update JGR ... I would greatly appreciate some clear guidelines for JGR installation/update on SuSE. Thank you in advance. Best regards, Maura E.M. tutti i telefonini TIM! [[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] R: Generative Topographic Map
I am running GTM on the same datda space points but changing the number of latent space points, the number of basis functions and parameter sigma. I found a combination of such parameters that works fine. On the other hand on page 7 of the paper The Generative Topographic Mapping by Swensen, Bishop, and Williams, it is stated Thre is no over-fitting if the number of sample points is increased since the nymber of degrees of freedom in the model is controlled by the mapping function y(x;W). However, since you have transalted the code from matLab to R I am pretty sure you know hwt is the cause of the fllowing messages, which routines generates them and under which circumstances. Once I have these details clear, I can possible try and avoid the event that causes them gtm_trn: Warning -- M-Step matrix singular, using pinv.\n 1: In chol.default(A, pivot = TRUE) : matrix not positive definite 2: In gtm_trn(T, FI, W, lambda, 1, b, 2, quiet = FALSE, minSing = 0.01) : Using 40 out of 40 eigenvalues Thank you so much. Maura -Messaggio originale- Da: Ondrej Such [mailto:ondrej.s...@gmail.com] Inviato: gio 01/04/2010 17.07 A: mau...@alice.it Oggetto: Re: Generative Topographic Map Hello Maura, Thank you for your email. Marcus Svensen, one of method's authors works at Microsoft, and can give you more insight how it works. Email marcu...@microsoft.com, home page http://research.microsoft.com/en-us/um/people/markussv/. I also found his Ph.D. thesis very insightful. I believe it is never useful to have as many data points in latent space as there are data points. And with 2000 points I can't imagine going beyond latent dimension 3 or 4, in applying GTM. I've heard that GTM can be useful mostly in situations, when data follows a relatively smooth manifold. Best, --Ondrej 2010/4/1 mau...@alice.it Thank you. I figured that out myself last night. I always forget that read.table does not actually read data into a matrix. GTM MatLab toolbox comes with a nice guide to use the package which may as well become an R vignette. Anyway, I got the singular matrix warnings myself and do not know whether I should be concerned about it or not. Moreover, I do not know how to avoid that. I will go through some other experiments keeping the data space samples and dimensionality fixed and changing some of the input parameters. I stress our goal is NOT visualization. We do not know the intrinsic dimensionality of that data space samples. Therefore we can only proceed by trial--error. That is we vary the dimensionality of the embedding space. In this experiment the dimensionality of the data space is 7 so we start out projecting our original data to a 1D embedding space, then we try out a 2D embedding space, ..., all the way up to a 6D embedding space. Since we do not know the intrinsic dimensionality of the original data, we need a method to evaluate the reliability of the projection. To assess that we reconstruct the data back from the embedding to the data space and here we calculate the RMSD between the original data and the reconstructed ones. Basically, using RMSD, we need as many reconstructed points as the original number. Such a requirement is achieved by choosing as many points in the latent space as in the data space. Can such a choice be the cause of the matrix singularity ? Futhermore, is the number of basis functions related to the number of latent space points somehow ? Unluckily, even GTM MatLab documentation is not explicitly providing any clear criteria about the parameters choice and their dependence, if any. Thank you, Maura -Messaggio originale- Da: Ondrej Such [mailto:ondrej.s...@gmail.com ondrej.s...@gmail.com] Inviato: gio 01/04/2010 11.16 A: mau...@alice.it Oggetto: Re: Generative Topographic Map Hello, the problem that's tripping the package is that T is a data.frame and not a matrix. Simply replacing T - read.table(DHA_TNH.txt) with T - as.matrix(read.table(DHA_TNH.txt)) makes the code run (though warnings about singular matrices remain, I'm not sure to what degree that is worrisome). I'd be curious, as to how you'd suggest improving the documentation. Hope this helps, --Ondrej 2010/3/31 mau...@alice.it I tried to use R version of package I noticed the original MatLab Pckage is much better documented. I had a look at the R demo code gtm_demo and found that variable Y is used in advanced of being created: I wrote my own few lines as follows: inDir - C:/Documents and Settings/Monville/Alanine Dipeptide/DBP1/DHA setwd(inDir) T - read.table(DHA_TNH.txt) L - 3 X - matrix(nrow=nrow(T),ncol=3,byrow=TRUE) MU - matrix(nrow=round(nrow(T)/5), ncol=L) for(i in 1:ncol(X)) { for(j in 1:nrow(X)) { X[j,i] - RANDU() } } for(i in 1:ncol(MU)) { for(j in 1:nrow(MU)) { MU[j,i] - RANDU() } } sigma -1 FI - gtm_gbf(MU,sigma,X) W -
[R] R: Generative Topographic Map
Thank you. I figured that out myself last night. I always forget that read.table does not actually read data into a matrix. GTM MatLab toolbox comes with a nice guide to use the package which may as well become an R vignette. Anyway, I got the singular matrix warnings myself and do not know whether I should be concerned about it or not. Moreover, I do not know how to avoid that. I will go through some other experiments keeping the data space samples and dimensionality fixed and changing some of the input parameters. I stress our goal is NOT visualization. We do not know the intrinsic dimensionality of that data space samples. Therefore we can only proceed by trial--error. That is we vary the dimensionality of the embedding space. In this experiment the dimensionality of the data space is 7 so we start out projecting our original data to a 1D embedding space, then we try out a 2D embedding space, ..., all the way up to a 6D embedding space. Since we do not know the intrinsic dimensionality of the original data, we need a method to evaluate the reliability of the projection. To assess that we reconstruct the data back from the embedding to the data space and here we calculate the RMSD between the original data and the reconstructed ones. Basically, using RMSD, we need as many reconstructed points as the original number. Such a requirement is achieved by choosing as many points in the latent space as in the data space. Can such a choice be the cause of the matrix singularity ? Futhermore! , is the number of basis functions related to the number of latent space points somehow ? Unluckily, even GTM MatLab documentation is not explicitly providing any clear criteria about the parameters choice and their dependence, if any. Thank you, Maura -Messaggio originale- Da: Ondrej Such [mailto:ondrej.s...@gmail.com] Inviato: gio 01/04/2010 11.16 A: mau...@alice.it Oggetto: Re: Generative Topographic Map Hello, the problem that's tripping the package is that T is a data.frame and not a matrix. Simply replacing T - read.table(DHA_TNH.txt) with T - as.matrix(read.table(DHA_TNH.txt)) makes the code run (though warnings about singular matrices remain, I'm not sure to what degree that is worrisome). I'd be curious, as to how you'd suggest improving the documentation. Hope this helps, --Ondrej 2010/3/31 mau...@alice.it I tried to use R version of package I noticed the original MatLab Pckage is much better documented. I had a look at the R demo code gtm_demo and found that variable Y is used in advanced of being created: I wrote my own few lines as follows: inDir - C:/Documents and Settings/Monville/Alanine Dipeptide/DBP1/DHA setwd(inDir) T - read.table(DHA_TNH.txt) L - 3 X - matrix(nrow=nrow(T),ncol=3,byrow=TRUE) MU - matrix(nrow=round(nrow(T)/5), ncol=L) for(i in 1:ncol(X)) { for(j in 1:nrow(X)) { X[j,i] - RANDU() } } for(i in 1:ncol(MU)) { for(j in 1:nrow(MU)) { MU[j,i] - RANDU() } } sigma -1 FI - gtm_gbf(MU,sigma,X) W - gtm_ri(T,FI) Y= FI%*%W b = gtm_bi(Y) lambda - 0.001 for (m in 1:15) { trnResult = gtm_trn(T, FI, W, lambda, 1, b, 2,quiet = TRUE, minSing = 0.01) W = trnResult$W b = trnResult$beta Y = FI %*% W } I ran the above script on my own data representing 1969 samples of 7 dihedral angles of a folding molecule (attached. Upon running the 1st iteration of the training function gtm_trn I get the following error that I cannot interpret. Any help and/or suggestion is welcome: trnResult = gtm_trn(T, FI, W, lambda, 1, b, 2,quiet = TRUE, minSing = 1.) Error in gtmGlobalR %*% T : requires numeric/complex matrix/vector arguments In addition: Warning messages: 1: In chol.default(A, pivot = TRUE) : matrix not positive definite 2: In gtm_trn(T, FI, W, lambda, 1, b, 2, quiet = TRUE, minSing = 1) : Using 7 out of 395 eigenvalues Thank you in advance, Maura Alice Messenger ;-) chatti anche con gli amici di Windows Live Messenger e tutti i telefonini TIM! er tutti i telefonini TIM! [[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] Generative Topographic Map
I tried to use R version of package I noticed the original MatLab Pckage is much better documented. I had a look at the R demo code gtm_demo and found that variable Y is used in advanced of being created: I wrote my own few lines as follows: inDir - C:/Documents and Settings/Monville/Alanine Dipeptide/DBP1/DHA setwd(inDir) T - read.table(DHA_TNH.txt) L - 3 X - matrix(nrow=nrow(T),ncol=3,byrow=TRUE) MU - matrix(nrow=round(nrow(T)/5), ncol=L) for(i in 1:ncol(X)) { for(j in 1:nrow(X)) { X[j,i] - RANDU() } } for(i in 1:ncol(MU)) { for(j in 1:nrow(MU)) { MU[j,i] - RANDU() } } sigma -1 FI - gtm_gbf(MU,sigma,X) W - gtm_ri(T,FI) Y= FI%*%W b = gtm_bi(Y) lambda - 0.001 for (m in 1:15) { trnResult = gtm_trn(T, FI, W, lambda, 1, b, 2,quiet = TRUE, minSing = 0.01) W = trnResult$W b = trnResult$beta Y = FI %*% W } I ran the above script on my own data representing 1969 samples of 7 dihedral angles of a folding molecule (attached. Upon running the 1st iteration of the training function gtm_trn I get the following error that I cannot interpret. Any help and/or suggestion is welcome: trnResult = gtm_trn(T, FI, W, lambda, 1, b, 2,quiet = TRUE, minSing = 1.) Error in gtmGlobalR %*% T : requires numeric/complex matrix/vector arguments In addition: Warning messages: 1: In chol.default(A, pivot = TRUE) : matrix not positive definite 2: In gtm_trn(T, FI, W, lambda, 1, b, 2, quiet = TRUE, minSing = 1) : Using 7 out of 395 eigenvalues Thank you in advance, Maura e tutti i telefonini TIM! Vai su __ 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 R package that can find the maxima of a 1-D time series
Is there any R package that can help me with digging out the maxima of a 1-D trajectory ? I have 975 1-D curves. They are only known as time series. That is a set of points ordered with respect to time. Some curves exhibit one only peak. Others have two peaks of different height. We wish to find the number of peaks and their position along the time axis. Apparently it's a trivial problem solved looking at the zeros and the change of sign of the 1st derivative. In practice it is necessary to apply some criteria (which ones ?) to discriminate between real peaks and noise oscillations. Presumably I ought to define the noise level with respect to peaks height in this application ... Maybe wavelets can help ? Thank you in advance, Maura tutti i telefonini TIM! [[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] R help unavailable
I have recently replaced R-2.9.0 with R-2.10.1 Patched. Apparently the installation completed successfully but right now I realized that the on-line help does not work any more. When I type ?R-command a message pops up warning that Help will not be available. Path not found ... regardless of the R-command. How can I get back R on-line man pages ? Thank you very much, Maura tutti i telefonini TIM! tutti i telefonini TIM! [[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] R: R help unavailable
Actually the problem exists only if I use JGR. If I launch R from a terminal window then the text on-line help works. It used to work with JGR too but with R version 2.9.0. Now, JGR shows the new R version is running but the on-line help is no more available from JGR. Perhaps JGR implementors will come up with some suggestion to fix this problem. Thank you, Maura -Messaggio originale- Da: Duncan Murdoch [mailto:murd...@stats.uwo.ca] Inviato: mer 03/03/2010 12.58 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] R help unavailable On 03/03/2010 6:39 AM, mau...@alice.it wrote: I have recently replaced R-2.9.0 with R-2.10.1 Patched. Apparently the installation completed successfully but right now I realized that the on-line help does not work any more. When I type ?R-command a message pops up warning that Help will not be available. Path not found ... regardless of the R-command. How can I get back R on-line man pages ? You could switch to text-based help by editing RHOME/etc/Rprofile.site or your personal Rprofile, but you probably want to fix the bigger problem, which is that your system can't open the URLs that R is giving it. Can you open any URL? E.g. does browseURL(http://www.r-project.org;) open that web page? If not, the problem is that your system doesn't know how to open a browser. Duncan Murdoch Thank you very much, Maura tutti i telefonini TIM! tutti i telefonini TIM! [[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. tutti i telefonini TIM! [[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 package dr appropriate for reducing the dimensionality of molecules conformational space ?
I anticipate lacking of prior experience with dimensionality reduction problems. Some scientists concerned with drug discovery performed several steered Molecular Dynamics simulations of the alanine-dipeptide molecule dragged by a radial force from an equilibrium conformation to another different equilibrium conformation. They sampled at regular intervals 7 dihedral angles, 5 bending angles, and 4 atom pair distances all along the trajectory from the initial to the final conformation. Likewise they also calculated the work done on the molecule by the applied force. When a real system is simulated (this is a toy model) macro-molecules conformational space is huge. Not all the sampled variables change coherently during the chemical-physical reaction (conformation change) taking place. A dimensionality reduction is necessary. We need to identify the subset of variables that are necessary and sufficient to describe such a reaction. Such variables must exhibit the highest correlation with the work curves. The objective is to correlate the work curves with specific structural descriptors (variables like angles, distances, and so on) and automatically discriminate between descriptors that correlate with work curves and descriptors which are not involved in the reactive pathway. I thought I could perform a dimensionality reduction first (experimenting with some common non-linear methods) and then perform regressionto estimate the correlation (dependence) of the survived variables with the work curves. Then i came across R package dr which apparently does it all in one step. Unluckily the examples that come with dr documentation are far away from the research field I am involved in. I know dimensionality reduction methods apply to many different fields. I wonder whether dr can help me with finding a reduced representation of molecule conformational changes. Data samples are available upon request. Thank you in advance. Maura tutti i telefonini TIM! [[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 pass external parameters to an R script
How, if possible, can I run an R script, from command line, passing external parameters just like I can run a C main program passing parameters: # Cprog p1 p2 p3 Cprog can access its arguments (p1,p2,p3) through the built-in structures argv and argc. Since R is built on C language I would expect the same feature to be available with R scripts as well ... ? Please, notice that I do not mean to open an interactive R session, assign values to p1, p2, p3 and then call the R script from the same interactive session. This way I daresay that p1, p2, p3 would be known to the R script as global variables. Thank you very much. Maura tutti i telefonini TIM! [[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] installation of package 'e1071' had non-zero exit status
I tried twice to install package e1071as it provides the Hamming distance. The installation failed twice. I am running R version 2.9.0 (2009-04-17). Any suggestion is welcome. Thank you, Maura tutti i telefonini TIM! [[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] (no subject)
here is the message I get upon trying to upgrade R from the provided RPM package for SuSE 11.1 (http://cran.r-project.org): YaST2 conflicts list - generated 2010-02-15 14:00:50 nothing provides libreadline.so.6()(64bit) needed by R-patched-2.10.1-50.1.x86_64 [ ] do not install R-patched-2.10.1-50.1.x86_64 YaST2 conflicts list END ### I searched for the requested library with Yast but could only find the library version 5. Maura tutti i telefonini TIM! [[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] R-patched-2.10.1-50.1.x86_64 installlation error
here is the message I get upon trying to upgrade R from the provided RPM package for SuSE 11.1 YaST2 conflicts list - generated 2010-02-15 14:00:50 nothing provides libreadline.so.6()(64bit) needed by R-patched-2.10.1-50.1.x86_64 [ ] do not install R-patched-2.10.1-50.1.x86_64 YaST2 conflicts list END ### I searched for the requested library with Yast but could only find the library version 5. The missing library version 6 cannot be found in any SuSE repository. Please, does anybody know where to get such a library ? Thank you in advance, Maura tutti i telefonini TIM! [[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] R: Dimensional reduction package
Thank you. Sorry. My question is rather ambiguous. Imeant to aske for Dimensionality Reduction methods and/or Intrinsic Dimensionality Estimation methods that can deal with non-linear data. That is, data that do not lie on a hyper-plane. ISOMAP is one of such methods. LLE, AutoEncoder, GTM Kernel PCA are other methods that are used with non-linear data. Maura -Messaggio originale- Da: Michael Denslow [mailto:michael.dens...@gmail.com] Inviato: dom 14/02/2010 23.46 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] Dimensional reduction package Hi Maura, Is there any R package which implements non-linear dimensionality reduction (LLE, ISOMAP, GTM, and so on) and/or intrinsic dimensionality estimation ? I am not exactly sure what is meant by non-linear dimensionality reduction but there is an isomap function in vegan. This is the isomap of Tenenbaum et al. 2000 and De'ath 1999. library(vegan) ?isomap De'ath, G. (1999) Extended dissimilarity: a method of robust estimation of ecological distances from high beta diversity data. Plant Ecology 144, 191-199 Tenenbaum, J.B., de Silva, V. Langford, J.C. (2000) A global network framework for nonlinear dimensionality reduction. Science 290, 2319-2323. Hope this helps, Michael Thank you, Maura tutti i telefonini TIM! [[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. -- Michael Denslow I.W. Carpenter Jr. Herbarium [BOON] Department of Biology Appalachian State University Boone, North Carolina U.S.A. -- AND -- Communications Manager Southeast Regional Network of Expertise and Collections sernec.org 36.214177, -81.681480 +/- 3103 meters tutti i telefonini TIM! [[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] Dimensional reduction package
Is there any R package which implements non-linear dimensionality reduction (LLE, ISOMAP, GTM, and so on) and/or intrinsic dimensionality estimation ? Thank you, Maura tutti i telefonini TIM! [[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] finding files whose name does NOT contain a given character
Unluckily I dela with miRNA files whose name may contain the character *. Because of the special meaning of * I have to remove it. I found out how to make list.files() extract only those file names which contain a * Namely: # list.files(pattern=\\*) Now I have to process all files whose name does NOT contain the character *. I cannot have list.files() extract all files whose name does NOT match pattern=\\* I tried using ^ in such a pattern but nothing is returned. Any suggestion is welcome. Thank you so much, Maura tutti i telefonini TIM! [[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] Updating R on Linux
I know my question has been asked many times. Please, forgive me for asking it once more. It's time to update R version. I run R on Windows, Linux, and Mac OS/X. I think I remember on Windows R comes with the un-installer. So I uninstall it first and then I install the latest version. On Mac OS I have no experience of updating R ... I think (and hope) all what I have to do is to drag R icon from the Applications folder into the Trashcan .. This simple operation should get rid of all R files from all the folders where they are placed during the installation procedure. Linux is really the only platform where in the past I manged to mix up pieces from different R versions. My question is: how can I get rid of all the current R files before installing the latest version on Linux/SuSE ? Thank you in advance, Maura tutti i telefonini TIM! [[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 R scripts detect signals sent by the task scheduler ?
In general, is it possible to run R scripts through cron jobs ? Is it possible to make the script detect the system interrupt, save its current status and then exit so that next time it is rescheduled it can pick up from where it left ? Examples, if any, are more then welcome. Thank you in advance, Maura tutti i telefonini TIM! [[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] R: can R scripts detect signals sent by the task scheduler ?
I have just updated R version to 2.10 for Windows. I cannot find package fork which seems to include the exception handling functions. The list that pops up when I select Install Package does not contain any fork package (even spelt with capital letters). Where am I supposed to get it from ? Thank you very much, Maura -Messaggio originale- Da: b.rowling...@googlemail.com per conto di Barry Rowlingson Inviato: ven 20/11/2009 16.16 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] can R scripts detect signals sent by the task scheduler ? On Fri, Nov 20, 2009 at 1:25 PM, mau...@alice.it wrote: In general, is it possible to run R scripts through cron jobs ? Yes, the only problem might be if you use anything that needs a graphics window. In the old days you needed an X11 display to create png graphics with the png() function, but not any more. I'm not sure if yo need an X11 system for anything apart from showing graphs. But I don't know everything. Is it possible to make the script detect the system interrupt, save its current status and then exit so that next time it is rescheduled it can pick up from where it left ? ?Signals: Interrupting Execution of R Description: On receiving 'SIGUSR1' R will save the workspace and quit. 'SIGUSR2' has the same result except that the '.Last' function and 'on.exit' expressions will not be called. So if you can send that signal to your process you might be in luck. However if by 'system interrupt' you mean the SIGQUIT signal, then I'm not sure that R can trap interrupts to that extent. You might want to see if your operating system supports 'checkpointing', in which case any process can be saved and restarted. If by 'system interrupt' you mean SIGKILL (signal 9) then you are very stuck. What is going on in your system? Are you trying to checkpoint if the machine is shut down? Barry tutti i telefonini TIM! [[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] MatLab SimBiology
Is there any R package that implements the same capability of MatLab toolbox called SimBiology ? We are expecially interested in protein-protein interactions and network analysis. As far as I know SimBiology implements a system of ODEs reflecting the kinetic chemical reactions. We would be more interested in stochastic simulations. Thank you in advance. Maura tutti i telefonini TIM! [[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] NULL elements in lists ... a nightmare
I can define a list containing NULL elements: myList - list(aaa,NULL,TRUE) names(myList) - c(first,second,third) myList $first [1] aaa $second NULL $third [1] TRUE length(myList) [1] 3 However, if I assign NULL to any of the list element then such element is deleted from the list: myList$second - NULL myList $first [1] aaa $third [1] TRUE length(myList) [1] 2 # myList$first - NULL myList $third [1] TRUE length(myList) [1] 1 Instead vectors cannot include NULL element: vec - c(TRUE,NULL,FALSE) vec [1] TRUE FALSE length(vec) [1] 2 vec[1] - NULL Error in vec[1] - NULL : replacement has length zero Is the above shown behaviour of list data structures to be expected ? I took me a lot of sweat to figure out this wierd behaviour was the cause of a bug in my big program. In general, if I have a list with some elements initialized to NULL, that can be changed dynamically, then how can I reinitialize such elements to NULL without deleting them from the list ? Thank you in advance, Maura [[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] R: How can I avoid a for-loop through sapply or lapply ?
Thank you very much. It works fine. Maura -Messaggio originale- Da: Steve Lianoglou [mailto:mailinglist.honey...@gmail.com] Inviato: mar 29/09/2009 18.08 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] How can I avoid a for-loop through sapply or lapply ? Hi, On Sep 29, 2009, at 12:03 PM, mau...@alice.it wrote: Through converting a miRNAs file from FASTA to character format I get a vector which looks like the following: nml [1] hsa-let-7a MIMAT062 Homo sapiens let-7a [2] hsa-let-7b MIMAT063 Homo sapiens let-7b [3] hsa-let-7c MIMAT064 Homo sapiens let-7c [4] hsa-let-7d MIMAT065 Homo sapiens let-7d [5] hsa-let-7e MIMAT066 Homo sapiens let-7e [6] hsa-let-7f MIMAT067 Homo sapiens let-7f [7] hsa-miR-15a MIMAT068 Homo sapiens miR-15a [8] hsa-miR-16 MIMAT069 Homo sapiens miR-16 [9] hsa-miR-17 MIMAT070 Homo sapiens miR-17 [10] hsa-miR-18a MIMAT072 Homo sapiens miR-18a ... [888] hsa-miR-675* MIMAT0006790 Homo sapiens miR-675* [889] hsa-miR-888* MIMAT0004917 Homo sapiens miR-888* [890] hsa-miR-541* MIMAT0004919 Homo sapiens miR-541* My goal is to separate into a vector only the first string preceding the 1st space starting from the left. With reference to the records above listed I would obtain: [1] hsa-let-7a [2] hsa-let-7b [3] hsa-let-7c [4] hsa-let-7d [5] hsa-let-7e [6] hsa-let-7f f [7] hsa-miR-15a [8] hsa-miR-16 [9] hsa-miR-17 [10] hsa-miR-18a ... [888] hsa-miR-675* [889] hsa-miR-888* [890] hsa-miR-541* pieces - strsplit(nml, ) sapply(pieces, '[', 1) Or, the same as a 1 liner: sapply(strsplit(nml, ), '[', 1) Hope that helps, -steve -- Steve Lianoglou Graduate Student: Computational Systems Biology | Memorial Sloan-Kettering Cancer Center | Weill Medical College of Cornell University Contact Info: http://cbio.mskcc.org/~lianos/contact tutti i telefonini TIM! [[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 avoid a for-loop through sapply or lapply ?
Through converting a miRNAs file from FASTA to character format I get a vector which looks like the following: nml [1] hsa-let-7a MIMAT062 Homo sapiens let-7a [2] hsa-let-7b MIMAT063 Homo sapiens let-7b [3] hsa-let-7c MIMAT064 Homo sapiens let-7c [4] hsa-let-7d MIMAT065 Homo sapiens let-7d [5] hsa-let-7e MIMAT066 Homo sapiens let-7e [6] hsa-let-7f MIMAT067 Homo sapiens let-7f [7] hsa-miR-15a MIMAT068 Homo sapiens miR-15a [8] hsa-miR-16 MIMAT069 Homo sapiens miR-16 [9] hsa-miR-17 MIMAT070 Homo sapiens miR-17 [10] hsa-miR-18a MIMAT072 Homo sapiens miR-18a ... [888] hsa-miR-675* MIMAT0006790 Homo sapiens miR-675* [889] hsa-miR-888* MIMAT0004917 Homo sapiens miR-888* [890] hsa-miR-541* MIMAT0004919 Homo sapiens miR-541* My goal is to separate into a vector only the first string preceding the 1st space starting from the left. With reference to the records above listed I would obtain: [1] hsa-let-7a [2] hsa-let-7b [3] hsa-let-7c [4] hsa-let-7d [5] hsa-let-7e [6] hsa-let-7f f [7] hsa-miR-15a [8] hsa-miR-16 [9] hsa-miR-17 [10] hsa-miR-18a ... [888] hsa-miR-675* [889] hsa-miR-888* [890] hsa-miR-541* I tried using strsplit as follows: strsplit(nml,MIMAT[0-9]*) from here I get a vector of lists and I can separate the string I need through the [[]] operator, as shown in the following. strsplit(nml,MIMAT[0-9]*)[[1]][1] [1] hsa-let-7a strsplit(nml,MIMAT[0-9]*)[[2]][1] [1] hsa-let-7b Unluckily the [[]] operator acts on one vector element at a time. In fact: strsplit(nml,MIMAT[0-9]*)[[]][1] Error in strsplit(nml, MIMAT[0-9]*)[[]] : invalid subscript type 'symbol' I guess a smart combination os strsplit ans sapply or lapply could do the job with one command line only ... but I haven't been able to get the syntax right ... I would greatly appreciate some help from R language experts. I know I can use a for-loop to get what I am struggling for. But Idefinitely wish to learn to use a high-level language as it deserves rather than the C-style. Thank you in advance, Maura tutti i telefonini TIM! [[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] upgraging R from 2.9.0 to 2.9.1
I am still running 2.9.0 and came across a package that was built with 2.9.1. I got a warning upon loading the package. I tried to launch a function from such a package. It seems to hang up. I can't believe it takes forever. I am resolved to upgrade my R version to the newest one. But on a Windows box I do not know how to unistall the current version in advance of installing the new one. On a Linux system I iinstaledl the new version without removing the previous one first and ended up with a messy situation. Can you please help ? Thank you in advance. Maura tutti i telefonini TIM! [[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] R: upgraging R from 2.9.0 to 2.9.1
Great ! Then I can wait a couple more days. Anyway, I do not need or want more than one R version at a time. So my question is: How can I avoid having coexisting R versions when I install a new one ? Thank you, Maura -Messaggio originale- Da: Robert Baer [mailto:rb...@atsu.edu] Inviato: dom 23/08/2009 21.49 A: mau...@alice.it; r-h...@stat.math.ethz.ch Oggetto: RE: [R] upgraging R from 2.9.0 to 2.9.1 FWIW, the R homepage says, R 2.9.2 Release Candidates will appear August 17-24. Final release is scheduled for 2009-08-24. (Tomorrow?) Maybe a short upgrade delay is in order? ;-) On Windows, I routinely install new versions without removing the previous version. They always seem to coexist happily. Rob Baer -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of mau...@alice.it Sent: Sunday, August 23, 2009 11:28 AM To: r-h...@stat.math.ethz.ch Subject: [R] upgraging R from 2.9.0 to 2.9.1 I am still running 2.9.0 and came across a package that was built with 2.9.1. I got a warning upon loading the package. I tried to launch a function from such a package. It seems to hang up. I can't believe it takes forever. I am resolved to upgrade my R version to the newest one. But on a Windows box I do not know how to unistall the current version in advance of installing the new one. On a Linux system I iinstaledl the new version without removing the previous one first and ended up with a messy situation. Can you please help ? Thank you in advance. Maura tutti i telefonini TIM! [[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. No virus found in this incoming message. Checked by AVG - www.avg.com 06:18:00 tutti i telefonini TIM! [[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] Textplot question
I have a long list of flags with relative values to print out. If I draw it all on a panel of a (2x2) plot it gets chopped at the bottom. I wonder whether it is possible to plot it on two columns. Something like: Flag1 Value1Flag4 Value4 Flag2 Vauel2Flag5 Value5 Flag3 Value3Flag6 Value6 Thank you in advance, Maura tutti i telefonini TIM! [[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 with functions spec and specprop
I deal with mono-channel breathing signals sampled at 30[Hz] which are non-linear and non-stationary. My goal is to classify the signals according to common breathing patterns Trend remotion is necessary for cluster analysis but quite challenging. In fact, quasi-periodic patterns that span a number of consecutive breathing cycles should not be naively removed as they carry a lot of useful information. In advance of applying any trend removing technique, I have to extract the main period and save it. I thought it would be an easy task through functions spec and specprop. But I cannot get them to work for me. Here is my simple exercise: length(amp) [1] 3885 amp.sp - spec(amp,f=0.033) specprop(amp.sp,f=0.033,str=TRUE,plot=1) Error in specprop(amp.sp, f = 0.033, str = TRUE, plot = 1) : Frequency resolution is to high (0.5 hz) specprop(amp.sp,f=0.033,str=TRUE) Error in specprop(amp.sp, f = 0.033, str = TRUE) : Frequency resolution is to high (0.5 hz) I cannot get the meaning of the message error unless there is a constraint on the frequency resolution deal with by these functions ... in this case the error message should read ... Frequency resolution is TOO high (0.5 hz) Even so, I am still puzzled beause the default window is 512 wide == 1/512 = 0.001953125 The signal length is 3885 == 1/3885 = 0.0002574003 Your help is very welcome. Thank you in advance. Kind regards, Maura tutti i telefonini TIM! tutti i telefonini TIM! [[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 R interpreter to remember constant values without using any memory location
Maybe I expect too much from a non compiled language. Anyway, I wonder whether it is possible in R to set constant values without using any memory location that would take useless space bacause such values are not going to be changed along the program. It's just a way to assign a mnemnic name tos some constant values. For instance, I would like R interpreter to replace all occurrences of mnemonic Monday with the number 1, Tuesday with the number 2, Wednesday with the number 3, and so on ... without having to assign such values to memory locations. Maybe environment variables are the way to go ? Thank you in advance for your advice, Maura tutti i telefonini TIM! [[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] R: how to get R interpreter to remember constant values without using any memory location
Thank you for all your suggestiona. I tried to write a self-contained example which turned oiut to confuse people's miind. I realized also the formulation of my question was unclear. Sorry for that. What I had in mind was something similar to Fortran Parameter declaration. I spent some time dealing with Monte Carlo codes for radiation trasport. In this particular research filed it's pretty common to come across Fortran code, like it or not. For example, through Fortran Parameter declaration, I can assign a name to a big floating-point number, something like Parameter( A = 123E-15) without having the compiler to allocate 32 (REAL data type) or 64 (DOUBLE data type) consecutive memory locations to accommodate such a number. Of course the computer must save any constant data somewhere but neglecting its data type, therefore saving memory space. In my R script I have to deal with a dynamically varying list of references. Something simiilar to what LaTeX interpreter does when we use it to write a manuscript. That is, we do not have to renumber the bibliography references list whenever we insert a new citation into, or remove an existing one from our manuscript. LaTeX takes care of that. We just cite references through labels taht LaTeX translates into a dynamically ordered list of numbers. So, factors may work fine for me. Another possibility that downed on me may be to name the list elements, although I will have to update the list names every time the list is updaed. Thank you again, Maura -Messaggio originale- Da: Don MacQueen [mailto:m...@llnl.gov] Inviato: gio 13/08/2009 21.17 A: mau...@alice.it; r-h...@stat.math.ethz.ch Oggetto: Re: [R] how to get R interpreter to remember constant values without using any memory location Like Ben, I wonder what the reason for doing this is. First of all, the amount of memory indicated by your example is so small I can't imagine it would make any difference. If you have such a large number of values that the amount of memory is significant -- and store them somewhere that isn't in memory (such as physical disk memory), then reading them into memory when you need to use them might affect performance a lot. Environment variables use memory also -- it's just someone else's memory (the OS instead of R). -Don At 4:05 PM +0200 8/13/09, mau...@alice.it wrote: Maybe I expect too much from a non compiled language. Anyway, I wonder whether it is possible in R to set constant values without using any memory location that would take useless space bacause such values are not going to be changed along the program. It's just a way to assign a mnemnic name tos some constant values. For instance, I would like R interpreter to replace all occurrences of mnemonic Monday with the number 1, Tuesday with the number 2, Wednesday with the number 3, and so on ... without having to assign such values to memory locations. Maybe environment variables are the way to go ? Thank you in advance for your advice, Maura tutti i telefonini TIM! [[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. -- -- Don MacQueen Environmental Protection Department Lawrence Livermore National Laboratory Livermore, CA, USA 925-423-1062 -- tutti i telefonini TIM! [[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] R: how import Excel data into R?
I recently downloaded an XLS file from a web site into a data.frame. You may want to try out the following: ?install.packages(gdata) library(gdata) ?read.xls Maura -Messaggio originale- Da: r-help-boun...@r-project.org per conto di Inchallah Yarab Inviato: mer 05/08/2009 17.56 A: r-help@r-project.org Oggetto: [R] how import Excel data into R? Hi I want to import Excel data into R I have used this code data-read.table(C:\Total_Art_Policies.xls,header=TRUE,sep=;) i have an error msg: Erreur dans file(file, r) : impossible d'ouvrir la connexion De plus : Warning message: In file(file, r) : impossible d'ouvrir le fichier 'C:\Total_Art_Policies.xls' : No such file or directory i tried to charge the package xlsreadwrite but i didn't found it? what i schould do someone can help me please? best regards [[alternative HTML version deleted]] tutti i telefonini TIM! [[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 catch an error using try
Sometimes the following function call causes a database exception: gene.seq - getSequence (id=gene.map[,ensembl_transcript_id], type=ensembl_transcript_id, + seqType=3utr, mart=hmart) I understand the above function must be called by try to capture the eventual error. WHat is not clear to me is how to realize that an error has occurred. The on-line documentation mentions an invisible object of class try-error. How shall I test whetehr such object has been created or not ? I assume it is created whenever an error does occur ? Thank you for your help. Maura tutti i telefonini TIM! [[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 avoid a script from hanging up
I am submitting this problem to the R forum , rather than the Bioconductor forum, because its nature is closer to programming style than any Bioinformatic contents. I have implemented an R script to extracts many strings through querying 3 Bioinformatic databases in the same loop cycle. Ideally, the script should perform as many cycles as necessary to extract all available data of interest. Inevitably it triggers a BioMart exception after running many cycles in a row. The exception seems to be independent of the script instructions because if I restart the script from the point where it got interrupted then it runs for another while, extracting also the data where the exception occurred with no problem at all. Sometimes, though, the script does not respond any more, it hangs up, even if no exception has apparently occurred, and the only way to regain control is to kill the R process. This way I lose memory of how many data have been processed and stored to disk files (unless I manually count them ... there are thousands ..). If I restart the script then it restarts processing the data strings from scratch. I guess it may be a memory problem as the task manager (Windows/XP) shows that the hung-up R script is taking more than 70% of the available RAM. I wonder whether there is any system command to make the script self-aware of its memory requirements and running time. Ideally the script should be able to trap the exception and be sensitive to its current RAM / CPU time requirements, self-exit after freezing and saving the current program status so that when rerun it would not restart from scratch but rather pick up from where it exited. Maybe this is asking too much from a non-compiled language ? Thank you in advance, Maura tutti i telefonini TIM! [[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] R: how to avoid a script from hanging up
Thank you very much. The instructions you suggested allow the script itself to decide whether to exit spontaneously. What I am still missing is how to prevent the script from restarting from scratch. I'll try to explain my problem a little bit better. Please, assume I have 3 huge data.frames called d1,d2,d3 My script searched d1 first and d2, d3 looking for matching fields with d1. A very simplified version of my script looks like the following: while (length(d1) 0) {# LOOP ON MirBase miRNAs LIST if (length (which (d2[] == d1[1])) 0) { tmp - d2[which(d2[] == d1[1])] FromWhere - d2 PROCESS ALL DATA in tmp }else if (length(which (d2[] == d1[1])) 0) { tmp - d3[which(d3[] == d1[1])] FromWhere - d3 PROCESS ALL DATA in tmp }else { missing_miRNA - d1[1] cat(\n miRNA: ,missing_miRNA, NOT FOUND IN d2 OR IN d3 \n) flush(stdout()) d1 - d1[-c(which(d1[] == d1[1]))] next } Please, notice also the sub-session PROCESS ALL DATA in tmp ends with the instructions that remove from d1 all the entries whose name is the same. Maybe it is not clear from my concise version. In reality d1,d2,d3 have many fields. d1 can have many rows whose field miRNA_ID is the same, but the other fields contain different pointers. For the sake of freeing some memory, I remove all the rows that pertain to the same miRNA_ID regardless whether the current miRNA has been found in d2 or d3 or not. Actually, perhaps I can operate a similar dynamic data pruning on d2 .. but I have first to check all the links carefully to avoid deleting data that may pertain to different miRNAs. In short, if the script handles its own exit through the instructions you suggested, even saving the environment variables, when the script is run again it will restart processing d1,d2,d3 from scratch. I am dreaming of a re-entrant process. Maybe I should use some environment (system) variables, not just the program variables, to save the necessary information to make next run a process resumption rather than a re-run Is it possible to access / create environment variables from inside an R script ? Regards, Maura -Messaggio originale- Da: jim holtman [mailto:jholt...@gmail.com] Inviato: dom 02/08/2009 21.54 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] how to avoid a script from hanging up You can use 'try' to catch errors and take corrective action. 'memory.size' and 'proc.time' will give you information on the memory usage of your application and the CPU time that has been used. On Sun, Aug 2, 2009 at 2:02 PM, mau...@alice.it wrote: I am submitting this problem to the R forum , rather than the Bioconductor forum, because its nature is closer to programming style than any Bioinformatic contents. I have implemented an R script to extracts many strings through querying 3 Bioinformatic databases in the same loop cycle. Ideally, the script should perform as many cycles as necessary to extract all available data of interest. Inevitably it triggers a BioMart exception after running many cycles in a row. The exception seems to be independent of the script instructions because if I restart the script from the point where it got interrupted then it runs for another while, extracting also the data where the exception occurred with no problem at all. Sometimes, though, the script does not respond any more, it hangs up, even if no exception has apparently occurred, and the only way to regain control is to kill the R process. This way I lose memory of how many data have been processed and stored to disk files (unless I manually count them ... there are thousands ..). If I restart the script then it restarts processing the data strings from scratch. I guess it may be a memory problem as the task manager (Windows/XP) shows that the hung-up R script is taking more than 70% of the available RAM. I wonder whether there is any system command to make the script self-aware of its memory requirements and running time. Ideally the script should be able to trap the exception and be sensitive to its current RAM / CPU time requirements, self-exit after freezing and saving the current program status so that when rerun it would not restart from scratch but rather pick up from where it exited. Maybe this is asking too much from a non-compiled language ? Thank you in advance, Maura tutti i telefonini TIM! [[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 Cincinnati, OH +1 513 646 9390 What is the problem that you are trying to solve? tutti i telefonini TIM!
[R] How to stop an R script when running JGR on a Linux/SuSE system
When I need to stop a running R script on Windows or Mac I just use the esc key which kills the current script and returns the control to R interpreter. But when I run R from JGR the esc is useless as well as the other available keyboard keys. Just recently not even clicking on the STOP-symbol (a big red X) placed on JGR top menu bar could terminate a process that had entered a long loop. Eventually I could kill the process from bash comman line using # kill -KILL process-id I wonder whether there is a more gentle way to stop an R script running on top of JGR aother than ... unplugging the power cord. Thank you so much, Maura .html?pmk=footer [[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] Looking for example of usage of function unz
I would greatly appreciate some example of correct usage of function unz. I have to download and uncompress the following web compressef file: ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.homo_sapiens.zip I tried the following command that does not work: Targets.rec - readLines(zz - unz(ftp://ftp.sanger.ac.uk/pub/mirbase/targets/v5/arch.v5.txt.homo_sapiens.zip;)) Thank you in advance, Maura tutti i telefonini TIM! [[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] R: R: Is there a way to extract some fields data fromHTML pages through any R function ?
It works if the web file adress is of the type: http://;. It does not work if the web file adress is of the type: 'ftp://;. outFile - read.xls(ftp://ftp.sanger.ac.uk/pub/mirbase/sequences/CURRENT/miRNA.xls;) Error in xls2csv(xls, sheet, verbose = verbose, ..., perl = perl) : Unable to read xls file 'ftp://ftp.sanger.ac.uk/pub/mirbase/sequences/CURRENT/miRNA.xls'. Error in file.exists(tfn) : invalid 'file' argument But the file does exists as shown in the following: download.file(ftp://ftp.sanger.ac.uk/pub/mirbase/sequences/CURRENT/miRNA.xls,outFile;) trying URL 'ftp://ftp.sanger.ac.uk/pub/mirbase/sequences/CURRENT/miRNA.xls' ftp data connection made, file length 2563072 bytes opened URL downloaded 2.4 Mb Can the two steps (download + read.xls) be performed with one command line only ? Thank you, Maura -Messaggio originale- Da: r-help-boun...@r-project.org per conto di Daniel Nordlund Inviato: lun 06/07/2009 20.45 A: r-h...@stat.math.ethz.ch Oggetto: Re: [R] R: R: Is there a way to extract some fields data fromHTML pages through any R function ? -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of mau...@alice.it Sent: Sunday, July 05, 2009 11:28 PM To: Martin Morgan Cc: r-h...@stat.math.ethz.ch Subject: [R] R: R: Is there a way to extract some fields data from HTML pages through any R function ? It helps. But it is overly sophisticated. I have already downloaded and used the Excel file containing the validated stuff. Since there are R commands to download gzip as well as FASTA files, I wonder whether it is possible to automatically download the Excel file from http://mirecords.umn.edu/miRecords/download.php Actually the latter may not be the actual file URL because it is necessary to click on the word here to download the file. Thank you, Maura Maura, I haven't seen a response to your question (however, I just may have missed it, or you mave have received an off-line response). I went to the URL above and found that the Excel file is at http://mirecords.umn.edu/miRecords/download_data.php?v=1 I think you could use the read.xls() function from the gdata package to get the file, something like this library(gdata) df - read.xls(http://mirecords.umn.edu/miRecords/download_data.php?v=1;) Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ 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. [[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] EOF revisited
I learnt from this forum to test for EOF reached with fiunction readLines as follows: con - file(MyFle.txt,r) repeat { line - readLines(con,n=1) if (length(line) == 0) break } It works fine if I read one line at a time. Since now I have a huge file so that it would take forever to read one line at a time, I wonder how to test for EOF whenreading blocks of,say, 100 lines at a time. Will the following work ? con - file(MyFle.txt,r) repeat { line - readLines(con,n=100) if (length(line) 100) break } Thank you very much. Maura tutti i telefonini TIM! [[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 use writeFASTA in modality append
It looks like Biostrings function writeFASTA overwrites the output file at each run. It seems it does not support the append parameter. I have to generate one big file gathering a miRNA identifier and relative sequence followd by a variable number of dara records pertaining such a miRNA target genes transcription. Each record is made up of a 3'utr identifier hgnc_id.ensembl_id.transript_id followed by the relative 3'UTR sequence. I hoped I could use writeFASTA but it does not allow me to append sequences to the same output file. Any suggestion is more than welcome. Thank you in advance, Maura .html?pmk=footer [[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 prpare the input data to writeFASTA ? Examples of CharacterToFASTArecords ...
I realize function write FASTA expects a list with two items, respectively, description and sequence. However, just passing a list won't work (please, see code at the bottom of this message) I saw there is the helper function CharacterToFASTArecords(x) that presumably generates the right input data format. It would b very useful to get some example of CharacterToFASTArecords(x) usage. The on-line documentation reads: For CharacterToFASTArecords, the (possibly named) character vector to be converted to a list of FASTA records as one returned by readFASTA Since I have description and sequnce in separate variables ... I do not know how to use it. zz - file (filname,w) write(miRNA.rec, zz, append = FALSE) write(miRNA.seq,zz, append = TRUE) # geneDesc - paste (,gene.id, |, gene.map[i,ensembl_transcript_id], sep=) geneSeq - gene.seq[i,3utr] gene.string - list(desc=geneDesc, seq=geneSeq) writeFASTA (gene.string, zz) Thank you in advance for your help. Maura tutti i telefonini TIM! [[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 test for End-Of-FIle
I have a long text file with uneven record length and variable structure. Therefore I have to read it line-by-line. I found out I can open a connection to the file and read in one line at a time. Something like: con - file(MyFle.txt,r) while (End-Of-File) { line - readLines(con,n=1) ParseLine(line) } But I realized I do not know how to test for the End-Of-File condition using R language. I found a ghost documentation page mentioning an R built-in function isEof(connection). But such a function is not listed in R utils package it seems to belong to. I would appreciate any comment and/or suggestion. Thank you in advance. Maura tutti i telefonini TIM! [[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] R: R: Is there a way to extract some fields data from HTML pages through any R function ?
It helps. But it is overly sophisticated. I have already downloaded and used the Excel file containing the validated stuff. Since there are R commands to download gzip as well as FASTA files, I wonder whether it is possible to automatically download the Excel file from http://mirecords.umn.edu/miRecords/download.php Actually the latter may not be the actual file URL because it is necessary to click on the word here to download the file. Thank you, Maura -Messaggio originale- Da: Martin Morgan [mailto:mtmor...@fhcrc.org] Inviato: dom 05/07/2009 21.42 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: R: [R] Is there a way to extract some fields data from HTML pages through any R function ? mau...@alice.it wrote: I tried to apply the scheme you suggested to open the web page on http://mirecords.umn.edu/miRecords/index.php; and got the followiing: result - postForm(http://mirecords.umn.edu/miRecords/index.php;, + searchType=miRNA, species=Homo sapiens, + searchBox=hsa-let-7a, submitButton=Search) What we are doing here is sometimes called 'screen scraping' -- figuring out how to extract information from a web page when the information is not presented in an alternative, more reliable, form. I offered this route as a response to your specific question, how to extract some fields from an HTML page, but maybe there is a better way that is specific to the resources and information you are trying to extract. For instance, I see on the web page above that there is a link 'Download validated targets' that leads to an Excel-style spread sheet. Maybe that is a better route for this resource? I don't know. In terms of the problem you are encountering above, the fields searchType, species, searchBox, and submitButton were all defined on the web page of the resource you mentioned in a previous email; here you must look at the 'source' (e.g., right-click 'View Page Source' in Firefox) of the web page you are trying to scrape, and figure out the appropriate fields. This requires some familiarity with html and html forms, so that you can recognize what you are looking for. I think on this particular page you are likely to run in to additional difficulties, because selection of a 'species' populates the 'mirna_acc' field with allowable values that combine the miRNA name with the number of validated targets that will be returned -- you almost need to know the answer before you can programatically extract the data. html - htmlTreeParse(result, asText=TRUE, useInternalNodes=TRUE) Unexpected end tag : a error parsing attribute name Opening and ending tag mismatch: strong and font htmlParseStartTag: invalid element name Unexpected end tag : a htmlTreeParse is very forgiving of mal-formed html, and it is telling you that it has parsed the document, even though it was formatted incorrectly. html - htmlTreeParse(result, asText=FALSE, useInternalNodes=TRUE) There are too many parameters involved to try changing them arbitrarily; you must take it upon yourself to understand the functions and the correct way to use them. Hoping this helps, Martin Error in htmlTreeParse(result, asText = FALSE, useInternalNodes = TRUE) : File html!-- InstanceBegin template=/Templates/admin.dwt codeOutsideHTMLIsLocked=false -- head meta http-equiv=Content-Type content=text/html; charset=utf-8 link href=style/link.css rel=stylesheet type=text/css !-- InstanceParam name=nav_1 type=boolean value=true -- titlemiRecords/title /head body bgcolor=#FF leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 table width=80 border=0 cellspacing=0 cellpadding=0 tr td colspan=3img src=images/title.jpg alt= width=900 height=79 border=0/a/td /tr tr td width=131 valign=bottom bgcolor=#CCmenu/td td width=769 align=right valign=middle bgcolor=#CCa href=redirect.php?s=l class=menuValidated Targets /a | a href=redirect.php?s=p class=menuPredicted Targets /a | a href=download.php class=menuDownload Validated Targets /a | a href=submit.php class=m I am lost about how to proceed from the above. My goal is always to get the VALIDATED miRNA identified and string followed by its target gene's 3'utr sequence- Thank you in advance, Maura P:S. BioMart started to work fine since yesterday -Messaggio originale- Da: Martin Morgan [mailto:mtmor...@fhcrc.org] Inviato: mer 01/07/2009 17.51 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] Is there a way to extract some fields data from HTML pages through any R function ? Hi Maura -- mau...@alice.it wrote: I deal with a huge amount of Biology data stored in different databases. The databases belongig to Bioconductor organization can be accessed through Bioconductor packages. Unluckily some useful data is stored in databases like, for instance, miRDB, miRecords, etc ... which offer just an interactive HTML interface. See for
[R] R: Is there a way to extract some fields data from HTML pages through any R function ?
I tried to apply the scheme you suggested to open the web page on http://mirecords.umn.edu/miRecords/index.php; and got the followiing: result - postForm(http://mirecords.umn.edu/miRecords/index.php;, + searchType=miRNA, species=Homo sapiens, + searchBox=hsa-let-7a, submitButton=Search) html - htmlTreeParse(result, asText=TRUE, useInternalNodes=TRUE) Unexpected end tag : a error parsing attribute name Opening and ending tag mismatch: strong and font htmlParseStartTag: invalid element name Unexpected end tag : a html - htmlTreeParse(result, asText=FALSE, useInternalNodes=TRUE) Error in htmlTreeParse(result, asText = FALSE, useInternalNodes = TRUE) : File html!-- InstanceBegin template=/Templates/admin.dwt codeOutsideHTMLIsLocked=false -- head meta http-equiv=Content-Type content=text/html; charset=utf-8 link href=style/link.css rel=stylesheet type=text/css !-- InstanceParam name=nav_1 type=boolean value=true -- titlemiRecords/title /head body bgcolor=#FF leftmargin=0 topmargin=0 marginwidth=0 marginheight=0 table width=80 border=0 cellspacing=0 cellpadding=0 tr td colspan=3img src=images/title.jpg alt= width=900 height=79 border=0/a/td /tr tr td width=131 valign=bottom bgcolor=#CCmenu/td td width=769 align=right valign=middle bgcolor=#CCa href=redirect.php?s=l class=menuValidated Targets /a | a href=redirect.php?s=p class=menuPredicted Targets /a | a href=download.php class=menuDownload Validated Targets /a | a href=submit.php class=m I am lost about how to proceed from the above. My goal is always to get the VALIDATED miRNA identified and string followed by its target gene's 3'utr sequence- Thank you in advance, Maura P:S. BioMart started to work fine since yesterday -Messaggio originale- Da: Martin Morgan [mailto:mtmor...@fhcrc.org] Inviato: mer 01/07/2009 17.51 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] Is there a way to extract some fields data from HTML pages through any R function ? Hi Maura -- mau...@alice.it wrote: I deal with a huge amount of Biology data stored in different databases. The databases belongig to Bioconductor organization can be accessed through Bioconductor packages. Unluckily some useful data is stored in databases like, for instance, miRDB, miRecords, etc ... which offer just an interactive HTML interface. See for instance http://mirdb.org/cgi-bin/search.cgi, http://mirecords.umn.edu/miRecords/interactions.php?species=Homo+sapiensmirna_acc=Anytargetgene_type=refseq_acctargetgene_info=v=yessearch_int=Search Downloading data manually from the web pages is a painstaking time-consumung and error-prone activity. I came across a Python script that downloads (dumps) whole web pages into a text file that is then parsed. This is possible because Python has a library to access web pages. But I have no experience with Python programming nor I like such a programming language whose syntax is indentation-sensitive. I am *hoping* that there exists some sort of web pages, HTML connection from R ... is there ?? Tools in R for this are the RCurl package and the XML package. library(RCurl) library(XML) Typically this involves manual exploration of the web form, Then you might query the web form result - postForm(http://mirdb.org/cgi-bin/search.cgi;, searchType=miRNA, species=Human, searchBox=hsa-let-7a, submitButton=Go) and parse the results into a convenient structure html - htmlTreeParse(result, asText=TRUE, useInternalNodes=TRUE) you can then use XPath (http://www.w3.org/TR/xpath, especially section 2.5) to explore and extract information, e.g., ## second table, first row getNodeSet(html, //table[2]/tr[1]) ## second table, makes subsequent paths shorter tbl - getNodeSet(html, //table[2])[[1]] xget - function(xml, path) # a helper function unlist(xpathApply(xml, path, xmlValue))[-1] df - data.frame(TargetRank=as.numeric(xget(tbl, ./tr/td[2])), TargetScore=as.numeric(xget(tbl, ./tr/td[3])), miRNAName=xget(tbl, ./tr/td[4]), GeneSymbol=xget(tbl, ./tr/td[5]), GeneDescription=xget(tbl, ./tr/td[6])) There are many ways through this latter part, probably some much cleaner than presented above. There are fairly extensive examples on each of the relevant help pages, e.g., ?postForm. Martin Thank you very much for any suggestion. Maura tutti i telefonini TIM! [[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. tutti i telefonini TIM! [[alternative HTML version deleted]]
[R] is there a way to extract fata from web pages through some R function ?
I deal with a huge amount of Biology data stored in different databases. The databases belongig to Bioconductor organization can be accessed through Bioconductor packages. Unluckily some useful data is stored in databases like, for instance, miRDB, miRecords, etc ... which offer just an interactive HTML interface. See for instance http://mirdb.org/cgi-bin/search.cgi, http://mirecords.umn.edu/miRecords/interactions.php?species=Homo+sapiensmirna_acc=Anytargetgene_type=refseq_acctargetgene_info=v=yessearch_int=Search Downloading data manually from the web pages is a painstaking time-consumung and error-prone activity. I came across a Python script that downloads (dumps) whole web pages into a text file that is then parsed. This is possible because Python has a library to access web pages. But I have no experience with Python programming nor I like such a programming language whose syntax is indentation-sensitive. I am *hoping* that there exists some sort of web pages, HTML connection from R ... is there ?? Thank you very much for any suggestion. Maura tutti i telefonini TIM! [[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 a way to extract some fields data from HTML pages through any R function ?
I deal with a huge amount of Biology data stored in different databases. The databases belongig to Bioconductor organization can be accessed through Bioconductor packages. Unluckily some useful data is stored in databases like, for instance, miRDB, miRecords, etc ... which offer just an interactive HTML interface. See for instance http://mirdb.org/cgi-bin/search.cgi, http://mirecords.umn.edu/miRecords/interactions.php?species=Homo+sapiensmirna_acc=Anytargetgene_type=refseq_acctargetgene_info=v=yessearch_int=Search Downloading data manually from the web pages is a painstaking time-consumung and error-prone activity. I came across a Python script that downloads (dumps) whole web pages into a text file that is then parsed. This is possible because Python has a library to access web pages. But I have no experience with Python programming nor I like such a programming language whose syntax is indentation-sensitive. I am *hoping* that there exists some sort of web pages, HTML connection from R ... is there ?? Thank you very much for any suggestion. Maura tutti i telefonini TIM! [[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] R: Is there a way to extract some fields data from HTML pages through any R function ?
Thank you so much. I emailed the people who are in charge of maintaining miRecords and related info. I asked them for an available data transfer protocol like ftp or similar to avoid manually downloading haindreds of sequences from their web site. I got no feedback at all. Thanks again, Maura -Messaggio originale- Da: Martin Morgan [mailto:mtmor...@fhcrc.org] Inviato: mer 01/07/2009 17.51 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] Is there a way to extract some fields data from HTML pages through any R function ? Hi Maura -- mau...@alice.it wrote: I deal with a huge amount of Biology data stored in different databases. The databases belongig to Bioconductor organization can be accessed through Bioconductor packages. Unluckily some useful data is stored in databases like, for instance, miRDB, miRecords, etc ... which offer just an interactive HTML interface. See for instance http://mirdb.org/cgi-bin/search.cgi, http://mirecords.umn.edu/miRecords/interactions.php?species=Homo+sapiensmirna_acc=Anytargetgene_type=refseq_acctargetgene_info=v=yessearch_int=Search Downloading data manually from the web pages is a painstaking time-consumung and error-prone activity. I came across a Python script that downloads (dumps) whole web pages into a text file that is then parsed. This is possible because Python has a library to access web pages. But I have no experience with Python programming nor I like such a programming language whose syntax is indentation-sensitive. I am *hoping* that there exists some sort of web pages, HTML connection from R ... is there ?? Tools in R for this are the RCurl package and the XML package. library(RCurl) library(XML) Typically this involves manual exploration of the web form, Then you might query the web form result - postForm(http://mirdb.org/cgi-bin/search.cgi;, searchType=miRNA, species=Human, searchBox=hsa-let-7a, submitButton=Go) and parse the results into a convenient structure html - htmlTreeParse(result, asText=TRUE, useInternalNodes=TRUE) you can then use XPath (http://www.w3.org/TR/xpath, especially section 2.5) to explore and extract information, e.g., ## second table, first row getNodeSet(html, //table[2]/tr[1]) ## second table, makes subsequent paths shorter tbl - getNodeSet(html, //table[2])[[1]] xget - function(xml, path) # a helper function unlist(xpathApply(xml, path, xmlValue))[-1] df - data.frame(TargetRank=as.numeric(xget(tbl, ./tr/td[2])), TargetScore=as.numeric(xget(tbl, ./tr/td[3])), miRNAName=xget(tbl, ./tr/td[4]), GeneSymbol=xget(tbl, ./tr/td[5]), GeneDescription=xget(tbl, ./tr/td[6])) There are many ways through this latter part, probably some much cleaner than presented above. There are fairly extensive examples on each of the relevant help pages, e.g., ?postForm. Martin Thank you very much for any suggestion. Maura tutti i telefonini TIM! [[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. tutti i telefonini TIM! [[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] Cannot install pakages from Bioconductor besides the default installation
I am running the last R version on SuSE 11.1. I installed the Bioconductor environment following the instructions on the web. As a consequence some core packages from Bioconductors were installed. I need to add some more packages. So I tried biomaRt as follows. It does not get installed correctly. Please see the following sequence. Thank you in advance. Maura source(http://bioconductor.org/biocLite.R;) Warning messages: 1: In safeSource() : Redefining biocinstall 2: In safeSource() : Redefining biocinstallPkgGroups 3: In safeSource() : Redefining biocinstallRepos biocLite(biomaRt) Running biocinstall version 2.4.11 with R version 2.9.0 Your version of R requires version 2.4 of Bioconductor. Warning in install.packages(pkgs = pkgs, repos = repos, dependencies = dependencies, : argument 'lib' is missing: using '/home/mauede/R/x86_64-unknown-linux-gnu-library/2.9' also installing the dependencies XML, RCurl trying URL 'http://bioconductor.org/packages/2.4/extra/src/contrib/XML_2.5-1.tar.gz' Content type 'application/x-gzip' length 676201 bytes (660 Kb) opened URL == downloaded 660 Kb trying URL 'http://bioconductor.org/packages/2.4/extra/src/contrib/RCurl_0.98-1.tar.gz' Content type 'application/x-gzip' length 470071 bytes (459 Kb) opened URL == downloaded 459 Kb trying URL 'http://bioconductor.org/packages/2.4/bioc/src/contrib/biomaRt_2.0.0.tar.gz' Content type 'application/x-gzip' length 200617 bytes (195 Kb) opened URL == downloaded 195 Kb The downloaded packages are in /tmp/RtmpAtNws1/downloaded_packages Warning messages: 1: In install.packages(pkgs = pkgs, repos = repos, dependencies = dependencies, : installation of package 'XML' had non-zero exit status 2: In install.packages(pkgs = pkgs, repos = repos, dependencies = dependencies, : installation of package 'RCurl' had non-zero exit status 3: In install.packages(pkgs = pkgs, repos = repos, dependencies = dependencies, : installation of package 'biomaRt' had non-zero exit status library(biomaRt) Error in library(biomaRt) : there is no package called 'biomaRt' ?getBM No matches for getBM have been found ?getSequence No matches for getSequence have been found tutti i telefonini TIM! [[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] question about package biomaRt
Can biomaRt connect to data base http://mirecords.umn.edu; or a branch of it ... for instance the validated miRNAs list ..? Thank you very much. Maura tutti i telefonini TIM! [[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] R: Cannot install pakages from Bioconductor besides the default installation
Yes it is. I copied and pasted all the attempted installation messages. The installed Bioconductor environment is the latest released. Just installed yesterday. The dependencies ... well, should be automatically resolved.- Thank you, Maura -Messaggio originale- Da: Martin Morgan [mailto:mtmor...@fhcrc.org] Inviato: mar 23/06/2009 18.55 A: mau...@alice.it Cc: bioconductor-boun...@stat.math.ethz.ch; r-h...@stat.math.ethz.ch; Stefano Rovetta; Francesco Masulli; Chenna Reddy Oggetto: Re: [R] Cannot install pakages from Bioconductor besides the default installation Please ask Bioconductor questions on the Bioconductor mailing list https://stat.ethz.ch/mailman/listinfo/bioconductor Is the below a complete transcript of the outcome of biocLite('biomaRt')? I would have expected to see R attempt to install each package, and then perhaps XML failing to compile. This would mean that first RCurl and then biomaRt would fail to install. Likely XML would fail to install because of outdated system dependencies, but this is just speculation; is this really the complete output of the biocLite('biomaRt') command? Martin mau...@alice.it writes: I am running the last R version on SuSE 11.1. I installed the Bioconductor environment following the instructions on the web. As a consequence some core packages from Bioconductors were installed. I need to add some more packages. So I tried biomaRt as follows. It does not get installed correctly. Please see the following sequence. Thank you in advance. Maura source(http://bioconductor.org/biocLite.R;) Warning messages: 1: In safeSource() : Redefining 'biocinstall' 2: In safeSource() : Redefining 'biocinstallPkgGroups' 3: In safeSource() : Redefining 'biocinstallRepos' biocLite(biomaRt) Running biocinstall version 2.4.11 with R version 2.9.0 Your version of R requires version 2.4 of Bioconductor. Warning in install.packages(pkgs = pkgs, repos = repos, dependencies = dependencies, : argument 'lib' is missing: using '/home/mauede/R/x86_64-unknown-linux-gnu-library/2.9' also installing the dependencies 'XML', 'RCurl' trying URL 'http://bioconductor.org/packages/2.4/extra/src/contrib/XML_2.5-1.tar.gz' Content type 'application/x-gzip' length 676201 bytes (660 Kb) opened URL == downloaded 660 Kb trying URL 'http://bioconductor.org/packages/2.4/extra/src/contrib/RCurl_0.98-1.tar.gz' Content type 'application/x-gzip' length 470071 bytes (459 Kb) opened URL == downloaded 459 Kb trying URL 'http://bioconductor.org/packages/2.4/bioc/src/contrib/biomaRt_2.0.0.tar.gz' Content type 'application/x-gzip' length 200617 bytes (195 Kb) opened URL == downloaded 195 Kb The downloaded packages are in '/tmp/RtmpAtNws1/downloaded_packages' Warning messages: 1: In install.packages(pkgs = pkgs, repos = repos, dependencies = dependencies, : installation of package 'XML' had non-zero exit status 2: In install.packages(pkgs = pkgs, repos = repos, dependencies = dependencies, : installation of package 'RCurl' had non-zero exit status 3: In install.packages(pkgs = pkgs, repos = repos, dependencies = dependencies, : installation of package 'biomaRt' had non-zero exit status library(biomaRt) Error in library(biomaRt) : there is no package called 'biomaRt' ?getBM No matches for getBM have been found ?getSequence No matches for getSequence have been found tutti i telefonini TIM! [[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. -- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M1 B861 Phone: (206) 667-2793 tutti i telefonini TIM! [[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 with installation of local gzip-ped packages
I was suggested to install two tar-red and gzip-ped packages that are not part of CRAN or BioConductors yet. I read the R manual about Administration and could only find a good description of how to install packages not canonically included in CRAN repository, on UNIX systems. I work on Linux/SuSE and Windows ... so I am stuck with such an installation. Any suggestion in very welcome. Thank you. Maura tutti i telefonini TIM! [[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] JGR installation errors
I remember JGR installation on SuSE 10.3 as a nightmare that eventually I overcame with JGR designers' help. I have installed SuSE 11.1, latest R version and am trying to install JGR again. It is still a nightmare. I have followed the guidelines on http://jgr.markushelbig.org/JGR_on_Linux.html I have made sure I have the so R libraries. I have installed java-1.6.0-sun and its development environment. Following the on-line guidelines for JGR installation, the process fails on trying to install rJava ... please see all the messages in the following. I get the same error if I try to install rJava in advance of JGR. Thank you very much, Maura As root: linux-326k:/home/mauede # sudo R CMD javareconf Java interpreter : /usr/bin/java Java version : 1.6.0_0 Java home path : /usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre Java compiler: /usr/bin/javac Java headers gen.: /usr/bin/javah Java archive tool: /usr/bin/jar Java library path: $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/amd64:$(JAVA_HOME)/../lib/amd64::/usr/java/packages/lib/amd64:/usr/lib64:/lib64:/lib:/usr/lib JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -L -L/usr/java/packages/lib/amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib -ljvm JNI cpp flags: Updating Java configuration in /usr/lib64/R Done. linux-326k:/home/mauede # sudo R install.packages('JGR') --- Please select a CRAN mirror for use in this session --- CRAN mirror Selection: 24 also installing the dependencies rJava, JavaGD, iplots trying URL 'http://cran.stat.unipd.it/src/contrib/rJava_0.6-3.tar.gz' Content type 'application/octet-stream' length 240527 bytes (234 Kb) opened URL == downloaded 234 Kb trying URL 'http://cran.stat.unipd.it/src/contrib/JavaGD_0.5-2.tar.gz' Content type 'application/octet-stream' length 87076 bytes (85 Kb) opened URL == downloaded 85 Kb trying URL 'http://cran.stat.unipd.it/src/contrib/iplots_1.1-3.tar.gz' Content type 'application/octet-stream' length 331100 bytes (323 Kb) opened URL == downloaded 323 Kb trying URL 'http://cran.stat.unipd.it/src/contrib/JGR_1.6-7.tar.gz' Content type 'application/octet-stream' length 506759 bytes (494 Kb) opened URL == downloaded 494 Kb * Installing *source* package rJava ... checking for gcc... gcc -std=gnu99 checking for C compiler default output file name... a.out checking whether the C compiler works... yes checking whether we are cross compiling... no checking for suffix of executables... checking for suffix of object files... o checking whether we are using the GNU C compiler... yes checking whether gcc -std=gnu99 accepts -g... yes checking for gcc -std=gnu99 option to accept ISO C89... none needed checking how to run the C preprocessor... gcc -std=gnu99 -E checking for grep that handles long lines and -e... /bin/grep checking for egrep... /bin/grep -E checking for ANSI C header files... yes checking for sys/wait.h that is POSIX.1 compatible... yes checking for sys/types.h... yes checking for sys/stat.h... yes checking for stdlib.h... yes checking for string.h... yes checking for memory.h... yes checking for strings.h... yes checking for inttypes.h... yes checking for stdint.h... yes checking for unistd.h... yes checking for string.h... (cached) yes checking sys/time.h usability... yes checking sys/time.h presence... yes checking for sys/time.h... yes checking for unistd.h... (cached) yes checking for an ANSI C-conforming const... yes checking whether time.h and sys/time.h may both be included... yes configure: checking whether
[R] R: JGR installation errors
It works now. Thank you. I even succeeded in starting R by clicking on JGR icon that I placed on my desktop. I wonder whether some Java or system flag that unlocks Mutex (I ignore what it is) has to be set somewhere ... maybe fron the .bashrc file. The first time I happened to get JGR running (as root) a warning popped up (I haven't saved it) about a possible crash caused by Mutex being unlocked by anothe thread ... I restarted JGR as regular user and that message is not printed out any more. I do not know whether I can feel confident everything is fine with this installation ... ? Regards, Maura -Messaggio originale- Da: Simon Urbanek [mailto:simon.urba...@r-project.org] Inviato: ven 19/06/2009 15.43 A: mau...@alice.it Cc: stats-rosuda-de...@listserv.uni-augsburg.de; r-h...@stat.math.ethz.ch Oggetto: Re: JGR installation errors MAura, On Jun 19, 2009, at 7:36 , mau...@alice.it mau...@alice.it wrote: I remember JGR installation on SuSE 10.3 as a nightmare that eventually I overcame with JGR designers' help. I have installed SuSE 11.1, latest R version and am trying to install JGR again. It is still a nightmare. Well, good Linux distros offer JGR as binaries so it's one-liner to install it ;). All other distros I use are easy to install even from sources - SuSE seems is notoriously struggling ... I have followed the guidelines on http://jgr.markushelbig.org/JGR_on_Linux.html I have made sure I have the so R libraries. I have installed java-1.6.0-sun and its development environment. Following the on-line guidelines for JGR installation, the process fails on trying to install rJava ... please see all the messages in the following. I get the same error if I try to install rJava in advance of JGR. Thank you very much, Maura As root: linux-326k:/home/mauede # sudo R CMD javareconf Java interpreter : /usr/bin/java Java version : 1.6.0_0 Java home path : /usr/lib64/jvm/java-1.6.0-openjdk-1.6.0/jre Java compiler: /usr/bin/javac Java headers gen.: /usr/bin/javah Java archive tool: /usr/bin/jar Java library path: $(JAVA_HOME)/lib/amd64/server:$(JAVA_HOME)/lib/ amd64:$(JAVA_HOME)/../lib/amd64::/usr/java/packages/lib/amd64:/usr/ lib64:/lib64:/lib:/usr/lib JNI linker flags : -L$(JAVA_HOME)/lib/amd64/server -L$(JAVA_HOME)/ lib/amd64 -L$(JAVA_HOME)/../lib/amd64 -L -L/usr/java/packages/lib/ amd64 -L/usr/lib64 -L/lib64 -L/lib -L/usr/lib -ljvm JNI cpp flags: ^^^ - it appears that you don't have full JDK installed properly or it's non-standard location - R cannot find flags needed to compile JNI. You don't have either of ${JAVA_HOME}/include, ${JAVA_HOME}/../ include, ${JAVA_HOME}/jre/include so you'll need to figure out whether a) you just didn't install them or b) they are installed in a non- standard location. The fix for a) is to install them, the fix for b) is set set them using JAVA_CPPFLAGS when calling javareconf (and report back to us to see if that's something we can add to R). Cheers, Simon Updating Java configuration in /usr/lib64/R Done. tutti i telefonini TIM! [[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] shall I uninstall an old R installation in advance of installing a new one ?
I have resumed developing R code on SuSE/Linux version 11.1 I installed the latest 64-bit R version available for my platform. Accidentally I figured out I still had an old R installation that, surprisingly, was not wiped out by the new SuSE installation from scratch. I suspect the new and old R versions got mixed up. I would greatly appreciate some suggestions about restarting from scratch a new R installation. My question is: how can I remove the old R installation so that no old files are left in the system ? Moreover, if I choose to install the new R version without previous disk saving ... where does R get installed (path) ? Thank you. Maura tutti i telefonini TIM! [[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 R function to read xls (Excel) format files ?
Sorry for this trivial question. I have just installed R on SuSE/Linux and cannot cope with the character terminal. I am going to install JGR that will make my life easier at searching for existing R functions/packages. In the meantime (higher-priority things to do) I would appreciate your answer. Thank you for your patience. Maura tutti i telefonini TIM! [[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] R and miRecords
I wonder whether R provides an interface to access miRecords data. Particularly, I am looking for extracting humans miRNA and target genes sequences. All such information is stored in there in a set of structured web site pages (http://mirecords.umn.edu/miRecords) I would greatly appreciate any suggestion even about other data bases from where it is possible to get the same sort of data. I had a look at the database whose interface is provided by the Bioconductors package. It seems to have a diferent contents, though. Thank you in advance, Maura tutti i telefonini TIM! [[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] R: R and miRecords
Thank you so much. Sorry for my basic questions that must read very silly for Biologists. As a physicist I was supposed to help Biology research with physics facets (free energy minimization, Molecular Dynamics, and so on). Unluckily, the student in charge of providing the test data (miRNA sequences and target gene sequences) has unexpectedly dropped out of the school just a few weeks from his Ms. thesis defence ! Consequently each member of the research group is getting a bigger slice of the pie ... The problem is that we have to make the database interrogation (data path selection) and data extraction processes fully automatic. miiRecords is searchable interactively through selecting items from some menus hierarchily structured.. That's why the drop-out student wrote some Python code to automatically extract miRNAa and gene sequences. Therefore my question is: how can I interrogate and extract data from miRecors, or any of the databases you suggested, automatically ? Is there any standard s/w interface whose functions are callable from a ... program (which language is the most appropriate ? Thank you so much. Kind regards, Maura -Messaggio originale- Da: iaingallag...@btopenworld.com [mailto:iaingallag...@btopenworld.com] Inviato: mar 16/06/2009 21.53 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] R and miRecords Try TargetScan, Pictar, miRbase. These are all useful miRNA databases. Data can be downloaded as cvs or tab delimited files and parsed in R after that. In fact this may be possible with the resource you have looked at (although I haven't checked). Cheers Iain --- On Tue, 16/6/09, David Winsemius dwinsem...@comcast.net wrote: From: David Winsemius dwinsem...@comcast.net Subject: Re: [R] R and miRecords To: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Date: Tuesday, 16 June, 2009, 4:24 PM Looks like a BioConductor question. On Jun 16, 2009, at 11:05 AM, mau...@alice.it wrote: I wonder whether R provides an interface to access miRecords data. Particularly, I am looking for extracting humans miRNA and target genes sequences. All such information is stored in there in a set of structured web site pages (http://mirecords.umn.edu/miRecords) I would greatly appreciate any suggestion even about other data bases from where it is possible to get the same sort of data. I had a look at the database whose interface is provided by the Bioconductors package. It seems to have a diferent contents, though. Thank you in advance, Maura tutti i telefonini TIM!de. David Winsemius, MD Heritage Laboratories West Hartford, CT __ 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. tutti i telefonini TIM! [[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 with package simsalabim
I have attached a text file representing the centralized amplitude of a signal, sampled at 30Hz, whose length N = 6922 My goal is to remove the trend. I am using package simsalabim. I ran command decompSSA with L = length(Amps)/5 The reason is that I have SSA/MTM toolkit running in Mac/OS. SSA/MTM documentation, relative to SSA, recommends that N/10 = L = N/5. Documentation of simsalabim package recommens that L=N/2 I ran the command getSignal and felt uncomfortable at picking values for parameters C0 and r0. I would appreciate some suggestion/guidelines because these values seem to influence the trend extraction. I chose C0=0.0005, r0=0.0005 which are both below the Nyquist frequency 1/Amps.dc$L = 0.0007223346 As a consequence, getSignal finds two Eigenvectors capturing the trend. From my experience with toolkit SSA/MTM I know this output can be misleading. I am trying to figure out whether trend has really been found by double-checking the print-out data: Amps.signal$trend k smoothness explainedVariance 1 10.134495414 26.254096 11 12 0.006693601 1.627475 The above print-out marks EOF_1 and EOF_12 as capturing all the trend in the signal. I canNOT understand the difference between smoothness and explainedVariance I tried to compare such values with the leading frequency associated with EOF_1 and EOF_12. Unluckily, I am unable to draw any comclusion: Amps.dc$freq[1] #EOF_1 LEADING FREQUENCY [1] 0.0007225434 Amps.dc$freq[12] #EOF_12 LEADING FREQUENCY [1] 0.002890173 getSignal on-line documentation states about Trend smoothness: The proportion of variance explained by the frequencies =q omega0. But nowhere I could find what q is equal to. I guess the above sentence indicates a fraction of the nyquist frequency Omega_0 getSignal on-line documentation states about Trend explainedVariance: Percentage of the variance explained by the Eigenvalues with rank k Does the above variance refer to the signal variance I would greatly appreciate your help at using this package properly. Thank you in advance. Maura e tutti i telefonini TIM! Vai su e tutti i telefonini TIM! Vai su e tutti i telefonini TIM! Vai su __ 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] searchpaths
May I use searchpaths() with arguments partially matching file names that are found in different directories ? My question is whether this is th R function equivalent of Linux find or Windows search. Both O.S. calls are given a starting point so that they search all diectories from then downwards looking for files whose names match the searching criteria. Thank you. Maura tutti i telefonini TIM! [[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] ACF roots
I have a number of signals whose ACF may or may not cross the zero line. Whether roots exist or not is a piece of useful information for me. Likewise, if any root exists, I'd like to know its lag value. Unluckily R function ACF does not seem to provide such information. I wonder whether someone can come up with some suggestions ... maybe there is some other function that yields the regular ACF plus more ... Otherwise, I would appreciate some literature reference or just any advice that can help. Thank you so much. Maura tutti i telefonini TIM! [[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] R: Harmonic Analysis
Well, the time series I am dealing with are non-linear and not-stationary. Maura -Messaggio originale- Da: r-help-boun...@r-project.org per conto di stephen sefick Inviato: mer 27/05/2009 14.58 A: r-h...@stat.math.ethz.ch Oggetto: Re: [R] Harmonic Analysis why will a fourier transform not work? 2009/5/27 Uwe Ligges lig...@statistik.tu-dortmund.de: Dieter Menne wrote: mauede at alice.it writes: I am looking for a package to perform harmonic analysis with the goal of estimating the period of the dominant high frequency component in some mono-channel signals. You should widen your scope by looking a time series instead of harmonic analysis. There is a task view on the subject at http://cran.at.r-project.org/web/views/TimeSeries.html ... or take a look at package tuneR. Uwe Ligges Dieter __ 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@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. -- Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis __ 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. tutti i telefonini TIM! [[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] R: R: Harmonic Analysis
Actually I do use DWT for features extraction which is aimed at clustering signals bearing statistically comparable patterns. Trend can easily fool any clustering function. This is why detrending is the number 1 step in the whole procedure. Sparing the quasi-harmonic components that bear most of the information is a must. I am interested at sparing the quasi-periodic oscillations that, otherwise, would be wiped out by the detrending procedure. Thanks, Maura -Messaggio originale- Da: stephen sefick [mailto:ssef...@gmail.com] Inviato: gio 28/05/2009 0.56 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: R: [R] Harmonic Analysis Do you need time localization, or are you only interested in the period of the high frequency? If you do need time localization why not use a CWT to look at the signal? Stephen On Wed, May 27, 2009 at 4:59 PM, mau...@alice.it wrote: Well, the time series I am dealing with are non-linear and not-stationary. Maura -Messaggio originale- Da: r-help-boun...@r-project.org per conto di stephen sefick Inviato: mer 27/05/2009 14.58 A: r-h...@stat.math.ethz.ch Oggetto: Re: [R] Harmonic Analysis why will a fourier transform not work? 2009/5/27 Uwe Ligges lig...@statistik.tu-dortmund.de: Dieter Menne wrote: mauede at alice.it writes: I am looking for a package to perform harmonic analysis with the goal of estimating the period of the dominant high frequency component in some mono-channel signals. You should widen your scope by looking a time series instead of harmonic analysis. There is a task view on the subject at http://cran.at.r-project.org/web/views/TimeSeries.html ... or take a look at package tuneR. Uwe Ligges Dieter __ 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@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. -- Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis __ 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. Alice Messenger ;-) chatti anche con gli amici di Windows Live Messenger e tutti i telefonini TIM! er -- Stephen Sefick Let's not spend our time and resources thinking about things that are so little or so large that all they really do for us is puff us up and make us feel like gods. We are mammals, and have not exhausted the annoying little problems of being mammals. -K. Mullis tutti i telefonini TIM! [[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] Harmonic Analysis
I am looking for a package to perform harmonic analysis with the goal of estimating the period of the dominant high frequency component in some mono-channel signals. I guess there are presumably a number of CRAN packages allowing for such analysis. However, my search with keywords was not successfull. It brought up a lot of Fourier miscellanea but nothing specifically geared for my needs. I would greatly appreciate your suggestions. Thank you in advance. Maura tutti i telefonini TIM! [[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 implement a circular buffer with R
Some wavelet analysis experts have implemented periodic boundary conditions for signals. I need to implement a circular buffer. Something like: 12345abcdefgh12345abcdefgh so that at each step the riightmost element is moved to the leftmost index and everything else is properly shifted: h12345abcdefgh12345abcdefg, gh12345abcdefgh12345abcdef, My implementation (still debugging) seems to start working but is terribly clumsy. I am sure that some expert can suggest a more elegant solution, Thank you. Maura tutti i telefonini TIM! [[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] stationarity tests
How can I make sure the residual signal, after subtracting the trend extracted through some technique, is actually trend-free ? I would greatly appreciate any suggestion about some Stationarity tests. I'd like to make sure I have got the difference between ACF and PACF right. In the following I am citing some definitions. I would appreciate your thoughts. ACF(k) estimates the correlation between y(t) and y(t-k) like an ordinary correlation coefficient. ACF is the simple ( i.e. unconditional ) correlation between a time series and it's lags thus y(t)=a+b*y(t-k) gnerates the kth autocoreelation coefficient (b). If we have form y(t)=a+b*y(t-1)+c*y(t-2) .. then (c) is the PARTIAL AUTOCORRELATION COEFFFICIENT or in other words the CONDITIONAL CORRELATION of lag 2 given lag1 PACF(k) estimates the correlation between y(t) and y(t-k) adjusted for the effects of y(t-1), ..., y(t-k+1). Model identification is achieved by looking at the pattern of the ACF and PACF. - If the ACF dies off exponentially, but the PACF has p spikes, AR(p) is indicated. - If the ACF has q spikes and the PACF dies off exponentially, MA(q) is indicated. The ACF and the PACF for the resulting stationary series is used to determine the best B/J model for the series according to the following rules: a. If the ACF trails off and the PACF shows spikes, then an AR model with order p = number of significant PACF spikes is the best model. b. If the PACF trails off and the ACF shows spikes, then an MA model with order q= number of significant ACF spikes is the best model. c. If both the ACF and the PACF trail off then a ARMA model is used with p=1 and q=1. Thank you very much, Maura Thank you very much. Best regards, Maura Edelweiss tutti i telefonini TIM! [[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] Spearman rho
I read that Spearman rho can be used to detect the presence of trend in a time series. However, I cannot figure out how to use such a test to thsi purpose. First of all which one of the available functions and how to pass my mono-channel time series which contains both positive and negative values. I would love to see some examples. Thank you very much. Maura tutti i telefonini TIM! [[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] corrupted smoothing kernel ?
I am trying to use the kernel function. To understand how it works I tried out some of the examples. None of them works as shown in the following: kernel(daniell, 50) # Error in kernel(daniell, 50) : unused argument(s) (50) kernel(daniell, 10) # Error in kernel(daniell, 10) : unused argument(s) (10) kernel(daniell, c(3,3)) Error in kernel(daniell, c(3, 3)) : unused argument(s) (c(3, 3)) kernel(fejer, 100, r=6) Error in kernel(fejer, 100, r = 6) : unused argument(s) (100, r = 6) kernel(daniell, c(11,7,3) ) Error in kernel(daniell, c(11, 7, 3)) : unused argument(s) (c(11, 7, 3)) My goal is to detrend a time series affected by non-linear trend. I do not have clear ideas about the difference betweeen detrending and smoothing. I would appreciate some suggestions and/or literature references by people experienced about detrending and smoothing. I was told the there are two best methods about detrending: polynomial fit on a sliding window and kernel smoothing. I keep being confused . I got the book by Hardle. Maybe you can advice some other clarifying literature (possibly with examples). Thank you very much. Maura tutti i telefonini TIM! [[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] R: corrupted smoothing kernel ?
I have just installed R2.9.0 on my Windows XP system. I have followed the same installation procedure I have been using for over a year. That is installation from the exe file. kernel belongs to package statswhich is (I think) installed by default. I loaded it but did not use the command: library(stats) Now I did and it works fine for me too. I am sorry. I though such a command is only necessary when a package is installed. Thank youi. Maura -Messaggio originale- Da: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Inviato: gio 14/05/2009 16.14 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] corrupted smoothing kernel ? mau...@alice.it wrote: I am trying to use the kernel function. To understand how it works I tried out some of the examples. None of them works as shown in the following: kernel(daniell, 50) # Error in kernel(daniell, 50) : unused argument(s) (50) which works for me. Have you loaded some specific package? Which R versioj is this? Your OS? Self-compiled R or some pre-compiled binary? Uwe Ligges kernel(daniell, 10) # Error in kernel(daniell, 10) : unused argument(s) (10) kernel(daniell, c(3,3)) Error in kernel(daniell, c(3, 3)) : unused argument(s) (c(3, 3)) kernel(fejer, 100, r=6) Error in kernel(fejer, 100, r = 6) : unused argument(s) (100, r = 6) kernel(daniell, c(11,7,3) ) Error in kernel(daniell, c(11, 7, 3)) : unused argument(s) (c(11, 7, 3)) My goal is to detrend a time series affected by non-linear trend. I do not have clear ideas about the difference betweeen detrending and smoothing. I would appreciate some suggestions and/or literature references by people experienced about detrending and smoothing. I was told the there are two best methods about detrending: polynomial fit on a sliding window and kernel smoothing. I keep being confused . I got the book by Hardle. Maybe you can advice some other clarifying literature (possibly with examples). Thank you very much. Maura tutti i telefonini TIM! [[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. tutti i telefonini TIM! [[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] Gaussian local detrending and smoothing within a moving time window
Is there an R function implementing a Gaussian local detrending and smoothing within a moving time window ? I used ksmooth over the entire time series. Plotting the data before and after this operation shows that the signal is actuslly smoother but the tend is still there. I wonder whether ksmooth can be adapted on a sliding window, iteratively providing overlapping signal segments like: x[(n+r):(m+r)] where n m; r =1,2,3, so the sliding window width is m-n However, I do not know how the bandwidth and the window with are going to be related. Thank you for any comment and/or suggestion. Maura tutti i telefonini TIM! [[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] wrong if-else syntax
What is wrong in the following nested if-else statements: if (Condition_1) { # begin IF_1 statement_1 statement_2 statement_3 if (Condition_2) { # begin IF_2 a- a +1 } # end IF_2 statement_4 statement_5 statement_6 statement_7 if (Condition_3) {# begin IF_2 statement_8 } else { # ELSE_2 statement_9 statement_10 } # end IF_2 } else { # ELSE_1 statement_11 } # end IF_1 It looks like R interpret does not like the above syntax. In fact in my script I have the following instructions: if (DonohoAplhaON){ tms - xx[,sampamp] #EXTRACT SIGNAL AMPLITUDE tmsLen - length(tms) J - ilogb(tmsLen, base=2) if (logb(tmsLen, base=2)%%2 0) { J - J + 1 } rm(xx) rawtms - tms X - PreProcessor(tms,tmsLen,J) BestWavList - FindBestWavelet (X,tmsLen,J,Step1NumHighScalesOFF) if (!is.null(BestWavList)) { #COMPUTE SIGNAL DONOHO-ALPHA features.mat[ns,alpha]- CalcDonohoAlpha(rawtms,BestWavList$No,J,tmsLen,Step3NumHighScalesOFF,Step3AllCoefON) } else { cat(\n\n Could not compute Best Wavelet Basis for Signal: ,fln, Skip current signal! \n\n) next } } else { features.mat[ns,alpha] - NA } It keeps printing out an error referred to the second } else { as if it could not realize that the inner if-statement has been closed: if(!is.null(BestWavList)) { #COMPUTE SIGNAL DONOHO-ALPHA + features.mat[ns,alpha]- CalcDonohoAlpha(rawtms,BestWavList$No,J,tmsLen,Step3NumHighScalesOFF,Step3AllCoefON) + }else { + cat(\n\n Could not compute Best Wavelet Basis for Signal: ,fln, Skip current signal! \n\n) + next + } }else { Error: unexpected '}' in } features.mat[ns,alpha] - NA } Error: unexpected '}' in } Thank you for clarifying my doubts Maura tutti i telefonini TIM! [[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 happens if a function removes an external (global) variable ?
My program consists of a number of functions and a main script. It loops through many time series analyzing one at a time. I have declared a number of arrays and scalar variables in the main script namespace (using C++ terminology) because those data structures ar shared by many functions. let say XX is he name of a global array. I wonder what happens in the following cases: 1. a function tries to remove the global array through the instruction rm(XX) Will the next usage of XX still access a global variable (if using the assignment operator -) or a new local one will be created ? 2. the main script removes the global array through the instruction rm(XX) Will the next usage of XX in the main script allocate a new global variable that can be accessed by all the called functions ? 3. If the global array XX is never removed but is assigned in different loops alternatively very short and very long time series then what will happen to the memory segment allocated to R ? Will it get more and more fragmented slowing down the process ... or aven crash ? Thank you very much. Maura tutti i telefonini TIM! [[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] R: constrained optimization
Thank you. Unluckily what makes the problem only apparenttly simple (for me) is that we have not differentiable functions and the parameter space is not continuous ... which reduces dramatically the number of choices. I would be grateful to chat with anyone who has tackled a similar problem. Maura -Messaggio originale- Da: David Winsemius [mailto:dwinsem...@comcast.net] Inviato: dom 26/04/2009 6.55 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] constrained optimization http://search.r-project.org/cgi-bin/namazu.cgi?query=%22constrained+optimization%22max=100result=normalsort=scoreidxname=functionsidxname=Rhelp08 And that is only the help messages from the last two years.' On Apr 26, 2009, at 12:00 AM, mau...@alice.it wrote: Is there any R package addressing problems of constrained optimization ? I have the following apparently simple problem: Given a set V with fixed cardinality:nv Given a set S whose cardinality is a parameter:nHat Let the cardinality of the intersection S.and.V be: nHatv The problem consists of maximizing nHatv/nv subject to a penalty if nHat nHatv It is allowed and even desirable to make set S contain set V Thank you so much tutti i telefonini TIM! [[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. David Winsemius, MD Heritage Laboratories West Hartford, CT tutti i telefonini TIM! [[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] eager to learn how to use sapply, lapply, ...
After a year my R programming style is still very C like. I am still writing a lot of for loops and finding it difficult to recognize where, in place of loops, I could just do the same with one line of code, using sapply, lapply, or the like. On-line examples for such high level function do not help me. Even if, sooner or later, I am getting my R scripts to do what I expect, I would really like to shake my C programming style off. I am staring at my R script and thinking how can I improve it ? For instance, I have a lot of loops similar to the following one and wonder whether I can replace them with a proper call to a high level R function that does the same: Nstart - Nfour/(2^Lev) + 1 Nfinish - Nstart -1 + Nfour/(2^Lev) LengLev - Nfinish - Nstart + 1 NW - floor(LengLev*N/Nfour) if(NW 0){ for(j in Nstart:(Nstart + NW -1)){ Dw - abs(Y[j]) Rnorm - Rnorm + Dw^2 } } Thank you very much for helping me get better. Maura tutti i telefonini TIM! [[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] constrained optimization
Is there any R package addressing problems of constrained optimization ? I have the following apparently simple problem: Given a set V with fixed cardinality:nv Given a set S whose cardinality is a parameter:nHat Let the cardinality of the intersection S.and.V be: nHatv The problem consists of maximizing nHatv/nv subject to a penalty if nHat nHatv It is allowed and even desirable to make set S contain set V Thank you so much tutti i telefonini TIM! [[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] R: how to split and handle a big R program into multiple files
Is that an R command ? I browswd for the on-line hlp about such a command but could not find it. Thank you. maura -Messaggio originale- Da: baptiste auguie [mailto:ba...@exeter.ac.uk] Inviato: gio 23/04/2009 11.48 A: mau...@alice.it Cc: r-help Help Oggetto: Re: [R] how to split and handle a big R program into multiple files If most of the functions are quite stable (you don't change them too often), you could also consider creating a R package with package.skeleton. baptiste On 23 Apr 2009, at 10:39, jgar...@ija.csic.es wrote: source() and the use of functions ... Javier --- I am working on a program totally written in R which is now getting bigger and bigger so that editling the only file that contains all the functions is becoming more and more unmanageable. I wonder whether it is possible to spread the R code, making up the same program, in a number of smaller files and then call them all, in the right order, through a list of something like the C language include directive. Any other suggestion how to organize, handle, and maintain a big R program is welcome. Thank you in advance, Maura tutti i telefonini TIM! [[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@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. _ Baptiste Auguié School of Physics University of Exeter Stocker Road, Exeter, Devon, EX4 4QL, UK Phone: +44 1392 264187 http://newton.ex.ac.uk/research/emag __ tutti i telefonini TIM! [[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] R: how to split and handle a big R program into multiple files
It looks like I can store each function in a different file and have main file containing the include-like directiives and the main instructions. Something like: source(Program_Global_Constants.R) source(Program_Global_Variables.R) source(Program_Fun1.R) source(Program_Fun2.R) source(Program_Fun3.R) source(Program_Fun4.R) #. # Main .. # Fun1() Fun2() ... Fun4() -Messaggio originale- Da: jgar...@ija.csic.es [mailto:jgar...@ija.csic.es] Inviato: gio 23/04/2009 11.39 A: mau...@alice.it Cc: r-help@r-project.org Oggetto: Re: [R] how to split and handle a big R program into multiple files source() and the use of functions ... Javier --- I am working on a program totally written in R which is now getting bigger and bigger so that editling the only file that contains all the functions is becoming more and more unmanageable. I wonder whether it is possible to spread the R code, making up the same program, in a number of smaller files and then call them all, in the right order, through a list of something like the C language include directive. Any other suggestion how to organize, handle, and maintain a big R program is welcome. Thank you in advance, Maura tutti i telefonini TIM! [[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. tutti i telefonini TIM! [[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 and handle a big R program into multiple files
I am working on a program totally written in R which is now getting bigger and bigger so that editling the only file that contains all the functions is becoming more and more unmanageable. I wonder whether it is possible to spread the R code, making up the same program, in a number of smaller files and then call them all, in the right order, through a list of something like the C language include directive. Any other suggestion how to organize, handle, and maintain a big R program is welcome. Thank you in advance, Maura tutti i telefonini TIM! [[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] R: R: how to split and handle a big R program into multiple files
I read the on-line documentation. What I am still missing is how I run my program after encapsulating it in a package. I will have to load the package ... just guessing Thank you maura -Messaggio originale- Da: baptiste auguie [mailto:ba...@exeter.ac.uk] Inviato: gio 23/04/2009 12.17 A: mau...@alice.it Cc: r-help Help Oggetto: Re: R: [R] how to split and handle a big R program into multiple files It is an R command (package utils), see ?package.skeleton baptiste On 23 Apr 2009, at 10:51, mau...@alice.it wrote: Is that an R command ? I browswd for the on-line hlp about such a command but could not find it. Thank you. maura -Messaggio originale- Da: baptiste auguie [mailto:ba...@exeter.ac.uk] Inviato: gio 23/04/2009 11.48 A: mau...@alice.it Cc: r-help Help Oggetto: Re: [R] how to split and handle a big R program into multiple files If most of the functions are quite stable (you don't change them too often), you could also consider creating a R package with package.skeleton. baptiste On 23 Apr 2009, at 10:39, jgar...@ija.csic.es wrote: source() and the use of functions ... Javier --- I am working on a program totally written in R which is now getting bigger and bigger so that editling the only file that contains all the functions is becoming more and more unmanageable. I wonder whether it is possible to spread the R code, making up the same program, in a number of smaller files and then call them all, in the right order, through a list of something like the C language include directive. Any other suggestion how to organize, handle, and maintain a big R program is welcome. Thank you in advance, Maura tutti i telefonini TIM! [[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@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. _ Baptiste Auguié School of Physics University of Exeter Stocker Road, Exeter, Devon, EX4 4QL, UK Phone: +44 1392 264187 http://newton.ex.ac.uk/research/emag __ Alice Messenger ;-) chatti anche con gli amici di Windows Live Messenger e tutti i telefonini TIM! er _ Baptiste Auguié School of Physics University of Exeter Stocker Road, Exeter, Devon, EX4 4QL, UK Phone: +44 1392 264187 http://newton.ex.ac.uk/research/emag __ tutti i telefonini TIM! [[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] R: R: R: how to split and handle a big R program into multiple files
Submitting to CRAN is one of my goals. What we are implementing is not done yet either in R or MatLab. There exists some Fortran applications of the algorithms we are implementing for general use. it'll still take me some time before I get there. Maura -Messaggio originale- Da: Duncan Murdoch [mailto:murd...@stats.uwo.ca] Inviato: gio 23/04/2009 14.21 A: mau...@alice.it Cc: baptiste auguie; r-help Help Oggetto: Re: [R] R: R: how to split and handle a big R program into multiple files On 4/23/2009 7:15 AM, mau...@alice.it wrote: I read the on-line documentation. What I am still missing is how I run my program after encapsulating it in a package. I will have to load the package ... just guessing If I had a large program that I needed to run just once, e.g. an analysis or simulations for a paper, here's how I would organize it: - Identify all the general purpose functions and put them in a package. - The one-off parts of the code don't really belong as functions in a package, though there's nothing to stop you from doing that. I'd probably put them into a vignette, or just write the whole paper in Sweave, which is almost the same thing. If your general purpose functions do something new that would be useful to others, you might want to polish up the package and send it to CRAN (and perhaps submit it with a supporting paper to JSS). But that's not necessary: a package is a good way to organize code for your own use too. Duncan Murdoch Thank you maura -Messaggio originale- Da: baptiste auguie [mailto:ba...@exeter.ac.uk] Inviato: gio 23/04/2009 12.17 A: mau...@alice.it Cc: r-help Help Oggetto: Re: R: [R] how to split and handle a big R program into multiple files It is an R command (package utils), see ?package.skeleton baptiste On 23 Apr 2009, at 10:51, mau...@alice.it wrote: Is that an R command ? I browswd for the on-line hlp about such a command but could not find it. Thank you. maura -Messaggio originale- Da: baptiste auguie [mailto:ba...@exeter.ac.uk] Inviato: gio 23/04/2009 11.48 A: mau...@alice.it Cc: r-help Help Oggetto: Re: [R] how to split and handle a big R program into multiple files If most of the functions are quite stable (you don't change them too often), you could also consider creating a R package with package.skeleton. baptiste On 23 Apr 2009, at 10:39, jgar...@ija.csic.es wrote: source() and the use of functions ... Javier --- I am working on a program totally written in R which is now getting bigger and bigger so that editling the only file that contains all the functions is becoming more and more unmanageable. I wonder whether it is possible to spread the R code, making up the same program, in a number of smaller files and then call them all, in the right order, through a list of something like the C language include directive. Any other suggestion how to organize, handle, and maintain a big R program is welcome. Thank you in advance, Maura tutti i telefonini TIM! [[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@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. _ Baptiste Auguié School of Physics University of Exeter Stocker Road, Exeter, Devon, EX4 4QL, UK Phone: +44 1392 264187 http://newton.ex.ac.uk/research/emag __ Alice Messenger ;-) chatti anche con gli amici di Windows Live Messenger e tutti i telefonini TIM! er _ Baptiste Auguié School of Physics University of Exeter Stocker Road, Exeter, Devon, EX4 4QL, UK Phone: +44 1392 264187 http://newton.ex.ac.uk/research/emag __ tutti i telefonini TIM! [[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. tutti i telefonini TIM! [[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
[R] R: Color coded 3D plot
Thank you. This is what I need. Maura -Messaggio originale- Da: Kingsford Jones [mailto:kingsfordjo...@gmail.com] Inviato: mer 22/04/2009 7.30 A: mau...@alice.it Cc: r-h...@stat.math.ethz.ch Oggetto: Re: [R] Color coded 3D plot The attachment didn't come through, but try: example(filled.countour) #or library(lattice) example(levelplot) hth, Kingsford Jones On Tue, Apr 21, 2009 at 9:46 PM, mau...@alice.it wrote: I wonder whether it is possible in R to generate color-coded 3D plots, like the attached example. Basically a function f(x,y) (the 3rd dimension) is rendered through colors intensities. The side color-bar is a guide to the interpretation of the plot. Thank you very much, Maura e tutti i telefonini TIM! Vai su e tutti i telefonini TIM! Vai su __ 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. tutti i telefonini TIM! [[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] Color coded 3D plot
I wonder whether it is possible in R to generate color-coded 3D plots, like the attached example. Basically a function f(x,y) (the 3rd dimension) is rendered through colors intensities. The side color-bar is a guide to the interpretation of the plot. Thank you very much, Maura e tutti i telefonini TIM! Vai su e tutti i telefonini TIM! Vai su __ 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.