[R] Fwd: Converting Lat Lon data in coordinates in R

2014-07-25 Thread Suparna Mitra
Hi ​Hello , ​Can anybody please let me know how can I convert Lat/Lon data in coordinates in R. I was trying to use the rgdal package ​ and proj4 package​ . But being bit confused how to use S or N information. ​and degree min second information. Any example help will be great.​ My

Re: [R] Fwd: Converting Lat Lon data in coordinates in R

2014-07-25 Thread Jeff Newmiller
Try reading the Posting Guide, and post in plain text (your data is corrupted by the HTML). Then read [1] and use dput to provide the data as you have it in R. The solution will involve parsing out the pieces of the coordinates and converting them to decimal degrees, but we don't really know

[R] Prooblem using RMpi on OSX moutain lion

2014-07-25 Thread Ahmed Nagi
I have posted the following question on stackoverflow http://stackoverflow.com/questions/24940918/error-using-rmpi-on-osx-moutain-lion (but i didn't get any feedback). I am posting it here, hoping that a more R-focued user group might be able to help me out.. Thank you

[R] clustering with hclust

2014-07-25 Thread Marianna Bolognesi
Hi everybody, I have a problem with a cluster analysis. I am trying to use hclust, method=ward. The Ward method works with SQUARED Euclidean distances. Hclust demands a dissimilarity structure as produced by dist. Yet, dist does not seem to produce a table of squared euclidean distances,

Re: [R] Retrieve Axis coordinates from map

2014-07-25 Thread Julien Million
Thanks you both, very useful! On 25/07/14 03:20, David Winsemius dwinsem...@comcast.net wrote: On Jul 24, 2014, at 2:05 PM, Julien Million wrote: Hi, i want to automatise the creation of some maps with R, however, I would need to be able to retrieve the coordinates of the axes that R

[R] svm implementation using RTextTools

2014-07-25 Thread Ayushi Pandey
Hello. This is the first time i am using RTextTools. I have to implement an SVM classification on a collection of text documents. I am following this tutorial. http://journal.r-project.org/archive/2013-1/collingwood-jurka-boydstun-etal.pdf I am giving you my code, stepwise. #First i read my

[R] Set Conditional Breakpoint with setBreakpoint Function

2014-07-25 Thread marcel Austenfeld
Hello, i'm searching for a way to realize a conditional breakpoint. setBreakpoint is a simple wrapper for the trace function. What i wan't to do is similar to the trace function described here: [1]http://www.stats.uwo.ca/faculty/murdoch/software/debuggingR/debug.shtml

Re: [R] clustering with hclust

2014-07-25 Thread Christian Hennig
Dear Marianna, the function agnes in library cluster can compute Ward's method from a raw data matrix (at least this is what the help page suggests). Also, you may not be using the most recent version of hclust. The most recent version has a note in its help page that states: Two different

Re: [R] Set Conditional Breakpoint with setBreakpoint Function

2014-07-25 Thread Duncan Murdoch
On 25/07/2014, 6:52 AM, marcel Austenfeld wrote: Hello, i'm searching for a way to realize a conditional breakpoint. setBreakpoint is a simple wrapper for the trace function. What i wan't to do is similar to the trace function described here:

[R] R function returning a list of variable(s) conditional on the value of an option?

2014-07-25 Thread Luke Hartigan
Dear all, I have an R function which returns a list of variables; however, within the body of the function I would like to incorporate a branch based on a user selected option that will mean there will be one different variable to return based on the option value. I was thinking of doing

[R] Set Conditional Breakpoint with setBreakpoint Function

2014-07-25 Thread marcel Austenfeld
Thank you very much. Exactly the information i needed. I always tried quote(if (x 10) browser()) and not tracer=quote(if (x 10) browser()) as the argument. Now it works. __ R-help@r-project.org mailing list

[R] Problem using ggplot2 with the legend of a stacked bar chart

2014-07-25 Thread John McKown
I am creating two graphs using ggplot2. The graphs are of the same data. One is a stacked bar chart. The other is a line graph. The code is below. code MSU_graph_m1 - ggplot(cpprdald2_m1,aes(x=Int_Start, y=LicPrLsys4HMSU,

[R] SASxport function read.xport gives error object 'w' not found

2014-07-25 Thread Jocelyn Ireson-Paine
The subject line says it. I've just tried converting an SAS .xpt file with this call: read.xport( 'formats.xpt' ) I get the message Error in read.xport(formats.xpt) : object 'w' not found but there's no explanation about what 'w' is or how I should make it known to R. I certainly wasn't

Re: [R] R function returning a list of variable(s) conditional on the value of an option?

2014-07-25 Thread David McPearson
I don't know about better or more elegant - but see inserts below... Cheers. On Fri, 25 Jul 2014 22:22:56 +1000 Luke Hartigan luke.harti...@bigpond.com wrote Dear all, I have an R function which returns a list of variables; however, within the body of the function I would like to

Re: [R] R function returning a list of variable(s) conditional on the value of an option?

2014-07-25 Thread PIKAL Petr
Hi It is not exactly clear what do you want from your function. foo - function(x, y, option = TRUE) in that cese you want to return list x,y,z or x,y,z,w with w=NA the same apply with foo - function(x, y, option = FALSE) return is x,y,w or x,y,z=NA,w? anyway I would use option like that {

Re: [R] Problem using ggplot2 with the legend of a stacked bar chart

2014-07-25 Thread John McKown
sigh/ Never mind. I had to specify the label in the labs=() portion of the ggplot(). Why, if I'm going to get it, do I get it only _after_ I post? On Fri, Jul 25, 2014 at 8:07 AM, John McKown john.archie.mck...@gmail.com wrote: I am creating two graphs using ggplot2. The graphs are of the same

Re: [R] working on a data frame

2014-07-25 Thread Matthew
Thank you for your comments, Peter. A couple of questions. Can I do something like the following ? if yourData[,8]==0, then yourData[,8]==1, yourData[,10] - yourData[,9]/yourData[,8] I think I am just going to have to learn more about R. I thought getting into R would be like going from

Re: [R] working on a data frame

2014-07-25 Thread William Dunlap
if yourData[,8]==0, then yourData[,8]==1, yourData[,10] - yourData[,9]/yourData[,8] You could do express this in R as is8Zero - yourData[,8] == 0 yourData[is8Zero, 8] - 1 yourData[is8Zero, 10] - yourData[is8Zero,9] / yourData[is8Zero,8] Note how logical (Boolean) values are used as

Re: [R] SASxport function read.xport gives error object 'w' not found

2014-07-25 Thread Marc Schwartz
On Jul 25, 2014, at 8:26 AM, Jocelyn Ireson-Paine p...@j-paine.org wrote: The subject line says it. I've just tried converting an SAS .xpt file with this call: read.xport( 'formats.xpt' ) I get the message Error in read.xport(formats.xpt) : object 'w' not found but there's no

[R] Turn Rank Ordering Into Numerical Scores By Transposing A Data Frame

2014-07-25 Thread Simon Kiss
Hello: I have data that looks like mydf, below. It is the results of a survey where participants were to put a number of statements (in this case colours) in their order of preference. In this case, the rank number is the variable, and the factor level for each respondent is which colour they

Re: [R] Fwd: Converting Lat Lon data in coordinates in R

2014-07-25 Thread MacQueen, Don
The sp package has what you need. spTransform() will convert from lat/lon to other coordinate systems. char2dms() will convert lat/lon coordinates formatted as you have them into numeric lat/lon values. You may wish to use as.numeric( char2dms( [your data] ) ) It will take some effort to get

Re: [R] Turn Rank Ordering Into Numerical Scores By Transposing A Data Frame

2014-07-25 Thread David L Carlson
I think this gets what you want. But your data are not reproducible since they are randomly drawn without setting a seed and the two data sets have no relationship to one another. set.seed(42) mydf - data.frame(t(replicate(100, sample(c(red, blue, + green, yellow) colnames(mydf) -

[R] Redefining reference class makes persistent object partly unreadable

2014-07-25 Thread Ross Boylan
A bunch of .rdata is on the disk, created from reference classes (as in setRefClass()). I redefined some of the classes--not by much. Now when I read in the rdata it seems to have been damaged, because some parts have disappeared. The data are generally a graph of objects, some of which (e.g.,

Re: [R-es] wordcloud y tabla de palabras

2014-07-25 Thread Carlos Ortega
Hola, Una forma de hacerlo es como aparece en el ejemplo de la ayuda de wordcloud(): #-- ## Not run: data(crude) crude - tm_map(crude, removePunctuation) crude - tm_map(crude, function(x)removeWords(x,stopwords())) # from frequency