gmane.comp.lang.r.general
http://blog.gmane.org/gmane.comp.lang.r.general
hourly11901-01-01T00:00+00:00Gmanehttp://gmane.org/img/gmane-25t.png
http://gmane.org
mvpart package
http://comments.gmane.org/gmane.comp.lang.r.general/331575
<pre>Does anybody know why mvpart package (for multivariate regression trees) is
not available on the web?
Thanks in advanced,
Joaquín.
</pre>Joaquín Aldabe2016-06-30T19:43:39Merge several datasets into one
http://comments.gmane.org/gmane.comp.lang.r.general/331574
<pre>Hi R users,
I'd like to ask that how to merge several datasets into one in R? I put
these csv files in one folder, and use the lapply function, but it says
that cannot open file 'xx.csv'. These files have different names, but end
with .csv extension, and the files have the same header. Thanks for your
help.
[[alternative HTML version deleted]]
</pre>lily li2016-06-30T19:26:07Command to combine means?
http://comments.gmane.org/gmane.comp.lang.r.general/331562
<pre>Dear all,
I'm newbie with R (changing from STATA), and I can't find some commands.
One of those is the "combine", which I use to combine means like this:
--------------------------------------------
n1 m1 sd1 n2 m2 sd2
combine 12 3 1 34 45 4
Combine has calculated the following values:
combined n = 46
combined mean = 34.043478
combined SD = 18.964829
--------------------------------------------
Does anybody knows a simmilar command in R to combine means?
Thanks in advance.
Carlos.
[[alternative HTML version deleted]]
</pre>Carlos R. Moreira Maia2016-06-30T15:02:50Documenting data
http://comments.gmane.org/gmane.comp.lang.r.general/331561
<pre>I am studying statistics and using R in doing it. I come from software development where we document everything we do.
As I “massage” my data, adding columns to a frame, computing on other data, perhaps cleaning, I feel the need to document in detail what the meaning, or background, or calculations, or whatever of the data is. After all it is now derived from my raw data (which may have been well documented) but it is “new.”
Is this a real problem? Is there a “best practice” to address this?
Thanks!
Pito Salas
Brandeis Computer Science
Feldberg 131
______________________________________________
R-help< at >r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.</pre>Pito Salas2016-06-30T14:51:05rpart - plotcp find specificity and sensitivity
http://comments.gmane.org/gmane.comp.lang.r.general/331560
<pre>Hi,
I am using rpart to build a decision tree, I am then using printcp to find
the cross-validation error (xerror) of different splits of the decision
tree.
I was wondering how I can use the rpart package to find sensitivity (false
negative) and specificity (false positive) of cross-validation folds?
In addition I was wondering how many cross-validation folds does printcp
uses?
Thanks for your help.
Regards,
Parsa
[[alternative HTML version deleted]]
</pre>Parsa Akbari2016-06-30T13:15:42lineplot.CI xaxis scale change in sciplot?
http://comments.gmane.org/gmane.comp.lang.r.general/331559
<pre>Hi,
I am trying to change the values of the tick marks on the xaxis of the following multipanel plot (see relevant bits of script below) to increments of 50 or to a custom scale (ie. 50, 100, 150, 200, 300...).
So far I tried using xaxp or xlim both in par() or lineplot.CI(), as well as axTicks and axisTicks but did not get it to work.
Suggestions?
#Plots average A/Ci for each day from ACi
#Parameters of the panels
par(mfcol=c(3,2), #row,col
mar=c(2,2,1,1), #inner margin (bottom, left, top, right)
oma=c(4,4,1,1), #outer margin (bottom, left, top, right)
omd=c(0.1,0.8,0.1,0.95), #outer dimensions, values {0-1}, (x1, x2, y1, y2)
xpd=NA)
...
#PAR = 1000, Day2
with(subset1000_2,
lineplot.CI(x.factor=Ci.average,
response=Photo,
group=Treatment,
ylab=NA,
xlab=NA,
legend=FALSE,
type="p",
x.cont=TRUE, #continuous x axis (spacing proportional to values)
ylim</pre>Clemence Henry2016-06-30T02:04:22Writing a formula to Excel
http://comments.gmane.org/gmane.comp.lang.r.general/331557
<pre>Hi All,
I am using excel.link to work seemslessly with Excel.
In addition to values, like numbers and strings, I would like to insert a
full operational formula into a cell.
xlc["G14"] <- print(paste("=G9*100/G6"), quote = FALSE)
The strings is put into the cell, but the cell is not evaluated. Thus the
string is show as result of the computation.
If I open that cell b pressing "F2" or by double-clicking the cell and
pressing RETURN will start the evaluation of the expession.
xlc["G14"] <- parse("=G9*100/G6") # does not run
How can I put a formula into Excel that is evaluated right away?
Kind regards
Georg
</pre>G.Maubach< at >weinwolf.de2016-06-30T12:34:28Can I increase the size of an asterisk in plotmath()?
http://comments.gmane.org/gmane.comp.lang.r.general/331545
<pre>
I am trying to plot an expression of the form "p^*" --- a bold letter p
with the asterisk as a superscript.
I can get *something* with code of the form
plot(1:10)
text(7.5,2.5,expression(paste(bolditalic(p)^"*")))
but the asterisk that appears is *tiny*.
Is there any way to increase its size? (I expect not, but I just
thought I'd ask!)
cheers,
Rolf Turner
</pre>Rolf Turner2016-06-30T00:38:43data.table: “group counter” with NAs
http://comments.gmane.org/gmane.comp.lang.r.general/331541
<pre>Hello,
I would like to add a counter column in a data frame based on a set of identical rows. To do this, I tested:
DF = data.table(x=c("a","a","a","b","c","d","e","f","f"), y=c(1,3,2,8,8,4,NA,NA,NA))
DF[ , Index := .GRP, by = c("y") ]
DF
However, the rows with NAs are considered to be identical.
So, how can I obtain:
x y Index
1: a 1 1
2: a 3 2
3: a 2 3
4: b 8 4
5: c 8 4
6: d 4 5
7: e NA 6
8: f NA 7
9: f NA 8
Instead of:
x y Index
1: a 1 1
2: a 3 2
3: a 2 3
4: b 8 4
5: c 8 4
6: d 4 5
7: e NA 6
8: f NA 6
9: f NA 6
Thank you very much for your time.
Have a nice day
Marine
[[alternative HTML version deleted]]
</pre>Marine Regis2016-06-29T22:32:26ggplot2 stat_smooth
http://comments.gmane.org/gmane.comp.lang.r.general/331536
<pre>I want to add a logistic plot to data.
My call to ggplot is:
ggplot(data = SSI.dt, aes(x = elapsed, y = 1 - control)) + geom_point() +
stat_smooth(method = 'glm', family = binomial) +
xlab('Surgery Duration (min)') + ylab('Probability SSI') +
labs(title = 'THA Surgical Site Infections')
ggsave(filename = 'Plots/SSI.Duration.pdf’)
An error message is returned: Unknown parameters: family
Removing “family = binomial” returns a straight line with points appropriately placed on y = 0 and y = 1.
I found some previous messages on markmail that listed my call as the correct syntax structure.
I’d appreciate thoughts/pointers.
Nathan
</pre>Nathan Pace2016-06-29T21:17:59linking vignettes in a man page
http://comments.gmane.org/gmane.comp.lang.r.general/331533
<pre>Dear list,
How can I link a vignette of a package in a man page (Rd files)?
I try \link[=pkgname/doc/filename]{a name} without success.
The link gives the following error message: Only help files, NEWS, DESCRIPTION and files under doc/ and demo/ in a package can be viewed
Thanks in advance
Kind regards, Christophe
---------------------------------------
Christophe Dutang
LMM, UdM, Le Mans, France
web: http://dutangc.free.fr
</pre>Christophe Dutang2016-06-29T20:49:35Understanding and predict round-off errors sign on simplefunctions
http://comments.gmane.org/gmane.comp.lang.r.general/331509
<pre>Hi,
May be it is a basic thing but I would like to know if we can anticipate
round-off errors sign.
Here is an example :
# numerical matrix
m <- matrix(data=cbind(rnorm(10, 0), rnorm(10, 2), rnorm(10, 5)), nrow=10,
ncol=3)
[,1] [,2] [,3]
[1,] 0.4816247 1.1973502 3.855641
[2,] -1.2174937 0.7356427 4.393279
[3,] 0.8504074 2.5286509 2.689196
[4,] 1.8048642 1.8580804 6.665237
[5,] -0.6749397 1.0944277 4.838608
[6,] 0.8252034 1.5595268 3.681695
[7,] 1.3002208 0.9582693 4.561577
[8,] 1.6950923 3.5677921 6.005078
[9,] 0.6509285 0.9025964 5.082288
[10,] -0.5676040 1.3281102 4.446451
#weird moving average of period 1 !
mma <- apply(m, 2, SMA, n=1)
[,1] [,2] [,3]
[1,] NA NA NA
[2,] -1.2174937 0.7356427 4.393279
[3,] 0.8504074 2.5286509 2.689196
[4,] 1.8048642 1.8580804 6.665237
[5,] -0.6749397 1.0944277 4.838608
[6,] 0.8252034 1.5595268 3.681695
[7,] 1.3002208 0.9582693 4.561577
[8,] 1.6950923 3.567</pre>Sirhc via R-help2016-06-29T09:55:55Installing from source on Windows 7: tibble
http://comments.gmane.org/gmane.comp.lang.r.general/331507
<pre>Hi All,
I would like to install R packages from source on Windows 7 64-Bit.
Currently my settings are:
</pre>G.Maubach< at >weinwolf.de2016-06-29T09:49:13Splitting data.frame into a list of small data.frames givenindices
http://comments.gmane.org/gmane.comp.lang.r.general/331506
<pre>It's the inverse problem to merging a list of data.frames into a large
data.frame just discussed in the "performance of do.call("rbind")"
thread
I would like to split a data.frame into a list of data.frames
according to first column.
This SEEMS to be easily possible with the function base::by. However,
as soon as the data.frame has a few million rows this function CAN NOT
BE USED (except you have A PLENTY OF TIME).
for 'by' runtime ~ nrow^2, or formally O(n^2) (see benchmark below).
So basically I am looking for a similar function with better complexity.
> nrows <- c(1e5,1e6,2e6,3e6,5e6)
+ dum <- peaks[1:i,]
+ timing[[length(timing)+1]] <- system.time(x<- by(dum[,2:3],
INDICES=list(dum[,1]), FUN=function(x){x}, simplify = FALSE))
+ }
$`1e+05`
user system elapsed
0.05 0.00 0.05
$`1e+06`
user system elapsed
1.48 2.98 4.46
$`2e+06`
user system elapsed
7.25 11.39 18.65
$`3e+06`
user system elapsed
16.15 25.81 41.99
$`5e+06`
user system elapsed
43.22</pre>Witold E Wolski2016-06-29T09:16:56Can R read Word fonts and comments?
http://comments.gmane.org/gmane.comp.lang.r.general/331493
<pre>Hi,
From time to time I highlight the word documents with red/blue color or
italic/bold fonts, and I also add comments to a file. Is there a
package/function to let R extract the italic/bold blue/red words and
comments from a docx/doc file?
I am aware that there are a few packages reading Word, but don't know
which one is able to do it.
Thanks,
John
[[alternative HTML version deleted]]
</pre>John2016-06-28T22:53:53termplot intervals - SE or CI?
http://comments.gmane.org/gmane.comp.lang.r.general/331489
<pre>Hello,
A reviewer queried what the intervals were on the termplot I provided in a report. The help file for termplot() suggests they're standard errors (se=T), but in the code the se.fit values from predict() are multiplied by 2, suggesting it's a rough 95% confidence interval, is that right?
Many thanks,
Eric Goodwin
Scientific data analyst | Coastal and Freshwater Group
Cawthron Institute
Phone +64 (0)3 548 2319 | Mobile 027 439 1141
eric.goodwin< at >cawthron.org.nz<mailto:eric.goodwin< at >cawthron.org.nz> | www.cawthron.org.nz<http://www.cawthron.org.nz/>
#####################################################################################
Note:
This message is for the named person's use only. It may...{{dropped:18}}
</pre>Eric Goodwin2016-06-28T20:53:09Rpart plot produces no text
http://comments.gmane.org/gmane.comp.lang.r.general/331488
<pre>I am using R Studio and am able to fit a tree with RPlot, however, the tree in the viewer has no text (see image attached).
Jim Thompson
This e-mail message is for the sole use of the intended recipient and may contain information that is confidential, proprietary or privileged. Any unauthorized review, use, distribution, copying or disclosure is strictly prohibited. If you are not the intended recipient, or the employee or agent responsible for delivering it to the intended recipient, please notify sender of the delivery error by replying to this message and then delete it from your system. Receipt by anyone other than the intended recipient is not a waiver of confidentiality or privilege.
</pre>Thompson, James2016-06-28T20:26:59Calculating Value at Risk
http://comments.gmane.org/gmane.comp.lang.r.general/331482
<pre>Dear all,
As I am working on Value at Risk, I am looking for an appropriate package to calculate Value at Risk using different methods beyond the historical method. In doing so, I have found the package jvnVaR which provides several methods to calculate VaR. Nevertheless, I am interested in calculating the Monte Carlo VaR and the GARCH (1,1) VaR.
Does anybody know another package which provides functions to calculate VaR?
Kind regards
[[alternative HTML version deleted]]
</pre>T.Riedle2016-06-28T20:40:55Not able to install RODBC package
http://comments.gmane.org/gmane.comp.lang.r.general/331481
<pre>Installing package into ‘/home/vivek/R/x86_64-pc-linux-gnu-library/3.0’
(as ‘lib’ is unspecified)
Warning: unable to access index for repository
https://cloud.r-project.org/src/contrib
Warning message:
package ‘RODBC’ is not available (for R version 3.0.2)
Please suggest any way to either install the package or use another package
to connect MySQL database from R.
Regards,
Vivek Kumar Singh
PhD student,
Information Systems Decision Sciences,
MUMA College of Business,
USF
Phone- (813) 5809131
Web: http://vivek4.myweb.usf.edu/
[[alternative HTML version deleted]]
______________________________________________
R-help< at >r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.</pre>Vivek Singh2016-06-28T20:36:47t-test for regression estimate
http://comments.gmane.org/gmane.comp.lang.r.general/331475
<pre>test option for linearHypothesis in library(car) include "Chisq" and
"F". I prefer a simple t-test so that I can retrieve the standard error.
Any options other than linearHypothesis to test the linear hypothesis
(with 1 restriction/degree of freedom)?
> summary(ols1)
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.20013 0.09199 -2.176 0.0298 *
age 0.04054 0.01721 2.355 0.0187 *
suburb 0.01911 0.05838 0.327 0.7435
smcity -0.29969 0.19175 -1.563 0.1184
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
> linearHypothesis(ols1,"suburb")
Linear hypothesis test
Hypothesis:
suburb = 0
Model 1: restricted model
Model 2: polideo ~ age + suburb + smcity
Res.Df RSS Df Sum of Sq F Pr(>F)
1 888 650.10
2 887 650.02 1 0.078534 0.1072 0.7435
[[alternative HTML version deleted]]
______________________________________________
R-help< at >r-project.org mailing list -- To UNSUBSCRIBE and</pre>Steven Yen2016-06-28T16:26:52(sin asunto)
http://comments.gmane.org/gmane.comp.lang.r.general/331473
<pre>Excuse me, I want to change my e-mail adress, where I receive your e-mails. Can you help me?
[[alternative HTML version deleted]]
</pre>Monse Buenaño2016-06-28T09:46:19Search EngineSearch the mailing list at Gmanequery
http://search.gmane.org/?group=$group=gmane.comp.lang.r.general