Hi, all
I have a medium sized data, 6 years. Each observation is a case with a date
variable, such as '2004-08-02'.
Some of the months didn't occur a case.
I want to plot the 6 years data by month, and the Y_axis is the freqency of
cases for each month, meaning 12*6=72 bars or points in the figu
Dear all,
I have a doubt: if I run windows(width=8.27,
height=11.69), the size of an A4 paper, does it work correctly in all
screens? Or does it depend on the inches of my screen?.
I ask
you about this question because I need to make the user see a graph in
the graph window and he must be ab
thank you.
it helps!
--
View this message in context:
http://r.789695.n4.nabble.com/retrieveing-value-from-KS-test-tp4663439p4663499.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.
Hi all,
i have 2 cumulative (F(x)) distribution function that not defined in R.
i want to make anderson darling goodness of fit test to first function
(function 1) to check if it behaves as the other distributed
function(function 2)
how can i insert my 2 unknown by R function to ad.test()?
Reg
Le vendredi 05 avril 2013 à 14:30 -0400, Emily Ottensmeyer a écrit :
> Dear R-Help,
>
> I am using the RDF package/ R 2.14 with the RDF package to download data
> from a website, and then use R to manipulate it.
>
> Text on the website is UTF-8. The RDF package's rdf_load command is
> converting
Le 06/04/13 10:00, ZhaoXing a écrit :
Hi, all
I have a medium sized data, 6 years. Each observation is a case with a date
variable, such as '2004-08-02'.
Some of the months didn't occur a case.
I want to plot the 6 years data by month, and the Y_axis is the freqency of
cases for each month, me
Dear List members
I have a large dataset organised in choice groups see sample below
+-+
| dn obs choice acid br date cdate
situat~n mth year set |
Hello,
Try the following. The first function removes a column(s) from the
table, and the secondd all rows and columns with zero elements in them.
fun1 <- function(x, col) x[, -which(colnames(x) %in% col)]
fun2 <- function(x){
idx <- which(x == 0, arr.ind = TRUE)
x[-idx[, 1],
I have a large dataset organised in choice groups see below. Each choice
represents a separate occasion with 1 product chosen out of the 6 offered.
Â
Â
Â
   Â
+-+
    | dn  obs  cho
Hi,
I want to calculate the Value at Risk with using some distirbutions and a
volatility model.
I use the following data(http://uploadeasy.net/upload/cdm3n.rar) which are
losses (negative returns) of a company of approx. the last 10 years. So I
want to calculated the Value at Risk, this is nothing
Hello,
That's not a very good way of posting your data, preferably paste the
output of ?dput in a post.
Some thing along the lines of the following might do what you want. It
seems that the groups are established by 'dn' and 'obs' numbers. If so, try
# Make up some data
dat <- data.frame(dn
Le 06/04/13 10:00, ZhaoXing a écrit :
Hi, all
I have a medium sized data, 6 years. Each observation is a case with a date
variable, such as '2004-08-02'.
Some of the months didn't occur a case.
I want to plot the 6 years data by month, and the Y_axis is the freqency of
cases for each month, me
Sorry --failed to cc the list. -- Bert
On Fri, Apr 5, 2013 at 9:29 PM, Bert Gunter wrote:
Have you tried plotting your data?!
>library(lattice)
>densityplot(yourdata)
Forget tests of normality -- they are a BAD idea, despite what the
statistics textbooks say (IMHO obviously) -- and focus on
Hello all!
I have a problem to arrange data in another form. My initial data is like
this:
'data.frame': 421 obs. of 58 variables:
$ 01A: num NA NA NA NA NA NA NA NA NA NA ...
$ 01B: num NA NA NA NA NA NA NA NA NA NA ...
$ 03A: num NA NA NA NA NA NA NA NA NA NA ...
$ 03B: num NA NA NA NA N
Hi Rui,
Thank you for your suggestion which is very much appreciated. Unfortunately
running this code produces the following error.
error in '$<-.data.frame' ('*tmp*', "mth", value = NA_real_) :
replacement has 1 rows, data has 0
I'm sure there must be an elegant solution to this problem?
On Apr 5, 2013, at 11:30 AM, Emily Ottensmeyer wrote:
> Dear R-Help,
>
> I am using the RDF package/ R 2.14 with the RDF package to download data
> from a website, and then use R to manipulate it.
>
> Text on the website is UTF-8. The RDF package's rdf_load command is
> converting it into a di
Hello,
Thanks for replying me!
I was investigating the EBImage package and actually
there is a algorithm for image segmentation. But I think this algorithm is not
automated enough for me and maybe to work with multispectral remote sensing
image when I want to segment the whole image. The algorith
Hello,
Can't you post a data example? If your dataset is named 'dat' use
dput(head(dat, 50)) # paste the output of this in a post
Rui Barradas
Em 06-04-2013 15:34, Leask, Graham escreveu:
Hi Rui,
Thank you for your suggestion which is very much appreciated. Unfortunately
running this code
Hi,
Try this:
tbl1<- structure(c(21L, 23L, 127L, 112L, 120L, 0L), .Dim = 2:3, .Dimnames =
structure(list(
labels = c(1, 2), gts = c("A1", "B2", "G3")), .Names = c("labels",
"gts")), class = "table")
dat1<-as.data.frame(tbl1,stringsAsFactors=FALSE)
dat2<-dat1[dat1$gts!="B2" & dat1$Freq!=0,]
On Apr 6, 2013, at 7:28 AM, catalin roibu wrote:
> Hello all!
> I have a problem to arrange data in another form. My initial data is like
> this:
> 'data.frame': 421 obs. of 58 variables:
> $ 01A: num NA NA NA NA NA NA NA NA NA NA ...
> $ 01B: num NA NA NA NA NA NA NA NA NA NA ...
> $ 03A: num
Hi Rui,
Data as follows. These data are arranged in choice sets of 6.
head(dat,50)
dn obs choice br mth
1 4 1 0 1 NA
2 4 1 0 2 NA
3 4 1 0 3 NA
4 4 1 0 4 NA
5 4 1 0 5 NA
6 4 1 1 6 487
7 4 2 0 1 NA
8 4 2 0 2 N
Hi Rui,
Data as follows
structure(list(dn = c(4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4), obs = c(1, 1,
1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 4, 4, 4, 4, 4,
4, 5, 5, 5, 5, 5, 5
Hello!
I have this error in R:
In svm.default(x, y, scale = scale, ..., na.action = na.action) :
Variable(s) X.11. constant. Cannot scale data.
Of course, I have a column of 25 rows where the values are always 0. Why it
is not possible to have a column with 0?
I need this column because is a
On Apr 6, 2013, at 9:16 AM, Leask, Graham wrote:
> Hi Rui,
>
> Data as follows
>
> structure(list(dn = c(4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
> 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
> 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4), obs = c(1, 1,
> 1, 1, 1, 1, 2, 2
If you want to reorder the column names of your data frame, try (it would
have been nice if you provided a subset of your data with 'dput'):
# create the order of the new columns
indx <- order(substring(colnnames(df), 3, 3)
, substring(colnames(df), 1, 2)
)
df <
Probably not very R-ish but it works (your data in a dataframe called "x"), if
I understand your question right:
# replace NA with 0
x$mth <- ifelse( is.na( x$mth ), 0, x$mth )
# loop through observation numbers and replace 0 with the month no
for( i in unique( x$obs ) ) x$mth[ x$obs == i ] <- m
On Apr 6, 2013, at 9:26 AM, David Winsemius wrote:
>
> On Apr 6, 2013, at 9:16 AM, Leask, Graham wrote:
>
>> Hi Rui,
>>
>> Data as follows
>>
>> structure(list(dn = c(4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
>> 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
>> 4, 4, 4, 4, 4, 4
Hi,
Try this:
#dat1 is dataset
indx<-apply(dat1,2,function(x) head(which(!is.na(x)),2))
res<-as.data.frame(sapply(seq_len(ncol(indx)),function(i) dat2[indx[,i],i]))
colnames(res)<- colnames(dat1)
res
# 1B 2B 4B 1A 2A 4A 5B 5A C31A C31B C34A C34B C35A
#1 2.518 2.357
lst1<-lapply(dat1,function(x) x[!is.na(x)])
res<-as.data.frame(sapply(lst1,function(x)
c(x,rep(NA,max(sapply(lst1,length))-length(x)) )))
head(res)
# 1B 2B 4B 1A 2A 4A 5B 5A C31A C31B C34A C34B C35A
#1 2.518 2.357 1.499 3.647 1.890 2.249 2.896 2.175 0.452 1.177
Hi Arun,
How odd. Directly pasting the code from your email precisely repeats the error.
See below. Any thoughts on the cause of this anomaly?
> dput(head(dat,50))
structure(list(dn = c(4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4,
4, 4, 4
slice.index() in base
On 4/2/2013 6:36 AM, Enrico Bibbona wrote:
Is there any function that extends to multidimentional arrays the
functionalities of "row" and "col" which are just defined for matrices?
Thanks, Enrico Bibbona
[[alternative HTML version deleted]]
___
slice.index() in base
On 4/2/2013 9:53 AM, Enrico Bibbona wrote:
Great!
Thanks a lot, Enrico
2013/4/2 Duncan Murdoch
On 02/04/2013 6:36 AM, Enrico Bibbona wrote:
Is there any function that extends to multidimentional arrays the
functionalities of "row" and "col" which are just defined for
Hi David,
Thank you for your suggestion unfortunately it yields an incorrect result.
Within a choice set the mth should be identical.
> head(dat)
dn obs choice br mth
1 4 1 0 1 487
2 4 1 0 2 488
3 4 1 0 3 488
4 4 1 0 4 488
5 4 1 0 5 488
6 4 1
Hello,
I've just run my code with your data and found no error. Anyway, try
replacing the lapply instruction with this.
tmp <- lapply(sp, function(x){
idx <- which(!is.na(x$mth))[1]
if(length(idx) > 0)
x$mth <- x$mth[idx]
Hello,
Can't you simply call svm() with scale = FALSE ?
If the variable is constant, it cannot be scaled to unit variance (and
zero mean).
Hope this helps,
Rui Barradas
Em 06-04-2013 17:19, Nicolás Sánchez escreveu:
Hello!
I have this error in R:
In svm.default(x, y, scale = scale, ..., n
I've recently had a reason to work a little with image segmentation too, and in
addition to EBImage, you should look at biOps. You can learn a lot by studying
these packages. Bryan
On Apr 6, 2013, at 10:04 AM, Eder Paulo wrote:
> Hello,
>
> Thanks for replying me!
>
> I was investigating t
Hi everyone,
I asked myself if exists a way to get a rows (or columns) matrix reduction with
R.
My goal is for education.
Thanks in advance
AS
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
Hi Rui,
I have just pasted this direct and rerun. I still get the same error.
I am running this on the full length dataset.
dim [1] 255030 5
I attach the first few rows of the file.
Error pasted below.
I am using version 2.15.2 on a windows 7 machine.
> sp <- split(dat, list(dat$dn, dat$
Incomprehensible. Define:"matrix reduction" .
Perhaps:
?qr
?svd
## and links therein.
-- Bert
On Sat, Apr 6, 2013 at 10:43 AM, Angelo Scozzarella Tiscali
wrote:
> Hi everyone,
>
> I asked myself if exists a way to get a rows (or columns) matrix reduction
> with R.
> My goal is for education
Well, I mean to use the elimination method to transform the matrix, for
example, of the coefficients of a linear equations system.
AS
Il giorno 06/apr/2013, alle ore 19:43, Angelo Scozzarella Tiscali ha scritto:
> Hi everyone,
>
> I asked myself if exists a way to get a rows (or columns) matr
On 06-04-2013, at 19:58, Angelo Scozzarella Tiscali
wrote:
> Well, I mean to use the elimination method to transform the matrix, for
> example, of the coefficients of a linear equations system.
>
> AS
>
Well if you only need to solve a linear equation system have a look at solve.
If you h
Hi,
dat<- read.csv("test1.csv",sep=",",stringsAsFactors=FALSE)
sp <- split(dat, list(dat$dn, dat$obs))
sp1<-sp[lapply(sp,nrow)!=0] #added here
names(sp1) <- NULL
tmp<- lapply(sp1,function(x){
idx<- which(!is.na(x$mth))[1]
x$mth<- x$mth[idx]
x
}
)
res<- do.call(rbind,tmp)
row.names(res)<
Hello,
With the attached file, I could reproduce the error but I think the
added line does the trick.
Rui Barradas
Em 06-04-2013 19:20, arun escreveu:
Hi,
dat<- read.csv("test1.csv",sep=",",stringsAsFactors=FALSE)
sp <- split(dat, list(dat$dn, dat$obs))
sp1<-sp[lapply(sp,nrow)!=0] #added h
Hi,
You could also do this with:
dat2<- dat1
dat2[]<-lapply(dat1,function(x) c(x[!is.na(x)],x[is.na(x)]))
row.names(res1)<- row.names(dat2)
identical(dat2,res1)
#[1] TRUE
For your new question:
test<- data.frame(medrw1)
row.names(test)
[1] "1" "2" "3" "4" "5" "6" "7" "8"
Hi Arun,
Thank you to yourself and Rui.
The solution that you provided does indeed work.
I greatly appreciate your help.
Best wishes
Graham
-Original Message-
From: arun [mailto:smartpink...@yahoo.com]
Sent: 06 April 2013 19:20
To: Leask, Graham
Cc: R help; Rui Barradas
Subject: Re:
Hi,
You could also do:
tbl1[,-match("B2",colnames(tbl1))]
# gts
#labels A1 G3
# 1 21 120
# 2 23 0
#or
tbl1[,!grepl("B2",colnames(tbl1))]
# gts
#labels A1 G3
# 1 21 120
# 2 23 0
If you need to remove columns that contains 0 along with removing a specific
column.
tb
Dear UseRs,
i want to apply mantel test by comparing a list of 124 distance matrices with a
reference distance matrix "q". The list of distance matrices was created by the
following command..
u<-lapply(el, function(x) dist(x))
where "el" is a data frame of 75 columns and 124 rows. Therefore, the
?chol
##also
-- Bert
On Sat, Apr 6, 2013 at 11:12 AM, Berend Hasselman wrote:
>
> On 06-04-2013, at 19:58, Angelo Scozzarella Tiscali
> wrote:
>
>> Well, I mean to use the elimination method to transform the matrix, for
>> example, of the coefficients of a linear equations system.
>>
>> AS
On 06-04-2013, at 22:01, Bert Gunter wrote:
> ?chol
>
> ##also
>
Quite true and therefore:
?backsolve
# forwardsolve
and
?qr
# qr.solve
So there's a lot to choose from.
Berend
> -- Bert
>
> On Sat, Apr 6, 2013 at 11:12 AM, Berend Hasselman wrote:
>>
>> On 06-04-2013, at 19:58, An
From: aguitatie...@hotmail.com
Sent: Friday, April 05, 2013 11:47 PM
To: r-help@r-project.org ; R Help
Subject: Reversing data transformation
Hi everybody,
I would be very grateful if you could give me your thoughts on the following
issue.
I need to perform Box-Cox (bcPowerÂÂ) transform
Dear all,
Iâm finding difficulties to normalize this data. Could you provide some input?
DATA:
c(0.000103113, 0.000102948, 0.000104001, 0.000103794, 0.000104628,
9.2765e-05, 9.4296e-05, 9.5025e-05, 9.4978e-05, 9.8821e-05, 9.7586e-05,
9.6285e-05, 0.00010158, 0.000100919, 0.000103535, 0.00010332
Hi,
I tried to send several questions to the lists (both normal R and
R-Sig-Finance), but everytime I look them up in the archives my messages
end up with the following
"An embedded and charset-unspecified text was scrubbed...
for example see my post here:
https://stat.ethz.ch/pipermail/r-sig-fi
Post in plain text (not HTML) which is a choice within your email client.
And please (!!) don't post the same question to multiple lists. If your
question is off-topic, the list membership will redirect as needed.
Double posting simply wasted the community's energies by duplicating responses.
Hi,
Try this:
set.seed(25)
el<-as.data.frame(matrix(sample(1:50,75*124,replace=TRUE),ncol=75))
lst1<-lapply(el,function(x) dist(x))
set.seed(28)
q<-as.data.frame(matrix(sample(1:50,75*124,replace=TRUE),ncol=75))
q<-dist(q)
library(ade4)
res<- lapply(lst1,function(x) mantel.rtest(q,x,nrepet=999
Hello,
See ?scale
scale(DATA) # mean 0, unit variance
Hope this helps,
Rui Barradas
Em 06-04-2013 21:21, Beatriz González Domínguez escreveu:
Dear all,
I’m finding difficulties to normalize this data. Could you provide some input?
DATA:
c(0.000103113, 0.000102948, 0.000104001, 0.0001037
> Anyway, try replacing the lapply instruction with this.
>
> tmp <- lapply(sp, function(x){
> idx <- which(!is.na(x$mth))[1]
> if(length(idx) > 0)
> x$mth <- x$mth[idx]
> x
> })
Note that
which(anyLogicalVector)[1]
always
Dear Rees Morrison,
Re:
> Franklin, I am very impressed. I ran your code and am amazed at the output.
> I want to use it in my efforts to figure out which are the most widely used
> functions, so that I can concentrate on understanding those basics reasonably
> well.
>
> May I ask you tw
On 06.04.2013 22:21, Beatriz González Domínguez wrote:
From: aguitatie...@hotmail.com
Sent: Friday, April 05, 2013 11:47 PM
To: r-help@r-project.org ; R Help
Subject: Reversing data transformation
Hi everybody,
I would be very grateful if you could give me your thoughts on the following
is
On 06.04.2013 09:45, iritgur wrote:
Hi all,
i have 2 cumulative (F(x)) distribution function that not defined in R.
i want to make anderson darling goodness of fit test to first function
(function 1) to check if it behaves as the other distributed
function(function 2)
You mean you have obse
On 06.04.2013 08:53, Eva Prieto Castro wrote:
Dear all,
I have a doubt: if I run windows(width=8.27,
height=11.69), the size of an A4 paper, does it work correctly in all
screens?
Correctly: yes, but not as you expect. It keeps the aspect ration but in
a smaller size if the screen is smalle
Hi,
May be this helps:
input1<-
data.frame(answer=rep(1:4,times=18),p.number=rep(1:18,each=4),session=rep(1:2,each=36),count=rep(1:8,each=9),type=rep(1:3,each=24))
input2<-
data.frame(answer=rep(1:4,times=18),p.number=rep(1:18,each=4),session=rep(1:2,each=36),count=rep(1:8,each=9),type=rep(1:3,e
There is much wisdom in the Posting Guide mentioned in the footer of every
email on this list. One pearl is the request to send your email in text format,
not HTML. How you do this is specific to your email program, so we cannot help
you, but Google is your friend.
As to your message, requests
Hey,
So I have a scatter plot and I am trying to plot a curve to fit the data
based on a Holling Type III functional response. My function is this:
nll2<-function(a,b) {
conefun<-(a*DBH^2)/(b^2+DBH^2)
nlls2<-dnbinom(x=cones ,size=DBH, mu=conefun,log=TRUE)
-sum(nlls)
}
and my plot is this:
Hello Everybody,
I'm working with a dataframe that has 18 columns. I would like to subset the
data in one of these columns, "present", according to combinations of data in
six of the other columns within the data frame and then save this into a text
file. The columns I would like to use to subs
Dear Sir,
Thanks a lot for your great help. Do appreciate it a lot. In my earlier mail,
where I had attached some files,
I have realized yesterday that instead of sending the R code customized by me
based on your guidance, I had by mistake attached the contents of email. I do
apologize to you
Dear R forum,
I am bit confused and please guide me -
(1) Is "Pearson Type III Distribution" as given in lmomco package same as Three
Parameter Pearson 5 Distribution?
If not, how do I estimate the parameters of Three Parameter Pearson 5
Distribution?
(2) Is there any other R forum dealing wi
Dear Sir,
I am referring to your package "FAdist". I wish to know how to estimate the
parameters of the distribution - "Log-Pearson Type III Distribution"?
Will it be possible for you to guide me or inform the package in R, I can use
to estimate the parameters.
Regards
Katherine
[[al
67 matches
Mail list logo