similar to: Converting from char to POSIX:

Displaying 20 results from an estimated 1200 matches similar to: "Converting from char to POSIX:"

2008 Sep 12
2
Greyed text in the background of a plot
Hi! Is there any way of having a greyed ("ghosted") text (i.e, 2006) in the background of a plot? I'm making a dynamic plot and would like to show the year of each time step as a big greyed text in the background. (the idea comes from Hans Rosling video: http://video.google.com/videoplay?docid=4237353244338529080&sourceid=searchfeed ) Thanks Agus -- Dr. Agustin Lobo Institut
2008 Jun 27
4
Recoding
Hi! Given a vector (or a factor within a df),i.e. v1 <- c(1,1,1,2,3,4,1,10,3) and a dictionary cbind(c(1,2,3),c(1001,1002,1003)) is there a function (on the same line than recode() in car) to get v2 as c(1001,1001,1001,1002,1003,4,1001,10,1003) ? I'm using myself a function based on match() since long ago (I think that thanks to advice by Prof. B. Ripley), but would like to know if there
2008 May 19
2
Log or diary file
Hi! Is it possible to set a file to which both commands and output would get automatically saved? I've tried with sink(), but only get the output. I mean something like a combined history and sink, as you get with File/Save to File.. in the windows GUI. Tis is done with diary filename in Matlab, and you can state diary on and diary off to control what is being saved to the file. Thanks Agus
2007 Jul 24
1
Renamig a factor
Which is the proper way to rename a factor? If I do: test$Parc[test$Parc=="Ol?rdola"]<-"Ol?rdola" R complains that Warning message: invalid factor level, NAs generated in: `[<-.factor`(`*tmp*`, test$Parc == "Ol?rdola", value = "Ol?rdola") Thanks Agus -- Dr. Agustin Lobo Institut de Ciencies de la Terra "Jaume Almera" (CSIC) LLuis Sole
2008 Apr 18
1
space between plots
I've set layout(matrix(c(1,3,2,4),ncol=2)) and par(mar=c(0, 4, 4, 0) + 0.0) and par(mar=c(0, 0, 4, 3) + 0.0) for the upper-left and upper-right plots, but still get an space between both plots, is there any way to completely eliminate that space? Thanks Agus -- Dr. Agustin Lobo Institut de Ciencies de la Terra "Jaume Almera" (CSIC) LLuis Sole Sabaris s/n 08028 Barcelona Spain
2009 Jul 03
4
Function to eliminate blank space within strings?
Is there an specific function to eliminate blank space within strings? Thanks -- Dr. Agustin Lobo Institut de Ciencies de la Terra "Jaume Almera" (CSIC) LLuis Sole Sabaris s/n 08028 Barcelona Spain Tel. 34 934095410 Fax. 34 934110012 email: Agustin.Lobo at ija.csic.es http://www.ija.csic.es/gt/obster
2009 Sep 02
1
Problem at subsetting matrix by using dimnames
Given: > mitest <- matrix(1:16,ncol=4) > dimnames(mitest)[[1]] <- c("a","b","c","d") > dimnames(mitest)[[2]] <- c("a","b","c","d") > mitest a b c d a 1 5 9 13 b 2 6 10 14 c 3 7 11 15 d 4 8 12 16 I can do: > mitest[cbind(c(1,2,3),c(2,3,2))] [1] 5 10 7 but using the names does not
2008 May 21
2
Proportional axes
Hi! If I'm plotting 2 variables with the same units (i.e. wing length of 2 species), how can I force that X and Y axes have the same size for length unit? For example, if X ranges from 0 to 10 and Y ranges from 10 to 30, I want Y axis to be twice as long as X axis. I know I can just put xlim and ylim from 0 to 30, i.e., plot(runif(10,0,10),runif(10,10,30),xlim=c(0,30),ylim=c(0,30)) but this
2009 Mar 21
0
Solved: [Fwd: Matching failure in merge()]
I've found where the problem was and a way to solve this problem: One dataset was encoded (and read) as UTF-8 and the other one was encoded (en read) as latin3 In this case, even if at the terminal you see the same characters, R states that the two elements are not equal. Don't know if this is the way it has to be, or this is a bug. Anyway, editing the second file (encoded as latin3)
2007 Oct 26
2
cut.dendrogram and cutree
Hi! In the example: hc <- hclust(dist(USArrests), "ave") dend1 <- as.dendrogram(hc) dend2 <- cut(dend1, h=70) Do the branches "Branch 1", "Branch 2", "Branch 2"...in dend2$upper str(dend2$upper) --[dendrogram w/ 2 branches and 4 members at h = 152] |--[dendrogram w/ 2 branches and 2 members at h = 77.6] | |--leaf "Branch 1" (h=
2008 Jun 24
2
subscripting in data frames with NA
Dear list: Given > str(b3) 'data.frame': 159 obs. of 6 variables: $ index_pollution : num 8.228 10.513 0.549 0.915 10.416 ... $ position_descrip: chr "2" "2" "2" NA ... $ position_geo : chr "3" "0" "3" "3" ... $ institution : Factor w/ 3 levels "digesa","mem",..: 3 3 3 3 3 3
2009 May 12
2
ubuntu problem with 'r-cran-robustbase' [FWD Agustin Lobo]
Agustin, posted on R-help. I think the problem is one of the debian/ubuntu package 'r-cran-robustbase' and its setup or (missing?) dependencies. I can confirm Agustin's problem, working on Ubuntu 8.04.2 (8.04 is a "LTS" = long time support version). apt-get install r-cran-robustbase works fine, but when trying to load the package, there's a DLL - dependency on
2009 Mar 08
2
prcomp(X,center=F) ??
I do not understand, from a PCA point of view, the option center=F of prcomp() According to the help page, the calculation in prcomp() "is done by a singular value decomposition of the (centered and possibly scaled) data matrix, not by using eigen on the covariance matrix" (as it's done by princomp()) . "This is generally the preferred method for numerical accuracy"
2006 Mar 12
1
beep media player
Hi, I was using xmms for a whie but it is inconvenience so i want to switch to beep media player. However, i can not find this media player in centos and dag repo. Dag has bmp-mp3.i386 but not the program. Anybody know where to get this for centos? Building from source requires gtk+ 2.8 but the current version available on centos is 1.2!!! Hope anone can help Thai
2008 Dec 04
0
reading files (readOGR) and non-ascii characters
I'm forwarding to this list as I've got no answer in [R-sig-Geo] and perhaps this issue is not exclusive of readOGR() I'm using ubuntu 8.04 andR version 2.8.0 (2008-10-20) -------- Original Message -------- Subject: readOGR and non-ascii characters Date: Wed, 03 Dec 2008 14:22:34 +0100 From: Agustin Lobo <aloboaleu at gmail.com> Reply-To: Agustin.Lobo at ija.csic.es To:
2008 Apr 16
1
SVG format from any R graphic GUI?
I have problems with emf files because OpenOffice does a poor job at importing figures in this format. On the other hand, imported eps figures are not displayed, just printed. Is there any R graphic gui able to export as SVG (or other vector format)? I've tried JGR, iplots and svGUI. Thanks! Agus -- Dr. Agustin Lobo Institut de Ciencies de la Terra "Jaume Almera" (CSIC) LLuis
2009 Mar 19
0
Matching failure in merge()
Hi! I've done a merging between 2 dataframes using merge(): delme <- merge(miDUNS50peqB,Bnomscodmunicipis,by.x="POBLACION",by.y="NOMMUNI",all.x=T,sort=F) After realizing some problems in the resulting dataset, I've found that the problem was that, in some cases, there was no match between the by.x and the by.y elements, despite the fact that, apparently, such
2008 Sep 05
1
Connecting a gps to download data
I've installed through wine the program for a gps data logger QSTARZ. The program works fine with wine, but cannot dowmnload the data from the gps because I only have a windows driver for it. Any way to get the windows driver installed in linux so that I could download the data? Thanks Agus -- Dr. Agustin Lobo Institut de Ciencies de la Terra "Jaume Almera" (CSIC) LLuis Sole
2009 May 12
0
[Fwd: Re: Problem at instaling robustbase (Rlapack) (2)]
Martin, Although I did remove the ln libRlapack.so -> ./lapack.so and sudo apt-get install r-cran-robustbase went fine (as does if the installation is done through Synaptic), once I start R I get: > require(robustbase) Loading required package: robustbase Error in dyn.load(file, DLLpath = DLLpath, ...) : unable to load shared library
2008 Apr 01
1
Subset: data frames and factor levels
Hi! I'm doing: etni <- subset(etni, NAMECOM!="Maniquisito") where etni is a data.frame, NAMECOM a factor and "Maniquisito" labels a row that I want to delete. The problem is that while the row is deleted, the factor level is still there (I can see "Maniquisito" if I do levels(etni$NAMECOM) ). I know I can get the appropriate levels by: