Re: [R] Is there a function to test if all the elements in a vector are unique

2009-12-01 Thread Rolf Turner
ot to work. Version 2.10.1 is about to be released, for crying out loud! cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{drop

Re: [R] Is there a function to test if all the elements in a vector are unique

2009-12-01 Thread Rolf Turner
On 2/12/2009, at 3:48 PM, Peng Yu wrote: On Tue, Dec 1, 2009 at 8:24 PM, Rolf Turner wrote: On 2/12/2009, at 3:09 PM, Peng Yu wrote: Here is my sessionInfo(). [Snotty comment deleted.] sessionInfo() R version 2.7.1 (2008-06-23) If you're goi

Re: [R] .libPaths(new) stopped working in 2.10

2009-12-06 Thread Rolf Turner
s/R.framework/Resources/library" > sessionInfo() R version 2.10.0 (2009-10-26) i386-apple-darwin8.11.1 locale: [1] C attached base packages: [1] datasets utils stats graphics grDevices methods base oth

Re: [R] Dividing a pixel image into factors - (cut.im(), cut.default())

2009-12-06 Thread Rolf Turner
cut.default(). Can anyone help? Unless I'm terribly confused, the obvious solution to your question is: cut.im(X.im,breaks=c(0,5,60)) Uhhh, why was this difficult? cheers, Rolf T

Re: [R] SAS "datalines" or "cards" statement equivalent in R?

2009-12-07 Thread Rolf Turner
nd get into the R way of thinking. You'll be glad you did! To paraphrase Eric Blair: ``SAS-thinkers unbellyfeel R-speak.'' cheers, Rolf Turner ## Attention:

Re: [R] Quadratcount problem in spatstat

2009-12-08 Thread Rolf Turner
and then attach ``cameroon.dput'' to your email. Thanks. cheers, Rolf Turner On 9/12/2009, at 9:38 AM, Sebastian Schutte wrote: Hi, I know there are older threads discussing the quadratcount function in spatstat. Unfortunately, I could not find a solution to

Re: [R] .Rhistory in R.app

2009-12-09 Thread Rolf Turner
orget about the GUI, which only gets in the way of serious work? cheers, Rolf Turner P. S.: > sessionInfo() R version 2.10.0 (2009-10-26) i386-apple-darwin8.11.1 locale: [1] en_NZ.UTF-8/en_NZ.UTF-8/C/C/en_NZ.UTF-8/en_NZ.UTF-8 attached base packages: [1] dataset

Re: [R] Plotting frequency curve over histogram

2009-12-09 Thread Rolf Turner
to change counts into density values. 2) Plot multiple frequency curves in a single plot ?lines I have been using the "hist" function for my job. I'd appreciate if anyone could help me with the solution

[R] Assigning variables into an environment.

2009-12-09 Thread Rolf Turner
not be so efficacious in the context of my real --- as opposed to toy --- example). I want to try to get the environment idea to work, and I want to understand more about environments and how they work.] Thanks for any insights. cheers, Rolf Turner P. S. Are there any articl

Re: [R] How to scale a histogram

2009-12-10 Thread Rolf Turner
alf evil. > x <- rnorm(300) > h <- hist(x,plot=FALSE) > h$counts <- h$counts*42 > plot(h,ylab="Rescaled counts") If you want to rescale the x-axis, see the posting by Stephan Devriese. ch

Re: [R] .Rhistory in R.app

2009-12-10 Thread Rolf Turner
file. Sounds like a job for Superman (i.e. Simon Urbanek). :-) cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{drop

Re: [R] Assigning variables into an environment.

2009-12-10 Thread Rolf Turner
Thanks to Gabor Grothendieck, Duncan Murdoch, Hadley Wickham, and Bert Gunter for their useful input. I'm beginning to get a glimmering of understanding, and I think I now have enough to make some progress. cheers, Rolf T

Re: [R] debug an error that incapacitates R?

2009-12-14 Thread Rolf Turner
Wouldn't sink.number() give you a handle on whether the problem is that there is an invalid sink() in effect? On 15/12/2009, at 10:55 AM, Brian Diggs wrote: -Original Message- From: Liviu Andronic [mailto:landronim...@gmail.com] Sent: Sunday, December 13, 2009 4:05 AM To: Duncan Murdoc

Re: [R] Type III sum of square in ANOVA

2009-12-15 Thread Rolf Turner
u insist on having them. cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}} __ R-help@r-project.org mailing list http

Re: [R] Odp: Creating Dummy Variables in R

2009-12-16 Thread Rolf Turner
ou want. The dummy variable encoding used will be determined by the (first) value of options()$contrasts, which by default i contr.treatment. Read up on factors and contrasts. cheers, Rolf Turner

Re: [R] Unintended loading of package:datasets

2009-05-10 Thread Rolf Turner
s (note the ``s'') is a required R package which is *always* loaded automatically --- and in my experience instantaneously. I don't know about a dataset (singular) package. There does not appear to be one on CRAN. There is some confusion in what you are doing. cheers

Re: [R] Read many .csv files into an R session automatically, without specifying filenames

2009-05-11 Thread Rolf Turner
do: files <- list.files(pattern="\\.csv$") for(file in files) { stem <- gsub("\\.csv$","",file) assign(stem,read.csv(file)) } cheers, Rolf Turner ###

Re: [R] (no subject)

2009-05-12 Thread Rolf Turner
, Rolf Turner ## Attention: This e-mail message is privileged and confidential. If you are not the intended recipient please delete the message and notify the sender. Any views or opinions presented are solely

Re: [R] Simulation

2009-05-13 Thread Rolf Turner
ing a seed serves to make the results reproducible. This works via either approach. Making results reproducible in this manner is advisable, but seed-setting is nothing that the OP needs to be *warned* about. cheers,

Re: [R] R: corrupted smoothing kernel ?

2009-05-14 Thread Rolf Turner
package:stats'' in the search path which is listed The point that Uwe was making was that you probably had some *other* package loaded, said package containing a density() function (with only one argument?) which masked the density() function in the

Re: [R] is.variable ? is.initialized ?

2009-05-14 Thread Rolf Turner
uote marks; requires the variable name as a string. cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}} __ R-help@r

Re: [R] is.variable ? is.initialized ?

2009-05-14 Thread Rolf Turner
ething together: !is.na(match("array",names(xxx))) will do it, I think. (Not tested.) cheers, Rolf Turner ## Attention:\ This e-mail message is privileged

Re: [R] stringsAsFactors param in expand.grid not working

2009-05-18 Thread Rolf Turner
it's working) of expand.grid() default to options() $stringsAsFactors, rather than to FALSE? This would make no difference to me personally, since I set options(stringsAsFactors=FALSE) in my .Rprofile. But it might make some people hap

Re: [R] error message re: max(i), but code and output seen O.K.

2009-05-20 Thread Rolf Turner
hould* happen if all of the arguments are NA? One way to start tracking down the instance would be to set options(warn=2) to change the warning to a real error, and then use traceback() to see where the error occurred. cheers, Rolf T

Re: [R] evaluate polynomial

2009-05-20 Thread Rolf Turner
x <- 1.6 > y(x) or > fred <- 1.6 > y(fred) cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}} ___

Re: [R] about strauss process

2009-05-24 Thread Rolf Turner
might consider trying the Geyer process. Use cif="geyer" in forming the model to be used by rmh(). In fitting Geyer models to data, one way to estimate the saturation parameter is via profile pseudolikelihood. See ?profilepl. cheers,

Re: [R] Replace is leaking?

2009-05-27 Thread Rolf Turner
] [1] 3926 > temp2[12] [1] 0.4462404 > xxx <- replace(rep(0, 4000), temp1[12] , temp2[12]) > xxx[3925] [1] 0 > xxx[3926] [1] 0.4462404 OMM! cheers, Rolf Turner ## Attention:\

Re: [R] How this addition works?

2009-05-28 Thread Rolf Turner
x27;-' for subtraction, '*' for multiplication, '/' for division and '^' for exponentiation. The key word is ``recycled''. cheers, Rolf Turner #

Re: [R] Still can't find missing data - How do I get NA in xtabs with factors?

2009-06-02 Thread Rolf Turner
.0 Sam 3.20.02.10.00.0 NA 0.0 0.0 0.0 100.2 1000.2 cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}} _

Re: [R] if + is.na

2009-06-14 Thread Rolf Turner
On 15/06/2009, at 7:48 AM, Grześ wrote: Hello! I wont to use a function is.na() I have two vectors: a=c(1,NA,3,3,3) b=c(0,0,0,0,0) and when I use is.na function it's ok: is.na(a) [1] FALSE TRUE FALSE FALSE FALSE but I would create sth like this: for i in 1:length(a){ if (wsp[i] ==

Re: [R] Confidence Bands in Polynomial Regression

2009-06-16 Thread Rolf Turner
e ``true'' curve. yt <- 1.3 + 0.4*tt - 0.6*tt^2 lines(tt,yt,lty=5,col="blue") cheers, Rolf Turner On 16/06/2009, at 2:11 PM, Dylan Beaudette wrote: On Mon, Jun 15, 2009 at 6:57 PM, Ben Amsel wrote: Hello R users, Given a linear (in the parameters) re

Re: [R] Coefficient of determination

2009-06-16 Thread Rolf Turner
psych.upenn.edu/Rhelp08/2009-April/196676.html points to a thread from 2002 which appears to be quite germane: https://stat.ethz.ch/pipermail/r-help/2002-July/023461.html cheers, Rolf Turner On Tue, Jun 16, 2009 at 4:50 PM, Derek An wrote: Dear all, Is there a instr

Re: [R] wrong results when apply+sum with missing values (NA)

2009-06-16 Thread Rolf Turner
Where the did you get the argument ``na.nr''? Perhaps you need new reading glasses. Anyhow, unless there's something else you're not telling us, apply(nafam,2,sum,na.rm=TRUE) should work just fine. cheers, Rolf Turner On 17/06/2009

Re: [R] loop help

2009-06-16 Thread Rolf Turner
1.7212112 2.7146747 3 5 1.4042683 1.8666787 3.3951935 3 6 0.8938755 2.6359504 1.0695309 2 7 2.5115220 1.7157471 1.2427306 1 8 0.9053410 -0.6564554 -0.2631631 1 9 3.0184237 -0.4404669 1.9600974 1 10 0.9372859 3.

Re: [R] How to parse and eval a collection of items

2009-06-18 Thread Rolf Turner
nceptually, eval(as.name(c(thels))) which of course doesn't work. Does do.call(c,thels) work? cheers, Rolf Turner ## Attention:\ This e-mail message is priv

Re: [R] Problem with storing a sequence of lmer() model fit into a list

2009-06-22 Thread Rolf Turner
fit.list[[i]] <- fit } So a ``fix'' for the problem would seem to be to start with fit.list being an empty list, rather than NULL. But why the problem shows up only with calls to lmer() is completely mysterious to me. Perhaps others will be able to shed light. HTH cheers

Re: [R] p-values for ARIMA coefficients

2009-06-22 Thread Rolf Turner
On 23/06/2009, at 11:38 AM, m.gha...@yahoo.fr wrote: Hi, I'm a beginner using R and I'm modeling a time series with ARIMA. I'm looking for a way to determine the p-values of the coefficients of my model. Does ARIMA function return these values? or is there a way to determine them easily?

Re: [R] Long to wide format without time variable

2009-06-23 Thread Rolf Turner
es=c ("COD","MDid"),direction="wide") Except for the order of the columns (which you can easily rearrange if it matters, which it doesn't) the result appears to be what you want. cheers, Rolf Turner Thanks in advanc

Re: [R] How to avoid ifelse statement converting factor to character

2009-06-24 Thread Rolf Turner
to use it a ``high'' level you need to understand the high level. Don't attempt to run before you can crawl. cheers, Rolf Turner Best regards, Craig Stavros Macrakis wrote: On Wed, Jun 24, 2009 at 12:34 PM, Mark Na wrote:

Re: [R] Difference between gam() and loess().

2009-03-23 Thread Rolf Turner
cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}} __ R-help@r-project.org mailing list https://stat.ethz.ch/mai

Re: [R] Testing for symbolic links

2009-03-24 Thread Rolf Turner
at is sufficiently Unix-like for the following roll-your-own to work: cfsl <- function(file) { # cfsl <--> "check for symbolic link" xxx <- system(paste("ls -l",file),intern=TRUE) if(substr(xxx,1,1)=="l") TRUE else FALSE } HT

Re: [R] Green and Byar (1980) Prostate Cancer Data set from Andrews and Herzberg - Data

2009-03-24 Thread Rolf Turner
sv file, and then read *that* in with read.csv() What am I missing? *Are* there ``R binary'' files lurking about that I am somehow not seeing? Why won't read.xls() work on this data set? cheers, Rolf Turner ##

Re: [R] Green and Byar (1980) Prostate Cancer Data set from Andrews and Herzberg - Data

2009-03-24 Thread Rolf Turner
On 25/03/2009, at 12:09 PM, Frank E Harrell Jr wrote: (2) Scrolling down to ``Byar and Green prostate cancer data'' appeared to get me to the right place. But I couldn't see any signs of any ``R binary files''. Please look again. It's under the heading "R". Unfortunately I u

Re: [R] use of "@" character in variable name

2009-03-26 Thread Rolf Turner
re also excluded. See fortune(18). Another rule is that a variable name can't begin with a digit. And it can't have white space in it. There are probably other rules, but essentially anything *sensible* as a variable name can be used as a variable name. cheers,

Re: [R] use of "@" character in variable name

2009-03-26 Thread Rolf Turner
On 27/03/2009, at 2:52 PM, Marc Schwartz wrote: On Mar 26, 2009, at 8:40 PM, Rolf Turner wrote: On 27/03/2009, at 2:04 PM, Mike Miller wrote: Importing data with a header row using read.delim, one variable should be named @5HTT but it is automatically renamed to X.5HTT, presumably

Re: [R] how to quit mailing list

2009-03-26 Thread Rolf Turner
t; R.help web interface ---> Unsubscribe or edit options Doesn't seem too difficult to me. cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and

Re: [R] Quadrat Variance analysis

2009-03-27 Thread Rolf Turner
, the spatstat package provides quite a few facilities for analyzing quadrats/quadrat counts. This package might prove to be of some use to you. cheers, Rolf Turner ## Attention:\ This e-mail message

[R] Lattice question.

2009-03-29 Thread Rolf Turner
Hi. I am trying to do histograms in lattice, and I want to get both counts and percents in the same plot. To try to be clearer --- there are 3 levels to my factor; I'd like to get a 2 x 3 array of plots where the top row consist of histograms by counts and the bottom consists of (the correspond

Re: [R] Lattice question.

2009-03-29 Thread Rolf Turner
Thanks very much for your input. On 30/03/2009, at 12:29 PM, Felix Andrews wrote: Modifying your example... library(lattice) set.seed(42) XX <- data.frame(y=runif(300,0,10),a=factor(sample(letters[1:3],300, TRUE,c(0.5,0.3,0.2 XX <- rbind(XX,XX)

Re: [R] Matrix max by row

2009-03-29 Thread Rolf Turner
system elapsed 1.938 0.098 2.040 so unless there's something that I am misunderstanding (always a serious consideration) Wacek's apply method looks to be about 1.4 times *faster* than the do.call/pmax method. cheers, Rolf Turner On 30/03/2009, at 3:55 PM

Re: [R] use R Group SFBA April meeting reminder; video of Feb k

2009-03-30 Thread Rolf Turner
got Mozilla 5.0, Firefox 2.0.0.2 --- whatever that means. Bottom line --- I can't watch the video. But that's the story of my life. ***Nothing*** ever works for me! :-) Except R, which *mostly* works. cheers, Rolf Turner On 31/03/2009, at 12:49 PM, Ted H

Re: [R] Variable Wildcard Value

2009-04-01 Thread Rolf Turner
This whole thing is an April Fool's joke. Isn't it? ***Please***!!! (Let it be an April Fool's joke.) cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confi

Re: [R] something equivalent to "switch" condition

2009-04-01 Thread Rolf Turner
On 2/04/2009, at 8:37 AM, Jason Rupert wrote: Is there any syntax in R that allows a "switch"-type condition to be used? switch(variable){ case CONSTANT_VALUE; break; default: break; } ?switch ## Attention:

Re: [R] Plotting multiple ablines

2009-04-01 Thread Rolf Turner
**Look*** at the values of a and b produced in your loop and see where you're getting infinite values. cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{droppe

Re: [R] Recode of text variables

2009-04-01 Thread Rolf Turner
may be sexier than my suggestion above. Note that D gets recoded as ``Blechh!'' in the my suggestion, since you didn't specify what you wanted to happen to D. If you want D to stay as D, replace "Blechh!" by "D"; or if you want it to becoming ``missing&#x

Re: [R] Recode of text variables

2009-04-01 Thread Rolf Turner
Uhhh, Bill, he wanted E to be recoded as ``Treat 3''. And he didn't say ***what*** he wanted to happen to D. Fancy. A chance to ``correct'' Bill Venables for a second time in two days! :-) cheers, Rolf On 2/04/2009, at 12:39 PM, bill.venab...@csiro.au wrote: Here i

Re: [R] A question about forecasting with R

2009-04-02 Thread Rolf Turner
On 2/04/2009, at 11:27 PM, Uwe Ligges wrote: Not many of us are clairvoyants Hey! Wish I'd said that! :-) cheers, Rolf P. S. Great minds think alike. R. ###

Re: [R] Deleting rows based on identity variable

2009-04-02 Thread Rolf Turner
ow so this doesn't do anything). Thus you are in effect asking for d1 [2:25,]. And that's what you get. Look carefully --- it is not correct to say that when you looked at d2 *no* data were removed; d2 is equal to d1 with its first row removed. I.e. your operation didn't r

Re: [R] Howto Disable Scientific Numeric in X-axis for Plotting

2009-04-02 Thread Rolf Turner
plain number: -10, 0 , 10, 20, ...etc Look at the ``scipen'' argument of options(). A perfunctory experiment indicates that options(scipen=1) should work in your case. cheers, R

Re: [R] How to force an point in x-axis to appear in plot

2009-04-02 Thread Rolf Turner
, 10, 30, ...etc ^ in the x-axis tick marks. axis(side=1,at=0) might give what you want. But I get a 0 tick mark plotted automatically when I try a simple example. This could be due to OS difference I guess. cheers, Rolf Turner

Re: [R] [OT ?] rant (was : Re: Conversions From standard to metric units)

2009-04-03 Thread Rolf Turner
On 4/04/2009, at 10:37 AM, Emmanuel Charpentier wrote: Le vendredi 03 avril 2009 à 14:17 -0400, stephen sefick a écrit : I am starting to use R for almost any sort of calculation that I need. I am a biologist that works in the states, and there is often a need to convert from standard units

Re: [R] Puzzled by an error with apply()

2009-04-06 Thread Rolf Turner
Sheesh! cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}} __ R-help@r-project.org mailing list https://stat.ethz.c

Re: [R] R package: Where to put code to Run Once Only?

2009-04-06 Thread Rolf Turner
ectively inaccessible --- which seems to have become an obsession with some of the R community, particularly many of the senior members --- bugs the living Drambuie out of me. cheers, Rolf Turner ###

Re: [R] Simulate binary data for a logistic regression Monte Carlo

2009-04-07 Thread Rolf Turner
luck. cheers, Rolf Turner set.seed(1) alpha <- numeric(100) # Vector to store coefficient estimates X1 <- numeric(100) X2 <- numeric(100) a <- 0 # True parameters B1 <- .5 B2 <- .85 for (i in 1:100){ x1 <- rnorm(1000) x2 <- rnorm(1000) epsi

Re: [R] Simulate binary data for a logistic regression Monte Carlo

2009-04-07 Thread Rolf Turner
On 8/04/2009, at 1:27 PM, Ben Bolker wrote: I agree that that the individual-level random effect is probably the issue. I played with this some today but didn't manage to resolve it -- tried JAGS/R2jags and glmer from lme4 but didn't manage to get an estimate of epsilon that matched

Re: [R] Newton method again

2009-04-07 Thread Rolf Turner
On 8/04/2009, at 2:31 PM, Roslina Zakaria wrote: Hi Rolf, I would like to extend the problem that I asked you before regarding the newton method using 4 functions with 4 parameters. My functions involve the modified bessel function of the first kind which I can type them without any pr

Re: [R] Doubt about aov and lm function... bug?

2009-04-08 Thread Rolf Turner
There is no bug. Both of your examples work fine for me. You may have a corrupt version of ``iris'' somewhere in your search path before ``datasets''. What does find("iris") tell you? What does names("iris") tell you? cheers,

Re: [R] Doubt about aov and lm function... bug?

2009-04-08 Thread Rolf Turner
trix() function gets called in the right circumstances. Sounds like a job for namespaces (about which I was *complaining* recently; :-) ) although I don't understand these well enough to be sure that they could help here. Peter will know, I have every confidence! cheers,

Re: [R] FFT function

2009-04-10 Thread Rolf Turner
discrete Fourier transform, the latter being what is calculated by fft(). (NOTE: ***NOT*** ``FFT'' --- R is case sensitive.) cheers, Rolf Turner ## Attention:\ This e-mail message is priv

Re: [R] get() versus getAnywhere()

2009-04-18 Thread Rolf Turner
On 17/04/2009, at 10:21 PM, Duncan Murdoch wrote: Benjamin Tyner wrote: Many thanks Duncan. Perhaps this merits a more explicit note in the documentation? The quote I gave is from the documentation. How could it be more explicit? This is unfortunately typical of the attitude of R-core

Re: [R] get() versus getAnywhere()

2009-04-19 Thread Rolf Turner
On 19/04/2009, at 9:45 PM, Duncan Murdoch wrote: On 18/04/2009 8:47 PM, Rolf Turner wrote: On 17/04/2009, at 10:21 PM, Duncan Murdoch wrote: Benjamin Tyner wrote: Many thanks Duncan. Perhaps this merits a more explicit note in the documentation? The quote I gave is from the documentation

Re: [R] explicit documentation (was: get() versus getAnywhere())

2009-04-19 Thread Rolf Turner
On 19/04/2009, at 8:59 PM, Patrick Burns wrote: Rolf Turner wrote: On 17/04/2009, at 10:21 PM, Duncan Murdoch wrote: Benjamin Tyner wrote: Many thanks Duncan. Perhaps this merits a more explicit note in the documentation? The quote I gave is from the documentation. How could it be

Re: [R] Deleting rows or cols that do not meet cut off

2009-04-21 Thread Rolf Turner
x27;'. So I'd end up with: f [,1] [,2] [,3] [1,]016 [3,]361 Note: 1 is an arbitrary cut-off value. d[apply(d,1,function(x){any(x<=1)}),apply(d,2,function(x){any(x<=1)})] cheers,

Re: [R] simulate arima model

2009-04-26 Thread Rolf Turner
ta(B)a_t you could generate W_t according to phi(B)W_t = theta(B)a_t and then set Z_t = W_t + mu where mu = phi_0/phi(1). HTH cheers, Rolf Turner ## Attention:\ This e-mail message is privi

Re: [R] xYplot() produces empty pdf

2009-05-05 Thread Rolf Turner
On 6/05/2009, at 12:50 PM, x wrote: Hi, While xYplot(...) below produces an empty pdf file, plot(...) works fine. The same xYplot(...) produces correct output if tried directly in R console. Any suggestions? RTFFAQ (7.22) cheers, Rolf Turner

Re: [R] [R-sig-ME] Duplicating meta-regression results from PROC MIXED with lmer

2009-05-05 Thread Rolf Turner
tacit assertion here that the results from PROC MIXED in The-Package-That-Must-Not-Be-Named are the correct results. This assertion is very likely to bring the wrath of Doug Bates down upon your head. An outcome to be devoutly avoided! :-) cheers, Rolf Turner

Re: [R] Eigenvectors and values in R and SAS

2010-01-11 Thread Rolf Turner
to be different from the values in SAS. I would also appreciate it if someone can explain the difference in simple terms. I'm pretty new to both programs. Thanks for your help- Read the posting guide then repost your question. cheers, R

Re: [R] The TeX-source for the package manual.

2010-01-12 Thread Rolf Turner
y want to clean up by 'rm -rf .Rd2dvi' " which tells you the value of ``''. The tex file you want is called Rd2.tex. There is probably a similar incantation that works under Windoze. cheers, Rolf Turner

Re: [R] expand.grid game

2010-01-12 Thread Rolf Turner
't the foregoing solution *leave in* the possibility of putting all 17 balls in the first urn? Or 3 balls in the first urn, 12 in the second, and the remaining 2 in any of the other six urns? Etc. I.e. don't more terms have to be subtracted? c

Re: [R] expand.grid game --- never mind, I figured it out!

2010-01-12 Thread Rolf Turner
I re-read the solution that you posted and realized where my thinking was going wrong. Sorry (again!) for being a thicko. cheers, Rolf Turner On 13/01/2010, at 9:19 AM, Greg Snow wrote: How trivial is probably subjective, I don't think it is much above trivia

Re: [R] convert factor data to numeric

2010-01-13 Thread Rolf Turner
eric <- as.numeric(levels(data_factor)[data_factor]) as has been pointed out quite a few times on this list. cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and

Re: [R] counting the number of times a string appears

2010-01-13 Thread Rolf Turner
?table On 14/01/2010, at 11:12 AM, Jesse Sinclair wrote: Hi all, I have a vector of strings and need to count the number of times a string appears in the vector. eg: [1] spp6 spp10 spp6 spp6 spp4 spp2 spp9 spp10 spp5 spp2 spp2 spp3 [13] spp4 spp3 spp6 spp10 spp6 spp4 sp

Re: [R] advice/opinion on "<-" vs "=" in teaching R

2010-01-14 Thread Rolf Turner
On 15/01/2010, at 4:45 PM, Erin Hodgess wrote: Hi R People: I'm teaching a statistical computing class using R starting next week (yay!) and I have an opinion type question, please. I'm old school and use "<-" in an assignment. However, I'm starting to see the "=" in the literature. Which s

Re: [R] Error: object of type 'closure' is not subsettable

2010-01-17 Thread Rolf Turner
to me, preferably in terms that are comprehensible to the human mind (which is what I'm equipped with)? cheers, Rolf Turner On 14/01/2010, at 2:24 PM, Gabor Grothendieck wrote: See ?rep where it says that the argument must be a vector. Try rep(list(sin), 3) On

Re: [R] Strange results from Windows 7

2010-01-17 Thread Rolf Turner
h() which will show you what packages are loaded. You could also try find() !!! cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confi

Re: [R] How to convert character matrix or data.frame to numeric?

2010-01-17 Thread Rolf Turner
ur data frame to numeric mode. If there are some columns that you wish to leave alone you will have to do something a little bit more subtle. But not much more subtle. It's all pretty easy if you learn some basic R syntax. cheers, Rolf Turner On 18/01/2010, at 11:17 AM,

[R] An argument processing puzzle.

2010-01-18 Thread Rolf Turner
the whole thing falls over when a is a name, i.e. mv(a,b) doesn't work any more. Is there an incantation that will allow me to accomplish all of my desiderata? Thanks. cheers, Rolf Turner ##

Re: [R] An argument processing puzzle --- solution.

2010-01-18 Thread Rolf Turner
that these objects consist of text strings which *could* name other objects is of no importance (to me). Thanks again to all who responded. cheers, Rolf Turner ##

Re: [R] how to install spatstat

2010-01-18 Thread Rolf Turner
ackages("spatstat",dependencies=TRUE,lib=xlib) and see how you go. cheers, Rolf Turner ## Attention: This e-mail message is privileged and confidential. If you are not the intended recipien

Re: [R] Help ~

2010-01-19 Thread Rolf Turner
. Zeileis? cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}} __ R-help@r-project.org mailing list https

Re: [R] question on runif

2010-01-20 Thread Rolf Turner
Ted, Alfredo, et al: Please stop doing this jerk's homework for him!!! cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{drop

Re: [R] simulation of binary data

2010-01-20 Thread Rolf Turner
. cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}} __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] Data Manipulation

2010-01-20 Thread Rolf Turner
like that, for goodness sake. cheers, Rolf Turner On 21/01/2010, at 2:19 PM, Peter Rote wrote: Thank you Dieter, but i still have a problem to write to file. The problem is the slash in file names (Aerospace/Defense Products & Services ). If

Re: [R] Automatic File Reading [Broadcast]

2010-01-24 Thread Rolf Turner
orp") # Give the columns evocative names. X <- cbind(site=sub(".txt","",file),X) result[[file]] <- X } result <- do.call(rbind,result) HTH cheers, Rolf Turner

Re: [R] finding values for arguments?

2010-01-24 Thread Rolf Turner
Seth ?args ??? cheers, Rolf Turner ## Attention:\ This e-mail message is privileged and confid...{{dropped:9}} __ R-help@r-project.org mailing list

Re: [R] Executing a R-string

2010-01-27 Thread Rolf Turner
ndering if there was an equivalent mechanism that I cannot find in the docs anywhere to make it work. > set.seed(42) > m <- sample(0:9,42,TRUE) > S <- "which(m==4)" > eval(parse(text=S)) [1] 11 15 19 29 42

Re: [R] Randomly rearranging elements of sets

2010-01-27 Thread Rolf Turner
?sample On 28/01/2010, at 12:06 PM, jshort wrote: Hi I've recently been trying to solve some probability questions in R, but am having trouble. This is one question thats been causing some hair loss: Given the set of integers S = {1,2,3,4,5,6,7,8,9,10}, create a function F(S) that u

Re: [R] iterative regressions, adding a new line of data each time

2010-02-01 Thread Rolf Turner
m running a > multivariable regression. Any help would be greatly appreciated. Thanks. This would seem to be very easy to do using a for loop and a list. What is the problem? Is this a homework question? cheers, Rolf Turner

Re: [R] iterative regressions, adding a new line of data each time

2010-02-01 Thread Rolf Turner
On 2/02/2010, at 8:38 AM, Steve Lianoglou wrote: > On Mon, Feb 1, 2010 at 2:16 PM, Rolf Turner wrote: >> >> On 31/01/2010, at 12:14 PM, ace834 wrote: >> >>> >>> Hi, I am pretty new to R. I'm trying run a regression repeatedly, adding a >&g

Re: [R] iterative regressions, adding a new line of data each, time

2010-02-02 Thread Rolf Turner
Sons, New York, 1968) may be of some interest and/or relevance here. cheers, Rolf Turner ## Attention: This e-mail message is privileged and confidential. If you are not the intended recipient please delete the me

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