Re: [R] ISO3 code to 7 continents names

2017-09-07 Thread Jeff Newmiller
The unequivocal answer is that it is possible, and most likely you have bad data or are referring to an incomplete lookup table. For us to see what your problem is would rewquire a reproducible example, but what you have provided is not reproducible [1][2][3]. [1] http://stackoverflow.com/que

Re: [R] show 0 at y axis in xyplot lattice

2017-09-11 Thread Jeff Newmiller
I recommend that Maria read [1], [2] and especially [3], since the latter helps you verify that your example is in fact reproducible before sending it out for us to have problems with and complain about. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

Re: [R] please let me unsubscribe or remove me from mailing list.

2017-09-12 Thread Jeff Newmiller
No-one is preventing you from unsubscribing, and we are not empowered to do it for you. Follow the instructions at the bottom of this and every posting on this list. -- Sent from my phone. Please excuse my brevity. On September 12, 2017 7:57:25 AM PDT, Where's YK wrote: >Thank you. > >from ca

Re: [R] Σχετ: show 0 at y axis in xyplot lattice

2017-09-12 Thread Jeff Newmiller
It contains the output of one call to dput, but several objects were missing and the name of the object provided in the text file was not specified. -- Sent from my phone. Please excuse my brevity. On September 12, 2017 10:22:36 AM PDT, Michael Dewey wrote: >Dear Maria > >The file you attache

Re: [R] Unable to load packages RODBC and RODBCext in R

2017-09-12 Thread Jeff Newmiller
The messages tell you that the package files were successfully downloaded and extracted, but could not be added to the package library. Try making sure all instances of R are closed down before running the install.packages function. Also, just to be clear, avoid running R "As Administrator" unde

Re: [R] Unable to load packages RODBC and RODBCext in R

2017-09-12 Thread Jeff Newmiller
The messages tell you that the package files were successfully downloaded and extracted, but could not be added to the package library. Try making sure all instances of R are closed down before running the install.packages function. Also, just to be clear, avoid running R "As Administrator" unde

Re: [R] To implement OO or not in R package, and if so, how to structure it?

2017-09-14 Thread Jeff Newmiller
I think you should consider whether the advantages of making an object-aware collections class are worth the effort... lists are the standard tool for this task in R, and are normally handled using the functional programming paradigm. Just make sure a sufficiently-complete set of methods are ava

Re: [R] using phia with glmmTMB

2017-09-14 Thread Jeff Newmiller
Should also make the example reproducible [1][2][3] when you do post there because some mismatch between the model and the data is frequently where the problem turns out to be, and without an example that triggers the problem it is very tough to figure that out. [1] http://stackoverflow.com/q

Re: [R] Help with shiny::reactiveFileReader()

2017-09-16 Thread Jeff Newmiller
No. However, you can modify the global environment from within a function if you understand how variable scoping works. [1] See `<<-`. Be warned that this leads down a perilous path of confusing code (side effects) if misused. [1] http://adv-r.had.co.nz/Environments.html -- Sent from my phone.

Re: [R] R_LIBS_USER not in libPaths

2017-09-16 Thread Jeff Newmiller
These environment variables are _inputs_ to the R startup sequence, and optional ones at that. If you don't set them then R makes default settings. Read the R Installation and Administration manual that comes with R for more information. You also need to understand the scope of environment var

Re: [R] help matching rows of a data frame

2017-09-18 Thread Jeff Newmiller
"Label" is not a clear term for data frames, but most data frames have rownames. If dta is a data frame, not a tibble, rownames( dta )[ !duplicated( dta ) ] Or could use row indexes directly which( !duplicated( dta ) ) -- Sent from my phone. Please excuse my brevity. On September 18, 2017 6

Re: [R] remove quotes from matrix

2017-09-19 Thread Jeff Newmiller
Greg, I think you should stop using noquote, because it is doing something that will not be useful to you for preparing your data for analysis. Please follow Duncan's advice and provide us with a sample of your data. Also, please set your email program to send plain text rather than HTML format

Re: [R] Keep on getting message errors when trying to install and load packages

2017-09-21 Thread Jeff Newmiller
This practice is not portable, as not everyone's default file creation permissions allow others to read those files, so putting them outside your home directory isn't necessarily helpful. It is much better to use the default user library within your home directory as suggested by the R install p

Re: [R] Add wrapper to Shiny in R package

2017-09-21 Thread Jeff Newmiller
... which begs the question... how does the my.env variable get from the myApp function into the server function? Perhaps read [1]? [1] https://shiny.rstudio.com/articles/function.html -- Sent from my phone. Please excuse my brevity. On September 21, 2017 8:13:15 AM PDT, Thierry Onkelinx wr

Re: [R] "XLConnect" packages; Excel dates read incorrectly

2017-09-24 Thread Jeff Newmiller
FYI: Most files you might attach to an email sent to the mailing list will not transmitted to us due to virus propagation policies of the mailing list (they are removed see the Posting Guide). The best method for sharing binary files is to to put them on a website like Dropbox or Google Driv

Re: [R] gsDesign Pocock & OBF boundary

2017-09-24 Thread Jeff Newmiller
Still failed. The first secret is in your email program settings, to use Plain Text format (at least for emails you send to this mailing list). The second secret tool to use is the reprex package to let you verify that your code example will do on our computers what it is doing on your compute

Re: [R] building random matrices from vectors of random parameters

2017-09-28 Thread Jeff Newmiller
The use of aperm is unnecessary if you call array() properly. ms <- array(c(rep(0, 5),so,sa*m,sa), c(5, 2, 2)) -- Sent from my phone. Please excuse my brevity. On September 28, 2017 9:10:26 AM PDT, Evan Cooch wrote: >Sure -- thanks -- only took me 3-4 attempts to get aperm to work (as >oppose

Re: [R] Converting SAS Code

2017-09-29 Thread Jeff Newmiller
All HTML emails have a plain text part along with the HTML part... but it is usually invisible to the author and is automatically generated by the email composing software and some software is better than others at that job (by a lot). However, without a doubt, sending the email in text form at

Re: [R] fwrite() not found in data.table package

2017-10-02 Thread Jeff Newmiller
You are asking about (a) a contributed package (b) for a package version that is not in CRAN and (c) an R version that is outdated, which stretches the definition of "on topic" here. Since that function does not appear to have been removed from that package (I am not installing a development ver

Re: [R] valid package repositories

2017-10-02 Thread Jeff Newmiller
I tend to regard GitHub as a bit of wild west... anyone can upload anything there, working or not. CRAN packages at least have to compile so there is some additional verification in being there. GitHub does have the advantage that you can easily download it and run an example if the authors hav

Re: [R] RFM Analysis Help

2017-10-04 Thread Jeff Newmiller
You won't deliver your question successfully to the mailing list if you don't follow the Posting Guide, particularly with regard to attachments. The most reliable way is to include your question in the text of your PLAIN TEXT format email with no attachments. Yes, there is an option in Gmail to

Re: [R] Adjusted survival curves

2017-10-07 Thread Jeff Newmiller
Change the columns into factors before you give them to the coxph function, e.g. df$treatment <- factor( df$treatment ) -- Sent from my phone. Please excuse my brevity. On October 7, 2017 5:01:19 PM GMT+01:00, "Ted Beginner (RStudio) via R-help" wrote: > >For adjusted survival curves I took t

Re: [R] comparing two strings from data

2017-10-13 Thread Jeff Newmiller
data_2 <- read.csv("excel_data.csv",stringsAsFactors=FALSE) column_1 <- data_2$data1 column_2 <- data_2$data2 result <- match( column_1, column_2 ) Please read the Posting Guide mentioned at the bottom of this and every posting, in particular about posting plain text so that what we see will be

Re: [R] make check Error: could not get timezone

2017-10-14 Thread Jeff Newmiller
Off topic. Read the Posting Guide. -- Sent from my phone. Please excuse my brevity. On October 14, 2017 11:02:50 AM GMT+01:00, Stephen Berman wrote: >On Fri, 13 Oct 2017 22:36:48 +0200 Stephen Berman > wrote: > >> I just built the latest R-patched from source (SVN-Revision: 73548, >Last >> Chan

Re: [R] make check Error: could not get timezone

2017-10-14 Thread Jeff Newmiller
. -- Sent from my phone. Please excuse my brevity. On October 14, 2017 12:07:37 PM GMT+01:00, Stephen Berman wrote: >On Sat, 14 Oct 2017 11:49:16 +0100 Jeff Newmiller > wrote: > >> Off topic. Read the Posting Guide. > >I did do that before posting; the choice seemed to be betwe

Re: [R] Select part of character row name in a data frame

2017-10-19 Thread Jeff Newmiller
(Re-)read the discussion of indexing (both `[` and `[[`) and be sure to get clear on the difference between matrices and data frames in the Introduction to R document that comes with R. There are many ways to create numeric vectors, character vectors, and logical vectors that can then be used as

Re: [R] nls() and loop

2017-10-20 Thread Jeff Newmiller
?tryCatch -- Sent from my phone. Please excuse my brevity. On October 20, 2017 7:37:12 AM PDT, Evangelina Viotto wrote: >Hello I´m need fitt growth curve with data length-age. I want to >evaluate >which is the function that best predicts my data, to do so I compare >the >Akaikes of different mo

Re: [R] Merging 2 files with different timestamp

2016-05-22 Thread Jeff Newmiller
What time zone are these data in? Does daylight savings adjustment apply? -- Sent from my phone. Please excuse my brevity. On May 22, 2016 9:48:08 AM PDT, Bhaskar Mitra wrote: >Hello, > >My apologies for the earlier posting. There was an error with regard to >my >query : > > >I am trying to mer

Re: [R] Element-by-element multiplication

2016-05-22 Thread Jeff Newmiller
outer( p, a ) -- Sent from my phone. Please excuse my brevity. On May 22, 2016 3:34:31 PM PDT, Jim Lemon wrote: >Hi Steven, > >as.data.frame(sapply(a,"*",p)) > >Jim > > >On Mon, May 23, 2016 at 8:22 AM, Steven Yen wrote: >> Dear R users: >> >> > # p is a vector if length 10 >> > # a is a vect

Re: [R] need help to convert animal ID to a factor

2016-05-22 Thread Jeff Newmiller
I am not familiar with any function called "toFactor". It may be part of some contributed package that you need to re-load. However, one does not ordinarily need to use a package to convert one column of a data frame into a factor, since factors are supported by base R. Eg MyDF$ID <- factor(

Re: [R] WG: Filtering String Variables (SOLVED)

2016-05-23 Thread Jeff Newmiller
Perhaps ds_example <- ds_example[ with( ds_example, 1 < ave( Debitor, Debitor, FUN=length ) ), ] -- Sent from my phone. Please excuse my brevity. On May 23, 2016 6:57:04 AM PDT, g.maub...@weinwolf.de wrote: >Hi All, > >the solution for my question is as follows > >## Filter duplicates and corr

Re: [R] promoting scalar arguments to vectors in a function

2016-05-23 Thread Jeff Newmiller
Scalar values in R are just vectors of length 1. The "promotion" you are thinking of is "recycling" that automatically occurs when vectors of different lengths are supplied to certain operations. One shortcut might be to put them all into a data frame using the data.frame() function. Otherwis

Re: [R] Merging 2 files with different timestamp

2016-05-23 Thread Jeff Newmiller
would warn against using POSIXlt for merging, though, for poor efficiency reasons. On Mon, 23 May 2016, Bhaskar Mitra wrote: Dear Jeff, Time zone is UTC. No, daylight savings time does not apply. regards, bhaskar On Sun, May 22, 2016 at 4:10 PM, Jeff Newmiller wrote: What time zone are the

Re: [R] WARNING: Method convertPointFromBase

2016-05-23 Thread Jeff Newmiller
This is almost certainly a message from a contributed package, not from R itself. Please figure out which package you are using and read the documentation for that package. -- Sent from my phone. Please excuse my brevity. On May 23, 2016 1:37:22 PM PDT, Fabian Schalle wrote: >Hello, >I’ve n

Re: [R] Reduce does not work with data.table?

2016-05-25 Thread Jeff Newmiller
This is a design feature of data.table objects, which don't conform to the normal functional programming paradigm that R is usually designed to adhere to and which Reduce expects. Specifically, they normally modify in-place rather than leaving the original object alone. In short, don't do that

Re: [R] mixed models

2016-05-25 Thread Jeff Newmiller
You forgot to show the commands to us that you used to read the data in with (your example is not "reproducible"). This step can make all the difference in the world as to whether your analysis commands will work or not. -- Sent from my phone. Please excuse my brevity. On May 25, 2016 11:59:06

Re: [R] mixed models

2016-05-25 Thread Jeff Newmiller
excuse my brevity. On May 25, 2016 2:26:54 PM PDT, James Henson wrote: >Good afternoon Jeff, >The sample sizes for levels of the factor "Irrigation" are not equal. >If >'nlme' requires equal sample sizes this may be the problem. The same >data >frame runs in &

Re: [R] Computing means of multiple variables based on a condition

2016-05-25 Thread Jeff Newmiller
rg/posting-guide.html <http://www.r-project.org/posting-guide.html> and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] rollapply and difftime

2016-05-26 Thread Jeff Newmiller
What about just diff( dts ) or as.numeric( diff( dts ), units="days" ) ? -- Sent from my phone. Please excuse my brevity. On May 26, 2016 5:09:20 PM PDT, "MacQueen, Don" wrote: >You want the number of days between dates? >Does this do the trick? > >dts <- Sys.Date()+ c(1,2,3,5,6,9) >dts[-1]

Re: [R] add value to Bar chart ggplot2

2016-05-27 Thread Jeff Newmiller
I think you need to read those questions again more carefully... particularly the second one. -- Sent from my phone. Please excuse my brevity. On May 27, 2016 7:41:25 AM PDT, "ch.elahe via R-help" wrote: >Thanks Ulrik, >But in these examples they want to mark the percentage or frequency of >p

Re: [R] couldn't install pcalg package in R 3.1.3

2016-05-27 Thread Jeff Newmiller
If you read the Posting Guide it warns you against posting in HTML (it doesn't say why but basically what you think you sent is not necessarily what we saw). It also mentions that you should update to the latest version of R (yours is not) if you want help (though we might try anyway). It also m

Re: [R] couldn't install pcalg package in R 3.1.3

2016-05-27 Thread Jeff Newmiller
again. -- Sent from my phone. Please excuse my brevity. On May 27, 2016 11:45:38 AM PDT, Lida Zeighami wrote: >Thank you Jeff for your reply, > >I've run install.packages( "pcalg" ) in my R version 3.1.3 but got >error: > >- package âpcalgâ is not available (f

Re: [R] Dynamically populate a vector by iteratively applying a function to its previous element.

2016-05-27 Thread Jeff Newmiller
You have set yourself an impossible goal. Either you can reformulate your problem as non-iterative and can process your data as arrays, or you have to use some kind of for loop. The lapply and Vectorize functions are popular "pretty" ways to do this, but they amount to hidden for loops. Note t

Re: [R] read.fortran format

2016-05-27 Thread Jeff Newmiller
Your rather sarcastic comment about knowledge given by John's mother seems inappropriate, given that he told you where his information came from and it is the first place you should have looked. The bit about the decimal leading to a shift in the decimal place pointed out by Bill is a bit obsc

Re: [R] Creating R file

2016-05-28 Thread Jeff Newmiller
This sounds like homework, which has been determined to be off-topic on this help list. Please read the Posting Guide before posting. That said, it would appear the OP may need to read about data frames in, say, the Introduction to R... and perhaps about matrices... and using the as.* function

Re: [R] colored table

2016-05-28 Thread Jeff Newmiller
If you don't mix the text and color, heatmaps are pretty standard presentation techniques. -- Sent from my phone. Please excuse my brevity. On May 28, 2016 7:41:53 AM PDT, Bert Gunter wrote: >Hi Naresh: > >I shall be brief, as discussions of what statistical/graphical >techniques >to use are l

Re: [R] read multiple sheets of excel data into R

2016-05-28 Thread Jeff Newmiller
Apparently you need to get your Java runtime setup, or install Perl, depending which of these tools you want to use. Or if your data are laid out simply, you might be able to use the readxl package. -- Sent from my phone. Please excuse my brevity. On May 28, 2016 10:55:50 AM PDT, li li wrot

Re: [R] Trimming time series to only include complete years

2016-05-28 Thread Jeff Newmiller
tat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --- Jeff Newmiller

Re: [R] Application of "merge" and "within"

2016-05-28 Thread Jeff Newmiller
Why do you want to do this? -- Sent from my phone. Please excuse my brevity. On May 27, 2016 4:00:14 PM PDT, Santosh wrote: >Dear Rxperts! > >Is there a way to compute relative values.. using within().. function? > >Any assistance/suggestions are highly welcome!! >Thanks again, >Santosh... >

Re: [R] matrix indexing/subset error

2016-05-30 Thread Jeff Newmiller
z %% 2 == 1 has 12 logical values. What do you expect R to do with it worth respect to 4 rows? -- Sent from my phone. Please excuse my brevity. On May 30, 2016 11:38:46 AM PDT, Carl Sutton via R-help wrote: >Hi Guru's >In my quest to understand R I have what I thought was a simple exercise

Re: [R] Trimming time series to only include complete years

2016-05-30 Thread Jeff Newmiller
al water year result <- 0 == wy1 # if last day is not Sep 30, mark last water year as partial if ( 8 != dtl$mon[ length( d ) ] | 30 != dtl$mday[ length( d ) ] ) { result[ wy1[ length( d ) ] == wy1 ] <- TRUE } result } dat2 <- dat[ !isPartialWaterYear( dat$Date ), ] On

Re: [R] email threads chronology

2016-05-30 Thread Jeff Newmiller
e https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. --- Jeff Newmiller

Re: [R] Extract from a text file

2016-05-30 Thread Jeff Newmiller
BE 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 provide commented, minimal, self-contained, reproducible code. --- Jeff NewmillerThe .

Re: [R] Difference subsetting (dataset$variable vs. dataset["variable"]

2016-05-31 Thread Jeff Newmiller
You were clearly mistaken. dataframe$column is almost the same as dataframe[["column"]], except that the $ does partial matching. Both of these "extract" a list element. A data frame is a list where all elements are vectors of the same length. A list is a vector where each element can refer

Re: [R] How to import sensitive data when multiple users collaborate on R-script?

2016-05-31 Thread Jeff Newmiller
Assume everyone will begin their work in a suitable working directory for their computer. Put data in that working directory or some directory "near" it. Then use relative paths to the data instead of absolute paths (don't use paths that start with "/"). I usually start by reading in a "configur

Re: [R] Whether statistical background is must to learn R language

2016-05-31 Thread Jeff Newmiller
In every activity, knowing something about it allows you to avoid repeating the mistakes of the past. There are non-statistical uses of programming languages, so you could use it for domains you are familiar with. Or you could see some intriguing statistical analysis and study in that area to un

Re: [R] Application of "merge" and "within"

2016-05-31 Thread Jeff Newmiller
What is complicated about merge( q, r )? Keep in mind that there is nothing simple about the rules for non-standard evaluation of variables that within() uses, and it only gets more complicated if you try to apply those rules to two data frames at once. While I am not quite sure I understand wh

Re: [R] Application of "merge" and "within"

2016-05-31 Thread Jeff Newmiller
t;within" function, >is >pretty straight forward.. At times there are situations when many, if >not >all, of the operations are needed to be done within the scope the >"within" >environment.. > >Thanks so much.. >Regards, >Santosh > >On Tue, May 31

Re: [R] Extract from a text file

2016-05-31 Thread Jeff Newmiller
phone. Please excuse my brevity. On May 31, 2016 6:26:31 PM PDT, Val wrote: >Thank you so much Jeff. It worked for this example. > >When I read it from a file (c:\data\test.txt) it did not work > >KLEM="c:\data" >KR=paste(KLEM,"\test.txt",sep="") >i

Re: [R] Training set in Self organizing Map

2016-06-01 Thread Jeff Newmiller
You did not send sample of your data, using dput. Before doing that, I suggest peeling apart your troublesome line of code yourself: str( as.matrix( scale( subdf ) ) ) str( scale( subdf ) ) str( subdf ) And then think about what the scale function does. Does it make sense to ask it to scale c

Re: [R] Making an if condition variable ?

2016-06-01 Thread Jeff Newmiller
Beware of getting too "meta" in your programming... it is rarely worth it. Just write the code and move on with life. That is the beauty of a scripting language. -- Sent from my phone. Please excuse my brevity. On June 1, 2016 7:30:29 PM PDT, ce wrote: > >Dear all, > >I want to make an if con

Re: [R] Convert ncdf data to dataframe

2016-06-02 Thread Jeff Newmiller
The answer to your question is "yes". You probably need to make your example reproducible by including (or referencing by URL) sample data if you want a more complete response. -- Sent from my phone. Please excuse my brevity. On June 2, 2016 1:42:55 AM PDT, Miluji Sb wrote: >Dear all, > >I ha

Re: [R] not common records

2016-06-02 Thread Jeff Newmiller
?merge Pay attention to the all-whatever parameters. -- Sent from my phone. Please excuse my brevity. On June 2, 2016 7:04:47 PM PDT, Ashta wrote: >I have 2 data sets. File1 and File2. Some records are common to both >data sets. For those common records I want get the difference between >d_x1

Re: [R] which function

2016-06-04 Thread Jeff Newmiller
The median is not always a member of the data set. What do you really want? I for one would want people to follow the guidance in the footer on every email on this mailing list. -- Sent from my phone. Please excuse my brevity. On June 4, 2016 9:01:41 AM PDT, Gafar Matanmi Oyeyemi wrote: >De

Re: [R] Faster Multivariate Normal

2016-06-07 Thread Jeff Newmiller
The help file ?dmvnorm is your friend. Read about "x". ghv <- matrix( gh[ as.vector( idx ) ], ncol = dm ) adjFactor2 <- dmvnorm( ghv, mean = mu, sigma = sigma ) -- Sent from my phone. Please excuse my brevity. On June 7, 2016 10:19:53 AM PDT, "Doran, Harold" wrote: >Thanks, Duncan. Not sure I f

Re: [R] Knitr R - how to draw plot exactly at place of plot function call in output document?

2016-06-08 Thread Jeff Newmiller
I would echo the suggestion that the knitr Google group or stackexchange.com would be better than this list for this question. I also suggest that you look at http://yihui.name/knitr/demo/child/ and make a reproducible example if you decide to ask for more help in one of those forums. -- Sent

Re: [R] Reading and converting time data via read.table

2016-06-08 Thread Jeff Newmiller
The canonical way to store times is as difftime vectors. However, there is no simple way to import e.g. HH:MM data directly into such vectors, so you need to embed such times into a longer string that includes a fixed date. After conversion to POSIXct you can subtract the fixed date to get the

Re: [R] R getting "Killed" while running VAR model

2016-06-08 Thread Jeff Newmiller
1. Don't allocate it. 2. If it was, would it make a difference? Seriously, some algorithms need more memory than others, and some packages are more wasteful than others. R is not monolithic... sometimes you just have to roll up your sleeves or buy more memory. -- Sent from my phone. Please

Re: [R] New installation

2016-06-10 Thread Jeff Newmiller
Re this thread: Please stop with the "my favorite Linux" messages. If you have concrete direction as to why R is well supported (preferably links to detailed instructions), that could be construed as "R-help", but "I like it" is unlikely to be useful to an inexperienced user. -- Sent from my ph

Re: [R] summing up a column.

2016-06-10 Thread Jeff Newmiller
Multiple posting happens when you are learning a new system, but reading the posting guide can keep the bleeding down. 1) There is a no-homework policy on this list... different educational organizations have different standards for what is acceptable outside help, so you should be using the s

Re: [R] problem in R2OpenBUGS

2016-06-11 Thread Jeff Newmiller
This is not a reproducible example, and posting in HTML format frequently corrupts R code so don't do it. -- Sent from my phone. Please excuse my brevity. On June 11, 2016 11:15:38 AM PDT, thanoon younis wrote: >Dear R- users > >I have a problem in the R-code, i want to draw some plots in R,h

Re: [R] problem in R2OpenBUGS

2016-06-11 Thread Jeff Newmiller
/ -- Sent from my phone. Please excuse my brevity. On June 11, 2016 11:36:58 AM PDT, thanoon younis wrote: >Thank you very much for your response, how can i solve this problem, i >want >to draw at least BGR plots? > > >Regards > >On 11 June 2016 at 21:33, Jeff Newmiller

Re: [R] summing up a column.

2016-06-13 Thread Jeff Newmiller
e: Ok. Instead of explaining what you have, please send a result of dput(B) and dput(A) And set you mail client to send plain text mail otherwise your code is barely readable. What do you want to do with printed values? What is B? From this it seems that it is data frame but then you try

Re: [R] Binary Value into Text

2016-06-13 Thread Jeff Newmiller
__ 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 provide commented, minimal, self-contained, reproducible code. ---

Re: [R] AR1 model using ARIMA

2016-06-14 Thread Jeff Newmiller
Looks like you forgot to read the Posting Guide, too. -- Sent from my phone. Please excuse my brevity. On June 14, 2016 6:30:23 AM PDT, "T.Riedle" wrote: >Sorry, I forgot to attach the file. > > > Dear R users, >I have not received any help regarding my p

Re: [R] Error in twitterR package

2016-06-15 Thread Jeff Newmiller
I have never used that package, but the error message seems clear. You need to use the correct arguments to the setup_twitter_oauth function, and that requires that you interact with twitter parsonally to obtain appropriate credentials. While someone here may be able to give you a pointer as to

Re: [R] Excluding coordinates that fall within a circle

2016-06-17 Thread Jeff Newmiller
This is mostly a domain-specific question about coordinate conversion and algebra, not really about R. However, there are packages that could be useful for this problem that are discussed in the CRAN "Analysis of Spatial Data" Task View [1] and on the R-sig-geo mailing list [2]. Some points to

Re: [R] merging df with world map

2016-06-17 Thread Jeff Newmiller
You should look at your own data before you post. The information in COUNTRY is not the same as the information in region. Also, dput is better than str for posting questions. -- Sent from my phone. Please excuse my brevity. On June 17, 2016 1:06:29 PM PDT, "ch.elahe via R-help" wrote: >Hi a

Re: [R] Fwd: Matrix Constraints in R Optim

2016-06-17 Thread Jeff Newmiller
Your code is corrupt because you failed to send your email in plain text format. You also don't appear to have all data needed to reproduce the problem. Use the dput function to generate R code form of a sample of your data. -- Sent from my phone. Please excuse my brevity. On June 17, 2016 1

Re: [R] Problems with Mann-Kendall trend test

2016-06-17 Thread Jeff Newmiller
Not reproducible. Use dput to generate R code form of your data along with the code that gave you the error, and set the email to plain text only when you send it so it doesn't get corrupted when the html is stripped on the mailing list. -- Sent from my phone. Please excuse my brevity. On Jun

Re: [R] Fwd: Matrix Constraints in R Optim

2016-06-17 Thread Jeff Newmiller
of Error.func, and the call to optim if you do it right. [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example -- Sent from my phone. Please excuse my brevity. On June 17, 2016 3:10:41 PM PDT, Narendra Modi wrote: >how to do that Jeff? I am newbie to R. &g

Re: [R] Fwd: Matrix Constraints in R Optim

2016-06-21 Thread Jeff Newmiller
ata.matrix.time, my.data.matrix.inj, my.data.matrix.prod,my.data.var,my.data.var.mat) diff.values <- my.data.matrix.prod-Calc.Qjk.Value#FIND DIFFERENCE BETWEEN CAL. MATRIX AND ORIGINAL MATRIX Error <- ((colSums ((diff.values^2), na.rm = FALSE, dims = 1)

Re: [R] Fwd: Matrix Constraints in R Optim

2016-06-21 Thread Jeff Newmiller
Not my problem. You are the one applying constraints. -- Sent from my phone. Please excuse my brevity. On June 21, 2016 1:13:35 PM PDT, Priyank Dwivedi wrote: >Thank you Jeff. >It seems to definitely solve it but the "total_error" is very high. >Around 399. >I also trie

Re: [R] filtering data by the time stamp

2016-06-21 Thread Jeff Newmiller
This is normal. R is a (mostly) functional language, which means functions normally don't have side effects like changing input data. Try saving the result of your function calls in a new object. -- Sent from my phone. Please excuse my brevity. On June 21, 2016 3:57:54 PM PDT, Alice Domalik <

Re: [R] Saving .eps files with Times New Roman font

2016-06-23 Thread Jeff Newmiller
Not that I am an expert, but you should probably be using the direct approach rather than pointing and clicking. ?postscript ?cairo_ps -- Sent from my phone. Please excuse my brevity. On June 23, 2016 10:15:15 AM PDT, A A via R-help wrote: >In RGui, I'm running the following bit of code: >win

Re: [R] Fwd: Fwd: RE: Heatmap.2 Breaks argument

2016-06-24 Thread Jeff Newmiller
Did you try the maintainer() function? -- Sent from my phone. Please excuse my brevity. On June 24, 2016 10:45:07 AM PDT, fgoetz wrote: >Dear Mr. or Mrs., > >Please see the previous messages for information. I had a problem with >the heatmap.2 breaks argument and was wondering if someone could

Re: [R] Rattle

2016-06-24 Thread Jeff Newmiller
This is like asking, "My car doesn't work. Can anyone tell me what is wrong?" Please spend some time reading (and paying attention to) the Posting Guide before sending any more emails here. -- Sent from my phone. Please excuse my brevity. On June 24, 2016 11:49:32 AM PDT, deva d wrote: >hi al

Re: [R] How I can calculate the value of response variable

2016-06-26 Thread Jeff Newmiller
Can you provide an example of what you mean? This is not a statistical theory forum, so you should be able to describe the calculation clearly if you want help translating it into R. Also, read the Posting Guide, which among other things warns you that this is a plain text mailing list so your

Re: [R] Fwd: Fwd: RE: Heatmap.2 Breaks argument

2016-06-27 Thread Jeff Newmiller
: ?heatmap.2 or help.search( "heatmap.2" ) if you have installed that package but not yet loaded it using library(). -- Sent from my phone. Please excuse my brevity. On June 27, 2016 7:14:01 AM PDT, fgoetz wrote: >Hi Jeff, > >I just tried the maintainerfunction but it did no

Re: [R] API key at start-up

2016-06-27 Thread Jeff Newmiller
"Assign ... key to a value" defies my understanding of those terms, and includes no context (API is a very vague term). We are not (necessarily) subject area experts in your preferred domain of jargon. Doing things when you start up your session is typically done as described in ?Startup -- S

Re: [R] performance of do.call("rbind")

2016-06-27 Thread Jeff Newmiller
Your description of the data frames as "approx" puts the solution to considerable difficulty and speed penalty. If you want better performance you need a better handle on the data you are working with. For example, if you knew that every data frame had exactly three columns named identically a

Re: [R] performance of do.call("rbind")

2016-06-27 Thread Jeff Newmiller
) with approx 200k data.frames with dim(data.frame) approx 100x3. a call data <-do.call("rbind", data.list) does not complete - run time is prohibitive (I killed the rsession after 5 minutes). I would think that merging data.frame's is a common operation. Is

Re: [R] (sin asunto)

2016-06-28 Thread Jeff Newmiller
Follow the listinfo link in the footer. You should be in possession of a password with which to make changes to your subscription there. -- Sent from my phone. Please excuse my brevity. On June 28, 2016 2:46:19 AM PDT, "Monse Buenaño" wrote: >Excuse me, I want to change my e-mail adress, where

Re: [R] Not able to install RODBC package

2016-06-28 Thread Jeff Newmiller
Try another mirror? Try the RMySQL package instead? Ask on R-sig-db? -- Sent from my phone. Please excuse my brevity. On June 28, 2016 1:36:47 PM PDT, Vivek Singh wrote: >> install.packages('RODBC') >Installing package into ‘/home/vivek/R/x86_64-pc-linux-gnu-library/3.0’ >(as ‘lib’ is unspecifi

Re: [R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

2016-07-02 Thread Jeff Newmiller
I can understand you not wanting to supply your actual data online, but only you know what your data looks like so only you can create a simulated data set that we could show you how to work with. -- Sent from my phone. Please excuse my brevity. On July 2, 2016 2:57:39 AM PDT, Kevin Wamae wro

Re: [R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

2016-07-02 Thread Jeff Newmiller
. Please excuse my brevity. On July 2, 2016 3:41:07 PM PDT, Kevin Wamae wrote: >Hi Jeff, sorry for referring to you as Jennifer earlier, accept my >apologies. > >I attached a sample dataset in the question, am afraid it must have >failed to attach. > >I have attached it

Re: [R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

2016-07-03 Thread Jeff Newmiller
Message- >> From: kwa...@kemri-wellcome.org >> Sent: Sun, 3 Jul 2016 09:39:59 + >> To: jdnew...@dcn.davis.ca.us, r-help@r-project.org >> Subject: Re: [R] R - Populate Another Variable Based on Multiple >> Conditions | For a Large Dataset >> >> Hi Je

Re: [R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

2016-07-03 Thread Jeff Newmiller
t0 %>% select( ID, admin_period1, end=start ) , by = c( ID="ID", admin_period ="admin_period1" ) ) %>% mutate( ddays = end - start ) ) -- Sent from my phone. Please excuse my brevity. On July 3, 2016 10:24:51

Re: [R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

2016-07-03 Thread Jeff Newmiller
%>% mutate( ddays = end - start ) ) -- Sent from my phone. Please excuse my brevity. On July 3, 2016 11:55:14 AM PDT, Kevin Wamae wrote: >Hi Jeff, “likes its Excel”, I don’t follow. Pardon me for any mix up. > >Thanks for the code. After running it, this is the e

Re: [R] R - Populate Another Variable Based on Multiple Conditions | For a Large Dataset

2016-07-03 Thread Jeff Newmiller
/16, 11:28 PM, "Bert Gunter" wrote: > >I haven't followed this thread closely, but if it's not too late, I >might suggest that you stop worrying about how you want your data >frame to look and start worrying about you want to display/analyze >your data. As Jeff su

<    1   2   3   4   5   6   7   8   9   10   >