[R] X11, fonts, R-2.0.1, R-2.2.1 and R-devel
Hello, I am having some problems with the X11 display in a gentoo linux laptop with R compiled manually. (https://stat.ethz.ch/pipermail/r-help/2006-March/089701.html) Whether I can open the X11 device and use it when I am using 'ion' as a window manager, I can't open it using 'gnome', due to a problem related to fonts: -8--- Error in X11() : could not find any X11 fonts Check that the Font Path is correct. -8--- I have tried and compiled R-2.0.1 and _it works_. With the latest stable version of R it does not work. And with the latest development (22 march 06) it does not work, neither. It is not due to the Xorg installation, because the display is opened when using other window manager different from gnome (and other version of R) It is not something related to the compilation options, for the same reason. So my last option is that it seems to be a problem with R, X11 and gnome, specifically. Any ideas or suggestions? I have googled and somebody in the FreeBSD lists talked about more or less the same problems, but it seems that without success: http://www.archivum.info/[EMAIL PROTECTED]/2005-06/msg00313.html http://www.archivum.info/[EMAIL PROTECTED]/2005-06/msg00307.html I paste the sessions and the errors, if it helps: -8--- R-2.0.1 $ ./bin/R R : Copyright 2004, The R Foundation for Statistical Computing Version 2.0.1 (2004-11-15), ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for a HTML browser interface to help. Type 'q()' to quit R. WARNING: UTF-8 locales are not currently supported X11() q() Save workspace image? [y/n/c]: n -8--- Works. The display is opened. -8--- R-2.2.1 $ ./bin/R R : Copyright 2005, The R Foundation for Statistical Computing Version 2.2.1 (2005-12-20 r36812) ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. X11() Error in X11() : could not find any X11 fonts Check that the Font Path is correct. q() -8--- Doesn't work. -8--- deu R-devel $ ./bin/R R : Copyright 2006, The R Foundation for Statistical Computing Version 2.3.0 Under development (unstable) (2006-03-22 r37566) ISBN 3-900051-07-0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. X11() Error in X11(display, width, height, pointsize, if (is.null(gamma)) 1 else gamma, : invalid 'width' or 'height' x - rnorm(50) y - rnorm(50) plot(x,y) Error in X11(display, width, height, pointsize, if (is.null(gamma)) 1 else gamma, : invalid 'width' or 'height' X11(width=200, height=200) Error in X11(width = 200, height = 200) : could not find any X11 fonts Check that the Font Path is correct. -8--- -- Xavier Fernández i Marín __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Error in X11(): Font Path?
Hello, I have recently upgraded to the new modular Xorg-7.0 in my gentoo laptop with R-2.2.1. Although everything seems to work fine, now in R I am unable to open the X11 device: -8--- Error in X11() : could not find any X11 fonts Check that the Font Path is correct. -8--- It happens any time that I want to plot anything or simply to open the display. -8--- options('X11fonts') $X11fonts [1] -adobe-helvetica-%s-%s-*-*-%d-*-*-*-*-*-*-* [2] -adobe-symbol-medium-r-*-*-%d-*-*-*-*-*-*-* -8--- I have found in some messages to the list that it is usually related to system configuration. But, except for the new Xorg-7.0 installation, anything has changed. Any ideas to follow from now on? Thank you, -8--- version _ platform i686-pc-linux-gnu arch i686 os linux-gnu system i686, linux-gnu status major2 minor2.1 year 2005 month12 day 20 svn rev 36812 language R -8--- -8--- $ locale LANG=ca_ES.UTF-8 LC_CTYPE=ca_ES.UTF-8 LC_NUMERIC=ca_ES.UTF-8 LC_TIME=ca_ES.UTF-8 LC_COLLATE=ca_ES.UTF-8 LC_MONETARY=ca_ES.UTF-8 LC_MESSAGES=ca_ES.UTF-8 LC_PAPER=ca_ES.UTF-8 LC_NAME=ca_ES.UTF-8 LC_ADDRESS=ca_ES.UTF-8 LC_TELEPHONE=ca_ES.UTF-8 LC_MEASUREMENT=ca_ES.UTF-8 LC_IDENTIFICATION=ca_ES.UTF-8 LC_ALL=ca_ES.UTF-8 -8--- -- Xavier Fernández i Marín __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] make.names() does not return what is expected
Hello, I don't know if it's only me, but I can't get make.names() transform '_' in the way it is expected when I add the allow_ option. A simple example trying to replicate the example provided in the help page gives: -8--- make.names(c(a and b, a_and_b), unique=TRUE, allow_=FALSE) [1] a and b. a_and_b -8--- When the example says it should be: -8--- make.names(c(a and b, a_and_b), unique=TRUE, allow_=FALSE) # a.and.b a.and.b.1 -8--- I'm using R-2.1.1 compiled by myself on a gentoo GNU/Linux laptop. Anybody with the same problems? Thank you, -- Xavier Fernández i Marín [EMAIL PROTECTED] __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
[R] Accents in R
Hi, How can I include accents and signs like 'ñ' 'à' in the plots generated by R? I try, but R automatically transforms the name ex: countries - c(México, España) countries [1] M\216éxico Espa\216ña I've seen in some Spanish texts about R how is it normal to include labels of the plots and other names with accents, but I can't. I'm using R 1.8.0 in a Mandrake 9.0 Thanks, Xavier __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Generating automatic plots
Hello, I have been trying to write a small program to generate automatic plots. What I want is to draw boxplots for some variables in my data frame, contrasting with a variable called 'missing' that has value 1 if some variable in a concrete case has at least one missing value, in order to check if the cases that don't enter in my analysis are biased. The first attempt was to start generating a list with the variables of contrast and then apply the list to the plots: varlist - c(var1, var2, var3, var4, ...) for (i in 1:length(varlist)) { + jpeg(varlist[i].jpg, width=480, heigth=480) + boxplot (varlist[i] ~ missing, xlab=missing values, ylab=varlist[i]) + } But I got 'Error in model.frame(formula, rownames, variables, varnames, extranames: invalid variable type' I suppose that is because I forget something related to the extraction of values in vectors, but I can't find it on the R manual neither in other books about R that I have checked. Is there a way to draw plots using commands like the one above? Thanks, Xavier __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] Generation of labels for 2 factors
Hello, I have a data set with 10 countries, 10 sectors of public policy and 15 years like country sector year a aa 1980 a aa 1981 ... a bb 1980 a bb 1981 ... b aa 1980 b aa 1981 ... b bb 1980 b bb 1981 with 1500 observations. My cases are the couple country/sector. So, I want to have 100 cases over 15 years. (both country and sector are factors) I want to assign to each case a label (e.i. country 'a' + sector 'aa' have value '1', country 'a' + sector 'b' have value 2...) and I have been trying differents ways, but I can't. Is there a function to do it directly or I have to write a function? Thank you, Xavier __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help
[R] R and RMySQL - segmentation fault
Hello, I want to import data from a database in Mysql to a R data frame. MySQL is running ok on my computer. I can start library RMySQL, and connect to the database, but when I try to make an statement, R says segmentation fault and stops: rs - dbExecStatement (con, select * from labels) Segmentation fault [EMAIL PROTECTED] I'm running R 1.7.1 on a Linux Mandrake 9.0. Thank you, Xavier Fernández i Marín Universitat Pompeu Fabra - Barcelona __ [EMAIL PROTECTED] mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help