Re: [R] Some problems with X11
Yuelin Li and Joerg van den Hoff, Thank you very much for your emails. Apparently, I found that xorg.conf has all the directories related to fonts specified as /usr/share/X11/fonts/. However, the files are located in /usr/share/fonts/X11/. I manually changed the paths for each line and tried R again. It is now working! Thanks a lot R Yuelin Li wrote: > Since you are running Ubuntu Edgy, you might want look at the "Files" > section in your /etc/X11/xorg.conf file. Perhaps R is looking for > fonts not available to the X windows system. You can compare the > "Files" sections between your laptop and desktop. My font path > settings are attached. > > Section "Files" > FontPath"/usr/share/fonts/X11/100dpi/:unscaled" > FontPath"/usr/share/fonts/X11/75dpi/:unscaled" > FontPath"/usr/share/fonts/X11/Type1" > FontPath"/usr/share/fonts/X11/100dpi" > FontPath"/usr/share/fonts/X11/75dpi" > FontPath"/usr/share/fonts/X11/TTF" > FontPath"/usr/share/fonts/X11/OTF" > FontPath"/usr/share/fonts/X11/CID" > FontPath"/usr/share/fonts/X11/misc" > # path to defoma fonts > FontPath > "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType" > EndSection > > > -- Joerg van den Hoff wrote --|Thu (Mar/08/2007)[10:18]|--: > >in `R', getOpton("X11fonts") tells you which font family `X11()' is using > by >default (but you can alter this in the `X11' call if need be) and the size > 8 >subtype seems to be missing. > >you may compare the above with the output from `xlsfonts' in the unix > shell, >or use `xfontsel' to browse interactively through the installed fonts >to verify whether `R's complaining is justified. > >probable solution: use some existing sufficiently complete (different > sizes) >font-family in the `X11()' call or copy over the default fonts from the > labtop >where it works. > >hth, >joerg > > > = > > Please note that this e-mail and any files transmitted with it may be > privileged, confidential, and protected from disclosure under > applicable law. If the reader of this message is not the intended > recipient, or an employee or agent responsible for delivering this > message to the intended recipient, you are hereby notified that any > reading, dissemination, distribution, copying, or other use of this > communication or any of its attachments is strictly prohibited. If > you have received this communication in error, please notify the > sender immediately by replying to this message and deleting this > message, any attachments, and all copies and backups from your > computer. > > __ 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 and provide commented, minimal, self-contained, reproducible code.
[R] Some problems with X11
Hi, I am really new with R, so I don't know anything about it. I have written a script (attached) which tries to do really basic stuff (such as computing basic statistics and basic plots). When I try to plot a histogram and pairs, for example, I get the following message: > source("project.R") Loading required package: sp - Analysis of geostatistical data For an Introduction to geoR go to http://www.est.ufpr.br/geoR geoR version 1.6-13 (built on 2006/12/26) is now loaded - Error in title(main = main, sub = sub, xlab = xlab, ylab = ylab, ...) : X11 font at size 8 could not be loaded > I have seen some threads about this problem, though none of them really states what should be done in order to solve that problem (At least it was not clear for me!). This is the R version I have: > version _ platform i486-pc-linux-gnu arch i486 os linux-gnu system i486, linux-gnu status major 2 minor 4.1 year 2006 month 12 day18 svn rev40228 language R version.string R version 2.4.1 (2006-12-18) I am also running R on a Ubuntu Linux Edgy distro. The interesting thing is that I have this problem on my desktop only. I also have Ubuntu Edgy installed on my laptop and it is working just fine! Thank you R # # # MATH574 - Geostatistics # # Prof. Dr. Donald Myers # # # # Term-project: Anaylizing climatological data from Sao Paulo State, # # Brazil: # #- Annual precipitation (mm); and # #- Annual mean temperature (oC). # # # # * elevation data is also provided# # # # Author: Rafael Rosolem ([EMAIL PROTECTED]) # # Department: Hydrology and Water Resources# # The University of Arizona# # # # Date: 02.14.2007 # # Last update: 02.19.2007 # # # # Opening libraries library(geoR) # geoR package library(gstat) # gstat package library(scatterplot3d) # scatterplot3d package # Setting the path and file name path <- "/home/rafael/math574/term-project/" input <- "dataset_rafael.dat" # Opening data file data <- read.table(paste(path,input,sep=""),header = TRUE) # Converting data object to geodata class data_geoR <- as.geodata(data,coords.col = c(1,2),data.col = c(3,4,5)) # Basics statistics data_summary <- summary(data_geoR) # Data summary data_stdev <- sd(data_geoR$data) # Standard deviation data_cor <- cor(data_geoR$data) # Data correlation # Histograms X11(display = "",width = 9,height = 4,pointsize = 12,bg = "transparent") #png(file=paste(path,"data_hist.png",sep=""),height=576,width=576, #res=600,bg="transparent") par(mfrow = c(1,3)) # 1x3 graph temp_hist <- hist(data_geoR$data[,"temp"],breaks = c(17:26), col = "red",border = "black", main = NULL, xlim = c(min(data_geoR$data[,"temp"])-1, max(data_geoR$data[,"temp"])+1),ylim = NULL, xlab = "Temperature (oC)",ylab = "Freq") # Temperature prec_hist <- hist(data_geoR$data[,"prec"],breaks = c(250*0:14), col = "dar