Tim,
The row names have only one dimension, so for example
row.names(xy)[11]<-"New rname"
will work
best,
Jon
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Tim Clark
Sent: 27. september 2010 04:41
To: r-help@r-project.org
Cc: tim
Hello Tim,
Either of these variations on your example should work...
rownames(xy)[11] <- 12
rownames(xy)[11] <- "12"
It's just like assigning values to any character vector, so you can
also do things like...
rownames(xy) <- a.vector.of.all.the.row.names
rownames(xy)[1:10] <- paste("foo", 1:10,
Hello, I am trying to unlist a list, which is attached, and I am having the
problem that when I unlist it the number of elements changes from 5065 to
5084
> x <- lapply(SumaPluvi, FUN="[", 1);
> n <- sapply(x, FUN=length);
> print(table(n));
n
1
5065
> print(which(n != 1));
integer(0)
> lengt
Henrik, thank you for your help, but I tried your code, and this is what I
get
> x <- lapply(SumaPluvi, FUN="[", 1);
> n <- sapply(x, FUN=length);
> print(table(n));
n
1
5065
> print(which(n != 1));
integer(0)
> length(unlist(lapply(SumaPluvi, FUN="[", 1)))
[1] 5081
>
apparently the problem is
Dear all,
I am trying to add a value to a dataframe and name the row with a number. I
have tried row.name, rowname, and attr(x,"row.names") but none seem to work.
It
seems like it should be simple, so not sure why I can't get it to work. Any
suggestions?
Thanks,
Tim
x<-seq(1,20,2)
y<-s
Dear all,
I have a question about the basis functions of cubic regression spline in
mgcv. Are there some ways I can get the exact forms of the basis functions
and the penalty matrix that are used in the mgcv package? Thanks in
advance!
Yan
PS. Sorry for sending this message twice. The header
I think you want ?solve ...
Remko
--
View this message in context:
http://r.789695.n4.nabble.com/matrix-help-tp2714378p2714896.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/ma
Please provide a reproducible example, like:
library(ca)
data(author)
p <- ca(author)
# now look at this:
str(p)
to find that this object of class 'ca' has lots of different results in it -
it is up to you to decide which ones you make into a dataframe.
cheers,
Remko
--
View this message i
As long as p <= 1, the minimum value of H will be log(m). Here are
some more (I think clearer) graphs. They show the basic function
p[,i] * log(p[,i] (the log function defaults to natural logarithm),
for values ranging from 0 to 1. Then include log(m) for different
values of m. I included the c
Thanks very much for this great info, Ista.
Best,
-Vik
On Sep 26, 2010, at 12:10 PM, Ista Zahn wrote:
> Hi Vik,
> I suggest reading through some of the introductory documentation. R
> has several classes of objects, including matrix, list, data.frame
> etc. and a basic understanding of what th
Hello,
my question is; for a specific item, how can I create a plot with both the
empirical probability of correct response and the predicted probability as a
function of the mean of the ability intervals (similar to a BILOG plot).
Thank you
--
View this message in context:
http://r.789695.n4
wow thnx a lot josh. so now i understand the most of the things. so my power
function is depent on the number of the blocks "m". how u said, if i take
m=0.8 or lower i get a different value than a 1. ofcourse a number between
0 or 1. but i can just take positive interger number for m, because m
r
Hi,
On Sun, Sep 26, 2010 at 12:42 PM, Natasha Asar wrote:
> Dear R helpers
>
> I have a big data sheet (CSV) which I use “read.csv” to read it
>
> When im trying to get the Dim() it says 38 column which is not correct it
> should
> be something about 400.
> I am wondering whether there is any wa
Hi Jethi,
Please look at this code, and the graph that is created in the code.
This all leads me to suspect you are trying to use the wrong formula
at the end. Since there was some confusion with it, I just removed
the stuff with apply().
Josh
##
I moved stu
x <- lapply(SumaPluvi, FUN="[", 1);
y <- lapply(x, FUN=unlist); # <==
n <- sapply(y, FUN=length);
print(table(n));
print(which(n != 1));
/Henrik
On Sun, Sep 26, 2010 at 7:02 PM, Luis Felipe Parra
wrote:
> Henrik, thank you for your help, but I tried your code, and this is what I
> get
>
>> x <-
Is the what you want:
> x
[1] -0.005282 0.000314 0.002851 -2.5059217162
-0.007545 -1.0317758496 0.001598
[8] -1.2981735068 0.072411
> (x-min(x))/(max(x) - min(x))
[1] 0.969 0.971 0.972 0.000 0.968 0.5882632
0.972 0.4819563 1.000
>
On Sun, S
Tim,
Boxplots are nice, but I find that they can be somewhat
misleading when applied to small groups, especially in the
suggestion of spread differences. (Your real data may well
be more extensive than the ToothGrowth data and so the
following may be moot.)
I prefer stripcharts for small groups.
Dear expert,
I have a series of number that looks like this
x <- c(-0.005282,
0.000314,
0.002851,
-2.5059217162,
-0.007545,
-1.0317758496,
0.001598,
-1.2981735068,
0.072411)
How can I normalize it in R so that the new numbers
is ranging from 0 to 1 ?
- G.V.
___
hi josh, and really thnx again.
i have now 2 problems . the first one ist if i take ur idea and programm
like u:
N = 10
n = 100
m = 2
k = n/m
l = matrix(0,nrow=m,ncol=N)
p=matrix(0,nrow=m,ncol=N)
alpha = 0.05
q_1 <- qnorm(alpha, 0, 0.05)
q_2 <- qnorm(1 -alpha, 0, 0.05)
for(i in 1:N){
x=rnorm(
x <- lapply(SumaPluvi, FUN="[", 1);
n <- sapply(x, FUN=length);
print(table(n));
print(which(n != 1));
My $.02
/H
On Sun, Sep 26, 2010 at 4:12 PM, Luis Felipe Parra
wrote:
> Hello I want to unlist the attached element getting only the first element
> in each element of the list. The last elemen
Hi Felipe,
Could it be something like what happens in mylist2?
###
mylist <- list(1:4, 2:5, 3:6)
mylist2 <- list(list(1:4, 11:14), 2:5, 3:6)
length(unlist(sapply(mylist, "[", 1)))
length(unlist(sapply(mylist2, "[", 1)))
###
HTH,
Josh
On Sun, Sep 26, 2010 at 4:12 PM, Luis Fe
CRAN (and crantastic) updates this week
New packages
Updated packages
BioPhysConnectoR (1.6-6), Deducer (0.4-1)
This email provided as a service for the R community by
http://crantastic.org.
Like it? Hate it? Please let us know: crana...@gmail.com.
_
My guess is that some of the Pluv3Meses elements have more than one
value. Have you checked your data to see if this is the case?
On Sun, Sep 26, 2010 at 7:12 PM, Luis Felipe Parra
wrote:
> Hello I want to unlist the attached element getting only the first element
> in each element of the list.
*Hello,*
*
*
*I'm new to R and trying to do Split Split Plot Design analysis with aov
function in R. Sharing any worked example and suggestion will be highly
appreciated. Thanks*
*
*
*Regards!
*
--
*
Muhammad Yaseen
*
[[alternative HTML version deleted]]
Hello I want to unlist the attached element getting only the first element
in each element of the list. The last element of the list looks as this:
[[5065]]
[[5065]]$Pluv3Meses
[1] 274.4
[[5065]]$PluvMesesMedio
[1] 378.2667
[[5065]]$Pluv2UltimosMeses
[1] 23.3
So I would like to get for each e
Hi,
I'm trying to make such a graphic :
http://heart.bmj.com/content/96/9/662/F1.large.jpg
Hi,
I finally managed with the survplot function from the Design package.
The only thing I could not achieve was to place the number of patient at
risk under the x-axis.
Does somebody know how t
On Sun, Sep 26, 2010 at 3:16 PM, jethi wrote:
>
> thnx again. now i understand my big problem. ok so now a want to watch the
> probabilities p, which are do this for example
> p[1,1]=cor(x1,y1)/(cor(x1,y1)+..+cor(xm,ym)).
>
>
> so
> N = 10
> n = 100
> m = 2
> k = n/m
> l = matrix(0,nrow=m,ncol=N)
thnx again. now i understand my big problem. ok so now a want to watch the
probabilities p, which are do this for example
p[1,1]=cor(x1,y1)/(cor(x1,y1)+..+cor(xm,ym)).
so
N = 10
n = 100
m = 2
k = n/m
l = matrix(0,nrow=m,ncol=N)
p=matrix(0,nrow=m,ncol=N)
for(i in 1:N){
x=rnorm(n,0,0.5)
y=rn
Hi,
You are correct that you do not know what the correlations are from
exactly. I tried to make up some examples to show you why.
##
Your Code
N = 10
n = 100
m = 5
k = n/m
l = matrix(0,nrow=m,ncol=N)
for(i in 1:N){
for(j in 1:m){
x=rnorm(n,0
thanks a lot for ur patience and understandig, josh. ok perhaps it would be
help me to change my programm by step by step. the first important thing of
my programm is to caluculate the correlation of each block of a radom
variable.
so i have a n bivariate random sample wich i saperate in m block
Maayt hotmail.com> writes:
> I linearized my power relations en fitted them with a linear rlm() function.
> When I re-sample my pairs from a bivariate normal distribution for my power
> law what transformation do I need to apply a transformation to my covariance
> (vcov) matrix to get back from m
Dear Kaja,
I've read quite a few of your emails and spent some time trying to
understand what you want, and so have a lot of other people. I know
this must be very frustrating for you especially because you have a
deadline soon.
I have noticed that in your emails, your explanations of what you a
Dear all,
in GADM map there are three levels (nation, province and precinct) for each
country of the world but for all of them you are never able to plot only one
part of a chosen country.
To be sure, I am trying to plot only one region of Italy and colour the
different precincts in it. So far
Dear R helpers
I have a big data sheet (CSV) which I use âread.csvâ to read it
When im trying to get the Dim() it says 38 column which is not correct it
should
be something about 400.
I am wondering whether there is any way I can read it right⦠I have used
ncol()
and itâs the same an
Hi Vik,
I suggest reading through some of the introductory documentation. R
has several classes of objects, including matrix, list, data.frame
etc. and a basic understanding of what these are is essential for
effectively using R. An essential function is str() which shows you
the structure of an ob
[Sorry- somehow the first time I posted this it got attached to another thread
-Vik]
I am successfully performing a correspondence analysis using the commands:
NonLuxury <- read.table("/Users/myUserName/Desktop/nonLuxury.data.txt")
ca(NonLuxury)
I would like to store the resu
Hello
On Sun, Sep 26, 2010 at 3:41 PM, statquant2 wrote:
> I am looking for a good and detailed documentation about Sweave... but can't
> find anything more that 15 pages asking Google...
> Any hint on that point ?
>
In the search below the third link is the user manual, which should
contain enou
I am successfully performing a correspondence analysis using the commands:
NonLuxury <- read.table("/Users/myUserName/Desktop/nonLuxury.data.txt")
ca(NonLuxury)
I would like to store the results to a data frame so that I can write them to
disk using write.table. I have tried sev
Thanks very much.
-Vik
On Sep 26, 2010, at 9:45 AM, Chris Mcowen wrote:
> Have you loaded the library after installing it?
>
> Either use > library(CA)
>
> Or
>
> Through the package manager tab
>
> Hth
> Sent from my iPhone
>
> On 26 Sep 2010, at 17:41, Vik Rubenfeld wrote:
>
>> I'm
Colin
Some links I used to get me going ...
http://www.ics.uci.edu/~vqnguyen/talks/SweaveSeminaR.pdf
http://www.r-bloggers.com/getting-started-with-sweave-r-latex-eclipse-statet-texlipse/
http://www.statistik.lmu.de/~leisch/Sweave/
http://stat.epfl.ch/webdav/site/stat/shared/Regression/EPFL-S
Thanks a lot for the help,
I linearized my power relations en fitted them with a linear rlm() function.
When I re-sample my pairs from a bivariate normal distribution for my power
law what transformation do I need to apply a transformation to my covariance
(vcov) matrix to get back from my linear
On Sun, Sep 26, 2010 at 1:19 PM, Neotropical bat risk assessments
wrote:
> Hi all,
>
> I have a package that is specific to a task I was repetitively using a few
> years ago.
> I now needed to run it again with new data.
>
> However I am told it was built with an older version or R and will not
On 26.09.2010 19:19, Neotropical bat risk assessments wrote:
Hi all,
I have a package that is specific to a task I was repetitively using a
few years ago.
I now needed to run it again with new data.
However I am told it was built with an older version or R and will not
work.
How can I tweak t
Hi all,
I have a package that is specific to a task I was repetitively using a
few years ago.
I now needed to run it again with new data.
However I am told it was built with an older version or R and will not work.
How can I tweak the package so it will run on 11.1?
It was a one-off product
Hi Vik,
You need to load the CA package first:
library(CA)
-Ista
On Sun, Sep 26, 2010 at 4:41 PM, Vik Rubenfeld wrote:
> I'm experienced in statistics, but I am a first-time R user. I would like to
> use R for correspondence analysis. I have installed R (Mac OSX). I have used
> the package
On 24.09.2010 17:51, Annalaura wrote:
Hi, I need help!
I am trying to iterate an iterative process to do cross vadation and store
the results each time.
I have a Spatial data.frame, called Tmese
str(Tmese)
Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
..@ data :
On Sun, Sep 26, 2010 at 8:52 AM, Josh B wrote:
> Hello again,
>
> How do I split a data frame into smaller, completely separate data frames
> (rather than separate data frames comprising a single "list")? Consider the
> following data, and my coding attempt:
>
> x <- read.table(textConnection("id
I'm experienced in statistics, but I am a first-time R user. I would like to
use R for correspondence analysis. I have installed R (Mac OSX). I have used
the package installer to install the CA package. I have run the following line
with no errors to read in the data for a table:
Non
On 26.09.2010 14:52, Josh B wrote:
Hello again,
How do I split a data frame into smaller, completely separate data frames
(rather than separate data frames comprising a single "list")? Consider the
following data, and my coding attempt:
x<- read.table(textConnection("id type number
indv.1 bag
On 26.09.2010 14:38, statquant2 wrote:
Hello everyone,
I currently run R code that have to read 100 or more large csv files (>= 100
Mo), and usually write csv too.
My collegues and I like R very much but are a little bit ashtonished by how
slow those functions are. We have looked on every argu
SWeave is a very nice and simple to use tool, hence 15 pages sound very
appropriate to get started.
Uwe Ligges
On 26.09.2010 14:41, statquant2 wrote:
Hello,
I am looking for a good and detailed documentation about Sweave... but can't
find anything more that 15 pages asking Google...
Any hint
On Sun, Sep 26, 2010 at 8:38 AM, statquant2 wrote:
>
> Hello everyone,
> I currently run R code that have to read 100 or more large csv files (>= 100
> Mo), and usually write csv too.
> My collegues and I like R very much but are a little bit ashtonished by how
> slow those functions are. We have
Hi,
You can use all.equal, like this:
all.equal(c(1,1), mtrx[1,], check.attributes=FALSE)
If you want to check each row of the matrix (I wasn't clear if you
wanted this) you can do something like
check.equal <- function(x, y)
{
isTRUE(all.equal(y, x, check.attributes=FALSE))
}
apply(mtrx, 1
Hello everyone,
I currently run R code that have to read 100 or more large csv files (>= 100
Mo), and usually write csv too.
My collegues and I like R very much but are a little bit ashtonished by how
slow those functions are. We have looked on every argument of those
functions and if specifying s
Hello,
I am looking for a good and detailed documentation about Sweave... but can't
find anything more that 15 pages asking Google...
Any hint on that point ?
Cheers
Colin
--
View this message in context:
http://r.789695.n4.nabble.com/Good-documentation-about-Sweave-tp2714326p2714326.html
Sent
Hello again,
How do I split a data frame into smaller, completely separate data frames
(rather than separate data frames comprising a single "list")? Consider the
following data, and my coding attempt:
x <- read.table(textConnection("id type number
indv.1 bagel 6
indv.2 bagel 1
indv.3 donuts 10
Hi Peter, H Berwin,
thanks a lot for your clarifications, it makes more sense now. But having
our input and thinking a little bit more about the problem, I realized that
I am simply interested in the pdf p(y) that y *number* of entities (which
ones is irrelevant) in N are are *not* drawn after the
jethi hotmail.com> writes:
> hey, is there anybody who can help me? its very urgent because i have to
> send my bachelor thesis on monday. pls help me
I'm really sorry that you're stuck, but ... waiting until a few days
before an important assignment is due and then depending on the gener
From: xxgr...@hotmail.com
To: r-help-boun...@r-project.org
Subject: compare a vector and a row of a matrix
Date: Sun, 26 Sep 2010 23:23:52 +0800
Hi Everyone:
I am trying to compare a vector and rows of a matrix
for example
> xn <- c(1,2,4,4,5,5,5,6)
>yn <- c(1,2,5,7,1,2,3,1)
Hi Andrew,
My inclination would be to put all the variables in a data.frame
instead of putting the predictors in a matrix. But if you want to
continue down this road, you need to have a column named dat in a the
data.frame that contains a matrix. I couldn't figure out how to do
such a thing in a si
Anyone know how write a function that solves:
(1 + c)x1 +x2 +x3 = 5
x1+(1 + c)x2+x3 = 5 + 2c
x1+x2 +(1 + c)x3= 5 + 3c,
where c is a small constant, for 1000 equidistant values c = (10^-14,
2*10^-14, ..
G'day Rainer,
On Sun, 26 Sep 2010 10:29:08 +0200
Rainer M Krug wrote:
> I realized that I am simply interested in the pdf p(y) that y
> *number* of entities (which ones is irrelevant) in N are are *not*
> drawn after the sampling process has been completed. Even simpler (I
> guess), in a first s
Hi:
Here are a couple of ways:
(1) Base graphics: add argument axes = FALSE to both plots, then add axes
boxplot(len ~ dose, data = subset(ToothGrowth, supp == 'VC'),
boxwex = 0.25, at = 1:3 - 0.2,
col = "yellow",
main = "Guinea Pigs' Tooth Growth",
axes = FALSE,
Le 26/09/10 12:18, Kurt Hornik a écrit :
Sebastian Gibb writes:
Am Sonntag, 26. September 2010, 10:08:39 schrieb Romain Francois:
Le 26/09/10 10:00, Sebastian Gibb a écrit :
Hello,
I get a value which stores a relative file name. (I get it from another
function, which I don't want to chan
> Sebastian Gibb writes:
> Am Sonntag, 26. September 2010, 10:08:39 schrieb Romain Francois:
>> Le 26/09/10 10:00, Sebastian Gibb a écrit :
>> > Hello,
>> >
>> > I get a value which stores a relative file name. (I get it from another
>> > function, which I don't want to change.)
>> > e.g.
>>
On 09/26/2010 10:29 AM, Rainer M Krug wrote:
> Hi Peter, H Berwin,
>
> thanks a lot for your clarifications, it makes more sense now. But
> having our input and thinking a little bit more about the problem, I
> realized that I am simply interested in the pdf p(y) that y *number* of
> entities (whi
In a context of spatial analysis, see also readGDAL in package rgdal:
library(rgdal)
logo <- system.file("pictures/logo.jpg", package="rgdal")[1]
x <- readGDAL(logo)
image(x)
Renaud
2010/9/25 Prof Brian Ripley :
> On Sat, 25 Sep 2010, Malik Shahzad wrote:
>
>>
>> Is it possible to read jpeg fil
Hi,
to hide the axis generated by bxp you have to set axes=FALSE and
frame.plot=FALSE and then you can plot the x-axis by using the axis()
function
example:
boxplot(len ~ dose, data = ToothGrowth,
frame.plot=FALSE,axes=FALSE,
boxwex = 0.25, at = 1:3 - 0.2,
subset = supp == "
On 26/09/2010 4:08 AM, Romain Francois wrote:
Le 26/09/10 10:00, Sebastian Gibb a écrit :
Hello,
I get a value which stores a relative file name. (I get it from another
function, which I don't want to change.)
e.g.
fileName<- "../data/2010-08.csv";
Is it possible to get the absolute file path
Am Sonntag, 26. September 2010, 10:08:39 schrieb Romain Francois:
> Le 26/09/10 10:00, Sebastian Gibb a écrit :
> > Hello,
> >
> > I get a value which stores a relative file name. (I get it from another
> > function, which I don't want to change.)
> > e.g.
> >
> >> fileName<- "../data/2010-08.csv
The package R.utils has a function to get absolutepath
On Sun, Sep 26, 2010 at 1:00 AM, Sebastian Gibb wrote:
> Hello,
>
> I get a value which stores a relative file name. (I get it from another
> function, which I don't want to change.)
> e.g.
> > fileName <- "../data/2010-08.csv";
>
> Is it pos
Le 26/09/10 10:00, Sebastian Gibb a écrit :
Hello,
I get a value which stores a relative file name. (I get it from another
function, which I don't want to change.)
e.g.
fileName<- "../data/2010-08.csv";
Is it possible to get the absolute file path out of this value?
(e.g. /home/sebastian/doc
Hi Andre,
try acf.data$acf
regards,
Theresa
andre bedon wrote:
Hi,
Im new to R so this question is quite fundamental.
Im trying to compare some autocorrelations generated by the acf function to
some theoretical correlations. How can I have acces to just the
autocorrelations, for comput
Hello,
I get a value which stores a relative file name. (I get it from another
function, which I don't want to change.)
e.g.
> fileName <- "../data/2010-08.csv";
Is it possible to get the absolute file path out of this value?
(e.g. /home/sebastian/documents/data/2010-08.csv)
Kind regards,
Seba
On 09/26/2010 04:50 AM, xin wei wrote:
>
> hi, peter:
> thank you for your attention. adding the line you suggested did display the
> static Mandelbrot plot with good resolution on R graphics device. However,
> the resulting gif file still come out ugly. the R wiki page I was referring
> to is the
i´m really sorry, once again. ok i will try to explain what i have to
programm. i want to programm a powerfunction.
i have to research if the correlations in a bivariate random sample are
homogeneous. for that i saperate the random sample in m blocks and
calculate the correlation of each block(p
It is not a problem of not knowing R.
It is a problem of reasoning. if you use m1 and not assign to it a value
beforehand it is difficult your function works.
And this will happen in any language, not only R.
Maybe explaining what you are trying to do helps. To do this try to add
comments (sta
Dear List,
I am creating a boxplot with two subsets, very similar to the example by Roger
Bivand at ?boxplot (reproduced below). I am trying to change the labels on the
x-axis to have one number to cover both subsets. I can do this in other plots
by using axis=FALSE followed by a separate ax
This is worse than before and getting pretty silly. Now you are calling outer
with a function that only takes one argument.
R might be hard for you, but mind reading is even harder for most of us. To
get help you need to explain clearly and sensibly what it is you want to do.
Look at your c
Hi,
Im new to R so this question is quite fundamental.
Im trying to compare some autocorrelations generated by the acf function to
some theoretical correlations. How can I have acces to just the
autocorrelations, for computation?
This is some of my code:
> acf.data<-c(acf(x))
> acf.dat
I have a question about the basis functions of cubic regression spline in
mgcv. Are there some ways I can get the exact forms of the basis functions
and the penalty matrix that are used in mgcv? Thanks in advance!
Yan
[[alternative HTML version deleted]]
___
hi, sorry but i can´t remove the problem.but i change the programm a little
bit. i didn´t work with r programm before, so its really hard for me to find
my problems. :)
N=5
n=100
p_0=c(1/5,1-1/5)
power = function(k1) {
set.seed(1000)
H=matrix(0,nrow=N,ncol=1)
for(i in 1:N) {
x <- matrix(r
The message is clear. Just resove this problem before posting a
terribly general and so not useful "it does not work".
Best
mario
> f=outer(p,m,Vectorize(power))
Error in outer(p, m, Vectorize(power)) : object 'p' not found
> persp(p,m,power,theta=-50,phi=30,d=4,border="blac
83 matches
Mail list logo