Re: [R] error in installing igraph

2017-08-02 Thread Jeff Newmiller
This is a perfect example of a question that should have gone to the R-sig-mac mailing list. (Mentioned in the POSTING GUIDE... read it.) When you post there I recommend that you include the output of sessionInfo(). -- Sent from my phone. Please excuse my brevity. On August 2, 2017 9:07:42 PM P

[R] error in installing igraph

2017-08-02 Thread lily li
Hi R users, I got warning messages when installing the package, and I pasted the messages below. I checked updates that my R-studio is already the newest version. I don't know how to solve the problem. Thanks for your help. > library(igraph) Error in dyn.load(file, DLLpath = DLLpath, ...) : unab

Re: [R] Extracting numeric part from a string

2017-08-02 Thread Marc Schwartz
Thanks Bert. I should probably also explicitly mention that if Christofer wants to ultimately coerce the numeric components of the strings to numeric data types for subsequent mathematical operations, you will need to strip the commas anyway. In that case, my first response, where I did not i

Re: [R] Extracting numeric part from a string

2017-08-02 Thread Bert Gunter
... and Marc's solution is **much** better than mine. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Wed, Aug 2, 2017 at 5:59 PM, Bert Gunter wrote: >

Re: [R] Extracting numeric part from a string

2017-08-02 Thread Bert Gunter
... Or if you just want to stick with basic regex's without extra packages: > x <- "\"cm_ffm\":\"563.77\"" > sub("[^[:digit:]]*([[:digit:]]*.?[[:digit:]]*).*","\\1",x) [1] "563.77" Cheers, Bert On Wed, Aug 2, 2017 at 5:16 PM, Ismail SEZEN wrote: > >> On 3 Aug 2017, at 02:59, Christofer Bogas

Re: [R] Extracting numeric part from a string

2017-08-02 Thread Marc Schwartz
> On Aug 2, 2017, at 7:42 PM, Marc Schwartz wrote: > > >> On Aug 2, 2017, at 6:59 PM, Christofer Bogaso >> wrote: >> >> Hi again, >> >> I am struggling to extract the number part from below string : >> >> "\"cm_ffm\":\"563.77\"" >> >> Basically, I need to extract 563.77 from above. The un

Re: [R] Extracting numeric part from a string

2017-08-02 Thread Marc Schwartz
> On Aug 2, 2017, at 6:59 PM, Christofer Bogaso > wrote: > > Hi again, > > I am struggling to extract the number part from below string : > > "\"cm_ffm\":\"563.77\"" > > Basically, I need to extract 563.77 from above. The underlying number > can be a whole number, and there could be comma se

Re: [R] Extracting numeric part from a string

2017-08-02 Thread Ismail SEZEN
> On 3 Aug 2017, at 02:59, Christofer Bogaso > wrote: > > Hi again, > > I am struggling to extract the number part from below string : > > "\"cm_ffm\":\"563.77\"" > > Basically, I need to extract 563.77 from above. The underlying number > can be a whole number, and there could be comma separ

[R] Extracting numeric part from a string

2017-08-02 Thread Christofer Bogaso
Hi again, I am struggling to extract the number part from below string : "\"cm_ffm\":\"563.77\"" Basically, I need to extract 563.77 from above. The underlying number can be a whole number, and there could be comma separator as well. So far I tried below : > library(stringr) > str_extract("\"

Re: [R] How to concatenate in R

2017-08-02 Thread Marc Girondot
Le 02/08/2017 à 13:06, Swain, Subrat a écrit : Hi, I have 6 excel files, I want to concatenate all and create one excel files, How to program that in R.(I need the code) Kind regards, SUBRAT SWAIN IMPORTANT NOTICE: The information in this email (and any attachments) is confidential. If you a

Re: [R] switch of cex adjustment with mfrow?

2017-08-02 Thread Duncan Murdoch
On 02/08/2017 8:29 AM, Jannis via R-help wrote: Dear list members, i am trying to create multiple figures with identical layout (i.e. font sizes etc.) for a publication created with Latex. To do so (i.e. to get identical font sizes) I save all plots as a pdf with widths and heights as they wo

Re: [R] switch of cex adjustment with mfrow?

2017-08-02 Thread S Ellison
Checking ?par, " In a layout with exactly two rows and columns the base value of '"cex"' is reduced by a factor of 0.83: if there are three or more of either rows or columns, the reduction factor is 0.66." You should be able to simply set cex to 1/0.83 for a 2x2 layout and by 1/0.66 for

Re: [R] How to concatenate in R

2017-08-02 Thread PIKAL Petr
Hi You have plenty of options. see e.g. ?merge ?cbind ?rbind If you want more specific answer you need to provide more specific question. Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Swain, Subrat > Sent: Wednesday, August 2, 2017 1

Re: [R] Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours

2017-08-02 Thread Rosa Oliveira
Dear all and Pikal (in particular :)) Pikal, I’m sorry. It works!!! Thank you very much :) Best, Rosa Oliveira > On 1 Aug 2017, at 16:31, PIKAL Petr wrote: > > Hi > > Keep your messages coppied to R helplist, others could give you answers too. > > See in line > > From: Rosa Oliveira

Re: [R] How to concatenate in R

2017-08-02 Thread Mark Sharp
You will need to understand dataframes and how to add those together. Use the help system by typing ?rbind at the console prompt. There are numerous examples to be found with a simple web search. Robert Kabacoff has a great book and website the provides examples and explanation at http://www.st

Re: [R] Remove attribute from netcdf4 object

2017-08-02 Thread Marc Girondot
Le 02/08/2017 à 12:03, raphael.fel...@agroscope.admin.ch a écrit : > Dear all > > For a model I need to combine several netCDF files into one (which works > fine). For better overview I'd like to delete/remove some of the attributes. > Is there a simple way doing this? > > I'm using the package n

[R] How to concatenate in R

2017-08-02 Thread Swain, Subrat
Hi, I have 6 excel files, I want to concatenate all and create one excel files, How to program that in R.(I need the code) Kind regards, SUBRAT SWAIN IMPORTANT NOTICE: The information in this email (and any attachments) is confidential. If you are not the intended recipient, you must not us

[R] [R-pkgs] glmnetUtils 1.1 now available

2017-08-02 Thread Hong Ooi via R-packages
The version 1.1 update to my glmnetUtils package is now available on CRAN. glmnetUtils provides a formula interface for the 'glmnet' package for elasticnet regression, a method for cross-validating the alpha parameter, and other quality-of-life tools. >From the NEWS.md file: - Now allows inte

[R] switch of cex adjustment with mfrow?

2017-08-02 Thread Jannis via R-help
Dear list members, i am trying to create multiple figures with identical layout (i.e. font sizes etc.) for a publication created with Latex. To do so (i.e. to get identical font sizes) I save all plots as a pdf with widths and heights as they would later appear in the paper (to prevent scalin

Re: [R] One Dimensional Monte Carlo Simulation

2017-08-02 Thread HUL-Anthony Egerton
Jason, Many thanks for your email and the kind assistance provided. This is very beautiful code that it is a joy to work through, especially so for a beginner like me. I have a couple of quick comments/questions as follows;- - I made a mistake in specifying L, it should be 7.5e6, which makes f

Re: [R] Looping Through QuantMod Objects

2017-08-02 Thread Joshua Ulrich
Use auto.assign = FALSE in your getFinancials() call, and use viewFinancials() to extract the data you want. items <- c("Cash & Equivalents", "Short Term Investments", "Cash and Short Term Investments") tickers <- c("AAPL", "IBM", "MSFT") for (ticker in tickers) { Data <- g

Re: [R] Error in `row.names<-.data.frame`(`*tmp*`, value = c("1.9", "1.9", "1.9", : duplicate 'row.names' are not allowed

2017-08-02 Thread PIKAL Petr
Hi I did not notice any answer to your question so I try. After studying docs and other responses to similar question I deduct that chid.var and alt.var are mixed together and new data frame is being build with chid.var and alt.var combination as new row names. As the combination is not unique

[R] Looping Through QuantMod Objects

2017-08-02 Thread Sparks, John James
Dear R Helpers, I have run into a problem trying to perform a number of actions on a set of quantmod data objects through a loop and I am hoping that this is an easy problem for someone else as opposed to very difficult for me. The example task is to get the first three objects of the quarterly

Re: [R] Remove attribute from netcdf4 object

2017-08-02 Thread raphael.felber
Hi Marc That's a workaround I can use. Thanks. I'm a newbie regarding netCDF data. Is there any information I'm losing when switching between the packages? Raphael Von: Marc Girondot [mailto:marc.giron...@u-psud.fr] Gesendet: Mittwoch, 2. August 2017 15:13 An: Felber Raphael Agroscope Betreff:

Re: [R] Remove attribute from netcdf4 object

2017-08-02 Thread raphael.felber
Dear Marc Thanks for your remark. I don't want to use both packages. I mentioned the package RNetCDF to show that there is a similar function I' d like to use. Raphael Von: Marc Girondot [mailto:marc.giron...@u-psud.fr] Gesendet: Mittwoch, 2. August 2017 14:51 An: Felber Raphael Agroscope ; r-

[R] Remove attribute from netcdf4 object

2017-08-02 Thread raphael.felber
Dear all For a model I need to combine several netCDF files into one (which works fine). For better overview I'd like to delete/remove some of the attributes. Is there a simple way doing this? I'm using the package netcdf4, which creates an object of class(nc) = "ncdf4". It seems that for earl

Re: [R] Generating samples from truncated multivariate Student-t distribution

2017-08-02 Thread Martin Maechler
> David Winsemius > on Tue, 9 May 2017 14:33:04 -0700 writes: >> On May 9, 2017, at 2:05 PM, Czarek Kowalski wrote: >> >> I have already posted that in attachement - pdf file. > I see that now. I failed to scroll to the 3rd page. from a late reader: Please, Czare