[R] portrait diagram

2015-07-09 Thread Said Filahi
Hello i want to make a portrait diagram, i don't know if i can perfom it with a R thank you Said [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see

[R] randomForest set.seed()

2015-07-09 Thread Joao Carreiras
Dear forum members, ​I wrote a piece of code to test various combinations of mtry and ntree, so that the best combination (in terms of mse​) could be used. Before each randomForest command I included a set.seed() command, so that I can keep track of the seed number and replicate the results.

Re: [R] portrait diagram

2015-07-09 Thread Boris Steipe
Read the posting guides and do not post in HTML. Type ?pdf at the console prompt. Read the help text. The parameter paper specifies paper size and orientation. Portrait is the default. B. On Jul 9, 2015, at 8:14 AM, Said Filahi sa.fil...@gmail.com wrote: Hello i want to make a portrait

[R] portrait diagram

2015-07-09 Thread Said Filahi
Hello, I x [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and

[R] ca.jo function, urca package, singular matrix problem

2015-07-09 Thread mrrox
Hi, I am trying to run a cointegration test with a dummy variable using `*ca.jo*` function in `*urca*` package. *johcoint=ca.jo(Ydata[10:60,1:5],type=trace,ecdet=c(const),K=2,spec=transitory,dumvar=dumvar) * `*dumvar*` is the binary variable that take 1 and 0 only. the first two observations

Re: [R] detecting any element in a vector of strings, appearing anywhere in any of several character variables in a dataframe

2015-07-09 Thread Bert Gunter
Here's a way to do it that uses %in% (i.e. match() ) and uses only a single, not a double, loop. It should be more efficient. sapply(strsplit(do.call(paste,zz[,2:3]),[[:space:]]+), + function(x)any(x %in% alarm.words)) [1] FALSE FALSE TRUE FALSE FALSE TRUE FALSE FALSE TRUE TRUE The

Re: [R] Maxent Jarfile

2015-07-09 Thread David Winsemius
On Jul 9, 2015, at 6:02 AM, John Kane wrote: Thanks Annemarie, Things came through okay. I'll defer to the experts on substantive advice. John; It only came through to you by way of a copy sent directly to you. It did not come to you from the rhelp-server. If there are any experts out

Re: [R] detecting any element in a vector of strings, appearing anywhere in any of several character variables in a dataframe

2015-07-09 Thread Jeff Newmiller
I think grep is better suited to this: zz$v5 - grepl( paste0( alarm.words, collapse=| ), do.call( paste, zz[ , 2:3 ] ) ) ) --- Jeff NewmillerThe . . Go Live...

Re: [R] Maxent Jarfile

2015-07-09 Thread annemariefischer86
‎Hi Roy, This example gives me the following error on trying to run the first line: Error: unexpected '' in jar - paste(system.file(package=dismo), /java/maxent.jar, sep= I am currently attempting to run using the code given in the below thread:

Re: [R] ca.jo function, urca package, singular matrix problem

2015-07-09 Thread Pfaff, Bernhard Dr.
Watch out for the pre-sample values (K = 2); hence you have supplied a dumvar consisting of zeros only, in your first example. Best, Bernhard -Ursprüngliche Nachricht- Von: R-help [mailto:r-help-boun...@r-project.org] Im Auftrag von mrrox Gesendet: Donnerstag, 9. Juli 2015 15:51 An:

Re: [R] detecting any element in a vector of strings, appearing anywhere in any of several character variables in a dataframe

2015-07-09 Thread Bert Gunter
Jeff: Well, it would be much better (no loops!) except, I think, for one issue: red would match barred and I don't think that this is what is wanted: the matches should be on whole words not just string patterns. So you would need to fix up the matching pattern to make this work, but it may be a

Re: [R] ca.jo function, urca package, singular matrix problem

2015-07-09 Thread Bert Gunter
I do know nothing about what you are specifically doing (!!) but... In general, R uses factors and contrasts not dummy variables to handle categorical variables in (linear) models, so it might be that your dummy variable representation is what causes the singularity. If so, do a web search on

Re: [R] randomForest set.seed()

2015-07-09 Thread Jeff Newmiller
Please post in plain text, and supply a reproducible example (that includes sample data, preferably using the dput function). The below code obtains repeatable random number sequences in each pass through the loop, as confirmed by the first value in each sequence. ## a - 0 ## ## For loop to

Re: [R] Maxent Jarfile

2015-07-09 Thread Roy Mendelssohn - NOAA Federal
This suggests that you either have the maxent.jar file in the wrong place or with the wrong name. I suspect when you get the first two lines of the script to work you will be okay. -Roy On Jul 9, 2015, at 10:10 AM, annemariefische...@gmail.com wrote: ‎Hi Roy, This example gives me the

[R] degree of freedom of smoothing spline in Generalized Additive Model (GAM)

2015-07-09 Thread Jackson Rodrigues
Hi all, I am trying to fit a Generalized Additive Model (GAM) with mgcv package aiming to identify changes on time series just like Gavin Simpson did ( http://www.fromthebottomoftheheap.net/2014/05/15/identifying-periods-of-change-with-gams/ ). However, depending on value of degree of freedom

Re: [R] detecting any element in a vector of strings, appearing anywhere in any of several character variables in a dataframe

2015-07-09 Thread Jeff Newmiller
Just add a word break marker before and after: zz$v5 - grepl( paste0( \\b(, paste0( alarm.words, collapse=| ), )\\b ), do.call( paste, zz[ , 2:3 ] ) ) ) --- Jeff NewmillerThe . . Go

Re: [R] Maxent Jarfile

2015-07-09 Thread annemariefischer86
‎Hi Roy, Using the code in the other path also did not work, as I am not sure what to use for the projections or background.   Original Message   From: Roy Mendelssohn - NOAA Federal Sent: Thursday 9 July 2015 18:48 To: annemariefische...@gmail.com Cc: David Winsemius; John Kane; R. Mailing

Re: [R] detecting any element in a vector of strings, appearing anywhere in any of several character variables in a dataframe

2015-07-09 Thread Bert Gunter
Yup, that does it. Let grep figure out what's a word rather than doing it manually. Forgot about \b Cheers, Bert Bert Gunter Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. -- Clifford Stoll On Thu, Jul 9, 2015 at 10:30 AM, Jeff Newmiller

[R] color2D.matplot with anchored color scale

2015-07-09 Thread Phong Nguyen
Hello Jim, I have a several matrices stored in allGrid - list() I am using: color2D.matplot(grid, extremes = c(green, red), vcol = black, nslices = 60, show.legend=TRUE,axes=FALSE,show.values=TRUE, xlab=Columns,ylab=Rows) for each of grid in allGrid. Each grid is a matrix with element

[R] Quantile regression interval prediction

2015-07-09 Thread Angel Marley via R-help
Hi all,I would like to know how to predict a new y value and its confidence interval for the prediction given a new observation x when using a linear(or non-linear) quantile regression model.How it is possible to transform the confidence prediction in to an interval prediction? Is it correct to

Re: [R] Can't post to the list

2015-07-09 Thread Rolf Turner
On 09/07/15 19:49, Maram Salem wrote: Sorry I mean NOT explicitly allowed You probably mean explicitly NOT allowed. The order of the words makes a substantial difference to the meaning. Sent from my iPhone On Jul 9, 2015, at 8:46 AM, Maram Salem marammagdysa...@gmx.com wrote: Dear

Re: [R] Can't post to the list

2015-07-09 Thread Maram Salem
Dear Rolf, I recieved this message exactly: The message's content type was not explicitly allowed Thanks for your concern, Maram Sent from my iPhone On Jul 9, 2015, at 11:36 AM, Rolf Turner r.tur...@auckland.ac.nz wrote: On 09/07/15 19:49, Maram Salem wrote: Sorry I mean NOT

Re: [R] Can't post to the list

2015-07-09 Thread John McKown
On Thu, Jul 9, 2015 at 6:04 AM, Maram Salem marammagdysa...@gmx.com wrote: Dear Rolf, I recieved this message exactly: The message's content type was not explicitly allowed I'm just guessing here! But this list is plain text only. I wonder if your email client sometimes uses

Re: [R] Maxent Jarfile

2015-07-09 Thread Thierry Onkelinx
Dear Annemie, The mailing list accepts only a limited number of extensions. Your attachment got stripped for the mail. It is probably easier to put the files on-line and send us the link to the files. Best regards, ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute

Re: [R] Maxent Jarfile

2015-07-09 Thread annemariefischer86
‎Hi John,  Sorry about that. Please find attached the code, error and input file. Thanks, Annemarie   Original Message   From: John Kane Sent: Thursday 9 July 2015 00:26 To: Annemarie Fischer; r-help@r-project.org Subject: Re: [R] Maxent Jarfile Hi Annemarie, You have sent the email in HTML

Re: [R] Maxent Jarfile

2015-07-09 Thread Bob O'Hara
You would do better to contact the package owner for this, as it's a problem specific to the package. In this case the problem looks to be in dismo, so you should use packageDescription(dismo) to discover that Robert Hijmans is the person to contact. I would suggest running maxent() first to see

Re: [R] Can't post to the list

2015-07-09 Thread Maram Salem
Sorry I mean NOT explicitly allowed Sent from my iPhone On Jul 9, 2015, at 8:46 AM, Maram Salem marammagdysa...@gmx.com wrote: Dear all, I need help with posting to the list. Whenever i post any message, i get this reply : the message content was explicitly allowed. Any help please?

[R] The R Journal, Volume 7, Issue 1

2015-07-09 Thread Bettina Gruen
Dear all, The latest issue of The R Journal is now available at http://journal.r-project.org/archive/2015-1/ Many thanks to all contributors. Regards, Bettina -- --- Bettina Grün Institut für Angewandte Statistik / IFAS Johannes

[R] Can't post to the list

2015-07-09 Thread Maram Salem
Dear all, I need help with posting to the list. Whenever i post any message, i get this reply : the message content was explicitly allowed. Any help please? Thanks a lot. Maram Sent from my iPhone __ R-help@r-project.org mailing list -- To

Re: [R] Can't post to the list

2015-07-09 Thread Maram Salem
Thanks a lot John. Will check it out. Maram Sent from my iPhone On Jul 9, 2015, at 1:17 PM, John McKown john.archie.mck...@gmail.com wrote: On Thu, Jul 9, 2015 at 6:04 AM, Maram Salem marammagdysa...@gmx.com wrote: Dear Rolf, I recieved this message exactly: The message's content

Re: [R] Can't post to the list

2015-07-09 Thread Maram Salem
Dear Rolf, There isn't any offending content. I think it's related to the styles used on the mail. Thanks for helping. Maram Sent from my iPhone On Jul 9, 2015, at 11:36 AM, Rolf Turner r.tur...@auckland.ac.nz wrote: On 09/07/15 19:49, Maram Salem wrote: Sorry I mean NOT explicitly

[R] detecting any element in a vector of strings, appearing anywhere in any of several character variables in a dataframe

2015-07-09 Thread Christopher W. Ryan
Running R 3.1.1 on windows 7 I want to identify as a case any record in a dataframe that contains any of several keywords in any of several variables. Example: # create a dataframe with 4 variables and 10 records v2 - c(white bird, blue bird, green turtle, quick brown fox, big black dog, waffle

Re: [R] detecting any element in a vector of strings, appearing anywhere in any of several character variables in a dataframe

2015-07-09 Thread John Fox
Dear Chris, If I understand correctly what you want, how about the following? rows - apply(zz[, 2:3], 1, function(x) any(sapply(alarm.words, grepl, x=x))) zz[rows, ] v1 v2v3 v4 3 -1.022329green turtleronald

[R] detecting any element in a vector of strings, appearing anywhere in any of several character variables in a dataframe

2015-07-09 Thread Christopher W Ryan
Running R 3.1.1 on windows 7 I want to identify as a case any record in a dataframe that contains any of several keywords in any of several variables. Example: # create a dataframe with 4 variables and 10 records v2 - c(white bird, blue bird, green turtle, quick brown fox, big black dog, waffle

Re: [R] Maxent Jarfile

2015-07-09 Thread John Kane
Thanks Annemarie, Things came through okay. I'll defer to the experts on substantive advice. John Kane Kingston ON Canada -Original Message- From: annemariefische...@gmail.com Sent: Thu, 09 Jul 2015 07:25:06 +0200 To: jrkrid...@inbox.com, annemarie...@hotmail.com,

Re: [R] ca.jo function, urca package, singular matrix problem

2015-07-09 Thread John C Frain
There is something very wrong in your data set. You appear to have two distinct observations of your variables and these are continuously repeated throughout the sample. On 9 Jul 2015 18:26, Bert Gunter bgunter.4...@gmail.com wrote: I do know nothing about what you are specifically doing (!!)

Re: [R] sum some columns for each row

2015-07-09 Thread Jeff Newmiller
Please read the Posting Guide before posting again. Pay particular attention to the guidance to post using plain text. Also use the dput function to provide your sample data so we can more accurately start from where you are starting bad give more targeted answers. You can use indexing to

Re: [R] ggmap warning

2015-07-09 Thread Thierry Onkelinx
Yes. Provide a reproducible example of your problem: the code and the data. Op 9-jul.-2015 22:06 schreef Chichi Shu chichi@hotmail.com: Hi, I limit my data to just two fields. Longitude and latitude. I first used is.finite to check each of the long and lat values to make sure they are

Re: [R] ggmap warning

2015-07-09 Thread William Dunlap
Look at your data.frame with str() and see if the variables you think are numeric are actually factors. is.finite(factor()) reports TRUE but lots of functions expecting numeric data will abort when given factor data. E.g. library(ggplot2) d - data.frame(X=factor(round(sin(1:1000),1)),

Re: [R] sum some columns for each row

2015-07-09 Thread Rui Barradas
Hello, Please use ?dput to give a data example, like this it's completely unreadable. If your data.frame is named 'dat' use dput(head(dat, 30)) # paste the outut of this in your mail And don't post in html, use plain text only, like the posting guide says. Rui Barradas Em 09-07-2015

Re: [R] Compiling on AIX 6.1

2015-07-09 Thread Jeff Newmiller
Please read and follow the Posting Guide, which indicates that this type of question is off-topic on R-help and should be asked on R-devel. It also warns you that cross-posting is not polite, so this reply is only being sent to R-help.

Re: [R] tcltk2 entry box

2015-07-09 Thread Greg Snow
If you want you script to wait until you have a value entered then you can use the tkwait.variable or tkwait.window commands to make the script wait before continuing (or you can bind the code to a button so that you enter the value, then click on the button to run the code). On Wed, Jul 8, 2015

[R] Revolutions blog: June roundup

2015-07-09 Thread David Smith
Since 2008, Revolution Analytics (and now Microsoft) staff and guests have written about R every weekday at the Revolutions blog: http://blog.revolutionanalytics.com and every month I post a summary of articles from the previous month of particular interest to readers of r-help. In case you

[R] sum some columns for each row

2015-07-09 Thread Dawn
Hi, I have a big dataframe as follows 109ABC109XYZ18ABC18XYZ22XYZ23ABC25ABC25XYZ 30ABC31XYZ32ABC32XYZ34DCM34XYZ36ABC36SUR 38DCM38XYZ39DCM39SUR41DCM41SUR42DCM42SUR 46SUR52DCM64ABC64XYZ65ABC

[R] panel function revisited

2015-07-09 Thread Szumiloski, John
Dear useRs, I recently posted here (https://stat.ethz.ch/pipermail/r-help/2015-July/430223.html) a query regarding customizing panel functions for lattice::xyplot. I received some helpful replies offline and while I learned some things, they did not get at my issue. However there was a

Re: [R] detecting any element in a vector of strings, appearing anywhere in any of several character variables in a dataframe

2015-07-09 Thread John Fox
Dear Christopher, My usual orientation to this kind of one-off problem is that I'm looking for a simple correct solution. Computing time is usually much smaller than programming time. That said, Bert Gunter's solution was about 5 times faster in a simple check that I ran with microbenchmark,

[R] Compiling on AIX 6.1

2015-07-09 Thread Schermerhorn, Phillip
I'm trying to compile R on AIX 6.1. gcc -v Using built-in specs. Target: powerpc-ibm-aix6.1.0.0 Configured with: ../gcc-4.4.5/configure --with-as=/usr/bin/as --with-ld=/usr/bin/ld --enable-languages=c,c++,fortran --prefix=/opt/freeware --enable-threads --enable-version-specific-runtime-libs

Re: [R] ggmap warning

2015-07-09 Thread Chichi Shu
Hi, I limit my data to just two fields. Longitude and latitude. I first used is.finite to check each of the long and lat values to make sure they are finite values. Then when I use ggmap again, it still tells me that it removed the majority of the records bec of non-finite values. Any other

Re: [R] Maxent Jarfile

2015-07-09 Thread annafischer86
Hi Roy, I managed to make the code work, the issue was with underscores in the files. Thanks for your help.

Re: [R] Maxent Jarfile

2015-07-09 Thread annemariefischer86
Hi John, I have attempted to add links to the files to the thread directly, but my message was not ‎authorized. I'm not sure why.  ‎https://www.dropbox.com/s/gqk908gw9ze9553/error.txt?dl=0 ‎https://www.dropbox.com/s/jffg48y4dojzsb3/R%20Studio%20code.txt?dl=0

Re: [R] Maxent Jarfile

2015-07-09 Thread Roy Mendelssohn - NOAA Federal
Have you been able to run the example that comes with dismo::maxent such as at the bottom of: http://www.inside-r.org/packages/cran/dismo/docs/maxent -Roy On Jul 9, 2015, at 9:38 AM, annemariefische...@gmail.com wrote: Hi John, I have attempted to add links to the files to the thread