[R] R parallel - slow speed

2015-07-30 Thread Martin Spindler
Dear all, I am trying to parallelize the function npnewpar given below. When I am comparing an application of apply with parApply the parallelized version seems to be much slower (cf output below). Therefore I would like to ask how the function could be parallelized more efficient. (With

Re: [R] Daily Category Revenue-Stacked Bar Chart in ggplot2

2015-07-30 Thread John Kane
Hi Markov I have no idea of what nabble is or why it exists but the real problem with it is that it looks like (is?) a form where questions and responses are threaded so that it is obvious what the on-going conversation is. So a nabble user will respond with something like : Great but why xx1

Re: [R] Mixed Date Formats

2015-07-30 Thread John Kane
That's what I get for reading without a cup of tea beside me. I looked at 5 and my eye just slide over the last entries. I change my assessment : this looks bad. (Tea at hand). So, presumably Farnoosh may not be able to guarantee the formats for 3 4 either unless they are unambiguously

[R] Need help

2015-07-30 Thread MyList
Dear All, What are inner and outer matrix multiplication. Kindly guide me where to look for this Wikipedia was not much help. Thanks in Advance, Harmeet __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

[R] R and AWS

2015-07-30 Thread My List
Hello All, I wanted to know if there is a quick tutorial which I could be pointed to, for the understanding of setting R and R studio on Amazon web services. Thanks in Advance, Harmeet [[alternative HTML version deleted]] __

Re: [R] Mixed Date Formats

2015-07-30 Thread John Kane
This does not look good. But not too bad Can we assume that the original data is in D-M-Y in all cases. The values at 3 4 in the sample data are ambigous, in that someone may be using the American dating system of M-D-Y. Given the rest of the data it seems unlikely but possible. Otherwise

Re: [R] Mixed Date Formats

2015-07-30 Thread Sarah Goslee
On Thu, Jul 30, 2015 at 9:14 AM, John Kane jrkrid...@inbox.com wrote: This does not look good. But not too bad Can we assume that the original data is in D-M-Y in all cases. The values at 3 4 in the sample data are ambigous, in that someone may be using the American dating system of M-D-Y.

Re: [R] R parallel - slow speed

2015-07-30 Thread Jeff Newmiller
Parallelizing comes at a price... and there is no guarantee that you can afford it. Vectorizing your algorithms is often a better approach. Microbenchmarking is usually overkill for evaluating parallelizing. You assume 4 cores... but many CPUs have 2 cores and use hyperthreading to make each

Re: [R] R parallel - slow speed

2015-07-30 Thread jim holtman
I ran a test on my Windows box with 4 CPUs. THere were 4 RScript processes started in response to the request for a cluster of 4. Each of these ran for an elapsed time of around 23 seconds, making the median time around 0.2 seconds for 100 iterations as reported by microbenchmark. The 'apply'

[R] ggplot2 - geom_text() with date as x-axis

2015-07-30 Thread John Kane
I am trying to annotate a graph using geom_text() and I seem to be misunderstanding how to use a date in the co-ordinates---or, at least, I think that is the problem. Code is below. Can anyone give me a suggestion of where I am going wrong? Thanks, John John Kane Kingston ON Canada

Re: [R] Mixed Date Formats

2015-07-30 Thread farnoosh sheikhi via R-help
Thank you all for your help.I came to this conclusion that data needs to be verified by its source. Thanks again.  On Thursday, July 30, 2015 7:07 AM, John Kane jrkrid...@inbox.com wrote: That's what I get for reading without a cup of tea beside me. I looked at 5 and my eye just

Re: [R] Need help

2015-07-30 Thread peter dalgaard
On 30 Jul 2015, at 16:00 , MyList mylistt...@gmail.com wrote: Dear All, What are inner and outer matrix multiplication. Kindly guide me where to look for this Wikipedia was not much help. I'd need some context to be sure, but some use tr(AB) as the inner product in a space of square

[R] Shiny help with verbatimTextOutput

2015-07-30 Thread Evan Kransdorf
Hello, I am working with Shiny and want to use it to show user-entered input from a check box. However, when using verbatimTextOutput with no options selected in the check box I get character(0) as the output. Is there any way to make this so it displays nothing instead? Thanks #Begin R code

[R] About nls.

2015-07-30 Thread Jianling Fan
Hello, I am trying to do a nls regression with R. but I always get a error as Error in numericDeriv(form[[3L]], names(ind), env) : Missing value or an infinity produced when evaluating the model. I googled it and found someone said it is because of the improper start value. I tried many times

Re: [R] Shiny help with verbatimTextOutput

2015-07-30 Thread Bert Gunter
Shiny is not R. It is an RStudio product, which is separate from R. So I think you need to post on RStudio's support forum, not here. Cheers, Bert Bert Gunter Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. -- Clifford Stoll On Thu, Jul 30, 2015

Re: [R] Using latticeExtra as.layer function with different number of plot panels

2015-07-30 Thread David Winsemius
On Jul 30, 2015, at 8:37 AM, sbihorel wrote: Hi, When the as.layer function is used to overaly 2 lattice plots, there seems to be an assumption that the data used in both plots will generate the same number of panels (and, I believe, in the same order). In case the data used in the

[R] Itinerary Ticket Parser

2015-07-30 Thread Anshuk Pal Chaudhuri
Dear All, I have seeing a lot of apis', (like worldmate or new product called sift from easilydo) which is used for parsing email and different itinerary tickets. Is there any packages in R which does that? Regards, Anshuk Pal Chaudhuri [[alternative HTML version deleted]]

[R] Problem with package plm

2015-07-30 Thread Luca Gagliardone
Hi! I am trying yo run a regression using the plm package. I tried in two different ways, that should give the same result, but eventually do not; and i cannot understand the reason. - The first way: Accellerator.model - read.delim(~/Desktop/Tesi/Accellerator model.txt) data - Accellerator.model

Re: [R] How to simulate informative censoring in a Cox PH model?

2015-07-30 Thread Daniel Meddings
Thanks Greg once more for taking the time to reply. I certainly agree that this is not a simple set-up, although it is realistic I think. In short you are correct about model mis-specification being the key to producing more biased estimates under informative than under non-informative censoring.

Re: [R] vectorized sub, gsub, grep, etc.

2015-07-30 Thread Adam Erickson
Here is a Rcpp version for exact character matching (for example) written in C++ that is substantially faster. Hence, I think this is the way to go where loops may be unavoidable. However, the input vector length has to match the length of the pattern and replacement vectors, as your original

[R] Looping help

2015-07-30 Thread April Smith
I have never looped before and know I need to. I am unsure how to proceed: - Action I need done: d(Data[1,2:399], q=0, boot=TRUE, boot.arg=list(num.iter=1000)) - I need this to happen to all rows, I need All[1,2:399] to increase to All[2:399], etc. - But I also need the results

Re: [R] vectorized sub, gsub, grep, etc.

2015-07-30 Thread John Thaden
Can you show what is its solution for the original sample data? Why that discrepancy for you original sub2() function? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

[R] dataframe for netcdf data

2015-07-30 Thread prabir das
I am trying to analyse time-series .netcdf (3D lat,long and time domain) climate data. I want to apply the SPEI package (calculation of standardized precipitation evapotranspiration index) on it. But unable to arrange my data in the required data frame. As I am a beginner in R, it will be very

Re: [R] Using latticeExtra as.layer function with different number of plot panels

2015-07-30 Thread Duncan Mackay
David has replied But I am wondering if the lattice function make.groups is what you want. As you seem to want extra panels. For the 3 graphs I get the 4 same panels NC W NE S and coloured points are added after foo but bar2 has more red points added bar1 and bar2 have the same colour for pch

[R] setting up R -- VM Fusion, WIndows7

2015-07-30 Thread Matthew Johnson
Hi, As i need R to speak to Bloomberg (and big only runs on windows), i'm running windows 7 via VM Fusion on my mac. I think i am having permission problems, as i cannot use install.packages, and cannot change .libPaths via either a .Rprofile, or Profile.site. I've posted more detail in this

Re: [R] Daily Category Revenue-Stacked Bar Chart in ggplot2

2015-07-30 Thread peter dalgaard
You still don't get it, do you? First, the list is not John. Second, and more importantly, those of us with threading mail programs (or group by conversation in Apple-speak) can fairly easily find Johns letter if we haven't deleted it yet. Those without threading will have to look back

[R] R Parse HTML tabular data and apply NLP

2015-07-30 Thread Anshuk Pal Chaudhuri
Hi All, I have quite a few files which is having HTML tabular data. All the files have have different format, numerous nested tables and different information and the table structure is completely different. The only common thing in these files is that they are in tables. I was able to read

Re: [R] Imbalanced random forest

2015-07-30 Thread jpara3
Thanks for the info! - Guided Tours Basque Country Guided tours in the three capitals of the Basque Country: Bilbao, Vitoria-Gasteiz and San Sebastian, as well as in their provinces. Available languages. Travel planners for groups and design of tourist routes across the Basque

Re: [R] Vignette using knitr, devtools, and R markdown

2015-07-30 Thread Peter Humburg
Hi Glenn, You should be able to add toc: true as an option to the yaml meta data block at the beginning of your vignette. If that isn't working for you you may have to give some more detail on what exactly you are doing and how it is failing. Peter On Thu, 30 Jul 2015 at 04:08 Glenn Schultz

Re: [R] Removing display of R row names from list.

2015-07-30 Thread Frederic Ntirenganya
I want to remove the rownames after incrementation. Thanks Frederic Ntirenganya Maseno University, African Maths Initiative, Kenya. Mobile:(+254)718492836 Email: fr...@aims.ac.za https://sites.google.com/a/aims.ac.za/fredo/ On Wed, Jul 29, 2015 at 7:04 PM, Bert Gunter bgunter.4...@gmail.com

[R] Bootstrap library

2015-07-30 Thread Amelia Marsh via R-help
Hello! I have following data and I am trying to apply bootstrapping. My data and code is as follows- amounts = c(829.53,4000,6000,1000,1063904,102400,22000,4000,4200,2000,1,400,459006,7276,4000,100,4000,1,613803.36,

[R] Using latticeExtra as.layer function with different number of plot panels

2015-07-30 Thread sbihorel
Hi, When the as.layer function is used to overaly 2 lattice plots, there seems to be an assumption that the data used in both plots will generate the same number of panels (and, I believe, in the same order). In case the data used in the plot within the as.layer call is incomplete , data may

Re: [R] ggplot2 - geom_text() with date as x-axis

2015-07-30 Thread Hadley Wickham
I'm a bit confused what you're trying to accomplish - the mix of annotate() and geom_text() is confusing. The following code works for me, and I think might be what you want: ggplot(ins, aes(td, glucose)) + geom_point(colour = red) + geom_line(colour = blue) + annotate(text, x = texdat, y =

Re: [R] Daily Category Revenue-Stacked Bar Chart in ggplot2

2015-07-30 Thread Hidden Markov Model
Hi John, Certainly, that makes sense. Thank you for the clear explanation. I am subscribed to the email list, it is how I knew you replied. A stacked bar chart is great for managing and analyzing multi-ad placement Profit and seeing the time series of the individual charts. Tableau makes it very

Re: [R] Daily Category Revenue-Stacked Bar Chart in ggplot2

2015-07-30 Thread Hidden Markov Model
Thanks Mom! You still don't get it, do you? First, the list is not John. Second, and more importantly, those of us with threading mail programs (or group by conversation in Apple-speak) can fairly easily find Johns letter if we haven't deleted it yet. Those without threading will have to

Re: [R-es] Duda ' raster package '

2015-07-30 Thread Oscar Perpiñán Lamigueiro
Hola, Tengo una matriz ' elev.rad.mx ' que tiene tres columnas: 1 columna: coordenada x del punto geogrfico. 2 columna: coordenada y del punto geogrfico. 3 columna: valores de un radar en el punto geogrfico (x,y). En este caso, es adecuado emplear `rasterFromXYZ` en lugar de `raster`. Cmo

Re: [R] Rearrange Data Frame

2015-07-30 Thread Jim Lemon
Hi Stella, I think Sarah is correct in asking if that is what you really want, but you can get a list similar to what you asked for like this: sample_names-unique(sx.df$Samples) sx.lst-list() for(sn in 1:length(sample_names)) sx.lst[[sn]]-sx.df$counts[sx.df$Samples==sample_names[sn]]

Re: [R] Removing display of R row names from list.

2015-07-30 Thread PIKAL Petr
Hi AFAIK you can not **remove** row names from data frame. You can suppress their printingas other adviced or you can rename row names. lev animals animalYears ind 1bird 1 2 2 cat 1 2 3 dog 1 2 4bird 2 2 5 cat 2