Re: [R] Question

2015-01-20 Thread Uwe Ligges
On 19.01.2015 23:58, Glenda Palacios wrote: I have any problems in R: The downloaded binary packages are in /var/folders/s9/kr21631n3nj30hb_4td3pv_8gn/T//RtmpDDAFmJ/downloaded_packages Warning messages: 1: In download.file(url, destfile, method, mode = wb, ...) : downloaded length

Re: [R] Question abt 'factanal' function

2015-01-18 Thread PIKAL Petr
Hi here are few points but no answer Please - do not use HTML post - provide some example code and data (preferably by dput function) which illustrate your point - check your data by ?str if they really are what you think they are - be more specific in your statements, we do not know what do

Re: [R] Question about package principal

2015-01-12 Thread William Revelle
As David suggests, look at your data. For instance, there seems to be only 1 case (#2) for seat.width.club with non-zero data. I find it hard to believe that the other planes have seat.widths of 0! I think you probably want to code the 0s as missing, rather than 0. You also want to rethink

Re: [R] Question about package principal

2015-01-11 Thread David Winsemius
On Jan 11, 2015, at 3:55 AM, 오건희 wrote: Hi, I tried to run principal function in the 'psych' package, but it failed to do.. here is both my code and error message. I searched on the web, but couldn't find the exact answer I wanted. data-read.csv(

Re: [R] Question

2014-12-28 Thread Duncan Murdoch
On 28/12/2014 11:12 AM, Iskender Karagul wrote: Dear All, I am a very fresh user of R platform. I completed the download of R for Windows, from the http://cran.r-project.org/ Web address. After opening the program I wanted to Go to Packages Tab and firstly Set CRAN mirror and then

Re: [R] Question

2014-12-28 Thread Jeff Newmiller
This is (mostly) normal. The R software comes with an initial set of packages that are kept in the Program Files directory, which is only modifiable using administrator privileges. If you are running your machine just for you (as most people do) then I highly advise accepting the option during

Re: [R] Question about CHAID

2014-12-17 Thread Achim Zeileis
On Wed, 17 Dec 2014, Francisco M. da Rocha wrote: Hallo there, I would like to work with CHAID, but the newest version of R does have it. So I thought I could use an older version of R which accepts or has the library CHAID. Could you tell me which version it is and where to download it?

Re: [R] Question on R lattice graphics

2014-11-19 Thread Julie Hope
Hi, Ignore the last email - R has plotted the number of data points (100) I have and using that as a scale rather than the normalised data values Sorry to be a pest!! Julie Julie Hope (NERC PhD Student) Sediment Ecology Research Group, University of St Andrews School of Geoscience, Bangor

Re: [R] Question about range of letters

2014-10-04 Thread Ben Bolker
Nia Gupta nia_gupta at yahoo.com writes: Hello, I have a column with a bunch of letters. I would like to keep some of these letters (A,C,D,L) and turn the rest into 'X'. I have tried using ifelse with '|' in between the argument but it didn't work nor did 4 separate ifelse statements.

Re: [R] Question about range of letters

2014-10-04 Thread Robert Baer
On 10/4/2014 8:21 AM, Nia Gupta wrote: Hello, I have a column with a bunch of letters. I would like to keep some of these letters (A,C,D,L) and turn the rest into 'X'. I have tried using ifelse with '|' in between the argument but it didn't work nor did 4 separate ifelse statements.

Re: [R] Question about searchTwitter{twitteR}

2014-09-11 Thread Cory N
You are only able to search twitter history for a short period of time. gnip.com and similar companies offer historical tweets for sale. cn On Sunday, September 7, 2014 9:21:34 AM UTC-5, Axel Urbiz wrote: Hello, The function searchTwitter() with the arguments supplied as below would

Re: [R] Question about searchTwitter{twitteR}

2014-09-07 Thread Amos B. Elberg
Twitter tweets aren't a stable database. I wouldn't expect the search results to stay stable, as tweets are retweeted, deleted, accounts are closed, privacy settings adjusted, etc. And if there are more than 1000 results, I don't know that twitter is internally ordered so you'd get the same

Re: [R] Question regarding the discrepancy between count model parameter estimates between pscl and MASS

2014-08-29 Thread peter dalgaard
I'm no expert on hurdle models, but it seems that you are unaware that the negative binomial and the truncated negative binomial are quite different things. -pd On 29 Aug 2014, at 05:57 , Nick Livingston nlivings...@ymail.com wrote: I have sought consultation online and in person, to no

Re: [R] Question regarding the discrepancy between count model parameter estimates between pscl and MASS

2014-08-29 Thread Achim Zeileis
On Fri, 29 Aug 2014, peter dalgaard wrote: I'm no expert on hurdle models, but it seems that you are unaware that the negative binomial and the truncated negative binomial are quite different things. Yes. You can replicate the truncated count part of the hurdle model with the zerotrunc()

Re: [R] Question regarding the discrepancy between count model parameter estimates between pscl and MASS

2014-08-29 Thread Nick Livingston
: [R] Question regarding the discrepancy between count model parameter estimates between pscl and MASS To: peter dalgaard pda...@gmail.com Cc: Nick Livingston nlivings...@ymail.com, r-help@r-project.org Date: Friday, August 29, 2014, 5:26 AM On Fri, 29 Aug 2014, peter dalgaard wrote: I'm

Re: [R] Question regarding the discrepancy between count model parameter estimates between pscl and MASS

2014-08-29 Thread David Winsemius
...@uibk.ac.at wrote: Subject: Re: [R] Question regarding the discrepancy between count model parameter estimates between pscl and MASS To: peter dalgaard pda...@gmail.com Cc: Nick Livingston nlivings...@ymail.com, r-help@r-project.org Date: Friday, August 29, 2014, 5:26 AM On Fri, 29 Aug 2014

Re: [R] Question regarding the discrepancy between count model parameter estimates between pscl and MASS

2014-08-29 Thread Prof Brian Ripley
: just untick 'binary'.) Thank you again. I appreciate your input. -Nick On Fri, 8/29/14, Achim Zeileis achim.zeil...@uibk.ac.at wrote: Subject: Re: [R] Question regarding the discrepancy between count model parameter estimates between pscl and MASS

Re: [R] Question

2014-07-30 Thread arun
Hi Farnoosh, Regarding the first question: dat2 - dat1 dat1$Mean - setNames(unsplit(sapply(split(dat1[,-1], dat1[,1]),rowMeans, na.rm=T),dat1[,1]),NULL) dat1   Unit q1 q2 q3 Mean 1    A  3  1  2 2.00 2    A  2 NA  1 1.50 3    B  2  2  4 2.67 4    B NA  2  5 3.50 5    C  3  2

Re: [R] Question regarding lattice::levelplot and distribution of colors

2014-07-07 Thread Sunny Srivastava
I am sorry but I think I have been unclear. The problem is not color theme. Assume I have the original data.frame. testdf - structure(list(yy = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c(R, L), class = c(ordered, factor)),

Re: [R] Question regarding lattice::levelplot and distribution of colors

2014-07-07 Thread Duncan Mackay
for certain ranges Duncan From: Sunny Srivastava [mailto:research.b...@gmail.com] Sent: Monday, 7 July 2014 18:57 To: Duncan Mackay Cc: R Subject: Re: [R] Question regarding lattice::levelplot and distribution of colors I am sorry but I think I have been unclear. The problem is not color theme

Re: [R] Question regarding lattice::levelplot and distribution of colors

2014-07-06 Thread David Winsemius
On Jul 6, 2014, at 4:35 PM, Sunny Srivastava wrote: Hello R-helpers: I think there is some problem with my code, but I would like to seek you help because I can't spot it. I have a data.frame defined as follows: testdf - structure(list(yy = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,

Re: [R] Question regarding lattice::levelplot and distribution of colors

2014-07-06 Thread Duncan Mackay
Your y values are not of the type required by levelplot ? levelplot I prefer not to use themes as they do not suit my data here is a way to get what you want - colours are a bit garish but they are some easily to hand breaks/cuts are just what came in a reasonable sequence - yours to change

Re: [R] Question regarding lattice::levelplot and distribution of colors

2014-07-06 Thread Sunny Srivastava
Hello David: Thanks for your response. I am not sure, but isn't an ordered categorical variable integer for all practical purposes? (R L) Further, the problem persists if I change 'at' from seq(-0.3, 0.3, length = 20) to seq(-0.3, 0.3, length = 50; I think this argument is for the color key

Re: [R] question about chi values GLM

2014-06-14 Thread peter dalgaard
The column labeled Deviance pretty much _is_ the chi-square, specifically the likelihood ratio test statistic, which has an asymptotic chi-square distribution. (Using test=Rao gives you the alternative Rao efficient score test, which in your case doesn't make much of a difference.) Notice

Re: [R] question about chi values GLM

2014-06-14 Thread Prof Brian Ripley
On 14/06/2014 09:45, peter dalgaard wrote: The column labeled Deviance pretty much _is_ the chi-square, specifically the likelihood ratio test statistic, which has an asymptotic chi-square distribution. (Using test=Rao gives you the alternative Rao efficient score test, which in your case

Re: [R] Question about setdiff()

2014-06-03 Thread Σταῦρος Μακράκης
There are two kinds of set difference: the usual set difference https://en.wikipedia.org/wiki/Set_difference#Relative_complement, also called the asymmetric difference or relative complement, and the symmetric difference https://en.wikipedia.org/wiki/Symmetric_difference. In R, setdiff(a,b) is

Re: [R] Question about setdiff()

2014-06-02 Thread Jeff Newmiller
About time for you to adjust your expectations... looks right to me from both a mathematical sense and as the functions are designed. --- Jeff NewmillerThe . . Go Live...

Re: [R] Question about setdiff()

2014-06-02 Thread Pascal Oettli
Hello, From the help page: Performs *set* union, intersection, (asymmetric!) difference, equality and membership on two vectors. Hope this helps, Pascal On Mon, Jun 2, 2014 at 3:57 PM, Raphael Päbst raphael.pae...@gmail.com wrote: Hello everyone, I have a question which is probably rooted in

Re: [R] Question about setdiff()

2014-06-02 Thread Raphael Päbst
Thanks everyone! It is just as I expected, I just didn't understand how setdiff() works. Raphael On 6/2/14, Pascal Oettli kri...@ymail.com wrote: Hello, From the help page: Performs *set* union, intersection, (asymmetric!) difference, equality and membership on two vectors. Hope this

Re: [R] Question about setdiff()

2014-06-02 Thread arun
Hi, Please check this link: http://r.789695.n4.nabble.com/meaning-of-asymmetric-on-help-page-for-intersect-td877408.html union(setdiff(v,w), setdiff(w,v)) #or in this case setdiff(union(v,w),intersect(v,w)) #or  setdiff(c(v,w),c(v,w)[duplicated(c(v,w))]) A.K. .pae...@gmail.com wrote: Hello

Re: [R] Question on Cluster Package, agnes() function

2014-05-03 Thread Martin Maechler
Anna F... on Thu, 1 May 2014 22:09:28 + writes: Hi Martin, I am a statistician at National Jewish Health in Colorado, and I have been working on clustering a dataset using Ward's minimum variance. When plotting the dendrogram, the y-axis is labeled as 'height'. Can you

Re: [R] Question about rgamma when the shape and the scale are vectors, not scalars

2014-04-30 Thread Greg Snow
Your command will generate 3 random values from gamma distributions, the first will be from a gamma with shape a[1] and scale b[1], then the 2nd will come from a gamma with shape a[2] and scale b[2] and the 3rd will have shape a[3] and scale b[3]. On Wed, Apr 30, 2014 at 3:00 PM, Stefano Sofia

Re: [R] Question: Do I need to set refit=FALSE when testing for random effects with anova()?

2014-04-07 Thread Christian Brauner
The question has been answered here: http://stackoverflow.com/questions/22892063/do-i-need-to-set-refit-false-when-testing-for-random-effects-in-lmer-models-wi [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] question on more efficient data block-match processing

2014-03-07 Thread Rainer Schuermann
What I would do: # read in your sample data mbr - read.table( clipboard, header = TRUE, stringsAsFactors = FALSE ) # create a vector with the codes you want to consider code.list - c(A,B,C,D,E) # reduce the data accordingly mbr - mbr[ mbr$code %in% code.list, ] # get your model matrix using

Re: [R] Question on 'get'

2014-03-06 Thread Sarah Goslee
Why do you need to use the get() command? If you want to access a column of a known data frame by name: R fakedata - data.frame(A=1:3, B=letters[8:10], C=runif(3)) R fakedata[A] A 1 1 2 2 3 3 If you're trying to access a data frame by name, then you do need get, but can then subset normally.

Re: [R] Question on density values obtained from kde2d() from package MASS

2014-01-23 Thread Peter Löwenberg
Hello Andy, Do you already understand kde2d output? if I run max(tmp$z) do I take the maximum value of the 2d density? Cheers, Peter Em quinta-feira, 24 de novembro de 2011 16h12min19s UTC-2, Andreas Klein escreveu: Hello, I am a little bit confused regarding the density values

Re: [R] Question: reproducibility of random sampling with replacement

2014-01-01 Thread Rui Barradas
Hello, Inline. Em 01-01-2014 22:12, Chee Chen escreveu: Dear All, I would like to ask for your help on reproducibility of random sampling with replacement. For example, one re-samples the rows with replacement of a residual matrix and uses the new residual matrix thus obtained to produce a

Re: [R] Question: reproducibility of random sampling with replacement

2014-01-01 Thread Rolf Turner
Why on earth would you expect S and T to be the same given what you have done. I am unable to rightly apprehend the confusion of ideas that could provoke such a question, (Charles Babbage). You have to set the *same* seed before each construction. I.e. do set.seed(123) before creating S; then

Re: [R] Question: reproducibility of random sampling with replacement

2014-01-01 Thread Jeff Newmiller
If you want to reproduce the same sequence twice, then you need to set the seed at the beginning of each calculation. You are only doing it for the second calculation below. --- Jeff NewmillerThe

Re: [R] Question: reproducibility of random sampling with replacement

2014-01-01 Thread Bert Gunter
You have to set the same seed before each random number generation! You did not do this. Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. H. Gilbert Welch On Wed, Jan 1, 2014 at 2:12

Re: [R] question about how to install package rjava in R 3.02

2013-12-04 Thread Pascal Oettli
Hello, Please read carefully the message. It says you three times that the name is rJava, not rjava. Regards, Pascal On 5 December 2013 13:19, tlw1987 [via R] ml-node+s789695n4681662...@n4.nabble.com wrote: Hello, everybody , recently , I want to install the package rjava in windows 7 64bt.

Re: [R] Question about ifelse() XXXX

2013-12-02 Thread Duncan Murdoch
On 02/12/2013 2:08 PM, Dan Abner wrote: Hi all, Can anyone explain what is happening with element 4,4 of c1? ifelse() is not recongizing it as value 1: FAQ 7.31. Duncan Murdoch c1 q1q2q3q4 q1 1.000 0.6668711 0.6948419 0.5758860 q2 0.6668711

Re: [R] Question about ifelse() XXXX

2013-12-02 Thread William Dunlap
What is the value of diag(c1) - 1 ? (Or, use digits=16 when printing c1.) Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Dan Abner Sent: Monday, December 02, 2013

Re: [R] Question about compatibility

2013-11-23 Thread Patrick Burns
If you are anything like me, then the main thing that you could do to win the game is to type the name of the file correctly. Given that is a near impossibility for me, when I'm on Windows I use 'file.choose' to get the correct name. Your command would look like:

Re: [R] Question about error of non-numeric argument to binary operator

2013-11-22 Thread David Winsemius
On Nov 22, 2013, at 1:28 AM, Noor Aziani Bt Harun wrote: Hi, I'm going to run my thesis that use R language for Lee-Carter method but some error occur when I'm running this code. Please guide me Sir. male.lca-lca(malaysia.male) Error in pop * mx : non-numeric argument to binary

Re: [R] Question on xyplot

2013-11-21 Thread Duncan Mackay
-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Carl Witthoft Sent: Thursday, 21 November 2013 23:22 To: r-help@r-project.org Subject: Re: [R] Question on xyplot you didn't show us the code you used to generate the legend. I'm guessing you want to add to the legend list

Re: [R] Question on xyplot

2013-11-21 Thread Carl Witthoft
you didn't show us the code you used to generate the legend. I'm guessing you want to add to the legend list something like lty=0:7 . KB wrote I recently started using R, so I'm not really experienced with it. My question is on adjusting xyplots to get lty lines instead of coloured lines.

Re: [R] question regarding cast function in reshape package with mixture of numeric and character

2013-09-26 Thread Jeff Newmiller
I am baffled. Just what do you want it to do? In melted form the data are all in one column and so are necessarily of one type... there are no mixed types to cast. As usual, assistance here will be more useful when you follow the Posting Guide and post plain text only and give reproducible

Re: [R] question about lines

2013-09-19 Thread meng
Ok,many thanks for your detailed answer. At 2013-09-18 19:20:26,Duncan Murdoch murdoch.dun...@gmail.com wrote: On 13-09-18 1:38 AM, meng wrote: Oh,yes, I found out this according to your reply.Thanks. As to time series analysis, in order to show the effect of smoothing or filtering,the

Re: [R] question about lines

2013-09-18 Thread meng
Oh,yes, I found out this according to your reply.Thanks. As to time series analysis, in order to show the effect of smoothing or filtering,the common command is: plot(ts0); lines(fitted(...)) But not lines(fitted(...) ~ time(ts) ) How to understand this then? Many thanks. Best. At

Re: [R] question about lines

2013-09-18 Thread Duncan Murdoch
On 13-09-18 1:38 AM, meng wrote: Oh,yes, I found out this according to your reply.Thanks. As to time series analysis, in order to show the effect of smoothing or filtering,the common command is: plot(ts0); lines(fitted(...)) But not lines(fitted(...) ~ time(ts) ) How to understand this then?

Re: [R] question about lines

2013-09-17 Thread Bretschneider (R)
Dear meng, Re: Hi all: I met a question about lines. attach(cars) plot(dist ~ speed) #add the regression line to the plot lines(fitted(lm(dist~speed)) ~ speed) plot(dist ~ speed) #what kind of curve does the following command add to the plot? lines(fitted(lm(dist~speed)))

Re: [R] question about lines

2013-09-17 Thread Duncan Murdoch
On 13-09-17 8:06 AM, meng wrote: Hi all: I met a question about lines. attach(cars) plot(dist ~ speed) #add the regression line to the plot lines(fitted(lm(dist~speed)) ~ speed) plot(dist ~ speed) #what kind of curve does the following command add to the plot? lines(fitted(lm(dist~speed)))

Re: [R] question about lines

2013-09-17 Thread meng
Thanks for your reply. Is fitted(lm(...)) the same as values of lines(values)? If yes,then why the range of lines(values) is different from range(fitted(lm(...)))? If no, what values refers to? At 2013-09-17 20:56:04,Duncan Murdoch murdoch.dun...@gmail.com wrote: On 13-09-17 8:06 AM,

Re: [R] question about lines

2013-09-17 Thread meng
Thanks for your reply. Yes, abline is much better,but it can only add straight line,and lines(fitted(lm(y~x)) ~ x) can do the same thing but not constrain to straight line. At 2013-09-17 20:45:08,Bretschneider (R) brets...@xs4all.nl wrote: Dear meng, Re: Hi all: I met a question

Re: [R] question about lines

2013-09-17 Thread Duncan Murdoch
On 13-09-17 6:36 PM, meng wrote: Thanks for your reply. Is fitted(lm(...)) the same as values of lines(values)? If yes,then why the range of lines(values) is different from range(fitted(lm(...)))? You are plotting against the wrong x axis, and you don't see all the values. Duncan Murdoch

Re: [R] Question about R2 in pls package

2013-09-05 Thread Bjørn-Helge Mevik
Euna Jeong eaje...@gmail.com writes: I have questions about R2 used in pls (or multivariate analysis). Is R2 same with the square of the PCC (Pearson Correlation Coefficient)? If you read the manual for R2 in the pls package, it will tell you how R2 is calculated there, and that for

Re: [R] Question about R2 in pls package

2013-09-05 Thread Euna Jeong
Thank you David, it is a good resouce to find related subjects. I need time to understand the topics. Thank you again Bjørn-Helge for your response. Euna [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Question about R2 in pls package

2013-09-04 Thread David Winsemius
On Sep 4, 2013, at 10:39 PM, Euna Jeong wrote: Hi, I have questions about R2 used in pls (or multivariate analysis). Is R2 same with the square of the PCC (Pearson Correlation Coefficient)? I found the following description from wiki (Coefficient of determination)

Re: [R] Question about the prediction plot in pls package

2013-09-03 Thread Bjørn-Helge Mevik
Euna Jeong eaje...@gmail.com writes: R plot(gas1, ncomp=2, asp = 1, line = TRUE) This shows only the cross-validated predictions. If you add the argument which = c(train, validation) (see ?predplot.mvr), you will get both. However, you will get them in separate panels in the plot. If you

Re: [R] Question about the prediction plot in pls package

2013-09-03 Thread Euna Jeong
Thank you very much! On Tue, Sep 3, 2013 at 3:18 PM, Bjørn-Helge Mevik b.h.me...@usit.uio.nowrote: Euna Jeong eaje...@gmail.com writes: R plot(gas1, ncomp=2, asp = 1, line = TRUE) This shows only the cross-validated predictions. If you add the argument which = c(train, validation)

Re: [R] question for diallel analysis

2013-08-12 Thread Kevin Wright
Your post is incomprehensible. Please do read the posting guide: http://www.R-project.org/posting-guide.html That said, this might help: http://stats.stackexchange.com/questions/9099/how-to-perform-diallel-analysis-in-r Kevin On Sun, Aug 11, 2013 at 1:02 AM, waqas shafqat waqas1...@gmail.com

Re: [R] question: data.frame data conversion

2013-08-04 Thread Rui Barradas
Hello, First of all, do _not_ create a data frame with as.data.frame(cbind(...)) Instead, use z = data.frame(x, y) As for your question, try the following. library(reshape2) fun - function(z){ zs - split(z, x) n - length(zs) m - nrow(zs[[1]]) zz - cbind(id =

Re: [R] question: data.frame data conversion

2013-08-04 Thread Rui Barradas
8 c3 -Original Message- From: Rui Barradas [mailto:ruipbarra...@sapo.pt] Sent: Sunday, August 04, 2013 1:57 PM To: Brijesh Gulati Cc: r-help@r-project.org Subject: Re: [R] question: data.frame data conversion Hello, First of all, do _not_ create a data frame with as.data.frame(cbind

Re: [R] question: data.frame data conversion

2013-08-04 Thread Brijesh Gulati
-Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: Sunday, August 04, 2013 1:30 PM To: Brijesh Gulati Cc: R help Subject: Re: [R] question: data.frame data conversion #actually, this would be more compact data.frame(split(z[,-1],z$x)) A.K. - Original Message - From

Re: [R] question: data.frame data conversion

2013-08-04 Thread arun
#actually, this would be more compact data.frame(split(z[,-1],z$x)) A.K. - Original Message - From: arun smartpink...@yahoo.com To: Brijesh Gulati brij...@gmail.com Cc: R help r-help@r-project.org Sent: Sunday, August 4, 2013 1:27 PM Subject: Re: [R] question: data.frame data conversion

Re: [R] question: data.frame data conversion

2013-08-04 Thread arun
Hi, May be: z-data.frame(x,y,stringsAsFactors=FALSE)  simplify2array(split(z[,-1],z$x)) #   a    b #[1,] 1.0 1.01 #[2,] 1.2 1.03 #[3,] 1.1 1.00  as.data.frame(simplify2array(split(z[,-1],z$x))) A.K. - Original Message - From: Brijesh Gulati brij...@gmail.com To:

Re: [R] question: data.frame data conversion

2013-08-04 Thread arun
' smartpink...@yahoo.com Cc: 'R help' r-help@r-project.org Sent: Sunday, August 4, 2013 3:27 PM Subject: RE: [R] question: data.frame data conversion Wow... great and really compact solution. One follow-up question. How do I solve the problem if the number of repeating values are different. For instance

Re: [R] question: data.frame data conversion

2013-08-04 Thread Brijesh Gulati
[mailto:ruipbarra...@sapo.pt] Sent: Sunday, August 04, 2013 1:57 PM To: Brijesh Gulati Cc: r-help@r-project.org Subject: Re: [R] question: data.frame data conversion Hello, First of all, do _not_ create a data frame with as.data.frame(cbind(...)) Instead, use z = data.frame(x, y) As for your question

Re: [R] question: data.frame data conversion

2013-08-04 Thread arun
Sent: Sunday, August 4, 2013 3:47 PM Subject: Re: [R] question: data.frame data conversion Hello, You're insisting in as.data.frame(cbind(...)). Don't do that. Just see the difference: z = data.frame(x, y) str(z) 'data.frame':  8 obs. of  2 variables:   $ x: Factor w/ 3 levels a,b,c: 1 1 1 2 2

Re: [R] question...

2013-07-19 Thread arun
Hi, dat-read.table(text=   1 0  1  1  1  1    0  0  1  0  0  1    1  0  0  0  0  0    2  1  1  2  1  1 ,sep=,header=FALSE)  which(sapply(seq_len(nrow(dat)),function(i) wilcox.test(unlist(dat[i,]))$p.value)0.05) #there will be warnings() though #[1] 2 3 table(sapply(seq_len(nrow(dat)),function(i)

Re: [R] Question on plotting with googleVis

2013-07-17 Thread Christofer Bogaso
Hello Arnaud, Thank you for your pointer. However I need to more clarification. I want to control the max. and min. values for the x-axis, as well as number of vertical gridlines to be displayed. I tried the following: MyData - data.frame(Names1 = paste(XXX, 1:150), Values1 = 1:150 + 10,

Re: [R] Question on plotting with googleVis

2013-07-17 Thread Arnaud Michel
Hi You can do a rotation and use gvisColumnChart instead gvisBarChart plot(gvisColumnChart(MyData, xvar=Names1, yvar=c(Values1, Values2),options=list(width=2500,height=1000))) Michel Le 17/07/2013 15:57, Christofer Bogaso a écrit : Hello Arnaud, Thank you for your pointer. However I need to

Re: [R] Question on plotting with googleVis

2013-07-17 Thread Christofer Bogaso
Hi Arnaud, Thanks for your answer. However I prefer to have Horizontal bar chart, because length of the strings for x-axis are quite large, therefore it would be better to put them vertically one-below-another instead horizontally. Therefore I would really appreciate if someone points me how to

Re: [R] Question on plotting with googleVis

2013-07-16 Thread Arnaud Michel
You can try with list options : plot(gvisBarChart(MyData, xvar=Names1, yvar=c(Values1, Values2), options=list(width=1200,height=1500))) Le 15/07/2013 20:00, Christofer Bogaso a écrit : Hello again, Let say I have following data-frame: MyData - data.frame(Names1 = paste(XXX, 1:150), Values1

Re: [R] Question on plotting with googleVis

2013-07-16 Thread Greg Snow
The HTKIdentify (requires tcltk package) and HWIdentify (windows only) functions in the TeachingDemos package will show identifying information on a plot for the point being hovered over. Both functions are pure R code, so if they don't work for you as is you can modify the source to make

Re: [R] Question on Simple Repeated Loops

2013-06-12 Thread Berend Hasselman
On 12-06-2013, at 04:53, Abdul Rahman bin Kassim (Dr.) rahm...@frim.gov.my wrote: Dear R-User, Appreciate any helps. It looks simple, but I don't have a clue. Given that I have a dataframe of tree population with three variables: sp=species , d0=initial_size grow=growth increment

Re: [R] question about trpaths

2013-05-31 Thread John Kane
This might supply a hint on what to look for. https://stat.ethz.ch/pipermail/r-help/2009-July/204388.html John Kane Kingston ON Canada -Original Message- From: ecol...@hotmail.com Sent: Fri, 31 May 2013 12:06:38 + To: r-help@r-project.org Subject: [R] question about trpaths

Re: [R] question

2013-05-30 Thread Pascal Oettli
Check out the CRAN task view on Robust Statistical Methods: http://cran.r-project.org/web/views/Robust.html and on Multivariate Statistics: http://cran.r-project.org/web/views/Multivariate.html Regards, Pascal On 05/30/2013 05:07 PM, nafiseh hagiaghamohammadi wrote: Hi my data has four

Re: [R] Question about subsetting S4 object in ROCR

2013-05-28 Thread Guido Leoni
Ye sorry of course i'm interested to the area ranging from 0;0 to 0.4;0.8 thank you Guido 2013/5/27 Uwe Ligges lig...@statistik.tu-dortmund.de On 27.05.2013 16:18, Guido Leoni wrote: Dear list I'm testing a predictor and I produced nice performance plots with ROCR package utilizing the 3

Re: [R] Question about subsetting S4 object in ROCR

2013-05-28 Thread Elizabeth McKenzie
You can access the data directly by using something like perf@x.values[[1]]. Not sure if that helps you. The package pROC allows you to do partial areas under the curve by selecting a range of specificity or sensitivity that you're interested in. On Tue, May 28, 2013 at 2:17 AM, Guido Leoni

Re: [R] Question about subsetting S4 object in ROCR

2013-05-27 Thread Uwe Ligges
On 27.05.2013 16:18, Guido Leoni wrote: Dear list I'm testing a predictor and I produced nice performance plots with ROCR package utilizing the 3 standard command pred - prediction(predictions, labels) perf - performance(pred, measure = tpr, x.measure = fpr) plot(perf, col=rainbow(10)) The

Re: [R] question

2013-05-22 Thread arun
HI, directory- /home/arunksa111/NewData GetFileList - function(directory,number){   setwd(directory)  filelist1-dir()[file.info(dir())$isdir]     direct-dir(directory,pattern = paste(MSMS_,number,PepInfo.txt,sep=), full.names = FALSE, recursive = TRUE)  direct-lapply(direct,function(x)

Re: [R] question about poisson regression

2013-05-14 Thread Achim Zeileis
On Tue, 14 May 2013, meng wrote: Many thanks. Another question: model- glm(count ~ drug*result, family = poisson) anova(model,test=Chisq)          Df Deviance Resid. Df Resid. Dev  Pr(Chi)     NULL                            3     47.522               drug         1    0.032         2    

Re: [R] question about poisson regression

2013-05-14 Thread meng
Many thanks. Another question: model- glm(count ~ drug*result, family = poisson) anova(model,test=Chisq) Df Deviance Resid. Df Resid. Dev Pr(Chi) NULL3 47.522 drug 10.032 2 47.491 0.85858 result 1

Re: [R] question about poisson regression

2013-05-13 Thread Achim Zeileis
On Mon, 13 May 2013, meng wrote: Hi all: I have a question about poisson regression. My data: drug result count 1 1 8 1 254 2 1 20 2 2 44 My model: model- glm(count ~ drug*result, family = poisson) My result: summary(model) Coefficients:

Re: [R] question about 1-way anova

2013-05-11 Thread peter dalgaard
On May 11, 2013, at 06:10 , meng wrote: Hi all: I have a question about one-way anova. The data is ¡°sleep¡±which belongs to R. code1: summary(lm(extra~group)) Estimate of group2(1.58) is the difference between mean of group1 and group2,and t value(1.861) and p

Re: [R] Question with apply

2013-05-09 Thread David Carlson
The apply() function works on an array or a matrix. There is no need to guess, just read the manual page: ? apply So including a character variable forces the entire matrix to characters. Excluding character variables will let you operate on the numeric values, but your code suggests you are

Re: [R] Question with apply

2013-05-09 Thread David Winsemius
On May 9, 2013, at 8:50 AM, Pooya Lalehzari wrote: Hello, When I use apply on a data frame, it seems like I get an error when I have a column that is not numeric. Via trial and error I realized that if I remove that column, I can get it to run. Is there a better way to tell the function

Re: [R] Question regarding error x and y lengths differ

2013-04-29 Thread Jim Lemon
On 04/30/2013 11:38 AM, Sean Doyle wrote: Hello, I'm a first semester statistics studenthttp://r.789695.n4.nabble.com/Question-regarding-error-quot-x-and-y-lengths-differ-quot-td4665773.html#and I am using R for roughly the third time ever. I am following a tutorial and yet I still get the error

Re: [R] question

2013-04-24 Thread R. Michael Weylandt
On Tue, Apr 23, 2013 at 2:54 PM, nafiseh hagiaghamohammadi n_hajiaghamohammadi2...@yahoo.com wrote: Hi I fit one linear quantile regression with package quantreg and I want to khow this model is good or not.Is there method for checking it? Thanks your advice I ask this question because

Re: [R] question

2013-04-24 Thread Roger Koenker
good usually means good relative to something else, in this case the comparison seems, as Michael has already said, f0 - rq(y ~ 1, tau = ?) and then one can compute the R1 version that I originally suggested. But since there is still no explicit way to evaluate this, it is all a bit pointless.

Re: [R] question

2013-04-23 Thread R. Michael Weylandt
On Tue, Apr 23, 2013 at 2:54 PM, nafiseh hagiaghamohammadi n_hajiaghamohammadi2...@yahoo.com wrote: Hi I fit one linear quantile regression with package quantreg and I want to khow this model is good or not.Is there method for checking it? Thanks your advice How is this different than the

Re: [R] question

2013-04-22 Thread Roger Koenker
In quantreg if you do FAQ() item 4 is: 4. [R^2] I am currently trying to caculate the coefficient of determination for different quantile regression models. For example, how do you calculate the the sum of the weighted absolute deviations in the models ... R-squared is evil,

Re: [R] Question on Stopword Removal from a Cyrillic (Bulgarian)Text

2013-04-10 Thread Ventseslav Kozarev, MPP
Hi, Thanks for taking the time. Here is a more reproducible example of the entire process: # Creating a vector source - stupid text in the Bulgarian language bg-c('Днес е хубав и слънчев ден, в който всички искат да бъдат навън.','Утре ще бъде още по-хубав ден.') # Converting strings from

Re: [R] Question on Stopword Removal from a Cyrillic (Bulgarian)Text

2013-04-10 Thread Milan Bouchet-Valat
Le mercredi 10 avril 2013 à 10:50 +0300, Ventseslav Kozarev, MPP a écrit : Hi, Thanks for taking the time. Here is a more reproducible example of the entire process: # Creating a vector source - stupid text in the Bulgarian language bg-c('Днес е хубав и слънчев ден, в който всички искат

Re: [R] Question on Stopword Removal from a Cyrillic (Bulgarian)Text

2013-04-10 Thread Ventseslav Kozarev, MPP
Thank you so much! You made it look (almost) so easy. I greatly appreciate it! On 10.4.2013 г. 11:29 ч., Milan Bouchet-Valat wrote: Le mercredi 10 avril 2013 à 10:50 +0300, Ventseslav Kozarev, MPP a écrit : Hi, Thanks for taking the time. Here is a more reproducible example of the entire

Re: [R] Question on Stopword Removal from a Cyrillic (Bulgarian)Text

2013-04-10 Thread Milan Bouchet-Valat
Le mercredi 10 avril 2013 à 13:17 +0200, Ingo Feinerer a écrit : On Wed, Apr 10, 2013 at 10:29:27AM +0200, Milan Bouchet-Valat wrote: Thanks for the reproducible example. Indeed, it does not work here either (Linux with UTF-8 locale). The problem seems to be in the call to gsub() in

Re: [R] Question on Stopword Removal from a Cyrillic (Bulgarian)Text

2013-04-10 Thread Ventseslav Kozarev
I just wanted to confirm that Milan's suggestion about adding (*UCP) like in the example below: gsub(sprintf((*UCP)\\b(%s)\\b, който), , който, perl=TRUE) solved all problems (under openSuse Linux 12.3 64-bit, R 2.15.2). I reencoded input files and stop word list in UTF-8, and now stop words

Re: [R] Question on Stopword Removal from a Cyrillic (Bulgarian)Text

2013-04-10 Thread Ventseslav Kozarev
I just wanted to confirm that Milan's suggestion about adding (*UCP) like in the example below: gsub(sprintf((*UCP)\\b(%s)\\b, който), , който, perl=TRUE) solved all problems (under openSuse Linux 12.3 64-bit, R 2.15.2). I reencoded input files and stop word list in UTF-8, and now stop words

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