[R] question about read.ssd function

2013-02-27 Thread Wu, Juan
Hi there, I am trying to read SAS dataset into R and have observed some weird behaviors. Here is my setting. I copied retail.sas7bdat from sashelp and placed it in my test directory C:\Temp. In R, I submitted the following command read.ssd(C:/Temp, retail, sascmd=C:/Program

[R] Converting code to R Question

2013-02-25 Thread Craig J
I'm learning R and am converting some code from SPSS into R. My background is in SAS/SPSS so the vectorization is new to me and I'm trying to learn how to NOT use loops...or use them sparingly. I'm wondering what the most efficient to tackle a problem I'm working on is. Below is an example piece

Re: [R] Converting code to R Question

2013-02-25 Thread Jeremy Miles
Here's a direct translation: Variable - 0 Variable - ifelse(item1 == 1, Variable +1, Variable) Variable - ifelse(item2 == 1, Variable +1, Variable) Variable - ifelse(item3 == 1, Variable +1, Variable) Variable - ifelse(item4 == 1, Variable +1, Variable) Here's another way to do it: Variable

Re: [R] Converting code to R Question

2013-02-25 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jeremy Miles Sent: Monday, February 25, 2013 5:41 PM To: Craig J Cc: r-help Subject: Re: [R] Converting code to R Question Here's a direct translation: Variable - 0 Variable - ifelse

Re: [R] Converting code to R Question

2013-02-25 Thread Ista Zahn
If you do this sort of thing a lot you may find the psych package helpful: # make example data x - 1:3 dat - data.frame(expand.grid(Item1=x, Item2=x, Item3=x, Item4=x)) # make scoring ky key - c(Item1=1, Item2=2, Item3=1, Item4=1) # load psych library library(psych) # score (scores -

Re: [R] R question

2013-02-14 Thread Adams, Jean
-one-step-forecasts/ Hope this helps. Jean On Wed, Feb 13, 2013 at 9:28 AM, Pedro Carvalho pedro_n_pi...@hotmail.comwrote: Hello, I have submitted a R question to stackoverflow and have not received an answer. Could anyone help me out? http://stackoverflow.com/questions/14825443

[R] R question

2013-02-13 Thread Pedro Carvalho
Hello, I have submitted a R question to stackoverflow and have not received an answer. Could anyone help me out? http://stackoverflow.com/questions/14825443/backtesting-accuracy-of-regression-model-through-rolling-window-regression-with Best regards, Pedro

Re: [R] question about reproducibility/consistency of principal component and lda directions in R

2013-02-10 Thread David Romano
On Sat, Feb 9, 2013 at 11:43 AM, Uwe Ligges lig...@statistik.tu-dortmund.de wrote: On 08.02.2013 20:14, David Romano wrote: Hi everyone, I'm not exactly sure how to ask this question most clearly, but I hope that giving the context in which it occurs for me will help: I'm trying to

Re: [R] question about reproducibility/consistency of principal component and lda directions in R

2013-02-09 Thread Uwe Ligges
On 08.02.2013 20:14, David Romano wrote: Hi everyone, I'm not exactly sure how to ask this question most clearly, but I hope that giving the context in which it occurs for me will help: I'm trying to compare the brain images of two patient populations; each image is composed of voxels (the

[R] question about reproducibility/consistency of principal component and lda directions in R

2013-02-08 Thread David Romano
Hi everyone, I'm not exactly sure how to ask this question most clearly, but I hope that giving the context in which it occurs for me will help: I'm trying to compare the brain images of two patient populations; each image is composed of voxels (the 3D analogue of pixels), and I have two images

Re: [R] Question about NLS model

2013-02-07 Thread S Ellison
After applying the NLS for a model like y=exp(a*x), and I get a result showing the summary as: Estimate Std. Error t value Pr(|t|) 2.6720 1.4758 1.811 0.3212 My question is what this t-statistics tests? And what's the meaning of Pr? t is (estimate/std.err) and can be used to

Re: [R] Question about NLS model

2013-02-07 Thread Liu, Liang
Thanks, Ellison. Another question is if this p-value is a good parameter to test if the fitting is good, as you this test is only for the null that the coefficient is 0 (a is 0 in y=exp(a*x), right?)? On Thu, Feb 7, 2013 at 10:48 AM, S Ellison s.elli...@lgcgroup.com wrote: After applying

Re: [R] Question about NLS model

2013-02-07 Thread Bert Gunter
Liang: In nonlinear models especially (and more generally, also), small p values are not reliable indicators of whether a fit is or is notgood. I would strongly suggest that you consult with your local statistician -- this is a (complicated, as it depends on the meaning of good) statistical

Re: [R] Question about NLS model

2013-02-07 Thread S Ellison
Thanks, Ellison. Another question is if this p-value is a good parameter to test if the fitting is good, Absolutely not. *** This email and any attachments are confidential. Any use, copying or disclosure other than by the

[R] Question about NLS model

2013-02-06 Thread Liu, Liang
After applying the NLS for a model like y=exp(a*x), and I get a result showing the summary as: Estimate Std. Error t value Pr(|t|) 2.6720 1.4758 1.811 0.3212 My question is what this t-statistics tests? And what's the meaning of Pr? New to R. Thanks. [[alternative HTML version

Re: [R] Question: write an R script with help information available to the user

2013-02-03 Thread Gabor Grothendieck
On Sun, Feb 3, 2013 at 1:50 AM, Bert Gunter gunter.ber...@gene.com wrote: A related approach which, if memory serves, was originally in S eons ago, is to define a doc attribute of any function (or object, for that matter) that you wish to document that contains text for documentation and a

Re: [R] Question on plotCI function

2013-02-02 Thread Jim Lemon
On 02/02/2013 02:21 AM, li li wrote: Thanks so much for the reply, Ista. I used plotrix library. Here is my example: xx- seq(0.05, 0.95, by=0.05) lower- c(-2.896865, -2.728416, -2.642574, -2.587724, -2.548672, -2.518994, -2.495409, -2.476031, -2.459662, -2.445513, -2.433014, -2.421739,

[R] Question: write an R script with help information available to the user

2013-02-02 Thread Chee Chen
Dear All, I would like to ask a question on how to incorporate into an R script help information for the user. I vaguely recall that I saw some instructions on an R manual, but am not able to figure them out. Hereunder is the basic setting: 1. I finished writing an R script, my_script.r, that

Re: [R] Question: write an R script with help information available to the user

2013-02-02 Thread Jeff Newmiller
The normal expectations of an R user is that useful functions you want to share are in packages, which include help files. There is no way to both avoid the package development process and offer help to the user within R. Read the Writing R Extensions document for the most up-to-date

Re: [R] Question: write an R script with help information available to the user

2013-02-02 Thread Gabor Grothendieck
On Sat, Feb 2, 2013 at 6:31 PM, Chee Chen chen...@purdue.edu wrote: Dear All, I would like to ask a question on how to incorporate into an R script help information for the user. I vaguely recall that I saw some instructions on an R manual, but am not able to figure them out. Hereunder is

Re: [R] Question: write an R script with help information available to the user

2013-02-02 Thread Bert Gunter
A related approach which, if memory serves, was originally in S eons ago, is to define a doc attribute of any function (or object, for that matter) that you wish to document that contains text for documentation and a doc() function of the form: doc - function(obj) cat(attr(obj,doc)) used as:

Re: [R] Question on plotCI function

2013-02-01 Thread Ista Zahn
There are many plotCI functions in many different packages... which one are you referring to? Also please construct a reproducible example illustrating your problem. Best, Ista On Thu, Jan 31, 2013 at 11:58 PM, li li hannah@gmail.com wrote: Hi all, In my plotCI function, the argument x

Re: [R] Question on plotCI function

2013-02-01 Thread li li
Thanks so much for the reply, Ista. I used plotrix library. Here is my example: xx - seq(0.05, 0.95, by=0.05) lower - c(-2.896865, -2.728416, -2.642574, -2.587724, -2.548672, -2.518994, -2.495409, -2.476031, -2.459662, -2.445513, -2.433014, -2.421739, -2.411344, -2.401536, -2.392040, -2.382571,

Re: [R] Question on plotCI function

2013-02-01 Thread MacQueen, Don
You haven't given any y values to plotCI. Try, for example, plotCI(xx, (lower+upper)/2, ui=upper, (etc) What you got was in effect plot( seq(along=xx), xx ) which is standard behavior for plot() when no y values are supplied. -Don -- Don MacQueen Lawrence Livermore National Laboratory

[R] Question on plotCI function

2013-01-31 Thread li li
Hi all, In my plotCI function, the argument x is chosen to be seq(0.05, 0.95, by=0.05). However, when I make the plot, the plot has the x coordinate goes 1:19. Does anyone know how to make the x coordinate to be (0,0.5, 0.1, ..., 0.95). Thank you. Hanna [[alternative HTML

[R] Question on matrix calculation

2013-01-24 Thread Christofer Bogaso
Hello again, Ley say I have 1 matrix and 1 data frame: mat - matrix(1:15, 5) match_df - data.frame(Seq = 1:5, criteria = sample(letters[1:5], 5, replace = T)) mat [,1] [,2] [,3] [1,]16 11 [2,]27 12 [3,]38 13 [4,]49 14 [5,]5 10 15

Re: [R] Question on matrix calculation

2013-01-24 Thread Rui Barradas
Hello, Something like this? do.call(rbind, lapply(split(as.data.frame(mat), match_df$criteria), colSums)) Hope this helps, Rui Barradas Em 24-01-2013 19:39, Christofer Bogaso escreveu: Hello again, Ley say I have 1 matrix and 1 data frame: mat - matrix(1:15, 5) match_df -

Re: [R] Question on matrix calculation

2013-01-24 Thread arun
  # a  5 10 15    #     b  5 15 25     #    d  2  7 12   # e  3  8 13 A.K. - Original Message - From: Christofer Bogaso bogaso.christo...@gmail.com To: r-help r-help@r-project.org Cc: Sent: Thursday, January 24, 2013 2:39 PM Subject: [R] Question on matrix

Re: [R] Question on matrix calculation

2013-01-24 Thread David L Carlson
- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of arun Sent: Thursday, January 24, 2013 2:27 PM To: Christofer Bogaso Cc: R help Subject: Re: [R] Question on matrix calculation Hi, You could also use: mat - matrix(1:15, 5) set.seed(5) match_df

[R] Question on broken-line regression: 'segmented' or alternative

2013-01-12 Thread Benedikt Drosse
Dear R-Users, I have a question concerning the determination of breakpoints and comparison of slopes from broken-line regression models. Although this is rather a standard problem in data analysis, all information I gathered so far, did not answer my questions. I added a subsetted example

Re: [R] Question on broken-line regression: 'segmented' or alternative

2013-01-12 Thread David Winsemius
On Jan 12, 2010, at 2:13 AM, Benedikt Drosse wrote: Dear R-Users, I have a question concerning the determination of breakpoints and comparison of slopes from broken-line regression models. Although this is rather a standard problem in data analysis, all information I gathered so far,

[R] Question on Round function

2013-01-03 Thread Christofer Bogaso
I happened to see these: round(.5, 0) [1] 0 round(1.5, 0) [1] 2 round(2.5, 0) [1] 2 round(3.5, 0) [1] 4 round(4.5, 0) [1] 4 What is the rule here? Should not round(.5, 0) = 1, round(2.5, 0) = 3 etc? Thanks and regards, __ R-help@r-project.org

Re: [R] Question on Round function

2013-01-03 Thread Bert Gunter
?round explicitly says: Note that for rounding off a 5, the IEC 60559 standard is expected to be used, ‘*go to the even digit*’. Therefore round(0.5) is 0 and round(-1.5)is -2. However, this is dependent on OS services and on representation error (since e.g. 0.15 is not represented exactly,

Re: [R] Question on Round function

2013-01-03 Thread Marc Schwartz
On Jan 3, 2013, at 11:44 AM, Christofer Bogaso bogaso.christo...@gmail.com wrote: I happened to see these: round(.5, 0) [1] 0 round(1.5, 0) [1] 2 round(2.5, 0) [1] 2 round(3.5, 0) [1] 4 round(4.5, 0) [1] 4 What is the rule here? Should not round(.5, 0) = 1, round(2.5, 0) = 3

Re: [R] Question on Round function

2013-01-03 Thread Berend Hasselman
On 03-01-2013, at 18:44, Christofer Bogaso bogaso.christo...@gmail.com wrote: I happened to see these: round(.5, 0) [1] 0 round(1.5, 0) [1] 2 round(2.5, 0) [1] 2 round(3.5, 0) [1] 4 round(4.5, 0) [1] 4 What is the rule here? Should not round(.5, 0) = 1, round(2.5, 0) = 3

Re: [R] Question on creating Date variable

2013-01-01 Thread Rui Barradas
Hello, The format AM/PM should be for display purposes only, when you use format() you get a variable of class character, not of classes POSIXct POSIXt . Produce a variable y with as.POSIXct (without AM/PM) for arithmetics and another formated for display. Hope this helps, Rui Barradas Em

Re: [R] Question on creating Date variable

2013-01-01 Thread David Winsemius
On Dec 31, 2012, at 9:40 PM, Christofer Bogaso wrote: On 01 January 2013 03:00:18, David Winsemius wrote: On Dec 31, 2012, at 11:57 AM, David Winsemius wrote: On Dec 31, 2012, at 11:54 AM, Christofer Bogaso wrote: On 01 January 2013 01:29:53, David Winsemius wrote: On Dec 31, 2012, at

Re: [R] Question on creating Date variable

2013-01-01 Thread arun
-01 11:00:00    AM #2 2013-01-01 11:15:00    AM A.K. - Original Message - From: Christofer Bogaso bogaso.christo...@gmail.com To: David Winsemius dwinsem...@comcast.net; David L Carlson dcarl...@tamu.edu Cc: r-help@r-project.org Sent: Tuesday, January 1, 2013 12:40 AM Subject: Re: [R

Re: [R] Question on creating Date variable

2013-01-01 Thread jim holtman
To: David Winsemius dwinsem...@comcast.net; David L Carlson dcarl...@tamu.edu Cc: r-help@r-project.org Sent: Tuesday, January 1, 2013 12:40 AM Subject: Re: [R] Question on creating Date variable On 01 January 2013 03:00:18, David Winsemius wrote: On Dec 31, 2012, at 11:57 AM, David Winsemius

Re: [R] Question on creating Date variable

2013-01-01 Thread David Winsemius
Winsemius dwinsem...@comcast.net; David L Carlson dcarl...@tamu.edu Cc: r-help@r-project.org Sent: Tuesday, January 1, 2013 12:40 AM Subject: Re: [R] Question on creating Date variable On 01 January 2013 03:00:18, David Winsemius wrote: On Dec 31, 2012, at 11:57 AM, David Winsemius wrote

[R] Question on creating Date variable

2012-12-31 Thread Christofer Bogaso
Hello all, Let say I have following (numeric) vector: x [1] 11.00 11.25 11.35 12.01 11.14 13.00 13.25 13.35 14.01 13.14 14.50 14.75 14.85 15.51 14.64 Now, I want to create a 'Date' variable (i.e. I should be able to do all calculations pertaining to date/time and also time-series plotting

Re: [R] Question on creating Date variable

2012-12-31 Thread Rui Barradas
Hello, Try the following. x - scan(text = 11.00 11.25 11.35 12.01 11.14 13.00 13.25 13.35 14.01 13.14 14.50 14.75 14.85 15.51 14.64 ) hours - floor(x) mins - (100*x) %% 100 as.POSIXct(paste(Sys.Date(), hours, mins), format = %Y-%m-%d %H %M) As you can see, there are three values of 'x'

Re: [R] Question on creating Date variable

2012-12-31 Thread David Winsemius
On Dec 31, 2012, at 9:12 AM, Christofer Bogaso wrote: Hello all, Let say I have following (numeric) vector: x [1] 11.00 11.25 11.35 12.01 11.14 13.00 13.25 13.35 14.01 13.14 14.50 14.75 14.85 15.51 14.64 Now, I want to create a 'Date' variable (i.e. I should be able to do all

Re: [R] Question on creating Date variable

2012-12-31 Thread Christofer Bogaso
On 01 January 2013 00:17:50, David Winsemius wrote: On Dec 31, 2012, at 9:12 AM, Christofer Bogaso wrote: Hello all, Let say I have following (numeric) vector: x [1] 11.00 11.25 11.35 12.01 11.14 13.00 13.25 13.35 14.01 13.14 14.50 14.75 14.85 15.51 14.64 Now, I want to create a 'Date'

Re: [R] Question on creating Date variable

2012-12-31 Thread David Winsemius
On Dec 31, 2012, at 11:35 AM, Christofer Bogaso wrote: On 01 January 2013 00:17:50, David Winsemius wrote: On Dec 31, 2012, at 9:12 AM, Christofer Bogaso wrote: Hello all, Let say I have following (numeric) vector: x [1] 11.00 11.25 11.35 12.01 11.14 13.00 13.25 13.35 14.01 13.14

Re: [R] Question on creating Date variable

2012-12-31 Thread Christofer Bogaso
On 01 January 2013 01:29:53, David Winsemius wrote: On Dec 31, 2012, at 11:35 AM, Christofer Bogaso wrote: On 01 January 2013 00:17:50, David Winsemius wrote: On Dec 31, 2012, at 9:12 AM, Christofer Bogaso wrote: Hello all, Let say I have following (numeric) vector: x [1] 11.00 11.25

Re: [R] Question on creating Date variable

2012-12-31 Thread David Winsemius
On Dec 31, 2012, at 11:54 AM, Christofer Bogaso wrote: On 01 January 2013 01:29:53, David Winsemius wrote: On Dec 31, 2012, at 11:35 AM, Christofer Bogaso wrote: On 01 January 2013 00:17:50, David Winsemius wrote: On Dec 31, 2012, at 9:12 AM, Christofer Bogaso wrote: Hello all, Let

Re: [R] Question on creating Date variable

2012-12-31 Thread David L Carlson
-project.org Subject: Re: [R] Question on creating Date variable On Dec 31, 2012, at 11:54 AM, Christofer Bogaso wrote: On 01 January 2013 01:29:53, David Winsemius wrote: On Dec 31, 2012, at 11:35 AM, Christofer Bogaso wrote: On 01 January 2013 00:17:50, David Winsemius wrote

Re: [R] Question on creating Date variable

2012-12-31 Thread David Winsemius
On Dec 31, 2012, at 11:57 AM, David Winsemius wrote: On Dec 31, 2012, at 11:54 AM, Christofer Bogaso wrote: On 01 January 2013 01:29:53, David Winsemius wrote: On Dec 31, 2012, at 11:35 AM, Christofer Bogaso wrote: On 01 January 2013 00:17:50, David Winsemius wrote: On Dec 31, 2012,

Re: [R] Question on creating Date variable

2012-12-31 Thread arun
. - Original Message - From: Christofer Bogaso bogaso.christo...@gmail.com To: r-help@r-project.org Cc: Sent: Monday, December 31, 2012 12:12 PM Subject: [R] Question on creating Date variable Hello all, Let say I have following (numeric) vector: x [1] 11.00 11.25 11.35 12.01 11.14 13.00

Re: [R] Question on creating Date variable

2012-12-31 Thread Christofer Bogaso
On 01 January 2013 03:00:18, David Winsemius wrote: On Dec 31, 2012, at 11:57 AM, David Winsemius wrote: On Dec 31, 2012, at 11:54 AM, Christofer Bogaso wrote: On 01 January 2013 01:29:53, David Winsemius wrote: On Dec 31, 2012, at 11:35 AM, Christofer Bogaso wrote: On 01 January 2013

[R] Question about Linear Regression

2012-12-28 Thread Lorenzo Isella
Dear All, A semi-trivial question: suppose you want to carry out a linear regression of the kind y~x1+x2+x3 where x3 is a dichotomous variable assuming only 0 and 1 values (x1 and x2 are continuous variables). Is there any particular caveat I should be aware of? Can I code this as a

Re: [R] Question about Linear Regression

2012-12-28 Thread Jeremy Miles
You can run that as it is. The term to search for on Google is 'dummy coding'. Jeremy On 28 December 2012 07:45, Lorenzo Isella lorenzo.ise...@gmail.com wrote: where x3 is a dichotomous variable assuming only 0 and 1 values (x1 and x2 are continuous variables). Is there any particular

[R] question about sum of (column) elements in R

2012-12-04 Thread T Bal
Hi, I have the following data: 0 12 1 10 1 4 1 6 1 7 1 13 2 21 2 23 2 20 3 18 3 17 3 16 3 27 3 33 4 11 4 8 4 19 4 16 4 9 In this data file I would like to sum the numbers of second column which belong to the same number in the first column. So the output

Re: [R] question about sum of (column) elements in R

2012-12-04 Thread Pascal Oettli
Hi, You can follow this example: test - structure(list(V1 = c(0L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L), V2 = c(12L, 10L, 4L, 6L, 7L, 13L, 21L, 23L, 20L, 18L, 17L, 16L, 27L, 33L, 11L, 8L, 19L, 16L, 9L)), .Names = c(V1, V2), class = data.frame, row.names =

Re: [R] question about sum of (column) elements in R

2012-12-04 Thread Gerrit Eichner
Hi, T. Bal, homework? Take a look at ?tapply Regards -- Gerrit On Tue, 4 Dec 2012, T Bal wrote: Hi, I have the following data: 0 12 1 10 1 4 1 6 1 7 1 13 2 21 2 23 2 20 3 18 3 17 3 16 3 27 3 33 4 11 4 8 4 19 4 16 4 9 In this data file I would

Re: [R] question about sum of (column) elements in R

2012-12-04 Thread Berend Hasselman
On 04-12-2012, at 08:59, T Bal wrote: Hi, I have the following data: 0 12 1 10 1 4 1 6 1 7 1 13 2 21 2 23 2 20 3 18 3 17 3 16 3 27 3 33 4 11 4 8 4 19 4 16 4 9 In this data file I would like to sum the numbers of second column

Re: [R] question about sum of (column) elements in R

2012-12-04 Thread Jose Iparraguirre
-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of T Bal Sent: 04 December 2012 07:59 To: r-help@r-project.org Subject: [R] question about sum of (column) elements in R Hi, I have the following data: 0 12 1 10 1 4 1 6 1 7 1 13 2 21 2 23 2 20 3 18 3 17 3

Re: [R] question about sum of (column) elements in R

2012-12-04 Thread arun
  0  12 #2  1  40 #3  2  64 #4  3 111 #5  4  63 A.K. - Original Message - From: T Bal studentt...@gmail.com To: r-help@r-project.org Cc: Sent: Tuesday, December 4, 2012 2:59 AM Subject: [R] question about sum of (column) elements in R Hi, I have the following data: 0  12 1  10 1  4 1

Re: [R] question about A2R

2012-11-27 Thread dmatshalaga
DID YOU SOLVE THE PROBLEM? -- View this message in context: http://r.789695.n4.nabble.com/question-about-A2R-tp4640539p4650952.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Question about VAR (Vector Autoregression) in differences.

2012-11-21 Thread Keith Weintraub
Folks, I have been using the VAR {vars} program to find a fit for the following bi-variate time series (subset): bivariateTS-structure(c(0.950415958293559, 0.96077848972081, 0.964348957109053, 0.967852884998915, 0.967773510751625, 0.970342843688257, 0.97613937178359, 0.980118627997436,

[R] Question about Package 'sampleSection' for IRT model

2012-11-19 Thread Kamontip Srihaset
Dear All, I am Ph.D student at Chulalongkorn University in Thailand, I want to use Package 'sampleSection' to estimate missing data which generate under IRT model(3-PL); n-500 ## number of examinee I-20 ## number of items num.imp-5 ##number of imputations p.missing-c(0.09, 0.01) #prob of

[R] Question about making histogram and x must be numeric

2012-11-18 Thread 9man
Hello all, I hope someone of you can help me out, I have searched other posts as well but I can't find any solution to the problem I'm dealing with. I want to make a histogram from the data Telephone Lines MDGdataset -read.csv(MDG_dataset_2010.csv, header=T) MDGdatasetAdapted -

Re: [R] Question about making histogram and x must be numeric

2012-11-18 Thread jim holtman
Most likely the value you are using in the 'hist' function is a factor. It would help if you included an 'str' of the object you are using. On Sun, Nov 18, 2012 at 4:45 PM, 9man lucas_9...@hotmail.com wrote: Hello all, I hope someone of you can help me out, I have searched other posts as well

Re: [R] Question about making histogram and x must be numeric

2012-11-18 Thread David L Carlson
, TX 77843-4352 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of 9man Sent: Sunday, November 18, 2012 3:45 PM To: r-help@r-project.org Subject: [R] Question about making histogram and x must be numeric Hello all, I hope

Re: [R] Question about contour3d and writeWebGL: rgl and misc3d package

2012-11-17 Thread Duncan Murdoch
On 12-11-17 1:51 PM, John Muschelli wrote: That works! Thanks for the help, but I can't seem to figure out why this happens with even one contour in the example below: Disclaimer: using MNI template from FSL (http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlases). Firefox still has array initialiser

Re: [R] Question about contour3d and writeWebGL: rgl and misc3d package

2012-11-17 Thread Duncan Murdoch
On 12-11-17 3:11 PM, Duncan Murdoch wrote: On 12-11-17 1:51 PM, John Muschelli wrote: That works! Thanks for the help, but I can't seem to figure out why this happens with even one contour in the example below: Disclaimer: using MNI template from FSL

Re: [R] Question about contour3d and writeWebGL: rgl and misc3d package

2012-11-17 Thread John Muschelli
That works! Thanks for the help, but I can't seem to figure out why this happens with even one contour in the example below: Disclaimer: using MNI template from FSL ( http://fsl.fmrib.ox.ac.uk/fsl/fslwiki/Atlases). Firefox still has array initialiser too large for this one contour, but Safari

[R] Question about contour3d and writeWebGL: rgl and misc3d package

2012-11-16 Thread John Muschelli
I saw that in rgl:::writeWebGL that Polygons will only be rendered as filled; there is no support in WebGL for wireframe or point rendering.. I found that you can easily use contour3d to make reproducible contour web figures, such as (taken from contour3d help) library(AnalyzeFMRI) a -

Re: [R] Question about contour3d and writeWebGL: rgl and misc3d package

2012-11-16 Thread Duncan Murdoch
On 12-11-16 5:59 PM, John Muschelli wrote: I saw that in rgl:::writeWebGL that Polygons will only be rendered as filled; there is no support in WebGL for wireframe or point rendering.. I found that you can easily use contour3d to make reproducible contour web figures, such as (taken from

Re: [R] Question about contour3d and writeWebGL: rgl and misc3d package

2012-11-16 Thread Duncan Murdoch
On 12-11-16 7:09 PM, John Muschelli wrote: The contour its just half a brain and the vertices are not surfaces and are filled in Sounds like a bug in the browser. When I try it in Firefox 16.0.2 it doesn't display properly; the error log (found via Tools | Web developer | Error console has

[R] Question about MICE and Amelia II

2012-11-11 Thread Kamontip Srihaset
Dear all, I am Ph.D student at Chulalongkorn University in Thailand, I use package 'MICE' and 'Amelia II' to impute missing data assump MAR and MNAR. I don't have problem to impute under MAR, but I don't know how to impute MNAR. My MNAR data generate under IRT model(3-PL); n-500 ## number of

[R] Question on callNextMethod

2012-11-06 Thread Simon Knapp
I don't understand why I get the following results. I define two classes 'Base' and 'Derived', the latter of which 'contains' the first. I then define a generic method 'test' and overload it for each of these classes. I call 'callNextMethod()' in the overload for Derived. From the output, it

Re: [R] Question on callNextMethod

2012-11-06 Thread Martin Morgan
On 11/06/2012 07:03 AM, Simon Knapp wrote: I don't understand why I get the following results. I define two classes 'Base' and 'Derived', the latter of which 'contains' the first. I then define a generic method 'test' and overload it for each of these classes. I call 'callNextMethod()' in the

Re: [R] Question on callNextMethod

2012-11-06 Thread cberry
Simon Knapp sleepingw...@gmail.com writes: I don't understand why I get the following results. I define two classes 'Base' and 'Derived', the latter of which 'contains' the first. I then define a generic method 'test' and overload it for each of these classes. I call 'callNextMethod()' in the

Re: [R] Question about cut()

2012-11-06 Thread Brian Diggs
On 11/2/2012 11:11 AM, Ni, Shenghua wrote: r-c(1,1,9,1,1,1) col_no-cut(r,c(0,2,3,6,8,10,100)) levels(col_no)-c(2%,2-4%,4-6%,6-8%,8-10%,10%) col_no [1] 2% 2% 8-10% 2% 2% 2% Levels: 2% 2-4% 4-6% 6-8% 8-10% 10% Yes. (Or, I get the same output from this code. What is the question?)

Re: [R] Question about cut()

2012-11-06 Thread David Winsemius
On Nov 2, 2012, at 11:51 AM, Berend Hasselman wrote: On 02-11-2012, at 19:11, Ni, Shenghua wrote: r-c(1,1,9,1,1,1) col_no-cut(r,c(0,2,3,6,8,10,100)) levels(col_no)-c(2%,2-4%,4-6%,6-8%,8-10%,10%) col_no [1] 2% 2% 8-10% 2% 2% 2% Levels: 2% 2-4% 4-6% 6-8% 8-10% 10% Where is

Re: [R] Question about cut()

2012-11-06 Thread peter dalgaard
On Nov 6, 2012, at 22:16 , Brian Diggs wrote: On 11/2/2012 11:11 AM, Ni, Shenghua wrote: r-c(1,1,9,1,1,1) col_no-cut(r,c(0,2,3,6,8,10,100)) levels(col_no)-c(2%,2-4%,4-6%,6-8%,8-10%,10%) col_no [1] 2% 2% 8-10% 2% 2% 2% Levels: 2% 2-4% 4-6% 6-8% 8-10% 10% Yes. (Or, I get the

[R] Question about cut()

2012-11-02 Thread Ni, Shenghua
r-c(1,1,9,1,1,1) col_no-cut(r,c(0,2,3,6,8,10,100)) levels(col_no)-c(2%,2-4%,4-6%,6-8%,8-10%,10%) col_no [1] 2% 2% 8-10% 2% 2% 2% Levels: 2% 2-4% 4-6% 6-8% 8-10% 10% [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Question about cut()

2012-11-02 Thread Berend Hasselman
On 02-11-2012, at 19:11, Ni, Shenghua wrote: r-c(1,1,9,1,1,1) col_no-cut(r,c(0,2,3,6,8,10,100)) levels(col_no)-c(2%,2-4%,4-6%,6-8%,8-10%,10%) col_no [1] 2% 2% 8-10% 2% 2% 2% Levels: 2% 2-4% 4-6% 6-8% 8-10% 10% Where is the question? Berend

Re: [R] Question about survdiff in for-loop.

2012-10-20 Thread Sando
Thank you for your replay and help !! Best Regards, Young. -- View this message in context: http://r.789695.n4.nabble.com/Question-about-survdiff-in-for-loop-tp4646707p4646827.html Sent from the R help mailing list archive at Nabble.com. __

[R] Question about survdiff in for-loop.

2012-10-19 Thread Sando
Hi everyone!! I have dataset composed of a numbers of survival analyses. ( for batch survival analyses by using for-loop) . Here are code !! ### dim(svsv) Num_t-dim(svsv) Num-Num_t[2] # These are predictors !! names=colnames(svsv) for (i in 1:Num ) { name_tt=names[i]

Re: [R] Question about survdiff in for-loop.

2012-10-19 Thread Thomas Lumley
On Fri, Oct 19, 2012 at 8:02 PM, Sando chocosa...@daum.net wrote: Hi everyone!! I have dataset composed of a numbers of survival analyses. ( for batch survival analyses by using for-loop) . Here are code !! ### dim(svsv) Num_t-dim(svsv) Num-Num_t[2] # These are predictors !!

[R] Question about use of sort.list(sort.list(x)) in rank.r

2012-10-16 Thread Tyler Ritchie
I was looking at rank() and I came across: ... first = sort.list(sort.list(xx)), ... line 32 of rank.r [1] sort.list(x) returns the indices of the values of x in ascending (by default) order. So sort.list(sort.list(x)) returns the same list. So, what am I missing here? -Tyler [1]

Re: [R] Question about use of sort.list(sort.list(x)) in rank.r

2012-10-16 Thread William Dunlap
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Tyler Ritchie Sent: Tuesday, October 16, 2012 2:23 PM To: r-help@r-project.org Subject: [R] Question about use of sort.list(sort.list(x)) in rank.r I was looking at rank

Re: [R] Question on survival

2012-10-12 Thread Terry Therneau
It is easy to get a cumulative hazard curve. First, decide what values of age, a, and b you want curves for tdata- data.frame(age=55, a=2, b=6) Get the curves, there will be one for each strata in the output sfit- survfit(coxPhMod, newdata= tdata) Plot them plot(sfit, fun='cumhaz',

Re: [R] Question on survival

2012-10-12 Thread Chris Andrews
lau pel wrote Hi, I'm going crazy trying to plot a quite simple graph. i need to plot estimated hazard rate from a cox model. supposing the model i like this: coxPhMod=coxph(Surv(TIME, EV) ~ AGE+A+B+strata(C) data=data) with 4 level for C. how can i obtain a graph with 4 estimated (better

[R] Question on survival

2012-10-11 Thread lau pel
Hi, I'm going crazy trying to plot a quite simple graph. i need to plot estimated hazard rate from a cox model. supposing the model i like this: coxPhMod=coxph(Surv(TIME, EV) ~ AGE+A+B+strata(C) data=data) with 4 level for C. how can i obtain a graph with 4 estimated (better smoothed) hazard curve

[R] question on assigning an argument in a function that is create by the function itself

2012-09-20 Thread Benjamin Caldwell
Hi, I need some help with making a function a bit more elegant. How would you all suggest avoiding the problem I've made myself below - I've written a function that creates a temporary matrix by subseting a larger one I assign it. I then call vectors from that matrix, add each item in the vector

Re: [R] question on assigning an argument in a function that is create by the function itself

2012-09-20 Thread Rui Barradas
Hello, Inline. Em 20-09-2012 22:48, Benjamin Caldwell escreveu: Hi, I need some help with making a function a bit more elegant. Yes you do! Below, your first function, for instance, becomes a one liner. Trick: R is vectorized. Use functions that act on whole vectors, avoiding loops.

Re: [R] Question about R performance on UNIX/LINUX with, different memory/swap configurations

2012-09-17 Thread Paul Gilbert
On 12-09-17 06:00 AM, r-help-requ...@r-project.org wrote: Date: Sun, 16 Sep 2012 14:41:42 -0500 From: Dirk Eddelbuettele...@debian.org To: Eberle, Anthonyae...@allstate.com Cc:r-help@r-project.org Subject: Re: [R] Question about R performance on UNIX/LINUX with different memory

[R] Question about R performance on UNIX/LINUX with different memory/swap configurations

2012-09-16 Thread Eberle, Anthony
Does anyone have any guidance on swap and memory configuration when running R v2.15.1 on UNIX/LINUX? Through some benchmarking across multiple hardware (UNIX, LINUX, SPARC, x86, Windows, physical, virtual) it seems that the smaller memory machines have an advantage. Typically my organization

Re: [R] Question about R performance on UNIX/LINUX with different memory/swap configurations

2012-09-16 Thread Dirk Eddelbuettel
On 16 September 2012 at 13:30, Eberle, Anthony wrote: | Does anyone have any guidance on swap and memory configuration when | running R v2.15.1 on UNIX/LINUX? Through some benchmarking across | multiple hardware (UNIX, LINUX, SPARC, x86, Windows, physical, virtual) | it seems that the smaller

Re: [R] Question about R performance on UNIX/LINUX with different memory/swap configurations

2012-09-16 Thread jim holtman
My first criteria is to make sure my application never swaps/pages due to memory issues -- have enough physical memory so it never happens and control what else is running on the machine. Once you start paging, performance takes a real hit. On Sun, Sep 16, 2012 at 2:30 PM, Eberle, Anthony

[R] Question about logistic regression with ordered factor variable using the rms package (prev.Design)

2012-09-11 Thread Tom Willems
Dear R users, Hopefully someone can help me, Maybe I just misunderstand the function in the package? I am working with a logistic regression model. Until now I always worked with the basic glm function, where for the model was: ¡§ glm( disease ~ test.value + cnct ,

[R] Question concerning anova()

2012-08-22 Thread Rainer M Krug
Hi I am comparing four different linear mixed effect models, derived from updating the original one. To compare these, I want to use anova(). I therefore do the following (not reproducible - just to illustration purpose!): dat - loadSPECIES(SPECIES) subs - expression(dead==FALSE

Re: [R] Question concerning anova()

2012-08-22 Thread Bert Gunter
Models with different fixed effects estimated by REML cannot be compared by anova. In future, please post questions on mixed effects models on the r-sig-mixed-effects mailing lists. You're likely to receive more informative replies there, too. -- Bert On Wed, Aug 22, 2012 at 7:23 AM, Rainer M

Re: [R] Question concerning anova()

2012-08-22 Thread Rainer M Krug
On 22/08/12 16:36, Bert Gunter wrote: Models with different fixed effects estimated by REML cannot be compared by anova. I have seen that much in Modern Applied Statistics in S, and therefore have chosen the model = ML In future, please post questions on mixed effects models on the

Re: [R] Question concerning anova()

2012-08-22 Thread Bert Gunter
Oops -- missed that. OTOH, my reply demonstrates the value of the mixed models list recommendation. -- Bert On Wed, Aug 22, 2012 at 7:55 AM, Rainer M Krug r.m.k...@gmail.com wrote: On 22/08/12 16:36, Bert Gunter wrote: Models with different fixed effects estimated by REML cannot be compared

Re: [R] Question concerning anova()

2012-08-22 Thread Rainer M Krug
Further discussed on r-sig-mixed-models Rainer On 22/08/12 17:04, Bert Gunter wrote: Oops -- missed that. OTOH, my reply demonstrates the value of the mixed models list recommendation. -- Bert On Wed, Aug 22, 2012 at 7:55 AM, Rainer M Krug r.m.k...@gmail.com wrote: On 22/08/12 16:36, Bert

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