Re: [R] R-help Digest, Vol 212, Issue 4

2020-10-05 Thread Izmirlian, Grant (NIH/NCI) [E] via R-help
Hi -- there are lots of replies --I have not read them all, if someone else suggested this, sorry for duplication. This is similar to the suggestion using mapply, but not specific to matrices. In fact it's a kludge that applies to many settings. You 'sapply' over the index 1:2, and pass a, b as

[R] understanding as.list(substitute(...()))

2020-10-05 Thread Tim Taylor
Could someone explain what is happening with the ...() of the following function: dots <- function(...) as.list(substitute(...())) I understand what I'm getting as a result but not why. ?dots and ?substitute leave me none the wiser. regards Tim __

Re: [R] understanding as.list(substitute(...()))

2020-10-05 Thread Bert Gunter
You need to understand what substitute() does -- see ?substitute and/or a tutorial on "R computing on the language" or similar. Here is a simple example that may clarify: > dots <- function(...) as.list(substitute(...())) > dots(log(foo)) [[1]] log(foo) ## a call, a language object > dots2 <-

Re: [R] how to get a numeric vector?

2020-10-05 Thread Avi Gross via R-help
Always hard to tell if THIS is a homework project. As with most things in R, if you can not find at least a dozen ways to do it, it is not worth doing. The question (way below) was how to take two vectors of length two and make a longer results based on using the ":" operator to generate a range

[R] Simultaneous Equation Model with Dichotomous Dependent Variables

2020-10-05 Thread Casey Mallon
Hello everyone! I am currently working with a time series panel data set measuring six dependent variables: 4 of which are binary and 2 of which are count data. I am interested in constructing a model to measure if the dependent variables influence one another. For example: DV1~ DV2 +

[R] data error problem

2020-10-05 Thread Mir Md. Abdus Salam
Dear all, I need urgent help. I am a new user of R. I got the following error anovamine<-read.table("spike cu.txt",header=TRUE) Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 1 did not have 9 elements Can anybody please help me to solve this problem why I am

Re: [R] data error problem

2020-10-05 Thread Mohammad Tanvir Ahamed via R-help
Hi, In your data file, the first row does not have an equal number of column like the rest of the row.Check your data file. Specially 1st row.   Regards.Tanvir AhamedStockholm, Sweden | mashra...@yahoo.com On Monday, 5 October 2020, 08:11:48 am GMT+2, Mir Md. Abdus

[R] unable to access index for repository...

2020-10-05 Thread Steven Yen
I had to install/use an older version of (R-3.0.3) for a reason. While installing a package from CRAN (either in RStudio or R), I received the following warning message saying unable to access index for repository http://cran.rstudio.com/bin/windows/contrib/3.0. See message below. In this

Re: [R] unable to access index for repository...

2020-10-05 Thread Uwe Ligges
From ../ReadMe in the mentioned web resource: "Packages for R >= 1.7.0 and R < 3.2.0 are available from https://cran-archive.r-project.org/bin/windows/contrib/; We do not hold binaries of several year old versions of R on CRAN. Note that R 3.0.0 is 7 years old. You shoudl realy consider to

Re: [R] data error problem

2020-10-05 Thread Jim Lemon
Hi Mir, Without knowing what the data looks like, this is only a guess. read.table() expects a white space delimiter and if you have a space in one of your column names it will consider it as two names instead of one. How many columns do you expect? Jim On Mon, Oct 5, 2020 at 6:14 PM Mohammad

Re: [R] how to get a numeric vector?

2020-10-05 Thread Mohammad Tanvir Ahamed via R-help
Hi,  You can try this.  Example: 1 a <- c(1, 4) b <- c(5, 8) unlist(as.vector(mapply(seq,a,b))) > [1]  1 2 3 4 5 4 5 6 7 8 a <- c(1, 4, 2) b <- c(5, 8, 10) unlist(as.vector(mapply(seq,a,b))) >  [1]  1  2  3  4  5  4  5  6  7  8  2  3  4  5  6  7  8  9 10 Regards. Tanvir Ahamed

Re: [R] unable to access index for repository...

2020-10-05 Thread Uwe Ligges
Then you'd rather need install.packages("aod",repos='https://cran-archive.r-project.org') or use the contrib.url argument. Best, Uwe Ligges On 05.10.2020 10:47, Steven Yen wrote: Thanks for the help. I do update to the latest R-4.0.2. As I said, for reasons that's hard to explain, some of

Re: [R] unable to access index for repository...

2020-10-05 Thread Steven Yen
Thanks for the help. I do update to the latest R-4.0.2. As I said, for reasons that's hard to explain, some of my tasks are better handled with an older version of R, in this case R-3.0.3. Please just help me install packages successfully with this older version of R. I ran the following line

Re: [R] how to get a numeric vector?

2020-10-05 Thread Martin Maechler
> Avi Gross via R-help > on Sun, 4 Oct 2020 19:50:43 -0400 writes: > Always hard to tell if THIS is a homework project. As with > most things in R, if you can not find at least a dozen > ways to do it, it is not worth doing. > The question (way below) was how to take

Re: [R] unable to access index for repository...

2020-10-05 Thread Steven Yen
Thanks. I did as suggested but still received a warning, though the installation went through. Anything I could do to install without the warning message. What is the contrib.url argument? > install.packages("aod",repos='https://cran-archive.r-project.org') Warning in install.packages :  

Re: [R] Simultaneous Equation Model with Dichotomous Dependent Variables

2020-10-05 Thread stephen sefick
Casey, I have used laavan for sem in the past. Stephen Sefick, PhD On Mon, Oct 5, 2020, 02:12 Casey Mallon wrote: > Hello everyone! > > I am currently working with a time series panel data set measuring six > dependent variables: > 4 of which are binary and 2 of which are count data. > > I am

[R] [Rd] R 4.0.3 scheduled for October 10

2020-10-05 Thread Peter Dalgaard via R-help
[Oops, this apparently got omitted during release scheduling] Full schedule is available on developer.r-project.org. -- Peter Dalgaard, Professor, Center for Statistics, Copenhagen Business School Solbjerg Plads 3, 2000 Frederiksberg, Denmark Phone: (+45)38153501 Office: A 4.23 Email: