Re: [R] field significance test

2021-09-06 Thread ani jaya
and yes I can sleep well now. Thank you, Jim. ne<-rep(0,ne) total<-c(neggg,posss,ne) hist(total) Best, Ani Jaya On Tue, Sep 7, 2021 at 9:38 AM ani jaya wrote: > > Hello Jim, thank you for your response. What I am trying to achieve is > like this: > > #calculate the positive significant station

Re: [R] field significance test

2021-09-06 Thread ani jaya
Hello Jim, thank you for your response. What I am trying to achieve is like this: #calculate the positive significant station for every row based on p-value df5<-df3 df5[df4>0.05|df5<0]<-NA #remove the insignificant one or negative statistic value df5[df5>0]<-1 #change the

[R] spm package is available on CRAN again

2021-09-06 Thread Jin Li
Dear spm users and all, I am glad to inform you that the spm package is available on CRAN again. It is an updated version with a few bugs fixed. Please note that some functions in the package are not only for spatial predictive modelling but also for general predictive modeling. Please feel free

Re: [R] 'Double to logical' error

2021-09-06 Thread Duncan Murdoch
You get this error from this kind of operation on tibbles: library(tibble) t1 <- tibble(x = c(TRUE, FALSE)) t2 <- tibble(x = c(1.2, 1.3)) t1[1,] <- t2[1,] #> Error: Assigned data `t2[1, ]` must be compatible with existing data. #> ℹ Error occurred for column `x`. #> x Can't convert from to due

Re: [R] 'Double to logical' error

2021-09-06 Thread Bill Dunlap
> Run `rlang::last_error()` to see where the error occurred What did rlang::last_error() show? -Bill On Mon, Sep 6, 2021 at 9:19 AM John Tully wrote: > Dear colleagues > > > > in conducting a meta-analysis (of MRI data) I am running into the > repeated issue: > > > > Error: Assigned data

Re: [R] 'Double to logical' error

2021-09-06 Thread Duncan Murdoch
On 06/09/2021 10:16 a.m., John Tully wrote: Dear colleagues in conducting a meta-analysis (of MRI data) I am running into the repeated issue: Error: Assigned data `single_study_df` must be compatible with existing data. ℹ Error occurred for column `accumbens_sd`. x Can't convert from to

[R] 'Double to logical' error

2021-09-06 Thread John Tully
Dear colleagues > > in conducting a meta-analysis (of MRI data) I am running into the repeated > issue: > > Error: Assigned data `single_study_df` must be compatible with existing data. > ℹ Error occurred for column `accumbens_sd`. x Can't convert from to > due to loss of precision. *

Re: [R] ggsave() with width only

2021-09-06 Thread Duncan Murdoch
On 06/09/2021 11:06 a.m., Ivan Calandra wrote: Yes Jeff, you are right. I hate manually editing figures too, but sometimes I find it's still the easiest way (e.g. when you submit your paper several times when journals have differing guidelines, or when you build figures from several (sub)plots +

Re: [R] ggsave() with width only

2021-09-06 Thread Ivan Calandra
Yes Jeff, you are right. I hate manually editing figures too, but sometimes I find it's still the easiest way (e.g. when you submit your paper several times when journals have differing guidelines, or when you build figures from several (sub)plots + other images, or when you combine plots that

Re: [R] ggsave() with width only

2021-09-06 Thread Jeff Newmiller
I don't always use rmarkdown to write papers either, but you can capture figures from it. I avoid hand editing figures like the plague of irreproducibility. But sometimes you get stuck in an approach... I cannot answer your original post, but wanted to point out that it may not actually be

Re: [R] ggsave() with width only

2021-09-06 Thread Ivan Calandra
Thank you Jeff for your answer. I do use rmarkdown but I do not write papers completely with it. I do output a report in HTML but I also like to export the plots as PDF so that I can edit them (using Inkscape or similar) if and as needed. And because I like to have both the HTML report

Re: [R] ggsave() with width only

2021-09-06 Thread Jeff Newmiller
I use an rmarkdown file to generate consistent output figures and tables for html or Word. I just use Rnw files directly if I am generating LaTeX. I do not use R files for building output... and I never use ggsave. So you might consider altering your approach to bypass the question entirely.

[R] ggsave() with width only

2021-09-06 Thread Ivan Calandra
Dear useRs, I produce several independent ggplot2 plots and I would like to save them to a fixed width (for publications), but the height (and therefore aspect ratio) is different from plot to plot. How can I save my plots with ggsave() supplying only a fixed width but without knowing the

Re: [R] Splitting a data column randomly into 3 groups

2021-09-06 Thread AbouEl-Makarim Aboueissa
Hi Bert and All: good morning I promise this would be the last time to write about this topic. I come up with this R function (please see below), for sure with your help. It works for all sample sizes. I also provided three different simple examples. with many thanks abou ##

Re: [R] field significance test

2021-09-06 Thread Jim Lemon
HI Ani, I would create these two matrices: # matrix of logicals for positive stat values posvalue<-df3 > 0 # matrix of logicals for significance sigstat<-df4 < 0.05 Then you can identify the positive/negative and significant values: which(posvalue & sigstat) [1] 12 which(!posvalue & sigstat)

Re: [R] combining geom_boxplot and geom_point with jitter

2021-09-06 Thread Ivan Calandra
Thank you very much Rui! -- Dr. Ivan Calandra Imaging lab RGZM - MONREPOS Archaeological Research Centre Schloss Monrepos 56567 Neuwied, Germany +49 (0) 2631 9772-243 https://www.researchgate.net/profile/Ivan_Calandra On 04/09/2021 18:22, Rui Barradas wrote: Hello, The problem is that you

[R] field significance test

2021-09-06 Thread ani jaya
Dear r-list member, I want to plot a histogram that shows a number of station that have a significant statistic (positive or negative) based on the value itself and its p-value. df3 shows the test statistic value (column shows the station and rows show the result from the resample matrix