(Forgot to cc. reply to K. Elo, apologies if you get it twice)
K. Elo wrote:
Dear Anna,
19.02.2010 08:17, Anna Carter wrote:
(1) If the dataset contains some variables having all the entries = 0
and while analysing I want to delete those pericular columns, how do
acheive this. i.e.
Let's sup
> (2) Suppose I have variable no of datasets 'say n = 10'. I wish to write a
> loop assigning each of these datasets to diffrent csv files e.g.
>
> for (i in 1:10)
> {
> write.csv(data.frame(dataset[,,i]), 'data_set[i].csv', row.names = FALSE)
> }
>
> The result of this command is generation of
On Feb 18, 2010, at 11:32 PM, Wincent wrote:
Have you tried install GTK2 manually first?
It can be downloaded from http://r.research.att.com/gtk2-runtime.dmg
That is for Tiger builds.
HTH
Ronggui
On 19 February 2010 10:02, Anna Oganyan
wrote:
Dear List,
I would like to ask about pac
On Feb 19, 2010, at 1:36 AM, K. Elo wrote:
Dear Anna,
19.02.2010 08:17, Anna Carter wrote:
(1) If the dataset contains some variables having all the entries = 0
and while analysing I want to delete those pericular columns, how do
acheive this. i.e.
Let's suppose 'df' is your data frame, the
Dear Anna,
19.02.2010 08:17, Anna Carter wrote:
> (1) If the dataset contains some variables having all the entries = 0
> and while analysing I want to delete those pericular columns, how do
> acheive this. i.e.
Let's suppose 'df' is your data frame, then:
subset(df, select=which(colSums(df)!=0)
On Feb 19, 2010, at 12:38 AM, Roslina Zakaria wrote:
Hi,
I would like to distinguish my plots using colors but I got error
message. How do I correct that?
plot(ecdf(z), main ="CDF for observed and simulated weighted
sum",type="l",lwd=2,col="blue",
xlab="Weighted sum (mm)", ylab="Cumula
Dear R helpers,
I have two queries.
(1) If the dataset contains some variables having all the entries = 0 and while
analysing I want to delete those pericular columns, how do acheive this. i.e.
dataset1
sr_no var1 var2 var3 var4 var5
1 5 0
I take back what I said about not being able to use RGtk2 with the 64-
bit mac. I (just today, for the first time ) can now get RGtk2 to load
and then to get rgl to run properly. I had been able to run rgl in the
32 bit system but that was not satisfactory. I had earlier installed
the 2.18
Hi,
I would like to distinguish my plots using colors but I got error message. How
do I correct that?
plot(ecdf(z), main ="CDF for observed and simulated weighted
sum",type="l",lwd=2,col="blue",
xlab="Weighted sum (mm)", ylab="Cumulative Percent", xlim=c(0,15), xaxs ='i',
yaxs ='i',ylim=c
Have you tried install GTK2 manually first?
It can be downloaded from http://r.research.att.com/gtk2-runtime.dmg
HTH
Ronggui
On 19 February 2010 10:02, Anna Oganyan wrote:
> Dear List,
> I would like to ask about package RGtk2 with which I have a problem.
> I will very much appreciate if somebo
Dear List,
I would like to ask about package RGtk2 with which I have a problem.
I will very much appreciate if somebody could tell me what I need to do.
I need to install a package scdMicro and it depends on gWidgetsRGtk2.
I am working on MAC, version 10.5.8.
When I try to load gWidgetsRGtk2 (or R
Hello there,
I have a bunch of histogram bars that I'd like the first to be a certain
colour, second to be another colour, third to be a third colour, and repeat
for all my 39 bars.
I thought this was the way to go, but I get the same cyan coloured bars for
all the bars. I did a vector of 3 colo
I am old enough to have lived through this particular transition.
Prior to the advent of SAS, trials were analyzed by in-house written
programs (usually in Fortran maybe with the help of IMSL). These
programs were huge card decks. Having the card reader eat a card
half way through reading the deck
Thanks guys. I ended up doing as you suggested Dieter. Thanks for the idea :)
--
View this message in context:
http://n4.nabble.com/sql-query-variable-tp1558189p1561158.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.
On Tue, 16 Feb 2010, Esmail wrote:
On 16-Feb-10 09:03, Karl Ove Hufthammer wrote:
On Tue, 16 Feb 2010 08:00:09 -0500 Esmail wrote:
And along the same lines, any type of interactive debugging
utility for R?
See this article in R News:
'Debugging Without (Too Many) Tears'
http://cran.r-proje
Ok, took me a while, but I figured it out. Because my running mean had less
years than my standard rainfall graph, when I overlaid the running mean onto
the rainfall it was trying to stretch out. So I just plotted both onto the
same graph., like so:
barplot(Ann,main=title, xlab="Year",ylab="Rainf
Thanks for all the replies!
I think I posted a poor example, but now I understand that you can name entries
in a list. That is really neat.
Before I was just letting them default, which is kind of problematic.
I think I also came across another way and also used the suggestion from Bert
I think you can just use
CondoLots[CondoLots > 1] <- CondoLots[CondoLots > 1] -1
-Ista
__
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 pr
For the following:
Bldgid<-c(1000,1000,1000,1001,1002,1003,1003,1003)
Maplot<-c(2,20001,20002,3,30001,4,40001,40002)
Area<-c(40,170,160,50,100,100,90,110)
#Construct Sample dataframe
MultiLotBldgs..<-data.frame(Bldgid,Maplot,Area)
CondoLots_ <- tapply(MultiLotBldgs..$Maplot, Mul
Greg Snow wrote:
Use outer margins. Try something like:
par(mfrow=c(3,1), mar=c(0,4,0,2)+0.1, oma=c(5,0,3,0)+0.1 )
Then do your plots without resetting margins.
Thanks. Perfect! This little detail has been bothering me for quite a
while...
Also you can use xaxt='n' rather than axes=FALS
## The grouped boxplot is one of the features included in the HH package.
## You will need to install HH if you do not yet have the HH package
## A similar example is posted on my website
##http://astro.ocis.temple.edu/~rmh/HH/bwplot-color.pdf
## This is fake data which I hope mimics the struc
Hi
Thank you very much for your reply.
I meant I got different RMSE with different runs to the same program without
any change for the dataset or the parameters of SVM.
This is my code:
library(e1071)
readingmydata <- as.matrix(read.delim("mydataset.txt"))
train.x <- readingmydata[,-1]
trai
?c
but you have to make sure z is a list:
c(pts,z) ## probably is not what you want
c(pts,list(z)) ## probably is, but z will be unnamed
c(pts,list(z=z) ## names z "z"
Cheers,
Bert Gunter
Genentech Nonclinical Biostatistics
-Original Message-
From: r-help-boun...@r-project.org
On Thu, 18 Feb 2010, Richard Valliant wrote:
Should the svyby function be able to work with svyquantile? I get the
error below ...
It works, but you need to either specify ci=TRUE or keep.var=FALSE. The
problem is that svyquantile() by default does not produce standard errors.
svyby(~api0
On Feb 18, 2010, at 6:15 PM, Jason Rupert wrote:
What steps can be take to append data to a list?
Suppose I have the following list and want to append a z axist to
the list?
pts <- list(x=cars[,1], y=cars[,2])
z<-rnorm(max(dim(cars)))
How would I go about appending z to an existing list?
Hi r-users,
I have 2 sets of data and I would like to superimpose this cumulative density
in one graph.
I know how to put the 2 graphs in one same graph but my problem is the data are
different.
> z[1:20]
[1] 2.02347388 3.19514379 0.05188875 1.41333812 3.50249892 4.34272676
6.6563
What steps can be take to append data to a list?
Suppose I have the following list and want to append a z axist to the list?
pts <- list(x=cars[,1], y=cars[,2])
z<-rnorm(max(dim(cars)))
How would I go about appending z to an existing list?
Thanks a ton...
___
On Feb 18, 2010, at 4:26 PM, Christopher W. Ryan wrote:
> Anyone have any recollection of Prophet software, from the National (US)
> Center for Research Resources?
>
> --Chris
A quick Google search comes up with a very dated site at Northwestern:
http://www.basic.northwestern.edu/biotools/pr
Anyone have any recollection of Prophet software, from the National (US)
Center for Research Resources?
--Chris
Christopher W. Ryan, MD
SUNY Upstate Medical University Clinical Campus at Binghamton
425 Robinson Street, Binghamton, NY 13904
cryanatbinghamtondotedu
"If you want to build a ship,
On Feb 18, 2010, at 3:50 PM, Nordlund, Dan (DSHS/RDA) wrote:
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
>> Behalf Of Peter Dalgaard
>> Sent: Thursday, February 18, 2010 12:44 PM
>> To: Douglas Bates
>> Cc: r-help@r-project.org; Bert
Hi,
I'm generating a mixture of 2 univariate normal distributions using norMix and
rnorMix and would like to put a constraint on Mean (Equal). here is my code
snippet:
library(nor1mix)
X <- norMix(mu=c(50, 60 ), sig2=c(5,10), w=c(0.5, 0.5))
mixData <- rnorMix(1000, X)
plot(mixData, type="l"
Without know what your data set really looks like, I'd look to decision
trees - specifically package rpart and use method = classify.
Your problem may not be appropriate in that environment, but it is hard to
say with limited explanation of issues.
good luck
Steve Friedman Ph. D.
Spatial Statist
Thanks for helping!
--
View this message in context:
http://n4.nabble.com/plot-more-series-or-more-colors-tp1556751p1560863.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman
Hi everyone!
Is it possible to save an image of the workspace where
1) Packages
2) Classes
are saved along with the image?
Until now I only managed to save an workspace image that contained all
variables (including functions). When loading this image back into a new
session, p
Hi Folks,
I want to apply cluster analysis on a categorical data set, could you
recommend me some R package and suggestion?
Thanks!
Dong
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/l
Use outer margins. Try something like:
> par(mfrow=c(3,1), mar=c(0,4,0,2)+0.1, oma=c(5,0,3,0)+0.1 )
Then do your plots without resetting margins.
Also you can use xaxt='n' rather than axes=FALSE to suppress just the x axis
and not have to do the y axis and box by hand.
Hope this helps,
--
G
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf Of Peter Dalgaard
> Sent: Thursday, February 18, 2010 12:44 PM
> To: Douglas Bates
> Cc: r-help@r-project.org; Bert Gunter
> Subject: Re: [R] Use of R in clinical trials
>
>
> >> (C
Hi,
I have a nonlinear constrained optimization code that can handle nonlinear
(and linear) constraints. Send me an email if you are interested.
There is also a package available on R-forge, called Rsolnp.
Hope this is helpful,
Ravi.
Hello All,
I'm having some issues controlling graphics in R. I was wondering if anyone
may help me tackle this problem:
Given a data frame "X" with variables "Year", "Factor" (w/ n groups), and
"Freq"
How do I create a single graphic with the following plots aligned in a
vertical stack?
1. box
Hello,
if You run R in terminal, You can type R to start the R software, then use
command source("/path/to/your/script") to load the script and then You call
functions from the script as usual. Optionally, You can move to the directory
with script with command setwd("/path/to/the/directory"). Or
At the very simplest level, you can open the R script in a text editor.
Then start R at the command line in the terminal by typing
R
and then copy and paste the desired lines from the text file into the
terminal.
There are plenty of more elegant and complex solutions, but that
one is easy and will
I have data (each Y_i is a vector) in the form of
Y_i = X_i \beta_i + Z_i b_i + epsilon_i
Were it not for the measurement error (the epsilon_i) it's a very
simple model --- nice and balanced, compound symmetry, and I'd just
use lme(y ~ x1 + x2, random=~1|subj, ...) but the measurement
(Corrections/additional information welcome!)
My recollection is that the BMD programs (which, in a later version,
became BMDP) predated SAS and were specifically for BioMeDical
analysis.
How could I forget those! Yes, my old (as in 1980-1985) boss at the
University hospital even had the
hi, I am new to Linux and R environment. I have a existing R script. I
wonder how to open my R script on Linux platform and execute selected
written R command?
thanks
Xin
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
Thanks, as a follow-up, how do i extract the list element name (ie, 4-2 or 44-1)
thanks,
chipper
Date: Thu, 18 Feb 2010 11:56:45 -0800
From: ml-node+1560750-540257540-69...@n4.nabble.com
To: chipma...@hotmail.com
Subject: Re: Extracting values from a list
Try this:
sapply(x, '[', 'p.value
Try this:
sapply(x, '[', 'p.value')
On Thu, Feb 18, 2010 at 5:21 PM, chipmaney wrote:
>
> I have run a kruskal.test() using the by() function, which returns a list of
> results like the following (subset of results):
>
> Herb.df$ID: 4-2
> Kruskal-Wallis chi-squared = 18.93, df = 7, p-value
Shawn Morrison-2 wrote:
>
> # The paper reports a 95% CI of 0.79 - 1.10
> # "My" reproduced result for the CIs is much larger, especially on the
> upper end. Why would this be?
> # The authors report using the 'delta' method (Caswell, 2001) to
> calculate the CI in which the
>
>
Shawn,
I p
chipmaney schreef:
I have run a kruskal.test() using the by() function, which returns a list of
results like the following (subset of results):
Herb.df$ID: 4-2
Kruskal-Wallis chi-squared = 18.93, df = 7, p-value = 0.00841
---
Yes, Doug is correct and I'm wrong. In fact, his comment jogged MY memory --
I actually used BMDP a bit in the late 70's(I think it was).
Thanks to Doug for corrected chronology.
Bert Gunter
Genentech Nonclinical Biostatistics
-Original Message-
From: r-help-boun...@r-project.org [ma
On 18-Feb-10 18:58:57, Dimitri Liakhovitski wrote:
> Dear gurus,
> I've analyzed a (fake) data set ("data") using logistic regression
> (glm):
>
> logreg1 <- glm(z ~ x1 + x2 + y, data=data, family=binomial("logit"),
> na.action=na.pass)
>
> Then, I created a data frame with 2 fixed levels (0 and
I am old enough. Memory isn't always reliable but Doug Bates recounting
is what I remember and a quick search has BMDP developed in 1961 and SAS
in 1966. To my surprise, the search produced a site that offered BMDP
for sale.
On 2/18/2010 11:15 AM, Peter Dalgaard wrote:
Christopher W. Ryan w
I have run a kruskal.test() using the by() function, which returns a list of
results like the following (subset of results):
Herb.df$ID: 4-2
Kruskal-Wallis chi-squared = 18.93, df = 7, p-value = 0.00841
Herb.df$ID: 44-1
Points regarding the advantages of LaTex are very well taken. If I were
fortunate enough to have complete ownership of the document (as might be the
case with a DSMB report produced by the Biostat group), then LaTex would be a
wonderful choice. Though I am not a LaTex user, I can easily imagine
Christopher W. Ryan wrote:
Pure Food and Drug Act: 1906
FDA: 1930s
founding of SAS: early 1970s
(from the history websites of SAS and FDA)
What did pharmaceutical companies use for data analysis before there was
SAS? And was there much angst over the change to SAS from whatever was
in use bef
On Thu, Feb 18, 2010 at 12:36 PM, Bert Gunter wrote:
> The key dates are 1938 and 1962. The FDC act of 1938 essentially mandated
> (demonstration of) safety. The tox testing infrastructure grew from that.At
> that time, there were no computers, little data, little statistics
> methodology. Statist
On 19/02/2010, at 1:12 AM, John Sorkin wrote:
> It is easy to devolve into visceral response mode, lose objectivity and slip
> into intolerance. R, S, S-Plus, SAS, PASW (nee SPSS), STATA, are all tools.
> Each has strengths and weaknesses. No one is inherently better, or worse than
> the other
On 18.02.2010 19:43, madhu sankar wrote:
Hi,
I am having trouble with svm regression.it is not giving the right results.
example
model<- svm(dataTrain,classTrain,type="eps-regression")
predict(model, dataTest)
36 37 38 39 40 41
42
-13.838257
On 18.02.2010 17:54, madhu sankar wrote:
Hi,
I am trying to use svm for regression data.
this is how my data looks like:
dataTrain
x y z
1 4 6
2 5 4
3 7 5
classTrain
a
2
3
4
dataTest
x y z
1 7 2
2 8 3
classTest
a
3
4
5
building the model
model<-svm(dataTrain,cl
Hi useRs,
This is not so much a help request as it is a request for feedback about the
possibilities of using Natural Language Processing (NLP) techniques on the
r-help archives for a more 'effective' retrieval of answers.
A few points that may capture what I'm trying to get at:
1) R has an emergi
Dear gurus,
I've analyzed a (fake) data set ("data") using logistic regression (glm):
logreg1 <- glm(z ~ x1 + x2 + y, data=data, family=binomial("logit"),
na.action=na.pass)
Then, I created a data frame with 2 fixed levels (0 and 1) for each predictor:
attach(data)
x1<-c(0,1)
x2<-c(0,1)
y<-c(0,1
What does
print(as.integer(branches))
give? That is what rep() uses.
/H
On Thu, Feb 18, 2010 at 7:49 PM, dkStevens wrote:
>
> I could send the entire bit of code but I was hoping that someone would
> recognize the issue from past experience. I may be an artifact of other
> parts of the code.
On 17.02.2010 15:38, rkevinbur...@charter.net wrote:
Thank you for the tip. I was used to inserting write statements and was
surpised when it didn't work and reading this section I see that I shouldn't
have been doing this anyway.
One more question. Is there another call that I can use to prin
I could send the entire bit of code but I was hoping that someone would
recognize the issue from past experience. I may be an artifact of other
parts of the code. I observed the problem in a larger context and cut
out all that you see below. The comments were next to the results to
clarify. Ap
That's what I did. 'branches' was shown at the top.
branches = c(5,6,5,5,5)
I tested this. When I copy and paste into R 10.0 I get the result in the
post. Perhaps I should reinstall R. I guess I don't see how much more
narrow I can get than this.
i iInd = 1
for(i in 1:length(branches)
Hi,
I am having trouble with svm regression.it is not giving the right results.
example
> model <- svm(dataTrain,classTrain,type="eps-regression")
> predict(model, dataTest)
36 37 38 39 40 41
42
-13.838257 -1.475401 10.502739 -3.047656 -8.71369
Works for me:
> sample(c(0,1,2),1,prob=c(0.2,0.3,0.5))
[1] 2
On Thu, Feb 18, 2010 at 7:48 AM, wrote:
> Hi,
>
> I am using the command
>
> >sample(c(0,1,2),1,prob=c(0.2,0.3,0.5))
>
> and I have this error notification
>
> "Error in sample(c(0,1,2),1,prob=c(0.2,0.3,0.5)):
> unused argument(s)(1
Abhijit Dasgupta wrote:
Hello,
Can summary.formula.reverse be customized to allow other summary
statistics to be reported rather than the quartiles and mean +/- sd? The
Not easily. I'm not sure which other statistics would be descriptive
however; certainly not the min and max or standard e
?traceback may be useful.
Bert Gunter
Genentech Nonclinical Biostatistics
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of jim holtman
Sent: Thursday, February 18, 2010 10:17 AM
To: ROLL Josh F
Cc: r-help@r-project.org
Subject: R
On Thu, Feb 18, 2010 at 7:15 PM, Erik Iverson wrote:
>
>
> Erik Iverson wrote:
>>
>> Cannot reproduce, what is branches? If you can narrow it down to a
>> "commented, minimal, self-contained, reproducible" example, you're far more
>> likely to get help from the list.
>>
>
> My blinded guess thoug
The key dates are 1938 and 1962. The FDC act of 1938 essentially mandated
(demonstration of) safety. The tox testing infrastructure grew from that.At
that time, there were no computers, little data, little statistics
methodology. Statistics played little role -- as is still mainly the case
today fo
Hi,
I am using the command
>sample(c(0,1,2),1,prob=c(0.2,0.3,0.5))
and I have this error notification
"Error in sample(c(0,1,2),1,prob=c(0.2,0.3,0.5)):
unused argument(s)(1,prob=c(0.2,0.3,0.5))
I don't know what is going wrong. Please give me some suggestions.
Thank you
Best,
Jing
___
Hey, I have one data like this:
tree azimuth distance
1 312 200
2 322 201
3 304 173
4 294 154
5 313 95
The "azimuth" stands for the azimuth of tree from plot center, and the
"distance" is the distance of tree from plot center.
I wan
Hey Jim,
That appears to work properly with my larger data set. That's really strange
to me though, why would my procedure not work even though the test works
correctly? I have always coded under the assumption that the code doesn't do
anything the user doesn't tell it too but I cant see a p
Well, yes and no. Obviously I was not asking for the complete recap of
a all the theory on the subject. My main concern is finding readily
available CRAN functions and packages that would help me in the
process. I've found the UCLA site to be very informative and spent a
lot of time ther the last c
Thank you,
but:
- How do I create a condition object watching for memory overflow? Or,
alternatively, excess time?
- How do I tell R to end the current lapply item, clean up memory and proceed
to the next item? (I know I can write a wrapper function including gc() and
direct lapply to that wra
I'm uncertain how helpful it will be to give example code, but last week,
this model gave an error message to the tune of "failed to converge" after
about 5 minutes of run-time :
library(nlme)
model.A<- lme (fixed = avbranch~ wk*trt*pop
, random = ~wk|ID/fam/pop, data=branch)
It seemed
Dearl list,
can anyone point me to a function or library that can create a graph similar to
the one in the following powerpoint presentation?
http://bmi.osu.edu/~khuang/IBGP705/BMI705-Lecture7.ppt
(pages 36-37)
In order to try to explain the graph, the way I see it in R terms is something
li
Should the svyby function be able to work with svyquantile? I get the
error below ...
data(api)
dclus1<-svydesign(id=~dnum, weights=~pw, data=apiclus1, fpc=~fpc)
svyby(~api00,
design=dclus1,
by = ~stype,
quantiles=c(.25,.5,.75),
FUN=svyquantile,
na.
Sorry, not reproducible. This works for me (as expected):
branches<-c(5,6)
iInd = 1
for(i in 1:length(branches)) {
print((1:branches[i])+iInd-1) # iInd is a position shift of the index
ni = branches[i]
print(i)
print(ni)
print(c(ni,rep(i,times=ni)))
# ... some interesting other
Even though it may work for a small subset, it can still break on
larger sets. Your code was doing a number of 'unlist' and tearing
apart the data and it is possible that some of the transformations
were not aligned with the data in the way you thought them to be.
What you need to do in that case
On Feb 18, 2010, at 12:33 PM, David Winsemius wrote:
I don't seem to have the unnamed package loaded that has aftreg(),
but in general you ought to be able to get what you want by looking
not just at the aftreg-object but also at the print(aftreg)-object
using str().
Trying that approach
Erik Iverson wrote:
Cannot reproduce, what is branches? If you can narrow it down to a
"commented, minimal, self-contained, reproducible" example, you're far
more likely to get help from the list.
My blinded guess though, is something to do with FAQ 7.31.
Cannot reproduce, what is branches? If you can narrow it down to a
"commented, minimal, self-contained, reproducible" example, you're far
more likely to get help from the list.
dkStevens wrote:
I'm observing odd behavior of the rep(...) procedure when using variables as
parameters in a loop.
Pure Food and Drug Act: 1906
FDA: 1930s
founding of SAS: early 1970s
(from the history websites of SAS and FDA)
What did pharmaceutical companies use for data analysis before there was
SAS? And was there much angst over the change to SAS from whatever was
in use before?
Or was there not such
Might be the case that the 'while' loop was not executed and therefore
'ck1' was not defined. You might put a check to see if that was
happening. Also you are incrementing 'count1' in the functions and it
is not being passed in as a parameter. What are you expecting it to
do? Is it defined in t
Hello,
Can summary.formula.reverse be customized to allow other summary
statistics to be reported rather than the quartiles and mean +/- sd? The
"fun" option apparently doesn't apply when method='reverse'
Thanks
--
Abhijit Dasgupta, PhD
Statistician | Clinical Sciences Section | NIAMS/NIH
I'm observing odd behavior of the rep(...) procedure when using variables as
parameters in a loop. Here's a simple loop on a vector 'branches' that is
c(5,6,5,5,5). The statement in question is
print(c(ni,rep(i,times=ni)))
that works properly first time through the loop but the second
subset(df, x %in% c(...))
chipmaney wrote:
This code works:
subset(NativeDominant.df,!ID=="37-R17")
This code does not:
Tree.df<-subset(NativeDominant.df,!ID==c("37-R17","37-R18","10-R1","37-R21","37-R24","R7A-R1","3-R1","37-R16"))
how do i get subset() to work on a range of values?
___
Use ' %in%':
Tree.df<-subset(NativeDominant.df,!ID %in%
c("37-R17","37-R18","10-R1","37-R21","37-R24","R7A-R1","3-R1","37-R16"))
On Thu, Feb 18, 2010 at 3:59 PM, chipmaney wrote:
>
> This code works:
>
> subset(NativeDominant.df,!ID=="37-R17")
>
>
> This code does not:
>
> Tree.df<-subset(Native
This code works:
subset(NativeDominant.df,!ID=="37-R17")
This code does not:
Tree.df<-subset(NativeDominant.df,!ID==c("37-R17","37-R18","10-R1","37-R21","37-R24","R7A-R1","3-R1","37-R16"))
how do i get subset() to work on a range of values?
--
View this message in context:
http://n4.nabbl
2010/2/18 Philipp Rappold :
> Dear all,
>
> does anyone know how I can extract specific p-values for covariates from an
> aftreg object? After fitting a model with aftreg I can find all different
> variables by using str(), but there's no place where p-values are kept. The
> odd thing is that print
2010/2/18 Philipp Rappold :
> Göran, David,
>
> in order to adapt aftreg to my needs I wrote a little function that I would
> like to share with you and the community.
I once promised to fix this 'asap'. Now I promise to do it tonight. OK?
Göran
>
>
> WHAT DOES IT FIX?
>
> (1) Using the id-argum
I don't seem to have the unnamed package loaded that has aftreg(), but
in general you ought to be able to get what you want by looking not
just at the aftreg-object but also at the print(aftreg)-object using
str().
On Feb 18, 2010, at 11:07 AM, Philipp Rappold wrote:
Dear all,
does anyo
Dear all,
When I try to return some vectors from some functions within a function, it
indicate an error,"Â Error in rbind(ck1, ck2, ck3) : object 'ck1' not found",
in one of the iterations and stop. Since I am not experienced in programming,
can anyone give me a suggestion to inspect this
Dear R-users,
I often stack plots that have the same x-axis. To save space and have
the plots themselves as large as possible I like to minimize the margins
between the plots to zero. I use the "mfrow" and "mar" parameters to
achieve this.
However, the different margin settings for the individua
Bert,
I have to disagree with just part of what you said. The ultimate
savings by using R is astronomical. Up front it would definitely cost
more, as you so eloquently stated. So it boils down to short-term vs.
long-term thinking.
More importantly, the statistical/graphical reports create
DISCLAIMER: This represents my personal view and in no way reflects that of
my company.
Warning: This is a long harangue that contains no useful information on R.
May be wise to delete without reading.
--
Sorry folks, I still don't understand your comments. As Cody's original post
pointe
At one time the "answer" would have been to buy a copy of Venables and
Ripley's "Modern Applied Statistics with S" (and R), and that would
still be a sensible strategy. There are now quite a few other R-
centric texts that have been published in the last few years. Search
Amazon if needed. Y
Göran, no worries - your help & advice is already invaluable!
Göran Broström wrote:
2010/2/18 Philipp Rappold :
Göran, David,
in order to adapt aftreg to my needs I wrote a little function that I would
like to share with you and the community.
I once promised to fix this 'asap'. Now I promis
Hi:
You might also want to consider the use of subset, as in
subset(foo, name == "A")or
subset(foo, name %in% c("A", "B"))
HTH,
Dennis
On Thu, Feb 18, 2010 at 8:01 AM, stephen sefick wrote:
> Is there any easy way to pull out the row indexes for a logical
> matching statment?
>
>
1 - 100 of 149 matches
Mail list logo