On 04/10/2013 04:45 AM, catalin roibu wrote:
Hello all!
I have a big problem now. I want a data frame like this:
dput(head(test,100))
> ...
Now I want to group rownames (in this case year) in 10 years classes and I
want to count for each 10 years classe (decade) the number of major and
minor ev
As a simple example, I want to find minimum value for x^2, but it can't be
obtained by:
f<-function(x)x^2
optimize(f,lower=-1,upper=1)
What are other methods to deal with this? I tried DEoptim, still doesn't
work. Any suggustions will be extremely helpful! THanks!
Shelly
--
View this message
Many thanks to Peter and Brian for their help; it was indeed a permissions
problem; thanks also to Josh Paulson of the RStudio team for pointing me to
instructions for making the necessary changes.
But at the risk of seeming not only ungrateful and pedantic, but also
off-topic, can I point out
Hi
Lets say
I made dendrogram using this matrix
A B C D E
A 143 2 7
B 4 1 73 9
C 3 7192
D 2 3 915
E 7 9251
I want a value to next each leaf. The value is represented using a heatcolor
square. So for each leave ther
But how would I get the coordinates of the leaves to draw a rectangle. And
what about determining the size of the rectangle. I will have about 1000
leaves, so it will hard to determine the size of the rectangle.
--
View this message in context:
http://r.789695.n4.nabble.com/Dengrogram-Help-Cust
Hi
where is function fitdist from? Do you by chance mean fitdistr from MASS
package?
What is result of str(k)?
Without these questions answered you hardly get any useful answer.
Regards
Petr
> -Original Message-
> From: r-help-boun...@r-project.org [mailto:r-help-bounces@r-
> project
Hi David,
Many thanks. I try to follow your example and code as follows:
xyplot( avg_cost_2012 ~ asset_2012,
panel=function(x,y) {
panel.xyplot(x,y, type="p")
panel.lines(x2, y1, col="red")},scales=list(x=list(log=10)))
However, I do see the points "p" of "avg_c
On 10/04/2013 08:29, PIKAL Petr wrote:
Hi
where is function fitdist from? Do you by chance mean fitdistr from MASS
package?
No, from the output. More likely
fitdistrplus::fitdist Fit of univariate distributions to non-censored
data
What is result of str(k)?
With
Hi,
Thanks for taking the time. Here is a more reproducible example of the
entire process:
# Creating a vector source - stupid text in the Bulgarian language
bg<-c('Днес е хубав и слънчев ден, в който всички искат да бъдат
навън.','Утре ще бъде още по-хубав ден.')
# Converting strings from
Dear LondonPhd,
assuming that you have assigned 'mod' to your VAR() call, you can run the
following:
lapply(coef(mod), function(x) x[sort(rownames(x)), ])
In general, the coef-method will retrieve the estimated coefficients and you
can then do the reordering to your liking.
Best,
Bernhard
--
On Apr 10, 2013, at 07:19 , Julian Wells wrote:
> Many thanks to Peter and Brian for their help; it was indeed a permissions
> problem; thanks also to Josh Paulson of the RStudio team for pointing me to
> instructions for making the necessary changes.
>
> But at the risk of seeming not only un
On Apr 10, 2013, at 03:24 , nntx wrote:
> As a simple example, I want to find minimum value for x^2, but it can't be
> obtained by:
> f<-function(x)x^2
> optimize(f,lower=-1,upper=1)
Works fine for me. What did you expect it to do?
> f<-function(x)x^2
> optimize(f,lower=-1,upper=1)
$minimum
[1]
Hi R users, I have a imputed dataset of undefinedundefined cycles which I
generated using StAta version undefinedundefined. Then I imported my data from
Stata into R and I used a loop to run Mclust package in R. My observation
starts with ID=2 (ID=1 has been excluded from the sample) and ends wi
Le mercredi 10 avril 2013 à 10:50 +0300, Ventseslav Kozarev, MPP a
écrit :
> Hi,
>
> Thanks for taking the time. Here is a more reproducible example of the
> entire process:
>
> # Creating a vector source - stupid text in the Bulgarian language
> bg<-c('Днес е хубав и слънчев ден, в който всички
Thank you so much! You made it look (almost) so easy. I greatly
appreciate it!
On 10.4.2013 г. 11:29 ч., Milan Bouchet-Valat wrote:
Le mercredi 10 avril 2013 à 10:50 +0300, Ventseslav Kozarev, MPP a
écrit :
Hi,
Thanks for taking the time. Here is a more reproducible example of the
entire proc
Have a look at the warning in ?geepack::geeglm It should be mentioned in
?geepack::geese as well.
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 And
Perhaps write.dta(..., convert.factors="string") might help.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of chong shiauyun
Sent: Mittwoch, 10. April 2013 10:01
To: r-help@r-project.org
Subject: [R] Levels and labels in factor
Hi R
Hello all!
I have a problem with a double exponential equation.
this are my data's>
structure(list(proc = c(1870.52067384719, 766.789388745793,
358.701545859122,
237.113777545511, 43.2726259059654, 148.985133316262, 92.6242882655781,
88.4521557193262, 56.6404686159112, 27.0374477259404, 34.334729
Beatriz,
In this case, use the car package and run the following:
> bp <- Boxplot(DATA$ave, data= DATA, main= "Average Size", labels=DATA$num,
> Id.method=c("y"))
This will print out the labels 211 & 225 beside the outlier points. As you can
see, the instruction assigns the values in the num c
Dear Catalin,
You can look at ?nls.
Alternatively, you could also consider a linear model as follows, where "d"
is your data:
# plot your data
with(d, plot(cls, proc, las = 1))
# linear model
fit <- lm(proc ~ I(1/cls) + I((1/cls)^2), data = d)
summary(fit)
# plotting
with(d, plot(cls, proc, la
Well, its mentioned in the function itself by library(xxx) or
require(xxx). Well, most probably codetools is more aimed towards
checking packages in whcih case such information is in the depends
section of the package declaration.
Best
Jannis
On 08.04.2013 21:03, Duncan Murdoch wrote:
On 13
Please do not forget to CC the list to increase your chances of getting
help. --JIV
On Wed, Apr 10, 2013 at 9:31 PM, catalin roibu wrote:
> Hello!
> I try to compute the double exponential function this code:
> f<-function(cls,a,b,c,d)a*exp(cls*b)+c*exp(cls*d)
>
> n2<-nls(proc~f(cls,a,b,c,d),da
Hi,
this is how far I have come without practicel knowledge of dendrograms.
_
# This dendrogram is from the demo of 'dendrogram', obtained by dput()!
d3 <- structure(list(structure(list(structure(8L, members = 1L,
height =
Dear PIKAL,
Thank you for your kind reply. The function fitdist comes from package
fitdistrplus. I am attaching a .csv document that contains the data I want
to fit a distribution to, so you can have a good idea of what kind of data
I am dealing with.
Basically what str(k) contains is the informa
Dear Dr. Brian,
Hope you are doing well. The thing is that my data does not have any 0s in
it. Furthermore, I also tried fitting other distributions (i.e. weibull)
and still did not work.
I will show you the results of str(k) so you have an idea of the tipe of
data I am dealing with:
int [1:499
Hi,
If you have the following lets say:
hist(log10(rnorm(0:1000)))
How do you show the labels on the x-axis as log vaules? so lets say: 0.01,
0.1,0,1,10,100 and so on.
Thanks
--
Shane
[[alternative HTML version deleted]]
__
R-help@r-projec
Hi,
"
>Thank You, Arun Kirshna , for your efforts and time.
>I also found an equivalent code:
>library(zoo)
>dat[] <- lapply(dat, function(x){replace(x, x == 0, NA)})
>dat <-na.locf(dat)
"
No problem.
If you have equal replications, you could also use:
dat<- structure(list(val = c(-1.111068
Hello,
Try
h <- hist(log10(rnorm(0:1000)), xaxt = "n")
axis(1, at = pretty(h$breaks), labels = 10^pretty(h$breaks))
Hope this helps,
Rui Barradas
Em 10-04-2013 14:25, Shane Carey escreveu:
Hi,
If you have the following lets say:
hist(log10(rnorm(0:1000)))
How do you show the labels on t
Yup, that worked. Thats great. Thanks
On Wed, Apr 10, 2013 at 3:34 PM, Rui Barradas wrote:
> Hello,
>
> Try
>
>
> h <- hist(log10(rnorm(0:1000)), xaxt = "n")
> axis(1, at = pretty(h$breaks), labels = 10^pretty(h$breaks))
>
>
> Hope this helps,
>
> Rui Barradas
>
> Em 10-04-2013 14:25, Shane Car
I would suggest to try different starting values. The following works
for instance:
n2<-nls(proc~f(cls,a,b,c,d),data=bline,start=list(a=1000,b=-1,c=4,d=1),t
race=TRUE)
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Jorge I Velez
Sen
Other options (possibly counting as ugly):
# Preserving States as rownames for labeling
> data.frame(State=rownames(tableData), tableData,
stringsAsFactors=FALSE)
State Frost Population Area
Connecticut Connecticut 139 3100 4862
Pennsylvania Pennsylvania 1
Hi David, Gabor, Arun, and Rolf,
Thanks for your replies to my question. Very interesting and very helpful. I
particularly liked the one-line solutions proposed by David and Gabor. I had a
suspicion that this conversion could be done using only a minimal amount of
code.
For what I'm doing, i
I have a matrix of p values below. Column1 are the analytes and the other
columns are p values comparing time points.
How do I convert this table of pvalues into adjust p values for FDR/BH
This is wrong does anyone know how to fix this code
a<-read.table("file", header=T, sep"\t")
b<-as.numeric
Hello All,
Am learning to create tables with n(%) formatting using R. Below is a working
example. I think this is not bad but wondered if there are better ways of doing
it. Although it can be quite humbling, seeing good code helps me assess my
progress as an R programmer.
Ultimately want to h
Hi Group,
I have a question on Stringr package
I have a table like this
X Y
absu - di
acpi - tu
adtu - tu
I want output like this
XY
ab su
ab di
ac pi
ac tu
ad tu
ad tu
I am wondering if this operation can be done
On Wed, Apr 10, 2013 at 4:47 AM, Jannis wrote:
> Well, its mentioned in the function itself by library(xxx) or require(xxx).
> Well, most probably codetools is more aimed towards checking packages in
> whcih case such information is in the depends section of the package
> declaration.
Yes -- it's
On Apr 10, 2013, at 12:44 AM, jpm miao wrote:
Hi David,
Many thanks. I try to follow your example and code as follows:
xyplot( avg_cost_2012 ~ asset_2012,
panel=function(x,y) {
panel.xyplot(x,y, type="p")
panel.lines(x2, y1,
col="red")},scales=list(x=list(l
To further David's comment, just think what the world would be like if
Alexander
Fleming had discarded an obvious outlier in 1928 (
http://en.wikipedia.org/wiki/Penicillin#Discovery).
On Tue, Apr 9, 2013 at 7:46 AM, David Winsemius wrote:
>
> On Apr 9, 2013, at 4:12 AM, Lorna wrote:
>
> Hi Eve
On 10/04/2013 11:59 AM, Paul Miller wrote:
Hello All,
Am learning to create tables with n(%) formatting using R. Below is a working
example. I think this is not bad but wondered if there are better ways of doing
it. Although it can be quite humbling, seeing good code helps me assess my
progre
On Apr 9, 2013, at 11:45 AM, catalin roibu wrote:
Hello all!
I have a big problem now. I want a data frame like this:
dput(head(test,100))
structure(c(NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA,
NA, NA, NA, NA, NA, NA, NA,
Hi,
Assuming that this is a data.frame.
dat1<-read.table(text="
X,Y
ab,su-di
ac,pi-tu
ad,tu-tu
",sep=",",header=TRUE,stringsAsFactors=FALSE)
library(stringr)
dat2<-data.frame(X=rep(dat1$X,each=2),Y=
unlist(str_split(dat1$Y,"-")),stringsAsFactors=FALSE)
dat2
# X Y
#1 ab su
#2 ab di
#3 ac pi
#4
On Wed, Apr 10, 2013 at 12:25 PM, Sudip Chatterjee
wrote:
> Hi Group,
>
> I have a question on Stringr package
>
> I have a table like this
> X Y
> absu - di
> acpi - tu
> adtu - tu
>
> I want output like this
> XY
> ab su
> ab di
> ac pi
>
Hi,
Just noticed that there is space before and after the "-"
dat1 <- read.table(text = ' X Y
ab "su - di"
ac "pi - tu"
ad "tu - tu"', header=TRUE,stringsAsFactors=FALSE)
library(stringr)
Y<-str_trim(unlist(str_split(dat$Y,"-")),side="both")
X<-unlist(str_split(str_trim(str_dup(str
> I am trying to solve a tridiagonal matrix in R. I am
> wondering if there is an inbuilt R function or package to
> solve that. I tried looking on google but couldn't find
> something that would help directly. Any help is highly appreciated.
You must be searching a different Google. I found S
Hello,
I am still struggling w/ the PLYR syntax. I am trying to build a customized
function to detect outliers in a data frame based on the interquantile
method. My data frame is called "ALL" & I am trying to create two new
variables in my data frame:
upper=q3+ 1.5*(q3-q1) & lower=q1-1.5*(q3-
Le mercredi 10 avril 2013 à 13:17 +0200, Ingo Feinerer a écrit :
> On Wed, Apr 10, 2013 at 10:29:27AM +0200, Milan Bouchet-Valat wrote:
> > Thanks for the reproducible example. Indeed, it does not work here
> > either (Linux with UTF-8 locale). The problem seems to be in the call to
> > gsub() in r
Hi,
You could try ?within()
set.seed(25)
ALL<- data.frame(q3=sample(15:30,10,replace=TRUE),
q1=sample(1:14,10,replace=TRUE))
res<-within(ALL,{lower<-q1- 1.5*(q3-q1);upper<-q3+1.5*(q3-q1)})
res
# q3 q1 upper lower
#1 21 5 45.0 -19.0
#2 26 6 56.0 -24.0
#3 17 14 21.5 9.5
#4 29 9 59.
Thanks everyone. The mutate function worked great:
all2<- mutate(all1,upper=p75+1.5*(p75-p25),lower=p25-1.5*(p75-p25))
--
View this message in context:
http://r.789695.n4.nabble.com/Using-PLYR-to-apply-a-custom-function-to-a-data-frame-tp4663897p4663902.html
Sent from the R help mailing list
Hello,
How can i mattch blanks within words, when i have more phrases?
c("Shangh i", "Hello here i am","h llo")
> gsub(" ","a",c("Shangh i", "Hello here i am","h llo"))
[1] "Shanghai""Helloahereaiaam" "hallo"
I would like to have [1] "Shanghai" "Hello here i am" "hallo"
I hope someo
Hi,
I have a data y~x which looks like an inverse quardratic function, i.e.
y=+/- sqrt(x). So for each x there are two y values due to the +/-
operation. Do you know it is possible to fit a linear model on the data to
fit such a model? How do I write the formula for this case?
Thanks for the
Hallo,
I'm working with the mle function and I would like to ask you a couple
of questions.
My goal is to construct the historical value of v1(t), v2(t) and
v3(t) using the maximum likelihood estimation.
So, I need to optimize the following log-likelihood:
sum(E1_f[t,]*(v1*teta1[] + v2*
Hi there!
Please help me, I am trying to replace all NAs in a data frame with numbers
randomly generated from the beta(0.1,1) distribution. Firstly I tried looping:
MAT <-
c(0.68,9.86,1.29,0.25,5.28,1.13,1.66,0.41,2.65,0.00,11.5,32.67,0.98,3.06,2.97,0.51,13.62,1.23,0.00,1.79,5.89,0.00,10.36,1.20,
Hello,
Any of the two lapply intructions will give what you want. The
difference is in the definition of "decade".
In the first case, it's ten years starting 1592. So the first decade are
the 10 years 1592, 1593, ..., 1601, the second decade are the 10 years
1602, ..., 1611, etc.
In the second
Hi.
I have 2 tables, with same dimensions (8000 x 5). Something like:
tab1:
V1 V2 V3 V4 V5
14.23 1.71 2.43 15.6 127
13.20 1.78 2.14 11.2 100
13.16 2.36 2.67 18.6 101
14.37 1.95 2.50 16.8 113
13.24 2.59 2.87 21.0 118
tab2:
V1 V2 V3 V4 V5
1.23 1.1 2.3 1.6 17
1.20 1.8 2.4 1.2 10
1.1
Thank you professor. I think the minimum value of x^2 between -1 and 1 should
be x=0, y=0. but the result is not that. I am thinking is any wrong with my
thought?
Thanks for helping me out!
--
View this message in context:
http://r.789695.n4.nabble.com/Optimization-problem-tp4663821p4663898.ht
Dear R-help list:
I have two related questions regarding the functions boot.strength and
custom.strength in bnlearn.
1)
I am using the following commands (on a set of continuous data, the
example here run on fake data):
> myblacklist<-data.frame(from=c("x1", "x1", "x1", "x2", "x2",
"x2"))
Hey All,
I have a large dataset and I want to calculate the average of each column
then return a new dataset.
Here is my question: I dont know if there is a function that can allow me
to calculate the average every 60 records of data in the whole dataset, and
return a new data frame. Not sure if
> with(dat, data.frame(X=rep(X, each=2), Y=unlist(strsplit(Y, split=" - "
str_split_fixed would be a bit safer here.
Hadley
--
Chief Scientist, RStudio
http://had.co.nz/
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-
Below.
On Wed, Apr 10, 2013 at 3:58 AM, Dominic Roye wrote:
> Hello,
>
> How can i mattch blanks within words, when i have more phrases?
>
> c("Shangh i", "Hello here i am","h llo")
>
>
>> gsub(" ","a",c("Shangh i", "Hello here i am","h llo"))
> [1] "Shanghai""Helloahereaiaam" "hallo"
>
>
On Apr 10, 2013, at 11:07 AM, Silvano Cesar da Costa wrote:
> Hi.
>
> I have 2 tables, with same dimensions (8000 x 5). Something like:
>
> tab1:
>
> V1 V2 V3 V4 V5
> 14.23 1.71 2.43 15.6 127
> 13.20 1.78 2.14 11.2 100
> 13.16 2.36 2.67 18.6 101
> 14.37 1.95 2.50 16.8 113
> 13.24 2.59 2
Hi,
TRy this:
set.seed(52)
dat1<- as.data.frame(matrix(sample(1:40,100*60,replace=TRUE), nrow=600))
lapply(split(dat1,((seq_len(nrow(dat1))-1)%/% 60)+1),nrow)
#$`1`
#[1] 60
#$`2`
#[1] 60
#$`3`
#[1] 60
res<-lapply(split(dat1,((seq_len(nrow(dat1))-1)%/% 60)+1),colMeans)
res[1:2]
#$`1`
# V1
I just wanted to confirm that Milan's suggestion about adding (*UCP) like in
the example below:
gsub(sprintf("(*UCP)\\b(%s)\\b", "който"), "", "който", perl=TRUE)
solved all problems (under openSuse Linux 12.3 64-bit, R 2.15.2). I reencoded
input files and stop word list in UTF-8, and now stop
Hi,
This could be done in different ways:
tab1<-read.table(text="
V1 V2 V3 V4 V5
14.23 1.71 2.43 15.6 127
13.20 1.78 2.14 11.2 100
13.16 2.36 2.67 18.6 101
14.37 1.95 2.50 16.8 113
13.24 2.59 2.87 21.0 118
",sep="",header=TRUE)
tab2<-read.table(text="
V1 V2 V3 V4 V5
1.23 1.1 2.3 1.6 17
1.20
Hi,
Try this:
which(MAT==0)
#[1] 10 19 22 27 28 34 40 46 51 52
MAT[MAT==0]<-sapply(seq_along(MAT[MAT==0]),function(x)rbeta(1,0.1,1))
MAT
# X1 X2 X3 X4 X5 X6
#1 0.68 9.731207e-14 0.03005021 0.003249449 1.36e+00 1.180602e-03
#2 9.86 1.15e
Thanks so much! it works fine!
But when I convert the result to a data frame, it mess up.
so i have:
res <- data.frame(res)
then i get:
X1 X2 X3 X4 X5 X6
V1 20.95000 22.16667 21.9 21.1 20.35000 19.36667
V2 20.5 19.85000 20.15000 17.5 19.3 2
Hello,
You should provide us with a data example, like the posting guide asks
you to.
Without one, you could adapt the following example to your case
# Make up some data
dat <- data.frame(X = rnorm(200), Y = rnorm(200))
# Divide into subsets of 60 rows each and compute the col means
grp <- r
That is very helpful Rui, thanks so much!
On Wed, Apr 10, 2013 at 1:54 PM, Rui Barradas wrote:
> Hello,
>
> You should provide us with a data example, like the posting guide asks you
> to.
> Without one, you could adapt the following example to your case
>
>
> # Make up some data
> dat <- data.
Hello,
Your thoght is mathematically right but numerically wrong. The result
given by optimize is so close to the real minimum that numerical
accuracy comes in and it becomes indistinguishable from the value you're
expecting.
You get the minimum up to a certain accuracy, not more.
Hope this
Hi,
Is this what you need?
as.data.frame(do.call(rbind,res))
# V1 V2 V3 V4 V5 V6 V7 V8
#1 20.95000 20.5 20.55000 21.1 20.1 18.3 21.1 20.5
#2 22.16667 19.85000 19.7 22.26667 18.8 19.9 18.85000 20.46667
#3 21.90
On Apr 10, 2013, at 13:09 , Sibusiso Ndzukuma wrote:
> Hi there!
>
> Please help me, I am trying to replace all NAs in a data frame with numbers
> randomly generated from the beta(0.1,1) distribution. Firstly I tried looping:
>
> MAT <-
> c(0.68,9.86,1.29,0.25,5.28,1.13,1.66,0.41,2.65,0.00,11.5
Hi,
The pattern is not clear.
In this particular case,
library(stringr)
word1<-c("Shangh i", "Hello here i am","h llo")
word1[str_count(word1," ")==1]<-gsub(" ","a",word1[str_count(word1," ")==1])
word1
#[1] "Shanghai" "Hello here i am" "hallo"
But, this will not work here:
word2<-c(
Hi Jose,
Thanks a lot for your email!
I was told a good solution to label outliers of a boxplot with identifying
variable values of the data frame (instead of the row names).
An example can be seen below:
## R CODE
#DATA
num <- as.numeric(200:225)
ave <- c(0.5, 1, 1.6, 2, 2, 2.3, 2.5, 2.4, 3,
Hi,
Try this:
set.seed(52)
dat1<- as.data.frame(matrix(sample(c(1:40,NA),100*60,replace=TRUE), nrow=600))
res1<-as.data.frame(do.call(rbind,lapply(split(dat1,((seq_len(nrow(dat1))-1)%/%
60)+1),function(x) colMeans(x,na.rm=TRUE
res1
# V1 V2 V3 V4 V5 V6
Hi,
YOu can load all the datasets directly from the directory in a list.
set.seed(25)
lst1<-lapply(1:100,function(i)
as.data.frame(matrix(sample(1:40,25,replace=TRUE),ncol=5)))
length(lst1)
#[1] 100
library(abind)
apply(abind(lst1,along=3),c(1,2),mean)
# V1 V2 V3 V4 V5
#
Hi,
For loading number of datasets, you can use list.files()
Example:
list.files(pattern=".txt")
#[1] "file1.txt" "file2.txt" "file3.txt"
lst2<-lapply(list.files(pattern=".txt"),function(x)
read.table(x,sep="",header=TRUE))
lst2[[1]]
# col1 col2
#1 1 0.5
#2 2 0.2
#3 3 0.3
#4 4
Any help?
Thanks!
2013/4/8 Nicolás Sánchez
> Hello!
>
> Does anyone know how to apply bagging for SVM? ( for example)
>
> I am using adabag package to execute bagging but this method, "bagging",
> works with classification trees. I would like to apply my bagging to other
> classifiers as SVM,RN
Thanks for your comments, David
avg_cost_2012 and asset_2012 are numeric vectors of length 39
while x2 and y1 are longer vectors whose range is about the same as
(avg_cost_2012, asset_2012)
I also present the data by dput below. Is it clear? Thanks,
Miao
asset_2012 avg_cost_2012
1 3973730.0
HI Silvano,
I tried with example set to see whether size is a problem.
set.seed(25)
lst1<-lapply(1:100,function(i)
as.data.frame(matrix(sample(1:100,8000*3,replace=TRUE),ncol=3)))
length(lst1)
system.time(res<-apply(abind(lst1,along=3),c(1,2),mean))
# user system elapsed
# 0.360 0.012
HI Silvano,
No problem.
Just wanted to make sure that it worked.
Regards,
A.K.
- Original Message -
From: Silvano Cesar da Costa
To: arun
Cc:
Sent: Wednesday, April 10, 2013 10:34 PM
Subject: Re: [R] means in tables
Arun,
this code work very well:
setwd('c:/Dados/')
list.files(pa
I am wondering if there is any function or command that could generate a
equation automatically from the fitted results?
For example,
> x<-seq(1:20)
> y<-rnorm(20)
> z<-lm(y~poly(x,4))
> z
Call:
lm(formula = y ~ poly(x, 4))
Coefficients:
(Intercept) poly(x, 4)1 poly(x, 4)2 poly(x, 4)3 poly
On Apr 10, 2013, at 6:11 PM, jpm miao wrote:
Thanks for your comments, David
avg_cost_2012 and asset_2012 are numeric vectors of length 39
while x2 and y1 are longer vectors whose range is about the same as
(avg_cost_2012, asset_2012)
I also present the data by dput below. Is it clear? Th
Dear R help
Don't really understand if there is graph or should be graph.
> library(ggm)
Loading required package: graph
Error: package ‘graph’ could not be loaded
In addition: Warning messages:
1: package ‘ggm’ was built under R version 2.15.3
2: In library(pkg, character.only = TRUE, logica
I just wanted to confirm that Milan's suggestion about adding (*UCP) like in
the example below:
gsub(sprintf("(*UCP)\\b(%s)\\b", "който"), "", "който", perl=TRUE)
solved all problems (under openSuse Linux 12.3 64-bit, R 2.15.2). I reencoded
input files and stop word list in UTF-8, and now stop
Rui, thanks for your reply. You meant that it is the issue of accuracy? So if
I change the numerical accuracy, my results can be output? Thanks a lot!
--
View this message in context:
http://r.789695.n4.nabble.com/Optimization-problem-tp4663821p4663928.html
Sent from the R help mailing list arc
Hi David,
Thanks. How can I make the graph in log scale?
Thanks
Miao
2013/4/11 David Winsemius
>
> On Apr 10, 2013, at 6:11 PM, jpm miao wrote:
>
> Thanks for your comments, David
>
> avg_cost_2012 and asset_2012 are numeric vectors of length 39
>
> while x2 and y1 are longer vectors w
Hello,
The package 'ggm' depends on "graph", "igraph" and "RGBL" packages.
The error message is clear: "there is no package called ‘graph’"
Regards,
Pascal
On 04/11/2013 05:02 AM, Gary wrote:
Dear R help
Don't really understand if there is graph or should be graph.
library(ggm)
Loadin
Hi Silvano,
Just to add:
If you need to use the first option:
set.seed(25)
lst1<-lapply(1:100,function(i)
as.data.frame(matrix(sample(1:100,8000*3,replace=TRUE),ncol=3)))
system.time(res1<-eval(parse(text=paste(paste("lst1","[[",seq_along(lst1),"]]",sep=""),collapse="+")))/length(lst1))
# user
Hi! I've been looking for a way to calculate std errors of marginal effects
when I use interaction terms, but with no success. I pretty much have two
cases: continuous variable * continuous variable, and continuous variable *
binary variable. In both cases, I know how to calculate the marginal
effe
Thank you so much for your assistance. A.K's suggestion is exactly what I was
looking for.
Thanks so much...
On Wed, 10 Apr 2013 23:12:25 +0200 peter dalgaard wrote
> On Apr 10, 2013, at 13:09 , Sibusiso Ndzukuma wrote:
>
> > Hi there!
> >
> > Please help me, I am trying to replace all NAs i
You need to apply the same transformation to the x argument of panel.lines as
you are setting up for the panel.xyplot.
--
David
Sent from my iPhone
On Apr 10, 2013, at 8:10 PM, jpm miao wrote:
> Hi David,
>
>Thanks. How can I make the graph in log scale?
>
>Thanks
>
> Miao
>
90 matches
Mail list logo