Re: [R] Code editor for writing R code

2023-11-30 Thread Dr Eberhard W Lisse
Sublime Text. On all platforms. On 29/11/2023 17:57, Christofer Bogaso wrote: > Hi, > > Currently I use VS-Code to write codes in R. While it is very good, it > does not allow me to write Latex expressions in comments, which I am > willing to have to write corresponding mathematical expressions

Re: [R] Code editor for writing R code

2023-11-30 Thread Ivan Krylov
В Wed, 29 Nov 2023 21:27:37 +0530 Christofer Bogaso пишет: > Does there exist any Code editor for R, that allows me to write Latex > in comments? While I cannot guarantee that you'll like it, may I suggest GNU Emacs? Its R support is provided by the ESS package , and

Re: [R] Code editor for writing R code

2023-11-29 Thread Duncan Murdoch
Ko wrote: TeX Comments extension in VS Code Sent from my phone Original message From: Christofer Bogaso Date: Wed, 29 Nov 2023, 15:57 To: r-help Subject: [R] Code editor for writing R code Hi, Currently I use VS-Code to write codes in R. While it is very good, it does

Re: [R] Code editor for writing R code

2023-11-29 Thread Jeff Newmiller via R-help
> > >> > >> > Original message >> > From: Christofer Bogaso >> > Date: Wed, 29 Nov 2023, 15:57 >> > To: r-help >> > Subject: [R] Code editor for writing R code >> > >> > Hi, >> > >> > Curr

Re: [R] Code editor for writing R code

2023-11-29 Thread Eric Berger
Wed, Nov 29, 2023 at 9:34 PM Sergei Ko wrote: > > > > TeX Comments extension in VS Code > > > > > > > > > > Sent from my phone > > > > > > Original message > > From: Christofer Bogaso > > Date: Wed, 29

Re: [R] Code editor for writing R code

2023-11-29 Thread Christofer Bogaso
Wed, 29 Nov 2023, 15:57 > To: r-help > Subject: [R] Code editor for writing R code > > Hi, > > Currently I use VS-Code to write codes in R. While it is very good, it > does not allow me to write Latex expressions in comments, which I am > willing to have to write correspon

Re: [R] Code editor for writing R code

2023-11-29 Thread Bert Gunter
This might be of use to you: https://everyday.codes/tutorials/how-to-use-latex-in-rmarkdown/ -- Bert On Wed, Nov 29, 2023 at 8:21 AM Bert Gunter wrote: > > I believe RMarkdown can use and render latex comments. RStudio/Posix > provides ide extensions (e.g. R Notebooks) that seem to do what you

Re: [R] Code editor for writing R code

2023-11-29 Thread Bert Gunter
I believe RMarkdown can use and render latex comments. RStudio/Posix provides ide extensions (e.g. R Notebooks) that seem to do what you want, but I have no experience with them. As Ben suggested, there are likely others, depending on exactly what you want to do. -- Bert On Wed, Nov 29, 2023 at

Re: [R] Code editor for writing R code

2023-11-29 Thread Eric Berger
Another direction would be to replace your R script (.R file) with a Quarto document (.qmd file). VS-code has good support for Quarto and you could intersperse your Latex with R chunks. On Wed, Nov 29, 2023 at 6:15 PM Ben Bolker wrote: > > > >Presumably there's nothing stopping you

Re: [R] Code editor for writing R code

2023-11-29 Thread Ben Bolker
Presumably there's nothing stopping you *writing* LaTeX in comments -- do you want a code editor that will render and display the LaTeX as you write? (Or am I misunderstanding something?) Does anyone do classic literate programming *sensu* Knuth any more?

[R] Code editor for writing R code

2023-11-29 Thread Christofer Bogaso
Hi, Currently I use VS-Code to write codes in R. While it is very good, it does not allow me to write Latex expressions in comments, which I am willing to have to write corresponding mathematical expressions as comments in my code files. Does there exist any Code editor for R, that allows me to

Re: [R] Problem in R code

2023-11-09 Thread Ivan Krylov
В Wed, 8 Nov 2023 16:03:15 +0530 Crown Flame пишет: > for(i in 1:8) > { > LST_city <- extract(LST, c(lon[i],lat[i]), fun = mean, buffer = > 1, na.rm = TRUE) #error > } Three things you might need to change: 1. You are trying to assign the output of extract() to the same variable

[R] Problem in R code

2023-11-09 Thread Crown Flame
Good afternoon, I have been working on my thesis project on the topic "Urban Heat Island Pattern in India". To achieve the results I am applying a* two-dimensional Gaussian fit* on an LST raster of 1 km spatial resolution but I am facing two errors in the following code. library(raster) LST <-

Re: [ESS] run R code upon starting each ESS session

2023-10-03 Thread Manuel Teodoro via ESS-help
2 PM, Manuel Teodoro via ESS-help wrote: > > Is there a way to run R code upon starting each ESS session? > > > > Hi Manuel, > > ESS provides a hook you can use for this purpose. This is described in the > manual: > > https://ess.r-project.org/Manual/ess.html#Customizing-sta

Re: [ESS] run R code upon starting each ESS session

2023-10-03 Thread Tyler Smith via ESS-help
On Tue, Oct 3, 2023, at 12:52 PM, Manuel Teodoro via ESS-help wrote: > Is there a way to run R code upon starting each ESS session? > Hi Manuel, ESS provides a hook you can use for this purpose. This is described in the manual: https://ess.r-project.org/Manual/ess.html#Customizing-s

Re: [ESS] run R code upon starting each ESS session

2023-10-03 Thread Dirk Eddelbuettel via ESS-help
On 3 October 2023 at 18:52, Manuel Teodoro via ESS-help wrote: | Is there a way to run R code upon starting each ESS session? | | Something like Rprofile but I'd like to make it more dependent to emacs. | | What I want is to have a few options settings in my R sessions by default. | Since I

[ESS] run R code upon starting each ESS session

2023-10-03 Thread Manuel Teodoro via ESS-help
Is there a way to run R code upon starting each ESS session? Something like Rprofile but I'd like to make it more dependent to emacs. What I want is to have a few options settings in my R sessions by default. Since I use it in different computers but my Emacs configuration is shared among all

Re: [R] R Code Execution taking forever

2022-04-24 Thread Paul Bernal
n with run time and trial size should let you > estimate run time for 1 million. > > > Tim > > -Original Message- > From: R-help On Behalf Of Rui Barradas > Sent: Sunday, April 24, 2022 5:44 AM > To: Paul Bernal ; R > Subject: Re: [R] R Code Execution ta

Re: [R] R Code Execution taking forever

2022-04-24 Thread Ebert,Timothy Aaron
ial size should let you estimate run time for 1 million. Tim -Original Message- From: R-help On Behalf Of Rui Barradas Sent: Sunday, April 24, 2022 5:44 AM To: Paul Bernal ; R Subject: Re: [R] R Code Execution taking forever [External Email] Hello, I'm having trouble running the c

Re: [R] R Code Execution taking forever

2022-04-24 Thread Rui Barradas
Hello, Thanks for the link, the package is TeachingDemos, it's the function that's named dice. And the source code shows that it calls sample() in a way similar to mine, so the code I posted should give approximately the same results. To run just once, change to K <- 1L, right before the

Re: [R] R Code Execution taking forever

2022-04-24 Thread Rui Barradas
Hello, I'm having trouble running the code, where does function dice come from? CRAN package dice only has two functions, getEventProb getSumProbs not a function dice. Can you post a link to where the package/function can be found? Rui Barradas Às 02:00 de 24/04/2022, Paul Bernal escreveu:

Re: [R] R Code Execution taking forever

2022-04-23 Thread Jim Lemon
HI Paul, I had a problem a bit like this when trying to implement the Lim-Wolfe imputation for ranks. The size of the output matrix increases exponentially with the size of the initial matrix and it goes into disk-swapping slow motion. It works for small matrices, but rapidly runs out of memory. I

Re: [R] Naming files within R code

2022-03-20 Thread Rui Barradas
Hello, You can read in the files in a `lapply` loop, assign the result to a list, say df_list, and names(df_list) <- c("tay","forth","don") list2env(df_list, envir = globalenv()) This creates 3 data.frames with those names in the global environment. Hope this helps, Rui Barradas Às 22:02

[R] Naming files within R code

2022-03-20 Thread Nick Wray
HelloI have data from various Scottish river catchments in the form of csv files. I want to be able to download the files in turn and refer to each one by an assigned name from a vector of names, but within R. So, for example, if my vector of names is c("tay","forth","don") I want to tell R

Re: [R] Repeating a R code and counting how many repetitions working

2021-12-11 Thread varin sacha via R-help
Dear Rui, Many thanks, I got it now, thanks. In my R code, I have moved the replication term N <-1000 out <- replicate(N, { This time I get what I am looking for. library(boot) s<- sample(178:798, 1, replace=TRUE) mean(s) N <

Re: [R] Repeating a R code and counting how many repetitions working

2021-12-11 Thread Rui Barradas
r mean(.) is a mean of an indicator function given by a logical conjunction. And there are only TRUE's. Hope this helps, Rui Barradas Às 15:37 de 11/12/21, varin sacha escreveu: Dear Rui, I really thank you a lot for your response. Even if I don't fully understand your R code, there i

Re: [R] Repeating a R code and counting how many repetitions working

2021-12-11 Thread varin sacha via R-help
Dear Rui, I really thank you a lot for your response. Even if I don't fully understand your R code, there is something strange happening while running the code. Indeed, I have run this R code here below 20 times and I always got the same answer : [1] 1

Re: [R] Repeating a R code and counting how many repetitions working

2021-12-11 Thread Rui Barradas
mean(s) & mean(s) < out[2,]) Hope this helps, Rui Barradas Às 10:47 de 11/12/21, varin sacha via R-help escreveu: Dear R-experts, Here below my R code. I am trying to do 2 things : 1) I would like to repeat this R code 1 times 2) Out of the 1 repetitions I would have l

[R] Repeating a R code and counting how many repetitions working

2021-12-11 Thread varin sacha via R-help
Dear R-experts, Here below my R code. I am trying to do 2 things : 1) I would like to repeat this R code 1 times 2) Out of the 1 repetitions I would have liked R to tell me how many times the "true" mean value of the population called "s" in my R example her

Re: [R] Code problem with R/Microeconomics

2021-11-01 Thread Eric Berger
Hi Olga, There are many people reading this list who are happy to try to help. Please provide some additional information about what you are trying to do and where you are stuck. Good luck, Eric On Mon, Nov 1, 2021 at 9:49 PM Olga Pervushina wrote: > > > Dear Sir/Madam, > > I am working on a

[R] Code problem with R/Microeconomics

2021-11-01 Thread Olga Pervushina
Dear Sir/Madam, I am working on a statistical evaluation with R at the Erasmus University and have a problem with one coding sentense. Who can help me with that? Thank you. Kind regards, Olga Pervushina [[alternative HTML version deleted]]

Re: [R] R code in RData

2021-10-28 Thread Martin Maechler
> Bert Gunter > on Wed, 27 Oct 2021 10:47:14 -0700 writes: > See ?load, but you may be confused. Strictly speaking, there is no code in > an .Rdata file, only a (typically binary, but possibly ascii) > representation of objects, usually as produced by ?save. Of course,

Re: [R] R code in RData

2021-10-28 Thread Martin Maechler
y" comic strip ) >> >> >> On Wed, Oct 27, 2021 at 10:18 AM Bogdan Tanasa wrote: >> >>> Dear all, would you please advice : >>> >>> I have an Rdata file, what is the way to print the R code that has been

Re: [R] R code in RData

2021-10-27 Thread Jeff Newmiller
ert Gunter > >"The trouble with having an open mind is that people keep coming along and >sticking things into it." >-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) > > >On Wed, Oct 27, 2021 at 10:18 AM Bogdan Tanasa wrote: > >>

Re: [R] R code in RData

2021-10-27 Thread Bert Gunter
would you please advice : > > I have an Rdata file, what is the way to print the R code that has been > used inside the Rdata file ? > > thank you, > > Bogdan > > [[alternative HTML version deleted]] > > __ > R

[R] R code in RData

2021-10-27 Thread Bogdan Tanasa
Dear all, would you please advice : I have an Rdata file, what is the way to print the R code that has been used inside the Rdata file ? thank you, Bogdan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] [R Code] Split long names in format.ftable

2021-09-17 Thread Leonard Mada via R-help
Dear List members, I have uploaded an improved version on Github. The function is now fully functional: - justify: left, right, cent...: TODO centre vs center; - sep: separator when printing; - pos: Top, Bottom; TODO: Middle; see: https://github.com/discoleo/R/blob/master/Stat/Tools.Data. I

Re: [R] [R Code] Split long names in format.ftable

2021-09-15 Thread Leonard Mada via R-help
Dear List members, I have uploaded an improved version on Github: - new option: align top vs bottom; Functions: split.names: splits and aligns the names; merge.align: aligns 2 string matrices; ftable2: enhanced version of format.ftable (proof of concept); see:

[R] [R Code] Split long names in format.ftable

2021-09-14 Thread Leonard Mada via R-help
Dear List members, I wrote some code to split long names in format.ftable. I hope it will be useful to others as well. Ideally, this code should be implemented natively in R. I will provide in the 2nd part of the mail a concept how to actually implement the code in R. This may be

Re: [R] showing the complexity of r code.....

2021-08-27 Thread Jiefei Wang
Hi, It all depends on the R skill level of your audience. If they are also programmers, show them your Github page and a list of the packages you made would be great. If they do not have any R experience, do some work on R shiny, tell them you can do all kinds of magic things with the data, and

Re: [R] showing the complexity of r code.....

2021-08-27 Thread Eric Berger
One approach would be to put some (non-confidential) projects on a site such as GitHub so that people can examine your work. Sent from my iPhone > On 27 Aug 2021, at 9:18, akshay kulkarni wrote: > > dear members, >I am a stock trader and a data science freelancer.

[R] showing the complexity of r code.....

2021-08-27 Thread akshay kulkarni
dear members, I am a stock trader and a data science freelancer. I am weighing the advantages of taking a R course in coursera to show my proficiency in R in some freelancing sites. But I have already done extensive research on Stock trading and data science, using

Re: [ESS] how to change default emacs behavior, upon running R code, from 2 side-by-by side frames to top-and-bottom frames?

2020-11-10 Thread Marc Schwartz via ESS-help
vided here on the list some time ago, and perhaps there is a more recent incantation, if things have changed since then. Regards, Marc Schwartz > On Nov 10, 2020, at 8:37 AM, Tyler Smith via ESS-help > wrote: > > Christopher W. Ryan via ESS-help writes: > >> When I execute

Re: [ESS] how to change default emacs behavior, upon running R code, from 2 side-by-by side frames to top-and-bottom frames?

2020-11-10 Thread Tyler Smith via ESS-help
Christopher W. Ryan via ESS-help writes: When I execute a line of R code, the R buffer opens up as expected, but it opens in a frame adjacent to the frame containing my source buffer. I would like it to open the R buffer as a frame below my source code, rather than adjacent to it. How can

Re: [ESS] how to change default emacs behavior, upon running R code, from 2 side-by-by side frames to top-and-bottom frames?

2020-11-09 Thread Jeremie Juste via ESS-help
Hello, > When I execute a line of R code, the R buffer opens up as expected, but > it opens in a frame adjacent to the frame containing my source buffer. I > would like it to open the R buffer as a frame below my source code, > rather than adjacent to it. This section of the d

[ESS] how to change default emacs behavior, upon running R code, from 2 side-by-by side frames to top-and-bottom frames?

2020-11-09 Thread Christopher W. Ryan via ESS-help
I'm running, on Windows 10, Vince Goulet's version of emacs/ess, which includes GNU Emacs 26.3 (build 1, x86_64-w64-mingw32)  of 2019-08-29 When I execute a line of R code, the R buffer opens up as expected, but it opens in a frame adjacent to the frame containing my source buffer. I would

Re: [R] securing R code....

2020-10-27 Thread PIKAL Petr
kulkarni > Sent: Monday, October 26, 2020 3:18 PM > To: R help Mailing list > Subject: [R] securing R code > > dear members, > I am a stock trader. I am using R for my research. > > I want to service my laptop, wherein resides all my R

Re: [R] securing R code....

2020-10-26 Thread Eric Berger
stock trader. I am using R for my > research. > > > > I want to service my laptop, wherein resides all my R code, which, for > obvious reasons, has to be secured. I am using Windows 7 Ultimate. > > > > I cannot encrypt the R data by Bitdefender, as it encrypts the entire &g

Re: [R] securing R code....

2020-10-26 Thread David Winsemius
On 10/26/20 7:17 AM, akshay kulkarni wrote: dear members, I am a stock trader. I am using R for my research. I want to service my laptop, wherein resides all my R code, which, for obvious reasons, has to be secured. I am using Windows 7 Ultimate. I cannot

Re: [R] securing R code....

2020-10-26 Thread Bert Gunter
ot;Bloom County" comic strip ) On Mon, Oct 26, 2020 at 7:18 AM akshay kulkarni wrote: > dear members, > I am a stock trader. I am using R for my > research. > > I want to service my laptop, wherein resides all my R code, which, for > obvious

[R] securing R code....

2020-10-26 Thread akshay kulkarni
dear members, I am a stock trader. I am using R for my research. I want to service my laptop, wherein resides all my R code, which, for obvious reasons, has to be secured. I am using Windows 7 Ultimate. I cannot encrypt the R data by Bitdefender, as it encrypts

Re: [R] Help in R code

2020-10-18 Thread Martin Møller Skarbiniks Pedersen
I think you first should read and understand this: https://stackoverflow.com/help/minimal-reproducible-example and https://stackoverflow.com/help/how-to-ask On Sun, Oct 18, 2020, 11:57 Faheem Jan via R-help wrote: > Good morning, Please help me to code this code in R. > I working in the

[R] Help in R code

2020-10-18 Thread Faheem Jan via R-help
Good morning,  Please help me to code this code in R. I working in the multivariate time series data, know my objective is that to one year forecast of the hourly time series data, using first five as a training set and the remaining one year as validation. For this  I transform the the data

Re: [R] Need help in R code of the functional data .

2020-10-17 Thread Richard O'Keefe
I do not understand your question. Are you talking about "functional data analysis", the statistical analysis of data where some of the covariates are (samples from) continuous functions? There are books and tutorials about doing that in R. Are you talking about "functional data structures", as

Re: [R] Need help in R code of the functional data .

2020-10-16 Thread Rui Barradas
Hello, You have asked several times about functional data, I really do not understand what you mean but if you want to learn about writing R functions, take a look at doc/manual/R-intro.pdf, that comes with any installation of R, chap. 10 Writing your own functions. And at any of Hadley

[R] Need help in R code of the functional data .

2020-10-16 Thread Ablaye Ngalaba
Hello, Please, I want to know how the functional data are defined in programming code R. If possible an illustrative example of code can help me to understand better. Yours sincerely. [[alternative HTML version deleted]]

Re: [R] help for R code

2020-10-13 Thread Eric Berger
Hi Ablaye, The CRAN repository has thousands of available R packages. To help people find relevant packages amid such a huge collection, there are some 'task view' pages that group packages according to a particular task. I am guessing that you are interested in kernels because of their use in

[R] help for R code

2020-10-13 Thread Ablaye Ngalaba
Good morning dear administrators, Please help me to code this code in R. I use in this file the redescription function Φ which by making a scalar product gives a . You can also choose instead of the redescription function Φ a kernel k(x,x). Sincerely [[alternative

Re: [R] Help in R code

2020-10-04 Thread Rui Barradas
Hello, This is cross-posted, you have posted the same question in SO[1]. Cross-posting is not well seen, post the question in one place and please wait a few days for an answer before posting here. [1]

[R] Help in R code

2020-10-04 Thread Faheem Jan via R-help
Hello , i am working in the functional time series using themultivariate time series data(hourly time series data). Sir  i am usingFAR model more than one order for which no statistical package is available inR, so for this i convert my data into functional form and obtained thefunctional

Re: [R] help in R code

2020-10-02 Thread Jim Lemon
Hi Faheem, This is a complete guess, but the hours of the day may range from 0 to 23 not 1 to 24. So you may be asking for an out of range hour. Jim On Fri, Oct 2, 2020 at 10:00 PM Faheem Jan via R-help wrote: > > > Hello , i am working in the functional time series using the multivariate >

[R] help in R code

2020-10-02 Thread Faheem Jan via R-help
Hello , i am working in the functional time series using the multivariate time series data(hourly time series data). Sir  i am using FAR model more than one order for which no statistical package is available in R, so for this i convert my data into functional form and obtained the functional

Re: [R] Some R code works on Linux, but not Linux via Windows Subsystem Linux

2020-09-08 Thread Tomas Kalibera
On 9/8/20 5:51 AM, Robert Knight wrote: RE: Some R code works on Linux, but not Linux via Windows Subsystem Linux This is taking data from a CSV and placing it into a data frame. This is R 3.6.3 inside Windows Subsystem for Linux v2, Ubuntu 18.04. The exact same code, unchanged

Re: [R] Some R code works on Linux, but not Linux via Windows Subsystem Linux

2020-09-08 Thread Eric Berger
ert Knight wrote: > RE: Some R code works on Linux, but not Linux via Windows Subsystem Linux > > This is taking data from a CSV and placing it into a data frame. This is R > 3.6.3 inside Windows Subsystem for Linux v2, Ubuntu 18.04. The exact same > code, unchanged and on the same

[R] Some R code works on Linux, but not Linux via Windows Subsystem Linux

2020-09-08 Thread Robert Knight
RE: Some R code works on Linux, but not Linux via Windows Subsystem Linux This is taking data from a CSV and placing it into a data frame. This is R 3.6.3 inside Windows Subsystem for Linux v2, Ubuntu 18.04. The exact same code, unchanged and on the same computer, works correctly in Ubuntu

Re: [R] Code seems OK (no warnings, no error messages) but no results

2020-03-18 Thread varin sacha via R-help
Dear R Experts, So I managed to get the first part of my R code to work with one error message but R still gives me the result I am looking for. Now I'm trying to calculate the bootstrap confidence interval around the "MSE_fastMM" value. The end of my code after mean(my.data) doe

Re: [R] Code seems OK (no warnings, no error messages) but no results

2020-03-18 Thread peter dalgaard
The double curlies in > my.experiment <- function() {{ look suspicious. -pd > On 16 Mar 2020, at 22:08 , varin sacha via R-help > wrote: > > Good afternoon, > > Here below my reproducible R code. I don't get any results. I am looking for > MSE_fastMM value a

[R] Code seems OK (no warnings, no error messages) but no results

2020-03-16 Thread varin sacha via R-help
Good afternoon, Here below my reproducible R code. I don't get any results. I am looking for MSE_fastMM value and the bootstrap CIs around MSE_fastMM value. How can I finish/correct my R code to get the results ? Many thanks for your help. install.packages( "robus

Re: [R] R code required

2019-12-23 Thread Jeff Newmiller
t to help me about to send the R Code of paper which title >Inference of Generalized endpoint inflated binomial regression . In . > 2017 >Best Regards >Salwa. A.Mousa > >Sent from my Samsung device > > [[alternative HTML version deleted]] > >__

[R] R code required

2019-12-23 Thread Salwa El-Aty
Dear Sir I want to help me about to send the R Code of paper which title Inference of Generalized endpoint inflated binomial regression . In . 2017 Best Regards Salwa. A.Mousa Sent from my Samsung device [[alternative HTML version deleted

Re: [R] Help to write the R-code, please

2019-12-06 Thread Martin Maechler
> Richard O'Keefe > on Fri, 6 Dec 2019 12:18:50 +1300 writes: > This particular task is not a problem about R. > It is a problem n combinatorics. > Start with the obvious brute force algorithm > (1) Let S be the union of all the sets > (2) For each K in 0 .. |S|

Re: [R] Help to write the R-code, please

2019-12-05 Thread Richard O'Keefe
This particular task is not a problem about R. It is a problem n combinatorics. Start with the obvious brute force algorithm (1) Let S be the union of all the sets (2) For each K in 0 .. |S| (3) Enumerate all |S| choose K subsets C of S (4) If C satisfies the condition, report it and stop

Re: [R] Help to write the R-code, please

2019-12-05 Thread Ivan Krylov
It might be easier to implement in R if you employ the base functions that take arrays and operate on them as if they represented sets. See the help() for "union", "intersect", "setdiff", "setequal" and the operator "%in%". -- Best regards, Ivan __

Re: [R] Help to write the R-code, please

2019-12-05 Thread Jeff Newmiller
On December 5, 2019 3:39:07 AM PST, "Александр Дубровский" wrote: >Task: >A family of sets of letters is given. Find K for which one can >construct a >set consisting of K letters, each of them belonging to exactly K sets >of a >given family. ... > > [[alternative HTML version

[R] Help to write the R-code, please

2019-12-05 Thread Александр Дубровский
Task: A family of sets of letters is given. Find K for which one can construct a set consisting of K letters, each of them belonging to exactly K sets of a given family. Possible solution: For each letter, we will have a separate 'scoop', in which we will' put ' the letter. This can be done using

Re: [R] Double / single backticks for inline R code in an Rmarkdown file

2019-10-14 Thread Ashim Kapoor
Dear Yihui, Thank you and Best Regards, Ashim On Mon, Oct 14, 2019 at 7:30 PM Yihui Xie wrote: > params$data is "hawaii" in this case, so the output of > > ``r params$data`` > > is > > `hawaii` > > The double backticks don't have any special meaning here. Only the > inside pair of

Re: [R] Double / single backticks for inline R code in an Rmarkdown file

2019-10-14 Thread Yihui Xie
params$data is "hawaii" in this case, so the output of ``r params$data`` is `hawaii` The double backticks don't have any special meaning here. Only the inside pair of backticks (i.e. `r `) makes sense to R Markdown (or precisely speaking, knitr). The outside pair will be left untouched

Re: [R] Double / single backticks for inline R code in an Rmarkdown file

2019-10-14 Thread Ashim Kapoor
Dear Jeff, Many thanks for your reply. Best, Ashim On Mon, Oct 14, 2019 at 7:07 PM Jeff Newmiller wrote: > No, you don't misunderstand. But you might want to be aware that targeting > PDF output uses LaTeX which regards double backticks as a method of > encoding a left curly double quote

Re: [R] Double / single backticks for inline R code in an Rmarkdown file

2019-10-14 Thread Jeff Newmiller
No, you don't misunderstand. But you might want to be aware that targeting PDF output uses LaTeX which regards double backticks as a method of encoding a left curly double quote mark, so this error could derive from an incomplete adaptation of the Rmd file for HTML output even though such a

[R] Double / single backticks for inline R code in an Rmarkdown file

2019-10-14 Thread Ashim Kapoor
Dear All, I am reading this file :- https://rmarkdown.rstudio.com/lesson-6.html My query is : In line 14 of the above file, ie. The [marmap](https://cran.r-project.org/web/packages/marmap/index.html) package provides tools and data for visualizing the ocean floor. Here is an example contour

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread William R Revelle
Hi all. I am taking a brief vacation and will look at this next week. Bill > On Aug 29, 2019, at 2:53 PM, William Dunlap wrote: > > Element #2 of that output, the empty fomula " F1=~ ", triggers the bug in > omegaSem. > omegaSem needs to ignore such entries in omega's output. psych's

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread Danilo Esteban Rodriguez Zapata via R-help
Thank you so much, I'll wait until then. The good thing is that we can make sure now what is the actual problem. I wish you have a good rest. El jue., 29 ago. 2019 a las 14:55, William R Revelle (< reve...@northwestern.edu>) escribió: > Hi all. > > I am taking a brief vacation and will look at

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread Danilo Esteban Rodriguez Zapata via R-help
well the output with the code that you refer is the following: > psych::omega(my.data)$model$lavaan [1] g =~

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread Danilo Esteban Rodriguez Zapata via R-help
Dear William, Thank you for your answer, I would like to add some information that I just obtained looking in different sites and forums. Someone there ask me to create a fake data file, so I did that from my original data file. What I did was open the .csv file with notepad and replace all the 4

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread William Dunlap via R-help
Element #2 of that output, the empty fomula " F1=~ ", triggers the bug in omegaSem. omegaSem needs to ignore such entries in omega's output. psych's author should be able to fix things up. Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Aug 29, 2019 at 12:31 PM Danilo Esteban Rodriguez

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread William Dunlap via R-help
Please use 'reply to all' for responses to R-help reponses. What do you get with your original data for psych::omega(my.data)$model$lavaan ? Any entries like "F3=~"? Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Aug 29, 2019 at 12:05 PM Danilo Esteban Rodriguez Zapata <

Re: [R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread William Dunlap via R-help
> omegaSem(r9,n.obs=198) Error in parse(text = x, keep.source = FALSE) : :2:0: unexpected end of input This error probably comes from calling factor("~") and psych::omegaSem(data) will do that if all the columns in data are very highly correlated with one another. In that case

[R] R code: How to correct "Error in parse(text = x, keep.source = FALSE)" output in psych package using own dataset

2019-08-29 Thread Danilo Esteban Rodriguez Zapata via R-help
This is a problem related to my last question referred to the omegaSem() function in the psych package (that is already solved because I realized that I was missing a variable assignment and because of that I had an 'object not found' error:

Re: [R] Code modification for post-hoc power

2019-08-27 Thread Michael Dewey
with a confusing error message sent earlier I don't understand. Best, Anne -Message d'origine- De : Michael Dewey [mailto:li...@dewey.myzen.co.uk] Envoyé : lundi, 26 août 2019 18:29 À : Marc Schwartz ; CHATTON Anne Cc : R-help Objet : Re: [R] Code modification for post-hoc power

Re: [R] Code modification for post-hoc power

2019-08-27 Thread Michael Dewey
with a confusing error message sent earlier I don't understand. Best, Anne -Message d'origine- De : Michael Dewey [mailto:li...@dewey.myzen.co.uk] Envoyé : lundi, 26 août 2019 18:29 À : Marc Schwartz ; CHATTON Anne Cc : R-help Objet : Re: [R] Code modification for post-hoc power Dear Anne

Re: [R] Code modification for post-hoc power

2019-08-27 Thread CHATTON Anne via R-help
] Envoyé : lundi, 26 août 2019 18:29 À : Marc Schwartz ; CHATTON Anne Cc : R-help Objet : Re: [R] Code modification for post-hoc power Dear Anne In addition to Marc's comments if you are forced to do this then, assuming your package computes sample size from power then just feed it a range

Re: [R] Code modification for post-hoc power

2019-08-26 Thread peter dalgaard
That doesn't work. In caricature, post-hoc power is - I observe a difference of nearly zero - However, to find a significant difference of that size I'd need 20 observations - I only used 100 observations - Therefore my study is useless and can be discarded (or: I calculate the probability

Re: [R] Code modification for post-hoc power

2019-08-26 Thread Michael Dewey
Dear Anne In addition to Marc's comments if you are forced to do this then, assuming your package computes sample size from power then just feed it a range of powers and find the one for which it calculates the sample size you had. There is a more elegant way to do this using uniroot but

Re: [R] Code modification for post-hoc power

2019-08-26 Thread Marc Schwartz via R-help
> On Aug 26, 2019, at 6:24 AM, CHATTON Anne via R-help > wrote: > > Hello everybody, > > I am trying to accommodate the R codes provided by Donohue for sample size > calculation in the package "longpower" with lmmpower function to estimate the > post-hoc power (asked by a reviewer) of a

[R] Code modification for post-hoc power

2019-08-26 Thread CHATTON Anne via R-help
Hello everybody, I am trying to accommodate the R codes provided by Donohue for sample size calculation in the package "longpower" with lmmpower function to estimate the post-hoc power (asked by a reviewer) of a binary GEE model with a three-way interaction (time x condition x continuous

Re: [R] Code that works when run as straight code, but that fails when run as a function

2019-08-23 Thread Rui Barradas
Hello, Inline. Às 20:45 de 23/08/19, Sorkin, John escreveu: I have code that works perfectly when run as in-line code, but that fails when the code is put into a function with the following message: Error in contest1D.lmerModLmerTest(model, ll, rhs = rhs, ddf = ddf, confint = confint, :

Re: [R] Code that works when run as straight code, but that fails when run as a function

2019-08-23 Thread Sarah Goslee
Since this isn't reproducible, my first guess would be that alldata, which is required for your model, is not visible within the environment of the function. Or something similar: that kind of problem is almost always a scoping issue. Sarah On Fri, Aug 23, 2019 at 3:46 PM Sorkin, John wrote: >

[R] Code that works when run as straight code, but that fails when run as a function

2019-08-23 Thread Sorkin, John
I have code that works perfectly when run as in-line code, but that fails when the code is put into a function with the following message: Error in contest1D.lmerModLmerTest(model, ll, rhs = rhs, ddf = ddf, confint = confint, : length(L) == length(model@beta) is not TRUE Why does moving the

Re: [R] Pasting R code lines into labels

2019-06-07 Thread Marc Schwartz via R-help
Thu, Jun 6, 2019 at 9:21 AM Nick Wray >>>>> wrote: >>>>>> >>>>>> Thanks Bert, that is exactly what I wanted. I think that you meant >>>>>> plot(z,y... in the last line? >>>>>> >>>>>>

Re: [R] Pasting R code lines into labels

2019-06-07 Thread Nick Wray via R-help
t, that is exactly what I wanted. I think that you meant > >>>>> plot(z,y... in the last line? > >>>>> > >>>>> Nick > >>>>> > >>>>> On 06 June 2019 at 17:13 Bert Gunter wrote: > &

  1   2   3   4   5   6   7   8   9   10   >