Re: [R] Accents and special character using hwriter (on Windows)
Thanks David, but this is not easy to me as these string are already in my data (labels, variable strings). Well, I still can make some script to do it, but it's messy, maybe I want make a Word file (not a html through Word) after this. When a HTML page has a UTF-8 charset it works ok with characters such as í or ñ. It seems that it's a Windows (maybe just Win7) issue. I will try to find out a bit when I come back to work. -- View this message in context: http://r.789695.n4.nabble.com/Accents-and-special-character-using-hwriter-on-Windows-tp4638474p4639739.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Accents and special character using hwriter (on Windows)
Thanks Arun, Yes, I have Windows 7. I have tried 2 versions of R, 2.14.1 and 2.15.x, but it did not change anything. Right now I can't try a different version of win. Ramón On Tuesday, July 31, 2012, arun kirshna [via R] wrote: Hello, I tried your code in R 2.15 with Ubuntu 12.04. It looks okay to me. datosdv-Ciencias Sociales y JurÃdicas n:74 | 33.94% print(datosdv) #[1] Ciencias Sociales y JurÃdicas n:74 | 33.94% library(hwriter) p=openPage('test.html') hwrite(datosdv,p,br=TRUE) #test.html output Ciencias Sociales y JurÃdicas n:74 | 33.94% Probably, it must be specific with the windows. Are you using windows7? A.K. - Original Message - From: ramonovelar [hidden email]http://user/SendEmail.jtp?type=nodenode=4638501i=0 To: [hidden email] http://user/SendEmail.jtp?type=nodenode=4638501i=1 Cc: Sent: Monday, July 30, 2012 7:11 PM Subject: [R] Accents and special character using hwriter (on Windows) Hello, I have a problem with special characters such as à or ñ when using hwriter. This only happens when I use windows, it works fine on mac. If I do: print(datosdv) Ciencias Sociales y JurÃdicas n:74 | 33.94% but: hwrite(datosdv, p, br=TRUE) Ciencias Sociales y Jur�dicas n:74 | 33.94% The bad sign is in the code, is not a problem of the encoding of the html page, that is in UTF-8. Does anybody have found this? Many thanks in advance. Ramón -- View this message in context: http://r.789695.n4.nabble.com/Accents-and-special-character-using-hwriter-on-Windows-tp4638474.html Sent from the R help mailing list archive at Nabble.com. __ [hidden email] http://user/SendEmail.jtp?type=nodenode=4638501i=2mailing 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. __ [hidden email] http://user/SendEmail.jtp?type=nodenode=4638501i=3mailing 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. -- If you reply to this email, your message will be added to the discussion below: http://r.789695.n4.nabble.com/Accents-and-special-character-using-hwriter-on-Windows-tp4638474p4638501.html To unsubscribe from Accents and special character using hwriter (on Windows), click herehttp://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4638474code=cmFtb24ub3ZlbGFyQGdtYWlsLmNvbXw0NjM4NDc0fC0xNzk0Mjk1MDc3 . NAMLhttp://r.789695.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- == Ramón Ovelar -- View this message in context: http://r.789695.n4.nabble.com/Accents-and-special-character-using-hwriter-on-Windows-tp4638474p4638515.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Accents and special character using hwriter (on Windows)
Hello, I have a problem with special characters such as í or ñ when using hwriter. This only happens when I use windows, it works fine on mac. If I do: print(datosdv) Ciencias Sociales y Jurídicas n:74 | 33.94% but: hwrite(datosdv, p, br=TRUE) Ciencias Sociales y Jur�dicas n:74 | 33.94% The bad sign is in the code, is not a problem of the encoding of the html page, that is in UTF-8. Does anybody have found this? Many thanks in advance. Ramón -- View this message in context: http://r.789695.n4.nabble.com/Accents-and-special-character-using-hwriter-on-Windows-tp4638474.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Line chart with a double matrix
Thanks David for the solution, I paste here the code with a few changes: par(xpd = NA, oma = c(5, 0, 0, 0)) matplot(t(buffersump[,1:6]), type=l, xaxt=n, lwd=3, ylab=Porcentajes de respuestas afirmativas) axis(1, 1:6, colnames(buffersump2)) legend(bottomright, legend=rownames(buffersump2), lty=1:5, col=1:5, inset = c(0, -0.7)) -- View this message in context: http://r.789695.n4.nabble.com/Line-chart-with-a-double-matrix-tp4637047p4637177.html Sent from the R help mailing list archive at Nabble.com. __ 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] Line chart with a double matrix
Hello, I have a double matrix that I want to represent in a line chart. Although I have seen some examples I still don't manage to get it. My data is this (a double matrix called mymatrix) : Blogs Wikis Redes Etiq. SPC LMS Menor de 30 57.14 28.57 14.29 28.57 57.14 28.57 de 31 a 40 63.83 61.70 29.79 17.02 59.57 70.21 de 41 a 50 72.64 70.75 47.17 20.75 55.66 75.47 Mayor de 51 62.07 58.62 48.28 17.24 50.00 67.24 As I understand from http://www.statmethods.net/graphs/line.html this example (see bottom of the page), I have to set the plot and then run a loop to draw every line. But: 1) If I do plot(range(mymatrix), type =l) lines(mymatrix[1,],lty=13) The width of the plot is very small, I just get two columns inside. Actually, It would like to put the colnames at the bottom of the plot, as labels and a I would like to calculate the width of the plot to adjust to my six columns. 2) I don't know how to make a loop for each row of the matrix. Something like for (row in mymatrix). Thanks in advance for any help. Ramón -- View this message in context: http://r.789695.n4.nabble.com/Line-chart-with-a-double-matrix-tp4637047.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] trouble loading ggplot2 using R
Hello, I have a similar error, running R in Snow Leopard too library(ggplot2) Error : .onAttach failed in attachNamespace() for 'ggplot2', details: call: stats::runif(1) error: .Random.seed no es un vector de números enteros pero es de tipo 'list' Error: package/namespace load failed for ‘ggplot2’ does anybody have this package running in Snow Leopard? thks in advance. Ramón Ovelar -- View this message in context: http://r.789695.n4.nabble.com/trouble-loading-ggplot2-using-R-tp3332044p4583459.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] trouble loading ggplot2 using R
Hi, thanks for the answer. Here is the output: sessionInfo() R version 2.14.1 (2011-12-22) Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit) locale: [1] C/en_US.UTF-8/C/C/C/C attached base packages: [1] grid stats graphics grDevices utils datasets methods [8] base other attached packages: [1] gplots_2.10.1 KernSmooth_2.23-7 caTools_1.12 bitops_1.0-4.1 [5] gdata_2.8.2 gtools_2.6.2 loaded via a namespace (and not attached): [1] MASS_7.3-16RColorBrewer_1.0-5 colorspace_1.1-1 dichromat_1.2-4 [5] digest_0.5.2 ggplot2_0.9.0 memoise_0.1munsell_0.3 [9] plyr_1.7.1 proto_0.3-9.2 reshape2_1.2.1 scales_0.2.0 [13] stringr_0.6tools_2.14.1 -- View this message in context: http://r.789695.n4.nabble.com/trouble-loading-ggplot2-using-R-tp3332044p4583568.html Sent from the R help mailing list archive at Nabble.com. __ 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] Positioning main title
Hello, I have a barplot where each row has quite long texts and I have used par to make some room in the left: par(mar=c(0, 17, 3, 0), oma=c(0, 0, 0, 0)) barplot2(prueba, main = l, col=colores, horiz=TRUE,las=1, cex.names=.7) My problem is that main text appears justified to the plot. I want to put it in the middle of the image, and find a way to sort it out with mtex par(mar=c(0, 17, 3, 0), oma=c(0, 0, 0, 0)) barplot2(prueba, col=colores, horiz=TRUE,las=1, cex.names=.7) mtext(l,side = 3, at = -70, line = 0.8) But I will have to adjust this at =-70 to his plot, depending on the length of the title. I wonder if I can't find a way to place it in the center. Many thanks, R -- View this message in context: http://r.789695.n4.nabble.com/Positioning-main-title-tp4583663p4583663.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] How insert data to a column in existing csv file?
Hi, You can use write.table with Append = TRUE to keep on writing in the same csv file, but I don't know how to write in an specific cell of your csv file. http://stat.ethz.ch/R-manual/R-devel/library/utils/html/write.table.html write.table (data, file = example.csv, sep = ;, col.names = NA, append = TRUE, dec =,) I think the best thing to do once you have imported your data into R is to create a new csv file and write in it the table you need. Hope it helps, R -- View this message in context: http://r.789695.n4.nabble.com/How-insert-data-to-a-column-in-existing-csv-file-tp4551327p4551441.html Sent from the R help mailing list archive at Nabble.com. __ 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.