Roger D. Peng wrote:
What version of R are you using? 'modreg' no longer exists---its
functions have been moved to the 'stats' package.
Let me add that the URL cited below is not an official one. Plaese
take a look at some CRAN mirror close to you.
Uwe Ligges
-roger
Amir Safari
On Wed, 24 Aug 2005, Greg Blevins wrote:
Hello R-Masters,
I have a list 's' with three elements, as shown below. I want to recode
a.a, a.a2, and a.a3 to NA if the value in a.a is less than 3.
I think s is a data frame, and you are looking at its printout. There is
almost certainly no
I am trying to fit a number of distributions to a set of data, I have used the
fitdristr() funtion for most of the distributions, but Poisson is not one of
the possible distributions. I found somewhee talking about using the gamlss
package, but have been unable to find it again, any help would
On Thu, 25 Aug 2005, Mark Miller wrote:
I am trying to fit a number of distributions to a set of data, I have used the
fitdristr() funtion for most of the distributions, but Poisson is not one of
the possible distributions. I found somewhee talking about using the gamlss
package, but have
Hi,
I often need to take columns from two data.frames and 'splice' them
together (alternately taking a column from the first data frame, then
from the second). For example:
x - table(sample(letters[1:9], 100, replace=TRUE),
sample(letters[1:4], 100, replace=TRUE))
y - prop.table(x)
what about:
@
*=
z-data.frame(matrix(rbind(x,y),nrow(x),2*ncol(x)))
rownames(z)-rownames(x)
z
@
output-start
Thu Aug 25 11:24:29 2005
X1 X2 X3 X4 X5 X6 X7 X8
a 2 0.02 1 0.01 2 0.02 2 0.02
b 3 0.03 0 0.00 4 0.04 3 0.03
c 3 0.03 2 0.02 1 0.01 6 0.06
d 3 0.03 4 0.04 2 0.02
Thank you! I think I can simplify the first line further to:
z-data.frame(matrix(rbind(x,y),nrow(x)))
i.e. remove 2 * ncol(x)
Thanks.
Dave
Peter Wolf wrote:
what about:
@
*=
z-data.frame(matrix(rbind(x,y),nrow(x),2*ncol(x)))
rownames(z)-rownames(x)
z
@
output-start
Thu Aug 25
Try this
con - gzfile(file.gz)
a - readLines(con, n=1)
showConnections(all=TRUE)
close(con)
showConnections(all=TRUE)
So the connection is opened and closed as it says, but not destroyed.
You do need to call close() explicitly -- from the help file
'close' closes and destroys a
On Thu, 25 Aug 2005, Prof Brian Ripley wrote:
On Thu, 25 Aug 2005, Mark Miller wrote:
I am trying to fit a number of distributions to a set of data, I have used
the
fitdristr() funtion for most of the distributions, but Poisson is not one
of
the possible distributions. I found somewhee
G'day Daniel,
DR == daniel [EMAIL PROTECTED] writes:
DR First: I think coefficients from lm(Employed~.,data=longley)
DR should be equal coefficients from
DR lm.ridge(Employed~.,data=longley, lambda=0) why it does not
DR happen?
Which version of R and which version of MASS are
Hi All
recently i faced an unknown problem while reading the data. Can
someone help me in understanding why this happened.
I have .txt file containing X, Y, Z variables. I used the command
a - read.table(filename, header=TRUE)
after reading the file i am able to view it by tryping a. but i am
Hi All
recently i faced an unknown problem while reading the data.
Can someone help me in understanding why this happened.
I have .txt file containing X, Y, Z variables. I used the command
Please show at least 2 lines of your data.
a - read.table(filename, header=TRUE)
Are you
A very simple and useful relation between the normal and log-normal
distributions is that if log(Y) follows the normal distribution, then Y follows
the log-normal distribution, and vice-versa.
Then, if you want to do a log-normal regression, you can take the natural
logarithm of your data and
Hi Mr. Pedro
I tried names(a) and it displayed the names as X, Y and Z.
rgds
snvk
On 8/25/05, Pedro J. Aphalo [EMAIL PROTECTED] wrote:
Hi,
Did you try names(a) so see what are the names of the columns in the
dataframe?
Hope this helps a little.
Pedro.
Krishna wrote:
Hi All
Hi Mr. Cleland
it worked excellently well, and i believe the same logic or function
by() can be used even for running regressions on subsets of huge
datasets. correct me if iam wrong
thank you for the help
rgds
snvk
On 8/24/05, Krishna [EMAIL PROTECTED] wrote:
Hi Mr. Cleland
Could you
Krishna wrote:
Hi Mr. Cleland
it worked excellently well, and i believe the same logic or function
by() can be used even for running regressions on subsets of huge
datasets. correct me if iam wrong
Yes. For example, the FUN argument to by() can be a summary of a
linear model:
I'm sure I'm missing something obvious here, but I can't find the
solution (including in the FAQ etc.).
I have a vector of names of variables like this: NRes.x.y. where x and y
are numbers. I want to extract these numbers as numbers to use
elsewhere. I can extract the numbers as a list of
Hi,
I'm trying to understand the code of lattice functions so that I can
write some S4 methods using lattice. The following code is a snipet of
dotplot that is reused in several other functions. I don't understand
why this is needed can someone help ?
Thanks
EJ
[...]
right.name -
Hi,
I am currently looking for a program or programmng language easy to
learn, easier to operate on.I heva heard about R, However I
understand that R is designed especially for statisticians. As an
economist, working on applied econometrics, I am not sure if it can
meet my needs.
Will I be able
Anon. wrote:
I'm sure I'm missing something obvious here, but I can't find the
solution (including in the FAQ etc.).
I have a vector of names of variables like this: NRes.x.y. where x and y
are numbers. I want to extract these numbers as numbers to use
elsewhere. I can extract the
Try:
NAMES=c(NRes.1.2., NRes.1.3., NRes.1.4., NRes.1.5., NRes.1.6.)
pattern-NRes\.([0-9]*)\.([0-9]*)\.
data.frame(x=sub(pattern,\\1,NAMES),y=sub(pattern,\\2,NAMES))
@
output-start
Thu Aug 25 14:08:50 2005
x y
1 1 2
2 1 3
3 1 4
4 1 5
5 1 6
output-end
Peter Wolf
Anon. wrote:
I'm sure I'm
Krishna a écrit :
unable to access the variables in a, by giving the command a$X.
try a$V1 or a[1] or a[,1] or a$V2 etc
hih
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
On 8/25/05, Anon. [EMAIL PROTECTED] wrote:
I'm sure I'm missing something obvious here, but I can't find the
solution (including in the FAQ etc.).
I have a vector of names of variables like this: NRes.x.y. where x and y
are numbers. I want to extract these numbers as numbers to use
Hi !
I got the same problem. I use R itself to install those package I got them.
Try this It may work !
Sincerly !
-
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing
hi ,
Ihave you try to use the package foreign ? try it may be you will see how to
read foreign data file.
Sincerly !
-
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch
Hi all
I used a function
qtrregr - by(AB, AB$qtr, function(AB) lm(AB$X~AB$Y))
objective is to run a regression on quartery subsets in the data set
AB, having variables X and Y, grouped by variable qtr.
Now i retrieved the output using qtrregr, however it only showed the
coefficients
justin bem wrote:
Hi !
I got the same problem. I use R itself to install those package I got them.
Try this It may work !
If you reply to a question posted on R-help, please
a) include the original question in your reply, others probably forgot
the original question;
b) reply to the
Look more carefully at
?lm
at the See Also section ...
X - rnorm(30)
Y - rnorm(30)
lm(Y~X)
summary(lm(Y~X))
Best,
Matthias
Hi all
I used a function
qtrregr - by(AB, AB$qtr, function(AB) lm(AB$X~AB$Y))
objective is to run a regression on quartery subsets in the
data set AB,
On 8/25/2005 6:52 AM, SELIM YILDIRIM wrote:
Hi,
I am currently looking for a program or programmng language easy to
learn, easier to operate on.I heva heard about R, However I
understand that R is designed especially for statisticians. As an
economist, working on applied econometrics, I am
On Thu, 25 Aug 2005 11:52:28 +0100 SELIM YILDIRIM wrote:
Hi,
I am currently looking for a program or programmng language easy to
learn, easier to operate on.I heva heard about R, However I
understand that R is designed especially for statisticians. As an
economist, working on applied
Also, looking at the last example in ?by would be helpful:
attach(warpbreaks)
tmp - by(warpbreaks, tension, function(x) lm(breaks ~ wool, data = x))
# To get coefficients:
sapply(tmp, coef)
# To get residuals:
sapply(tmp, resid)
# To get the model matrix:
sapply(tmp, model.matrix)
To get
Hello,
My name is Philippe Favrot, I'm a french occupational doctor (working in
Luxembourg), and I'm an R beginner.
I would be happy you could help me about the utilization of R.
Recently, I measured sound levels in a plant. Before the measuring, I
divided the plant in 3 virtual rows and 8
Philippe a écrit :
... how can I draw a three dimensional graphic of the
plant's sound level ?
Not an answer, but I find image() very useful
to visualize 3D data simply on a 2D colored image.
hih
__
R-help@stat.math.ethz.ch mailing list
Le 25.08.2005 15:54, Philippe a écrit :
Hello,
My name is Philippe Favrot, I'm a french occupational doctor (working in
Luxembourg), and I'm an R beginner.
I would be happy you could help me about the utilization of R.
Recently, I measured sound levels in a plant. Before the measuring, I
Potential helpers need more information.
Type:
head(a)
and
str(a)
and post the results.
Compare with the output of the same commands on a
dataframe that does have this problem.
-Don
At 5:01 PM +0530 8/25/05, Krishna wrote:
Hi Mr. Pedro
I tried names(a) and it displayed the
What about using lmList from the lme4 package?
Randy
On 8/25/05 9:44 AM, Marc Schwartz [EMAIL PROTECTED] wrote:
Also, looking at the last example in ?by would be helpful:
attach(warpbreaks)
tmp - by(warpbreaks, tension, function(x) lm(breaks ~ wool, data = x))
# To get coefficients:
Dear R-help,
I have a home-made package works perfectly under R 1.9.1. Now I'm trying to
port it to R 2.0. So I rebuild the package under R 2.1.1. It installs and
loads OK. But when I try to call some functions myfoo in this package, it
returns error message: Couldn't find function myfoo. I
There are some reviews. You can read:
R: yet another Econometric Programming Environment, Francisco Cibari- Neto
and Spyros G. Zarkos.
Journal of Applied Econometrics, 14: 319-329 (1999)
On 8/25/05, Achim Zeileis [EMAIL PROTECTED] wrote:
On Thu, 25 Aug 2005 11:52:28 +0100 SELIM YILDIRIM
On Thu, 25 Aug 2005 11:20:01 -0500 Jorge de la Vega Gongora wrote:
There are some reviews. You can read:
R: yet another Econometric Programming Environment, Francisco Cibari-
Neto
and Spyros G. Zarkos.
Journal of Applied Econometrics, 14: 319-329 (1999)
It's a good article and definitely
Hi
Is the package loaded?
What is echoed vhen you do
library(mypackage)
Does search() find your package?
Cheers
Petr
On 25 Aug 2005 at 11:19, qikai xu wrote:
Dear R-help,
I have a home-made package works perfectly under R 1.9.1. Now I'm
trying to port it to R 2.0. So I rebuild
Hello,
Is it safe to use tapply when the result will be of dim 2
x 1 or more ? In my PC R crashes. The code used was on a 3-col
data frame with two factor cols and a numeric column. The fn was diff
.
data form being A, B, Num
tapply(data$A, list(data$A, data$B), diff)
--
A. Mani
Also, for the three dimensional graphic,
help.search(3d)
will lead to a reference to the cloud() function in the lattice package.
I don't remember if the lattice package is installed by default. If
not, you will have to install it.
(If you're using a Mac or Windows computer, there's a menu
Could it be that there are spaces in the names that were read in?
a - data.frame( X=1:2, Y=3:4, Z=5:6, check.names=FALSE)
a
X Y Z
1 1 3 5
2 2 4 6
names(a)
[1] X Y Z
a$X
NULL
Andy
From: Krishna
Hi Mr. Pedro
I tried names(a) and it displayed the names as X, Y and Z.
Hello everybody,
Is there in R a so called box m-test for testing the equality of the
variance/cov. matrix for checking on homoscedasticity? I could not find
it among the traditional packages for multivariate statistics...
Petra
--
Petra Wallem
Centro de Estudios Avanzados en Ecología
bonjour
je suis elève à l'ENSAI Rennes et je suis actuellement en stage de fin
d'études
j'ai une question sur R
en fait lorsque le simule 2 lois normales qui sont mes 2 variables
explicatives continus
- une avec que des valeurs 0 (ou que 0) X1
- l'autre peut prendre aussi
That works also (using the example in ?lmList)
library(lme4)
?lmList
fm1 - lmList(breaks ~ wool | tension, warpbreaks)
However, one still would need to use either sapply() or lapply() as
below to get the details that Krishna is looking for.
'fm1' above is a list of models (S4 class
On 8/24/05, ernesto [EMAIL PROTECTED] wrote:
Hi,
I'm trying to develop an histogram method for a class called FLQuant
which is used by the package FLCore (http://flr-project.org). FLQuant is
an extension to array. There is an as.data.frame method that coerces
flquant into a data.frame
On 8/25/05, ernesto [EMAIL PROTECTED] wrote:
Hi,
I'm trying to understand the code of lattice functions so that I can
write some S4 methods using lattice. The following code is a snipet of
dotplot that is reused in several other functions. I don't understand
why this is needed can someone
Dear r-help team:
Is a package implemented in R which includes a function that calculates
polynomial distributed lag models (also: Almon models, pdl-model)? Provided
a pdl function is available, can it be applied to robust statistics like
MM-estimators?
Thanks in advance!
Best regards,
Carsten
Sorry to reply to my own post, but in reviewing the NAMESPACE file for
lme4, it looks like Doug is perhaps planning to add additional model
object accessor methods for the lmList class, including resid() and
summary(), which are commented out now. coef() is available presently.
So when in place,
Hi,
I just installed ROracle and RDBI. The connection to the database seems
to work also. My problem is when I am selection rows that really exist
in the database, it is returning nothing. Where should I look to see
what could be my problem?
Thank you very much,
Mathieu
drv -
Hello,
I'm working with irregular time series data. What do you all think
about the strengths and weaknesses of the zoo and its packages?
I've installed and skimmed the documentation on both packages. I was
hoping to get a little guidance from the user community before
proceeding
I am the maintainer of its, but not it's original author.
One of the main strengths of its is that it uses POSIXct dates.
Zoo has the flexibility of using almost any date format, but I don't
know if the other date formats can store hour, min, sec data.
You might want to do a little exploring
Hello David,
You may be interested also by the regul() function and similar fro the
pastecs package: it is designed to solve the kind of problems you talk
about. You should read the manual, which is included. However, this
manual is in French.
Best,
Philippe
I posted a translation from a Matlab version a while ago. Search in the
list archive.
Andy
From: Petra Wallem
Hello everybody,
Is there in R a so called box m-test for testing the equality of the
variance/cov. matrix for checking on homoscedasticity? I
could not find
it among the
I have resolved the problem I had with rgui quiting automatically.
I am posting this mainly so that if anyone else in the future has
the same problem there will be a solution in the archives.
The problem was apparently with the file Rconsole that was
in the directory My Documents, when I deleted
On 8/25/2005 3:39 PM, Greg Snow wrote:
I have resolved the problem I had with rgui quiting automatically.
I am posting this mainly so that if anyone else in the future has
the same problem there will be a solution in the archives.
The problem was apparently with the file Rconsole that was
Hello,
I am quite new in R, and I have one problem:
I have large d-dimensional data sets (d=2, 3, 6, 10). I would like to
divide the d-dim space into n (n may be 10, but better some larger
number, for example 20) equally sized d-dim hypercubes and count how
many data points are in each cube.
Hello
I am fitting a Cox PH model using the function coxph(). Does anyone know how
to obtain the estimate of the covariance matrix under the null hypothesis.
The function coxph.detail() does not seem to be useful for this purpose.
Thanks,
KD.
[[alternative HTML version deleted]]
On 8/25/05, David James [EMAIL PROTECTED] wrote:
Hello,
I'm working with irregular time series data. What do you all think
about the strengths and weaknesses of the zoo and its packages?
I have worked on the development of zoo with Achim Zeileis so
I will just speak to that one.
The key
Hi,
I have a class called spss containing prepared info from an SPSS file.
...
class(ret) = spss
return(ret)
The function that returns this defined in a file that I source into R.
Also in that file is a function matSummary.spss.
I think I ought to be able to call
matSummary(ret)
to run the
61 matches
Mail list logo