Re: [R] How to read only ten rows from a SAS dataset (read.ssd)?

2010-10-19 Thread Daniel Nordlund
the SAS dataset being exported. If the OP or anyone else is interested, they can contact me off-list and I will provide an example (no need to clutter up the list). Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https

Re: [R] doubt in climate variability analysis in R!

2010-10-29 Thread Daniel Nordlund
are having. Provide say 10 observations and the code you used to subset the data, and maybe someone can help you with a solution. Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] About 5.1 Arrays

2010-11-05 Thread Daniel Nordlund
consecutively in memory. Notice that layer one in the stack was filled first, and the first layer was filled just like the previous 2-dimensional example. But the items are still physically stored linearly, in consecutive locations in memory. Hope this is helpful, Dan Daniel Nordlund Bothell

Re: [R] connecting to remote database using RMySQL

2010-11-05 Thread Daniel Nordlund
for databases and R. https://stat.ethz.ch/mailman/listinfo/r-sig-db Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] About 5.1 Arrays

2010-11-06 Thread Daniel Nordlund
] [1] 4 Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list 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

Re: [R] Using changing names in loop in R

2010-11-06 Thread Daniel Nordlund
or something else? You said you normally do this by repeating lines of code. Can you show us a simple example? Someone should be able to show you how to optimize it. Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https

Re: [R] Help with Iterator

2010-11-09 Thread Daniel Nordlund
yourself at some point). I haven't tried to figure out what you are doing so I don't know if that is the best solution. But the problem is that f doesn't know about object 'itel'. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R

Re: [R] Error while connecting to Oracle using RODBC package

2010-07-14 Thread Daniel Nordlund
do check with your Oracle admin. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] (no subject)

2010-07-30 Thread Daniel Nordlund
contain values for each simuation trial e - matrix(rnorm(n.k*tslength,0,var.all), ncol = n.k) # run your analyses for(k in 1:n.k) { b[k] - coef(lm(e[,k] ~ ts))[2] } Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r

Re: [R] how to implement string pattern extraction in R

2010-08-22 Thread Daniel Nordlund
for regexp ?regexp Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

[R] relative risk regression with survey data

2010-09-13 Thread Daniel Nordlund
=binomial(log) ? Any other suggestions for covariate adjustment of relative risk estimates? Any and all suggestions welcomed. Dan -- Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] relative risk regression with survey data

2010-09-13 Thread Daniel Nordlund
Thanks to Thomas Lumley and David Winsemius for their responses. I had read a number of papers by Thomas and have ordered his book on survey analysis, but I wanted to get some confirmation because I wanted to get started before the book arrived. Thanks, again. Dan Daniel Nordlund Bothell, WA

Re: [R] sampling from normal distribution

2010-10-03 Thread Daniel Nordlund
, although the second formula is missing a closing parenthesis and a multiplication operator. You could also simplify the second formula to qnorm(1-p*runif(n)) Hope this is helpful, Dan Daniel Nordlund Bothell __ R-help@r-project.org mailing list https

Re: [R] Highly significant intercept and large standard error

2010-10-06 Thread Daniel Nordlund
-complete separation in the data and there is no maximum likelihood estimate for the coefficient. What does a cross-tabulation of Mag with your DV look like? You might want to read up on quasi-complete separation and suggestions for dealing with that. Hope this is helpful, Dan Daniel Nordlund

Re: [R] same random numbers in different sessions

2010-10-09 Thread Daniel Nordlund
that is setting the seed? What happens if you start R using the --vanilla option? Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

Re: [R] MATLAB vrs. R

2010-10-11 Thread Daniel Nordlund
) a = x[1] b = x[length(x)] plot(x,-h) a = x[1]; b = x[length(x)] #call your quadrature function. Hint, the answer should be 3. f = u*h result = myquadrature(f,a,b) result Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r

Re: [R] MATLAB vrs. R

2010-10-11 Thread Daniel Nordlund
be 3. f = u*h result = myquadrature(f,a,b) result Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Memory limit problem

2010-10-11 Thread Daniel Nordlund
of contiguous memory, it still couldn't allocate the vector. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Re use objects from within a custom made function

2009-10-12 Thread Daniel Nordlund
like test(1,4)$x But this is inefficient because each time you access one of the components, you need to rerun the function. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Upgrading R using the global library folder strategy - what do you think about it?

2010-04-25 Thread Daniel Nordlund
you need to do to upgrade is install a new version of R and then run update.packages() from the new R installation. And for the latest versions of R and Windows, it seems something like that is done by default if you don't have R_LIBS or R_LIBS_USER defined. Dan Daniel Nordlund Bothell, WA USA

Re: [R] Discretize factors?

2010-05-15 Thread Daniel Nordlund
try something like model.matrix(~ group -1) Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] r-help

2009-11-28 Thread Daniel Nordlund
redirected posts to the R-help mailing list, which is where your posts are still coming to. So, go ahead and post your questions concerning your R code. You are in the right place. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r

Re: [R] R on Large Data Sets (again)

2009-11-28 Thread Daniel Nordlund
of adequate open source compilers for 64-bit Windows). So 64-bit R will need to be Revolution's solution or a non-Windows platform. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] sequence of commands in R

2009-11-29 Thread Daniel Nordlund
as a list. Something like: resumen-function(x) { print(apply(x,2,sd,na.rm=TRUE)) print(summary(x)) } Or resumen-function(x) { return(list(apply(x,2,sd,na.rm=TRUE), summary(x))) } Hope this is helpful, Dan Daniel Nordlund Bothell, WA

Re: [R] Announcing a new R news site: R-bloggers.com

2009-12-05 Thread Daniel Nordlund
as suspicious (I can count on one hand the number of times I have received that warning). My question: do you know what your site is doing that might be considered suspicious? Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https

Re: [R] Announcing a new R news site: R-bloggers.com

2009-12-05 Thread Daniel Nordlund
I don’t have comments as yet, because I didn’t stay around the site too long. I will go back and look at it using a spare Ubuntu box and let you know what I think. Dan Daniel Nordlund Bothell, WA USA _ From: Tal Galili [mailto:tal.gal...@gmail.com] Sent: Saturday

[R] how to combine multiple indicator variables in a single factor

2009-12-18 Thread Daniel Nordlund
a How would I do this? Thanks, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list 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

Re: [R] how to combine multiple indicator variables in a single factor

2009-12-18 Thread Daniel Nordlund
Thanks to Ehud Cohen and William Dunlap for their assistance. Both solutions worked and were helpful. Dan Daniel Nordlund Bothell, WA USA -Original Message- From: ehud cohen [mailto:ehudco.l...@gmail.com] Sent: Friday, December 18, 2009 1:05 PM To: Daniel Nordlund Cc: r-help@r

Re: [R] difference in sort order linux/Windows (R.2.11.0)

2010-05-28 Thread Daniel Nordlund
of the locale command in Linux includes: LC_COLLATE=en_GB.UTF-8 This happens consistently on a Debian Lenny and a Debian Etch system. Thanks, Ted. Maybe asking on R-sig-Debian could be of some help. https://stat.ethz.ch/mailman/listinfo/r-sig-debian Hope this is helpful, Dan Daniel

Re: [R] Popularity of R, SAS, SPSS, Stata...

2010-06-25 Thread Daniel Nordlund
of different systems. Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list 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

Re: [R] How to detect and exclude outliers in R?

2010-01-18 Thread Daniel Nordlund
and the data contains some outliers. I want to know if it is possible in R to automatically detect outliers in a dataset and remove them -- You will need to provide more information. What is your definition of an outlier? And, why should those data be removed? Daniel Nordlund Bothell, WA USA

Re: [R] Random number quality

2010-02-05 Thread Daniel Nordlund
package. Thanks, Ben K. Without knowing what criteria/methods you would use to decide on random enough, I would still say the default PRNG in R is more than adequate for your described application. Dan Daniel Nordlund Bothell, WA USA __ R-help@r

[R] SAS and RODBC

2010-02-11 Thread Daniel Nordlund
suggest how I might go about tracking down the problem? I don't know much about ODBC in general or what RODBC is doing under the hood, or how the SAS ODBC driver is written, but it would be useful if I could get R to write SAS datasets, and not just read them. Thanks, Dan Daniel Nordlund

Re: [R] SAS and RODBC

2010-02-12 Thread Daniel Nordlund
-Original Message- From: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] Sent: Thursday, February 11, 2010 1:25 AM To: Daniel Nordlund Cc: r-help@r-project.org Subject: Re: [R] SAS and RODBC On Thu, 11 Feb 2010, Daniel Nordlund wrote: I am using R-2.10.1 binary from CRAN

Re: [R] lm function in R

2010-02-12 Thread Daniel Nordlund
= fitted(mod) Y.hat This gives me the following output: Y.hat 1 2 3 4 5 6 14 23 30 50 39 67 Obviously I am doing something wrong. Please help. Thanks. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r

Re: [R] SAS and RODBC

2010-02-13 Thread Daniel Nordlund
-Original Message- From: Frank E Harrell Jr [mailto:f.harr...@vanderbilt.edu] Sent: Saturday, February 13, 2010 5:49 AM To: Daniel Nordlund Cc: r-help@r-project.org Subject: Re: [R] SAS and RODBC Daniel Nordlund wrote: . . . This is just a quick follow-up to my previous

[R] sas.get and Windows: WAS RE: SAS and RODBC

2010-02-14 Thread Daniel Nordlund
-Original Message- From: Uwe Ligges [mailto:lig...@statistik.tu-dortmund.de] Sent: Sunday, February 14, 2010 7:09 AM To: Daniel Nordlund Cc: r-help@r-project.org Subject: Re: [R] SAS and RODBC On 14.02.2010 08:19, Daniel Nordlund wrote: -Original Message- From

Re: [R] Bivariate Uniform distribution

2010-02-16 Thread Daniel Nordlund
is simply pairs of uniform random numbers. The density is constant, so it is easy to get to the other quantities that you want based on that. So what is it that you are actually wanting to do? Dan Daniel Nordlund Bothell, WA USA __ R-help@r

Re: [R] Need some help

2007-10-14 Thread Daniel Nordlund
), replace=TRUE)) Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] Need some help

2007-10-15 Thread Daniel Nordlund
this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list 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

Re: [R] Bar plot with error bars

2007-10-22 Thread Daniel Nordlund
to the graph. Hope this helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list 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

Re: [R] Sampling

2008-02-05 Thread Daniel Nordlund
, replace=T) How can I specify that I need 12 As and 12 Bs? Thank you, Judith Judith, Does this do what you want? g-sample(rep(LETTERS[1:2],12)) Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org

Re: [R] relationship between t-test CI and SEM?

2008-03-09 Thread Daniel Nordlund
Daniel Nordlund Bothell, WA __ R-help@r-project.org mailing list 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] SAS data

2008-03-16 Thread Daniel Nordlund
, and operating system (presumably MS Windows, but what version?), someone should be able to help. Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Error: cannot allocate vector of size 3.0 Gb

2008-03-28 Thread Daniel Nordlund
. If I am incorrect, I'm sure someone will be along to correct me shortly. Hope this is helpful, Dan Daniel Nordlund Bothell, WA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] newbie - read.csv creates a (data.frame, table, array, matrix, ...) and plotting one column

2009-06-28 Thread Daniel Nordlund
or an array. As you move forward you will want to keep these structues separate in your mind. Best of luck, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] R: R: Is there a way to extract some fields data from HTML pages through any R function ?

2009-07-06 Thread Daniel Nordlund
- read.xls(http://mirecords.umn.edu/miRecords/download_data.php?v=1;) Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Best way to export values from a function?

2009-07-08 Thread Daniel Nordlund
) factorialVal-factorial(x) return(list(squared=squared, cubed=cubed, exponential=exponential, factorialVal=factorialVal)) } Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] 'scan' in a script?

2009-07-09 Thread Daniel Nordlund
at the readline() function. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] Nested for loops

2009-07-14 Thread Daniel Nordlund
) { // do something } } And you avoid your current problem. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] ifelse choices in a data.frame?

2009-07-19 Thread Daniel Nordlund
- with(DF, ifelse(Test,c*d,c+d)) Have I missed something in what you are doing? Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org

Re: [R] ROCR package question

2009-07-25 Thread Daniel Nordlund
exactly what your problem is. I have created some data and and run boxplot with and without outline=FALSE. When FALSE, I don't get the outliers drawn. So can you show us an example of your problem? x-c(rnorm(100), 30); boxplot(x) boxplot(x,outline=FALSE) Dan Daniel Nordlund Bothell, WA USA

Re: [R] na.strings and the like; suspending interpretation of NA

2009-08-04 Thread Daniel Nordlund
, and where in your program values are getting converted to NA, before anyone can give you much help. Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] Seeing negative numbers to zero

2009-08-07 Thread Daniel Nordlund
-contained, reproducible example would help us help you. KN1 - rnorm(100) KN2 - ifelse(KN1 0, 0, KN1) Works fine for fine for me. Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Seeing negative numbers to zero

2009-08-07 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Daniel Nordlund Sent: Friday, August 07, 2009 2:50 PM To: r-help@r-project.org Subject: Re: [R] Seeing negative numbers to zero -Original Message- From: r-help-boun

Re: [R] problem adding columns to matrix

2009-08-09 Thread Daniel Nordlund
. It could have to do with different versions of R, and or operating systems, etc., which you told us nothing about. I am using R-2.9.1 on Win XP Pro. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https

Re: [R] climatological standard deviation- (question re-posted)

2008-09-25 Thread Daniel Nordlund
),FUN=sd) names(co2.mean) - c('month','mean') names(co2.sd) - c('month','sd') co2.stats - merge(co2.mean,co2.sd) with(data=co2.stats, errbar( month, mean, mean+sd, mean-sd )) Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r

Re: [R] sudden problem with script

2008-04-30 Thread Daniel Nordlund
Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list 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

Re: [R] R is a virus, spyware or malware (gasp!)

2008-05-19 Thread Daniel Nordlund
I looked at the home website and found a contact form which someone could use to inform the company of the error of their ways. http://www.prevx.com/contactus.asp I will leave it to those who may be better equipped to deal with any replies from the company to contact them. Dan Daniel

Re: [R] rbinom : Does randomness preclude precision?

2008-05-28 Thread Daniel Nordlund
a certain percentage of ones in a sequence, but you should not expect to see that exact percentage in any subset of the sequence. One other example, if you flip a fair coin 100 times, do you expect to get exactly 50 heads? Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA Randomness

Re: [R] Print to File Formatting

2009-05-06 Thread Daniel Nordlund
these quotes in my file - is it possible to get R to omit them even if my data frame contains character strings? Any help or hints on this are greatly appreciated! Thanks, Brigid Brigid, Look at ?write.table. This should solve both problems. Hope this is helpful, Dan Daniel Nordlund

[R] sprintf() question

2009-05-17 Thread Daniel Nordlund
: [1] stats graphics grDevices utils datasets methods base Thanks for any enlightenment. Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] sprintf() question

2009-05-17 Thread Daniel Nordlund
-Original Message- From: Ted Harding [mailto:ted.hard...@manchester.ac.uk] Sent: Sunday, May 17, 2009 3:32 PM To: Daniel Nordlund Cc: r-help@r-project.org Subject: RE: [R] sprintf() question On 17-May-09 22:03:19, Daniel Nordlund wrote: When I type the following, I get results

Re: [R] sprintf() question

2009-05-18 Thread Daniel Nordlund
-Original Message- From: Peter Dalgaard [mailto:p.dalga...@biostat.ku.dk] Sent: Monday, May 18, 2009 12:15 AM To: Daniel Nordlund Cc: ted.hard...@manchester.ac.uk; r-help@r-project.org Subject: Re: [R] sprintf() question Daniel Nordlund wrote: Enlightenment is what I asked

Re: [R] Problems with sample variance

2009-05-20 Thread Daniel Nordlund
with these numbers. HTH . Peter Alspach Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] ifelse(is.na), with function inside

2009-06-17 Thread Daniel Nordlund
a function: wy[i]- ifelse(((is.na(a))), call_fun1(x), call_fun2(x) Not sure if I understand everything you want to do, but what is wrong with just using wy - ifelse(is.na(a), fun1(x), fun2(x)) Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA

[R] problem updating packages on Ubuntu 7.10

2007-11-22 Thread Daniel Nordlund
to find anything that was helpful to me. I have successfully updated packages on Ubuntu 6.10 and 7.04. I am sure somebody knows what is happening here, and I would appreciate any pointers to what I am doing wrong. Thanks, Dan Daniel Nordlund Bothell, WA

Re: [R] problem updating packages on Ubuntu 7.10

2007-11-23 Thread Daniel Nordlund
-Original Message- From: Vincent Goulet [mailto:[EMAIL PROTECTED] Sent: Friday, November 23, 2007 7:47 AM To: Daniel Nordlund Cc: [EMAIL PROTECTED] Subject: Re: [R] problem updating packages on Ubuntu 7.10 Le jeu. 22 nov. à 14:19, Daniel Nordlund a écrit : I am running Ubuntu

Re: [R] Different value between R variance and definition of variance

2007-11-28 Thread Daniel Nordlund
this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list 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

Re: [R] Naming list objects

2008-01-07 Thread Daniel Nordlund
, How about names(alninc) - c('F','V','G') Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] product of vector elements

2008-01-12 Thread Daniel Nordlund
the product of all elements in a vector: #get product of vector elements: (1,2,3,4,5) vec.product - exp(sum(log(c(1,2,3,4,5 I have not found a vector product function, if one has been written. Thanks, Gerard See ?prod. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA

Re: [R] Different results in calculating SD of 2 numbers

2008-01-16 Thread Daniel Nordlund
for your two numbers would be ( (1.25 - 1.1)^2 + (.95 - 1.1)^2 )^.5 sd(c(1.25, 0.95)) [1] 0.2121320 # why it is different from 0.15? Regards, Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing

Re: [R] things that are difficult/impossible to do in SAS or SPSS but simple in R

2008-01-16 Thread Daniel Nordlund
environment, so it's always much more difficult than it should be to do something new. As soon as you get away from the canned procs and have to write something of your own, SAS falls down. I don't know enough about SPSS to comment. -- Jeff Dan Daniel Nordlund Bothell, WA USA

Re: [R] Fisher test problem

2009-03-21 Thread Daniel Nordlund
and they are not symmetrical). To calculate a two-tailed test, one needs to calculate the probability for each table that is as extreme or more extreme than the observed table and take the sum (including the probabiility of the observed table). Hope this is helpful, Dan Daniel Nordlund Bothell, WA

Re: [R] Converting Matrix into List - problem (urgent)

2009-03-22 Thread Daniel Nordlund
the 20 values you want vector1 - as.vector(t(m))[1:20] But without knowing the actual structure of your variable congeneric, it is not possible to tell you how to manipulate it. Maybe someone else will be better at guessing. Dan Daniel Nordlund Bothell, WA USA

Re: [R] Splitting Area under curve into equal portions

2009-03-26 Thread Daniel Nordlund
Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list 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] binary AND operators in R

2009-03-29 Thread Daniel Nordlund
??bitwise And found the package bitops on CRAN. Check and see if it has what you need. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Generating random integers

2009-04-12 Thread Daniel Nordlund
integer(s) in a range (say that beetween 1 to 100) in R. Any help is deeply appreciated. Kind Regards Seyit Ali Look at ?sample Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list

Re: [R] taking the log then later exponentiate the result query

2009-04-12 Thread Daniel Nordlund
. Try changing your calculation of M to (I think this right) M - (alpha-1)*log(alpha-1) + (beta-1)*log(beta-1) - (alpha+beta-2)*log(alpha+beta-2) Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https

Re: [R] birthday problem (factorial limit)

2008-09-28 Thread Daniel Nordlund
use the lfactorial() or lgamma() functions as has been suggested in other discussions of factorials on this list. exp((lfactorial(365) - lfactorial(365-23)) - 23*log(365)) or exp((lgamma(365 + 1) - lgamma(365-23 + 1)) - 23*log(365)) Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA

Re: [R] does there any function like sumif in excel?

2008-09-28 Thread Daniel Nordlund
datas[,'a'] %in%(1:5) is the example filter criteria that I used for the example. What is the nature of your data, and what are your filter criteria? Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Convert text into a variable name

2008-11-05 Thread Daniel Nordlund
at the R console prompt to read about the function. Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] write.table

2009-02-20 Thread Daniel Nordlund
, carichi.annui.lav) #It doesn't work?!?!?! Does someone have an explanation? Thanks a lot for any help!! Laura Laura, What do you mean by It doesn't work? Do you get error messages? Or, do you just not get what you want? And if so, what is that you want? Dan Daniel Nordlund Bothell, WA USA

Re: [R] rounding problem

2009-03-01 Thread Daniel Nordlund
that round(0.15, 1) equals 0.2 . You say you want 1.5 to round to 2.0. What would you like the result of round(2.5) to equal? Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] R - need more memory, or rejection sampling algorithm doesn't work?

2009-03-02 Thread Daniel Nordlund
to say for sure what the problem is. However, it is not a memory problem (unless you have a broken system). There are also problems in your second routine. We need reproducible code if you want R-help to do more than guess. Dan Daniel Nordlund Bothell, WA USA

Re: [R] How to generate fake population (ie. not sample) data?

2009-03-03 Thread Daniel Nordlund
) Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list 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

Re: [R] How to generate fake population (ie. not sample) data?

2009-03-04 Thread Daniel Nordlund
-Original Message- From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com] Sent: Wednesday, March 04, 2009 3:17 AM To: Daniel Nordlund Cc: r-help@r-project.org Subject: Re: [R] How to generate fake population (ie. not sample) data? On Wed, Mar 4, 2009 at 2:48 AM, Daniel

Re: [R] new r user

2009-03-04 Thread Daniel Nordlund
College Park, MD 20742-1815 If you are asking how to find the least-squares estimates for slope and intercept for a given set of data, then look at ?lm If you are asking about something else, then you will need to provide more context. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA

Re: [R] sas.get function in Hmsic 3.4-4 vs. 3.0-12

2008-12-13 Thread Daniel Nordlund
and Hmisc 3.4-4. Anyway, from the Rgui console select Help, then search.r-project.org, and search for sas.get. The following post has the solution to your problem. http://finzi.psych.upenn.edu/R/Rhelp02a/archive/97413.html Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA

Re: [R] How can I avoid nested 'for' loops or quicken the process?

2008-12-23 Thread Daniel Nordlund
time is saved by using apply to eliminate the final for loop? Is it worth the additional programming time? Enquiring minds want to know. :-) Dan Daniel Nordlund Bothell, WA USA -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf

Re: [R] runif limited precision

2009-01-02 Thread Daniel Nordlund
. But that is just my 4 cents worth (inflation :-). Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

[R] Combining matrices

2009-08-24 Thread Daniel Nordlund
, they are given so as to illustrate how I want to combine the matrices. I.e., I am looking for a general way to combine the first row of x with each row of y, then the second row of x with y, Thanks, Dan Daniel Nordlund Bothell, WA USA Thanks

Re: [R] Combining matrices

2009-08-24 Thread Daniel Nordlund
-Original Message- From: Marc Schwartz [mailto:marc_schwa...@me.com] Sent: Monday, August 24, 2009 9:57 AM To: Daniel Nordlund Cc: r help Subject: Re: [R] Combining matrices On Aug 24, 2009, at 11:46 AM, Marc Schwartz wrote: On Aug 24, 2009, at 11:16 AM, Daniel Nordlund

Re: [R] Help on comparing two matrices

2009-08-24 Thread Daniel Nordlund
and columns of x.o with tied totals are permuted## for(i in 1:nrow(rperm)){ for(j in 1:nrow(cperm)){ if(identical(m.o,x.o[rperm[i,],cperm[j,]])) { cat('TRUE','\n') break } } } Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA

Re: [R] How not to keep the redundant space when convert a data frame with as.matrix()?

2009-09-16 Thread Daniel Nordlund
? Is there some reason you can't use a data.frame? Enquiring minds want to know? Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

[R] sem package and growth curves

2010-03-01 Thread Daniel Nordlund
would also be interested in other simple examples using sem and RAM specifications. If anyone is interested, I would also be willing to share the R code I have written for other chapters in the Singer and Willett book. Thanks, Dan Daniel Nordlund Bothell, WA USA

Re: [R] sem package and growth curves

2010-03-03 Thread Daniel Nordlund
or had overlooked in the documentation for the sem package. Again, this has been very helpful, Dan Daniel Nordlund Bothell, WA USA -Original Message- From: John Fox [mailto:j...@mcmaster.ca] Sent: Wednesday, March 03, 2010 7:19 AM To: 'Chuck Cleland'; 'Daniel Nordlund' Cc: 'r

Re: [R] EM algorithm in R

2010-03-21 Thread Daniel Nordlund
, Dan Daniel Nordlund Bothell, WA USA __ R-help@r-project.org mailing list 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

Re: [R] SAS and R on multiple operating systems

2010-04-05 Thread Daniel Nordlund
variables. NOTE: DATA statement used (Total process time): real time 0.04 seconds cpu time0.01 seconds I can even concatenate windows and unix SAS datasets. Hope this helpful, Dan Daniel Nordlund Bothell, WA USA

Re: [R] SAS and R on multiple operating systems

2010-04-06 Thread Daniel Nordlund
character button. I do use unicode in SAS for scripting some simple mathematical text. Regards Roger, You might try Google-ing for SASweave. It is apparently similar to sweave and facilitates using Latex with SAS. Hope this is helpful, Dan Daniel Nordlund Bothell, WA USA

  1   2   3   >