Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Frede Aakmann Tøgersen
Well now, I think I have seen something similar to Alpesh. Recently I needed the climatol package that I have used some time ago. It is not maintained anymore but I downloaded the latest version, climatol_2.2.tar.gz, from archives

[R] reading understanding SVG?

2014-04-21 Thread Spencer Graves
Hello: What would you suggest I use to read and manipulate an SVG file? I'd like to extract components of an svg file. I see it's XML, but I have very little experience with either SVG or XML. I've tried GIMP and findFn{sos} without finding a clear suggestion of where to

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Jeff Newmiller
Frede... Windows uses zip files (binary, aka pre-compiled format) for packages by default, because most installations don't have the development tools installed. You need to setup RTools and use the source option to install_package in order to handle the tar.gz package file, or download and

[R] for loop to list files

2014-04-21 Thread Beatriz R. Gonzalez Dominguez
Dear all, I'm trying to create a loop to select a series of files into my computer but I haven't been successful until now. I've looked into different possibilities but none has worked. I'd appretiate if you could help me by providing me with some ideas. Basically what I'd like to do is to

Re: [R] for loop to list files

2014-04-21 Thread Jorge I Velez
Hi Beatriz, Try paste(val_mapped_petpe_, 1976:1981, 01.txt, sep=) Best, Jorge.- On Mon, Apr 21, 2014 at 6:43 PM, Beatriz R. Gonzalez Dominguez aguitatie...@hotmail.com wrote: Dear all, I'm trying to create a loop to select a series of files into my computer but I haven't been successful

Re: [R] for loop to list files

2014-04-21 Thread Beatriz R. Gonzalez Dominguez
Hi Jorge, Thanks so much! Exactly what I wanted. Finally I wrote: for(i in 1976:1981){ PE.files_01_7681 - paste(val_mapped_petpe_, 1976:i, 01.txt, sep=) } Cheers, Bea On 21/04/2014 10:46, Jorge I Velez wrote: Hi Beatriz, Try paste(val_mapped_petpe_, 1976:1981, 01.txt, sep=) Best,

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Frede Aakmann Tøgersen
Hi Couldn't find a zip file in the archives. Why didn't 'R CMD build' (in a command shell on Windows) not make a zip file? I did try to build from the climatol library that holds the typical files as DESCRIPTION, LICENSE, etc. as well as folders like R, etc. Did you see the debug information

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Michael Dewey
At 08:43 21/04/2014, Jeff Newmiller wrote: Frede... Windows uses zip files (binary, aka pre-compiled format) for packages by default, because most installations don't have the development tools installed. You need to setup RTools and use the source option to install_package in order to

Re: [R] reading understanding SVG?

2014-04-21 Thread Peter Crowther
Spencer, what components do you want to extract? Do the SVG files have a reasonably well-defined structure? I've done a fair amount with SVG and may be able to help. - Peter On 21 April 2014 08:30, Spencer Graves spencer.gra...@structuremonitoring.com wrote: Hello: What would you

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Milan Bouchet-Valat
Le lundi 21 avril 2014 à 11:38 +0200, Frede Aakmann Tøgersen a écrit : Hi Couldn't find a zip file in the archives. Why didn't 'R CMD build' (in a command shell on Windows) not make a zip file? I did try to build from the climatol library that holds the typical files as DESCRIPTION,

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Milan Bouchet-Valat
Le lundi 21 avril 2014 à 11:38 +0200, Frede Aakmann Tøgersen a écrit : Hi Couldn't find a zip file in the archives. Why didn't 'R CMD build' (in a command shell on Windows) not make a zip file? I did try to build from the climatol library that holds the typical files as DESCRIPTION,

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Duncan Murdoch
On 21/04/2014, 7:10 AM, Milan Bouchet-Valat wrote: Le lundi 21 avril 2014 à 11:38 +0200, Frede Aakmann Tøgersen a écrit : Hi Couldn't find a zip file in the archives. Why didn't 'R CMD build' (in a command shell on Windows) not make a zip file? I did try to build from the climatol library

Re: [R] Read.table mucks up headers

2014-04-21 Thread starter
Hello Uwe I tried both the options you mentioned but all i get as output then is the header line and the headers as row.names and X. -- View this message in context: http://r.789695.n4.nabble.com/Read-table-mucks-up-headers-tp4688742p4689185.html Sent from the R help mailing list archive at

[R] Loop to extract from variables in the workspace

2014-04-21 Thread Beatriz R. Gonzalez Dominguez
Dear all, I'm starting to work with loops and I'm stucked on something. I've been searching and trying different possibilities but I don't get to the solution. I'd be very grateful if you could share any ideas that you think may help. library(raster) # All my variables are in the workspace

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Frede Aakmann Tøgersen
Sorry guys I didn't do my homework, sorry for cluttering the list. I did know about the source argument. This worked like a charm: install.packages(choose.files(), type=source, repos=NULL) * installing *source* package 'climatol' ... ** R ** data ** inst ** preparing package for lazy loading

Re: [R] Loop to extract from variables in the workspace

2014-04-21 Thread Frede Aakmann Tøgersen
Hi Beatriz Did you read the help for extract{raster} carefully? Several things can be wrong. 1) First argument to extract is not a file name but a raster object. 2) In the loop you name an object extract as an intermediate name to hold the result from the extract function. Do you think there

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Milan Bouchet-Valat
Le lundi 21 avril 2014 à 07:21 -0400, Duncan Murdoch a écrit : On 21/04/2014, 7:10 AM, Milan Bouchet-Valat wrote: Le lundi 21 avril 2014 à 11:38 +0200, Frede Aakmann Tøgersen a écrit : Hi Couldn't find a zip file in the archives. Why didn't 'R CMD build' (in a command shell on

Re: [R] Loops (run the same function per different columns)

2014-04-21 Thread arun
Hi, Using the example data from library(gvlma) library(gvlma) data(CarMileageData) CarMileageNew - CarMileageData[,c(5,6,3)]  lst1 - list()  y - c(NumGallons, NumDaysBetw)  for(i in seq_along(y)){  lst1[[i]] - gvlma(lm(get(y[i])~MilesLastFill,data=CarMileageNew))  lst1} pdf(gvlmaplot.pdf)  

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Duncan Murdoch
On 21/04/2014 9:19 AM, Milan Bouchet-Valat wrote: Le lundi 21 avril 2014 à 07:21 -0400, Duncan Murdoch a écrit : On 21/04/2014, 7:10 AM, Milan Bouchet-Valat wrote: Le lundi 21 avril 2014 à 11:38 +0200, Frede Aakmann Tøgersen a écrit : Hi Couldn't find a zip file in the archives. Why

Re: [R] Loop to extract from variables in the workspace

2014-04-21 Thread Beatriz R. Gonzalez Dominguez
Hi Frede, Many thanks for your reply. 1. The first argument in extract is a Formal class RasterLayer in the Workspace (e.g RR_1981_1 ). 2. I created an intermediate name to hold the result fromthe extract function because I'd like to create several dataframes with the output of the

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Duncan Murdoch
On 21/04/2014 10:30 AM, Alpesh Pandya wrote: Frede's suggestion was very helpful to me and I could resolve the issue finally. I created new archive manually using source code for XML package (only R code) and winzip utility. Then ran this command for installation and that worked fine.

Re: [R] reading understanding SVG?

2014-04-21 Thread Spencer Graves
Hi, Peter: On 4/21/2014 3:34 AM, Peter Crowther wrote: Spencer, what components do you want to extract? Do the SVG files have a reasonably well-defined structure? I've done a fair amount with SVG and may be able to help. Thanks. I should have been more specific: I'd like to try

Re: [R] reading understanding SVG?

2014-04-21 Thread Spencer Graves
p.s. I don't need to use R for this, though I'd prefer to stay with something that's free, open-source software. I tried GIMP, but couldn't see how to access the layers. Hi, Peter: On 4/21/2014 3:34 AM, Peter Crowther wrote: Spencer, what components do you want to extract? Do the SVG

[R] constructing a sequence of POSIXct dates

2014-04-21 Thread Erin Hodgess
Hello! I have the following: time1a - as.POSIXct(paste(2008,08,01,sep=-)) time1b - as.POSIXct(paste(2008,08,11,sep=-)) time1a [1] 2008-08-01 CDT time1b [1] 2008-08-11 CDT time1c - seq(from=as.POSIXct(time1a),to=as.POSIXct(time1b),by=days) class(time1c) [1] POSIXct POSIXt print(time1c)

Re: [R] constructing a sequence of POSIXct dates

2014-04-21 Thread Erin Hodgess
Never mindsolved it On Mon, Apr 21, 2014 at 9:48 AM, Erin Hodgess erinm.hodg...@gmail.comwrote: Hello! I have the following: time1a - as.POSIXct(paste(2008,08,01,sep=-)) time1b - as.POSIXct(paste(2008,08,11,sep=-)) time1a [1] 2008-08-01 CDT time1b [1] 2008-08-11 CDT time1c -

Re: [R] constructing a sequence of POSIXct dates

2014-04-21 Thread Michael Weylandt
On Apr 21, 2014, at 10:55, Erin Hodgess erinm.hodg...@gmail.com wrote: Never mindsolved it xkcd.com/979/ On Mon, Apr 21, 2014 at 9:48 AM, Erin Hodgess erinm.hodg...@gmail.comwrote: Hello! I have the following: time1a - as.POSIXct(paste(2008,08,01,sep=-)) time1b -

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Alpesh Pandya
Frede's suggestion was very helpful to me and I could resolve the issue finally. I created new archive manually using source code for XML package (only R code) and winzip utility. Then ran this command for installation and that worked fine.

Re: [R] reading understanding SVG?

2014-04-21 Thread Boris Steipe
Indeed you don't need R. This is accomplished in two minutes with the excellent, free, and open software inkscape. But before I type more and since I have it open anyway, I'll just send you the three images off-list. B. On 2014-04-21, at 10:43 AM, Spencer Graves wrote: p.s. I don't need

Re: [R] reading understanding SVG?

2014-04-21 Thread Spencer Graves
Awesome. Are there things one might like to do in R reading them directly as svg that aren't so easy after converting to another format like png? Thanks again, Spencer p.s. To confirm, I received the three files you sent offline, converted then to png using GIMP

Re: [R] reading understanding SVG?

2014-04-21 Thread Boris Steipe
Google for png vs. svg. png is a raster graphics format, svg is a vector graphics format. Which one is the right one to used depends totally on the purpose. B. On 2014-04-21, at 11:49 AM, Spencer Graves wrote: Awesome. Are there things one might like to do in R reading them

Re: [R] reading understanding SVG?

2014-04-21 Thread David Carlson
I was able to grab the logos by bringing the .svg file into Inkscape (open source .svg editor). The three logos are grouped so you can select them and then paste them into another document. Then you'll have to ungroup the three logos and select each logo separately.

Re: [R] for loop to list files

2014-04-21 Thread Jeff Newmiller
You seem overly intent on getting a for loop into your code. Jorge's solution has the same effect as your for loop. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.us

[R] find maximum values on the density function of a bimodal distribution

2014-04-21 Thread Luigi Marongiu
*dear all,I have a bimodal distribution and i would like to identify the two most frequent values. Using unimodal values i found from the R archive that is possible to identify the most frequent value, which corresponds to the peak of the density function:from Bert Gunter, Fri Mar 13 04rv -

[R] Hi , Is it possible select a different number of rows by each group with R????

2014-04-21 Thread Marta Tobeña
Hi , Is it possible select a different number of rows by each group with R I must to select different number (specific quantity in field2:Table1) of rows in each group(field1:Table2). I have these 2

Re: [R] R 3.0.3, Windows 7: Problem installing XML package

2014-04-21 Thread Alpesh Pandya
@Duncan I understand. But it seems to be working. At least I could use basic functions like htmlParse. On Mon, Apr 21, 2014 at 10:37 AM, Duncan Murdoch murdoch.dun...@gmail.comwrote: On 21/04/2014 10:30 AM, Alpesh Pandya wrote: Frede's suggestion was very helpful to me and I could resolve

Re: [R] find maximum values on the density function of a bimodal distribution

2014-04-21 Thread David Carlson
This will work, as long as there are exactly 2 distinct modes: runs - rle(sign(diff(d.rv$y))) length(runs$lengths) # There should be 4 runs if there are exactly 2 modes [1] 4 mode1 - runs$lengths[1]+1 mode2 - length(d.rv$x)- runs$lengths[4] d.rv$y[c(mode1, mode2)] # The 2 modes: [1]

[R] List of Dataframes

2014-04-21 Thread Timothy W. Cook
I am processing an arbitrary number of XML files and extracting specific nodes. I then create a dataframe for each nodeset. I return a list containing these dataframes. Example: str(result)List of 2 $ :'data.frame': 1 obs. of 5 variables: ..$ data-name : chr Etiologic diagnosis

Re: [R] Hi , Is it possible select a different number of rows by each group with R????

2014-04-21 Thread David Carlson
Look below at your question. R-help does not support html email so you must use plain text if you want to get an answer. - David L Carlson -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Marta

Re: [R] List of Dataframes

2014-04-21 Thread Timothy W. Cook
Okay, all day on this and I send the msg. and almost immediately discover that: dat - ldply(result) solves the problem. On Mon, Apr 21, 2014 at 5:40 PM, Timothy W. Cook t...@mlhim.org wrote: I am processing an arbitrary number of XML files and extracting specific nodes. I then create a

[R] How to draw a histogram for some intervals in R

2014-04-21 Thread VG
Hello Everyone, I have a text file which has data in this format. genestartendfreq Slc19a1811441 Slc19a11922556 Slc19a12733367 Slc19a13634264 Slc19a14655283 Slc19a15406035 Slc19a18138765 Slc19a1912

Re: [R] find maximum values on the density function of a bimodal distribution

2014-04-21 Thread Bert Gunter
Well, yes and no, David. Yours is one possible interpretation -- just work verbatim with the finite sample and, as you say, hope it's well behaved. But if the data are a noisy *sample* from a bimodal distribution and the purpose is to estimate the *population* modes, then, of course, it's a

[R] Spline regression (or any localized regression) in the setting of a random effects model.

2014-04-21 Thread John Sorkin
Colleagues, Is there any R program that will allow me to run a localized regression (e.g. smoothing spline) in the context of a random effects model? I have data on the growth of animals and want to create growth curves. I am not certain what shape the growth curve would take, so I would like

Re: [R] Spline regression (or any localized regression) in the setting of a random effects model.

2014-04-21 Thread Bert Gunter
See gam() and gamm() in the mgcv package. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. H. Gilbert Welch On Mon, Apr 21, 2014 at 3:25 PM, John Sorkin

Re: [R] Loops (run the same function per different columns)

2014-04-21 Thread CRoa
Thank you Arun for your quick answer. Ill try it and ill let you know. Cheers On 21/04/2014, at 11:30 PM, arun kirshna [via R] ml-node+s789695n4689190...@n4.nabble.com wrote: Hi, Using the example data from library(gvlma) library(gvlma) data(CarMileageData) CarMileageNew -

Re: [R] Spline regression (or any localized regression) in the setting of a random effects model.

2014-04-21 Thread Kenneth Frost
Also, you might want to check out the gamm4 package. Ken On 04/21/14, Bert Gunter wrote: See gam() and gamm() in the mgcv package. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is

Re: [R] How to draw a histogram for some intervals in R

2014-04-21 Thread Jim Lemon
On 04/22/2014 06:32 AM, VG wrote: Hello Everyone, I have a text file which has data in this format. genestartendfreq Slc19a1811441 Slc19a11922556 Slc19a12733367 Slc19a13634264 Slc19a14655283 Slc19a15406035

[R] reading data saved with writeBin() into anything other than R

2014-04-21 Thread Mike Miller
After saving a file like so... con - gzcon(file.gz, wb)) writeBin(vector, con, size=2) close(con) I can read it back into R like so... con - gzcon(file.gz, rb)) vector - readBin(con, integer(), 4800, size=2, signed=FALSE) close(con) ...and I'm wondering what other programs might be able

Re: [R] List of Dataframes

2014-04-21 Thread arun
Hi, #or you could use: do.call(rbind,result) A.K. On Monday, April 21, 2014 4:48 PM, Timothy W. Cook t...@mlhim.org wrote: Okay, all day on this and I send the msg. and almost immediately discover that: dat - ldply(result) solves the problem. On Mon, Apr 21, 2014 at 5:40 PM, Timothy W.

Re: [R] reading data saved with writeBin() into anything other than R

2014-04-21 Thread William Dunlap
For me that other software would probably be Octave. I'm interested if anyone here has read in these files using Octave, or a C program or anything else. I typed 'octave read binary file' into google.com and the first hit was the Octave help file for its fread function. In C fread is also a

Re: [R] List of Dataframes

2014-04-21 Thread Jim Holtman
also do.call(rbind, result) Sent from my iPad On Apr 21, 2014, at 16:47, Timothy W. Cook t...@mlhim.org wrote: Okay, all day on this and I send the msg. and almost immediately discover that: dat - ldply(result) solves the problem. On Mon, Apr 21, 2014 at 5:40 PM, Timothy W.

Re: [R] reading data saved with writeBin() into anything other than R

2014-04-21 Thread Mike Miller
On Tue, 22 Apr 2014, William Dunlap wrote: For me that other software would probably be Octave. I'm interested if anyone here has read in these files using Octave, or a C program or anything else. I typed 'octave read binary file' into google.com and the first hit was the Octave help file

Re: [R] Labeling/identifying observations in plot after MclustDR from Mclust

2014-04-21 Thread Jim Lemon
On 04/17/2014 01:01 PM, Mark Manger wrote: Hi, I’m trying to figure out how to label points in a contour plot produced from the output of MclustDR, the dimension reduction function in the Mclust package. The original data frame has row names RRcoarse govtDeficitres_gdp

Re: [R] Loop to extract from variables in the workspace

2014-04-21 Thread Frede Aakmann Tøgersen
Well, sticking to your loop that you seem comfortable with try this: ## list to hold dataframes extracList - vector(list, length(1981:2010)) cnt - 0 for(i in 1981:2010){ cnt - cnt + 1 rasterObj -get( c(paste(RR_, i, _1, sep=))) extractList[[cnt]]- extract(rasterObj,