Re: [R] Fwd: effects() extractor for a quantile reqression object: error message

2024-09-06 Thread Gregg Powell via R-help
Need to kill some time, so thought I'd Opine. Given the intent, as I understood it... to extract components from a quantile regression (rq) object similar to how one might extract effects from an lm object. Since it seems effects() is not implemented for rq, here are some alternative approach

Re: [R] Fwd: Strange results : bootrstrp CIs

2024-01-14 Thread varin sacha via R-help
Dear R-experts, I really thank you all for your responses. Best, Le dimanche 14 janvier 2024 à 10:22:12 UTC+1, Duncan Murdoch a écrit : On 13/01/2024 8:58 p.m., Rolf Turner wrote: > On Sat, 13 Jan 2024 17:59:16 -0500 > Duncan Murdoch wrote: > > > >> My guess is that one of the boot

Re: [R] Fwd: Strange results : bootrstrp CIs

2024-01-14 Thread Duncan Murdoch
On 13/01/2024 8:58 p.m., Rolf Turner wrote: On Sat, 13 Jan 2024 17:59:16 -0500 Duncan Murdoch wrote: My guess is that one of the bootstrap samples had a different selection of countries, so factor(Country) had different levels, and that would really mess things up. You'll need to decide how

Re: [R] Fwd: Strange results : bootrstrp CIs

2024-01-13 Thread Rolf Turner
On Sat, 13 Jan 2024 17:59:16 -0500 Duncan Murdoch wrote: > My guess is that one of the bootstrap samples had a different > selection of countries, so factor(Country) had different levels, and > that would really mess things up. > > You'll need to decide how to handle that: If you are trying t

Re: [R] Fwd: r-stats: Geometric Distribution

2023-10-19 Thread Sahil Sharma
Hi, today I came across the same problem. And, I'm able to explain it with an example as well. Suppose I want to PDF or P(X=5) in Geometric Distribution with P = 0.2. The theoretical formula is P * (1-P) ^ (x -1). But the R function dgeom(x, p) works like P * (1-P) ^ x, it does not reduce 1 from

Re: [R] Fwd: r-stats: Geometric Distribution

2023-10-18 Thread Jim Lemon
Please delete drjimle...@gmail.com from your mailing lists. He passed away a mknth ago. Regards, Juel Wife On Tue, 17 Oct 2023, 22:58 Sahil Sharma -- Forwarded message - > From: Sahil Sharma > Date: Tue, Oct 17, 2023 at 12:10 PM > Subject: r-stats: Geometric Distribution > To: >

Re: [R] Fwd: r-stats: Geometric Distribution

2023-10-17 Thread Ivan Krylov
В Tue, 17 Oct 2023 12:12:05 +0530 Sahil Sharma пишет: > The original formula for Geometric Distribution PDF is > *((1-p)^x-1)*P*. However, the current r function *dgeom(x, p)* is > doing this: *((1-p)^x)*P, *it is not reducing 1 from x. Your definition is valid for integer 'x' starting from 1. (

Re: [R] Fwd: Reg: Frequency in declaring time series data

2023-01-17 Thread Eric Berger
Hi Upananda, A few comments: 1. As you know, CRAN has thousands of packages. One of the ways to learn about the packages you might care about is to use the CRAN views. A 'view' is an attempt to provide some information on a certain subset of the packages related to a particular area. See a list of

Re: [R] Fwd: Reading very large text files into R

2022-09-29 Thread Enrico Schumann
On Thu, 29 Sep 2022, Nick Wray writes: > -- Forwarded message - > From: Nick Wray > Date: Thu, 29 Sept 2022 at 15:32 > Subject: Re: [R] Reading very large text files into R > To: Ben Tupper > > > Hi Ben > Beneath is an example of the text (also in an attachment) and it's the "B",

Re: [R] Fwd: alternative way to define a function

2021-12-02 Thread Martin Møller Skarbiniks Pedersen
On Thu, 2 Dec 2021 at 12:40, Ivan Krylov wrote: > > > The \(arguments) syntax has been introduced in R 4.1.0: > https://cran.r-project.org/doc/manuals/r-release/NEWS.html (search for > "\(x)"). It is the same as function(arguments). > > The only benefit is slightly less typing; could be useful if

Re: [R] Fwd: alternative way to define a function

2021-12-02 Thread Ivan Krylov
On Thu, 2 Dec 2021 12:23:27 +0100 Martin Møller Skarbiniks Pedersen wrote: > Is that exactly the same as: > f <- function(x,y) x * y > ? > > Is there any benefit to the first or second way to define a function? The \(arguments) syntax has been introduced in R 4.1.0: https://cran.r-project.org/d

Re: [R] Fwd: Package is not available for this version of R.

2021-11-26 Thread Jeff Newmiller
Anyone could write a function named prob.def1, and it is not part of base R so it is off-topic here and there is no way for people on this list to definitively know the answer. As far as Google can tell me it is not from CRAN either. OP should go talk to whoever wrote this code. On November 26,

Re: [R] Fwd: Merging multiple csv files to new file

2021-11-03 Thread Jim Lemon
Hi Gabrielle, I get the feeling that you are trying to merge data in which each file contains different variables, but the same subjects have contributed the data. This a very wild guess, but it may provide some insight. # assume that subjects are identified by a variable named "subjectID" # creat

Re: [R] Fwd: Merging multiple csv files to new file

2021-11-03 Thread Duncan Murdoch
On 02/11/2021 6:30 p.m., gabrielle aban steinberg wrote: Hello, I would like to merge 18 csv files into a master data csv file, but each file has a different number of columns (mostly found in one or more of the other cvs files) and different number of rows. I have tried something like the follo

Re: [R] Fwd: Merging multiple csv files to new file

2021-11-03 Thread Avi Gross via R-help
Newmiller Sent: Wednesday, November 3, 2021 1:22 PM To: r-help@r-project.org; Robert Knight ; gabrielle aban steinberg Cc: r-help Subject: Re: [R] Fwd: Merging multiple csv files to new file Data type in a CSV is always character until inferred otherwise... it is not necessary nor even easier

Re: [R] Fwd: Merging multiple csv files to new file

2021-11-03 Thread Jeff Newmiller
>(Maybe the R Studio free trial/usage is underpowered for my project?) - R is a computer language, as well as a program for interpreting R source code. - RStudio Desktop is an editor with "features" intended to make using R easy. It cannot "do" anything without R being installed. - R is completel

Re: [R] Fwd: Merging multiple csv files to new file

2021-11-03 Thread Jeff Newmiller
Data type in a CSV is always character until inferred otherwise... it is not necessary nor even easier to manipulate files with Python if you are planning to use R to manipulate the data further with R. Just use the colClasses="character" argument for read.csv. On November 3, 2021 9:47:03 AM PD

Re: [R] Fwd: Merging multiple csv files to new file

2021-11-03 Thread Bill Dunlap
The error message arises because you are sometimes delimiting character strings using non-ASCII open and close double quotes, '“' and '”', instead of the old-fashioned ones, '"', which have no open or close variants. This is a language syntax error, so R didn't try to compute anything. The others

Re: [R] Fwd: Merging multiple csv files to new file

2021-11-03 Thread Robert Knight
It might be easier to settle on the desired final csv layout and use Python to copy the rows via line reads. Python doesn't care about the data type in a given "cell", numeric or char, whereas the type errors R would encounter would make the task very difficult. On Wed, Nov 3, 2021, 10:36 AM gabr

Re: [R] Fwd: Merging multiple csv files to new file

2021-11-03 Thread Bert Gunter
I should have added that once read into R, the collection of data frames (presumably) can also be saved in one .Rdata file via save() **without** first combining them into a list. I still prefer keeping them together as one list in R, but that's up to you. Bert Gunter "The trouble with having an

Re: [R] Fwd: Merging multiple csv files to new file

2021-11-03 Thread Bert Gunter
1. Think more carefully about the appropriate data structure for what you wish to do. It's unlikely to be .csv files, however. In the absence of the above, a simple (but perhaps inappropriate) default is: 2. Read the files into R and combine into a list.(You will need to read about lists in R if

Re: [R] Fwd: Merging multiple csv files to new file

2021-11-03 Thread Avi Gross via R-help
Gabrielle, Why would you expect that to work? rbind() binds rows of internal R data structures that are some variety of data.frame with exactly the same columns in the same order into a larger object of that type. You are not providing rbind() with the names of variables holding the info but

Re: [R] Fwd: Create new polygon from a polygon

2021-04-22 Thread Greg Minshall
Javad, you might think of asking in the r-sig-geo e-mail list? : r-sig-...@r-project.org cheers. __ R-help@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://w

Re: [R] Fwd: Concatenation?

2021-02-18 Thread Gerrit Eichner
Right, Bert, but not if X is "only" matrix. ;-) > X <- cbind(X1 = letters[1:3], X2 = 5:7, X3 = LETTERS[1:3] ) > do.call(paste0, X) Fehler in do.call(paste0, X) : das zweite Argument muss eine Liste sein (Sorry, but my system is German. :-)) But, of course, then, e.g., do

Re: [R] Fwd: Concatenation?

2021-02-18 Thread Bert Gunter
Inline comment below. Cheers, Bert Bert Gunter " or, if stored as columns of a matrix or data frame X, e.g., > > ## > apply(X, 1, paste0) > ## " No. paste() is vectorized. apply() can be avoided: > df <- data.frame(X1 = letters[1:3], X2 = 5:7,

Re: [R] Fwd: Error in setting the parameter values of k

2020-12-29 Thread Neha gupta
Hello, I am sorry but after settings the value of C between 1 and 7, I get the following error message now: Error in self$assert(xs) : Assertion on 'xs' failed: The parameter 'C' can only be set if the following condition is met 'type {eps-svr, eps-bsvr}'. Instead the parameter value for 'type'

Re: [R] Fwd: Error in setting the parameter values of k

2020-12-29 Thread Neha gupta
Thanks a lot, Milne and Patrick. I am going to change the values, hopefully the error message will disappear. Warm regards On Tue, Dec 29, 2020 at 5:53 PM Patrick (Malone Quantitative) < mal...@malonequantitative.com> wrote: > Likely, yes. Your error message says k must be at least 1, so search

Re: [R] Fwd: Error in setting the parameter values of k

2020-12-29 Thread Patrick (Malone Quantitative)
Likely, yes. Your error message says k must be at least 1, so searching below 1 is probably your issue. Also, logically, zero nearest neighbors doesn't seem to make a lot of sense. Pat On Tue, Dec 29, 2020 at 11:01 AM Neha gupta wrote: > Thank you for your response. > > Are you certain that k

Re: [R] Fwd: Error in setting the parameter values of k

2020-12-29 Thread Neha gupta
Thank you for your response. Are you certain that k = 0 is a legitimate setting? Since, the default value of k is 1, I wanted to search between the values of 0 to 3. Milne, Do you mean I have to provide both the lower and upper bounds greater than 1 in order to get rid of this error? On Tue, D

Re: [R] Fwd: Error in setting the parameter values of k

2020-12-29 Thread T. A. Milne via R-help
I am using mlr3 'fast nearest neighbor' leaner i.e. fnnIts parameter is 'k' which has a default value of 1. When I use tuningusing random search, I set the parameter of k as: lower= 0, upper=3But it gives an error messageError in self$assert(xs) : Assertion on 'xs' failed: k: Element 1 is not >

Re: [R] Fwd: Help using the exclude option in the neuralnet package

2020-10-12 Thread Frauke Günther
Dear all, the exclude and constant.weights options are used as follows: exclude: A matrix with n rows and 3 columns will exclude n weights. The the first column refers to the layer, the second column to the input neuron and the third column to the output neuron of the weight. constant.weights:

Re: [R] Fwd: Help with looping a function over a list of dataframes:

2020-07-04 Thread Kathan Desai
Hello thanks everyone for your help i managed to get a working function as followed: for(i in 2:length(list_df)){ list_df[[paste0("position_tab_",i)]][['ID']] <- unlist(lapply(list_df[[paste0("position_tab_",i)]][['midpoint']], function(x) ifelse(any(abs(x - list_df[[paste0("position_tab_",i-1)

Re: [R] Fwd: Help with looping a function over a list of dataframes:

2020-07-04 Thread Bert Gunter
Perhaps the following will be helpful (you can ignore the warning message here): > set.seed(1001) > x <- sample(1:5,10, rep = TRUE) > y <- sample(1:5,12, rep = TRUE) > n <- seq_len(min(length(x), length(y))) > flag <- as.numeric(abs(x-y)[n] <= 1) Warning message: In x - y : longer object length is

Re: [R] Fwd: Help with looping a function over a list of dataframes:

2020-07-04 Thread Kathan Desai
*I hope this is more succinct.* *I have the following code: * list_df$position_tab_5$ID <- unlist(lapply(list_df$position_tab_5$midpoint, function(x) ifelse(any(abs(x - list_df$position_tab_4$midpoint) <= 1),1,0))) It compares every observation from the midpoint column from dataframe 2 to every

Re: [R] Fwd: Help with looping a function over a list of dataframes:

2020-07-04 Thread Eric Berger
Hi Kathan, How about trying to create a *minimal* reproducible example, e.g. with a list of two data frames, where each data frame has 5 rows,? My guess is that there is a good chance that when you try to create such an example, you will discover the problem yourself. In the event that you create t

Re: [R] Fwd: Package PCMBaseCpp stops the R process on Fedora-clang

2020-03-22 Thread Jeff Newmiller
Wrong list. Way wrong. Pay attention to the Posting Guide. The correct list would be the Rcpp-devel. If your question were less specific, then r-package-devel. But absolutely not r-help. There are known issues with Rcpp being fixed right now on the fly... go read the recent archives for Rcpp-de

Re: [R] Fwd: Extracting a particular column from list

2020-01-20 Thread Bert Gunter
Trickier, but shorter: > lapply(u,'[',1) $a [1] 1 $b [1] "a" Bert 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 Fri, Jan 17, 2020 at 10:04 PM Eric Berger wrote:

Re: [R] Fwd: Extracting a particular column from list

2020-01-19 Thread PIKAL Petr
Or simply lapply(u, "[", 1) $a [1] 1 $b [1] "a" Cheers Petr > -Original Message- > From: R-help On Behalf Of Eric Berger > Sent: Thursday, January 16, 2020 1:36 PM > To: R mailing list > Subject: [R] Fwd: Extracting a particular column from list > > [Putting back onto r-help] > > Yo

Re: [R] Fwd: Which external functions are called in a package?

2020-01-03 Thread Jeff Newmiller
No, sorry, I misunderstood your question. a) Read the NAMESPACE file of package B? If they use importFrom that would be specific enough. b) "Suggests" can refer to usage that does not even appear in the loaded package at all. c) Try asking in the r-package-devel mailing list? On January 3, 20

Re: [R] Fwd: Which external functions are called in a package?

2020-01-03 Thread Duncan Murdoch
On 03/01/2020 4:45 p.m., Hans W Borchers wrote: You are absolutely right. I forgot that there is a difference between the unpacked and the installed directory of a package. The documentation of the *pkgapi* package in development is quite scarce and does not mention the details. Thanks for the ti

Re: [R] Fwd: Which external functions are called in a package?

2020-01-03 Thread Hans W Borchers
Jeff, the problem is: There I see the packages that depend on mine, but not which functions are used Or maybe I misunderstood your comment. On Fri, 3 Jan 2020 at 22:49, Jeff Newmiller wrote: > > If you are so lucky as to have this problem, perhaps you could take a look at > the reverse dependenc

Re: [R] Fwd: Which external functions are called in a package?

2020-01-03 Thread Jeff Newmiller
If you are so lucky as to have this problem, perhaps you could take a look at the reverse dependencies on your packages' CRAN web page. On January 3, 2020 1:45:42 PM PST, Hans W Borchers wrote: >You are absolutely right. I forgot that there is a difference between >the unpacked and the installed

Re: [R] Fwd: RFA Now Open: Essential Open Source Software for Science

2019-06-18 Thread Bert Gunter
This is probably a suboptimal list for your message. If you have not already done so, you should post it to R-package-devel and the Bioconductor development list, https://stat.ethz.ch/mailman/listinfo/bioc-devel . Cheers, Bert Gunter "The trouble with having an open mind is that people keep co

Re: [R] Fwd: How to retain the NA as a value for splitting a dataframe

2019-05-23 Thread Gerrit Eichner
Hello, Jun, try split(df, f = factor(df$C, exclude = NULL)) For more info see ?factor, of course. Regards -- Gerrit - Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eich...@math.uni-giessen.de

Re: [R] Fwd: Re: transpose and split dataframe

2019-05-06 Thread Matthew
Thank you very much Jim and David for your scripts and accompanying explanations. I was intrigued at the results that came from David's script.  As seen below where I have taken a small piece of his DataTable: AT1G69490 AT1G29860    AT4G18170 *AT5G46350* AT1G01560    0    0    0    1 *AT1G02920

Re: [R] Fwd: Re: transpose and split dataframe

2019-05-02 Thread Jim Lemon
Hi again, Just noticed that the NA fill in the original solution is unnecessary, thus: # split the second column at the commas hitsplit<-strsplit(mmdf$hits,",") # get all the sorted hits allhits<-sort(unique(unlist(hitsplit))) tmmdf<-as.data.frame(matrix(NA,ncol=length(hitsplit),nrow=length(allhit

Re: [R] Fwd: Re: transpose and split dataframe

2019-05-02 Thread Jim Lemon
Hi Matthew, I'm not sure whether you want something like your initial request or David's solution. The result of this can be transformed into the latter: mmdf<-read.table(text="Regulator hits AT1G69490 AT4G31950,AT5G24110,AT1G26380,AT1G05675,AT3G12910,AT5G64905,AT1G22810,AT1G79680,AT3G02840,AT5G2

Re: [R] Fwd: Re: transpose and split dataframe

2019-05-02 Thread David L Carlson
We still have only the toy version of your data from your first email. The second email used dput() as I suggested, but you truncated the results so it is useless for testing purposes. Use the following code after creating DataList (up to mx <- ... ) in my earlier answer: n <- sapply(DataList,

Re: [R] Fwd: Re: transpose and split dataframe

2019-05-01 Thread Matthew
Thank you very much, David and Jim for your work and solutions. I have been working through both of them to better learn R. They both proceed through a similar logic except David's starts with a character matrix and Jim's with a dataframe, and both end with equivalent dataframes (  identical(tm

Re: [R] Fwd: Re: transpose and split dataframe

2019-04-30 Thread David L Carlson
If you read the data frame with read.csv() or one of the other read() functions, use the asis=TRUE argument to prevent conversion to factors. If not do the conversion first: # Convert factors to characters DataMatrix <- sapply(TF2list, as.character) # Split the vector of hits DataList <- sapply(

Re: [R] Fwd: Potential Issue with lm.influence

2019-04-03 Thread Eric Bridgeford
tario, Canada > Web: https://socialsciences.mcmaster.ca/jfox/ > > > > > > -Original Message----- > > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Eric > > Bridgeford > > Sent: Tuesday, April 2, 2019 5:01 PM > > To: Bert Gunter

Re: [R] Fwd: Potential Issue with lm.influence

2019-04-03 Thread Eric Bridgeford
rstudent calls influence, to my knowledge, and all of the results passed by rstudent are dependent on values returned by influence (other than the weights, which I can't imagine are NaN), so I believe that influence is the issue. See the line https://github.com/SurajGupta/r-source/blob/a28e609e72ed

Re: [R] Fwd: Potential Issue with lm.influence

2019-04-03 Thread peter dalgaard
io, Canada > Web: https://socialsciences.mcmaster.ca/jfox/ > > > > >> -Original Message- >> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Eric >> Bridgeford >> Sent: Tuesday, April 2, 2019 5:01 PM >> To: Bert Gunter >>

Re: [R] Fwd: Potential Issue with lm.influence

2019-04-02 Thread Fox, John
ic > Bridgeford > Sent: Tuesday, April 2, 2019 5:01 PM > To: Bert Gunter > Cc: R-help > Subject: Re: [R] Fwd: Potential Issue with lm.influence > > I agree the influence documentation suggests NaNs may result; however, as > these can be manually computed and are, ind

Re: [R] Fwd: Potential Issue with lm.influence

2019-04-02 Thread Jim Lemon
Hi Eric, When I run your code (using the MASS library) I find that rstudent(fit2) also returns NaN in the seventh position. Perhaps the problem is occurring there and not in the "influence" function. Jim On Wed, Apr 3, 2019 at 9:12 AM Eric Bridgeford wrote: > > I agree the influence documentatio

Re: [R] Fwd: Potential Issue with lm.influence

2019-04-02 Thread Eric Bridgeford
I agree the influence documentation suggests NaNs may result; however, as these can be manually computed and are, indeed, finite/existing (ie, computing the held-out influence by manually training n models for n points to obtain n leave one out influence measures), I don't possibly see how the func

Re: [R] Fwd: Potential Issue with lm.influence

2019-04-02 Thread Eric Bridgeford
How can I add attachments? The following two files were attached in the initial message On Tue, Apr 2, 2019 at 3:34 PM Bert Gunter wrote: > Nothing was attached. The r-help server strips most attachments. Include > your code inline. > > Also note that > > > 0/0 > [1] NaN > > so maybe something l

Re: [R] Fwd: Potential Issue with lm.influence

2019-04-02 Thread Bert Gunter
Also, I suggest you read ?influence which may explain the source of your NaN's . Bert 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 Tue, Apr 2, 2019 at 1:29 PM Ber

Re: [R] Fwd: Potential Issue with lm.influence

2019-04-02 Thread Bert Gunter
I told you already: **Include code inline ** See ?dput for how to include a text version of objects, such as data frames, inline. Otherwise, I believe .txt text files are not stripped if you insist on *attaching* data or code. Others may have better advice. Bert Gunter "The trouble with having

Re: [R] Fwd: Potential Issue with lm.influence

2019-04-02 Thread Bert Gunter
Nothing was attached. The r-help server strips most attachments. Include your code inline. Also note that > 0/0 [1] NaN so maybe something like that occurs in the course of your calculations. But that's just a guess, so feel free to disregard. Bert Gunter "The trouble with having an open mind

Re: [R] Fwd: Error message: object of type 'closure' is not subsettable

2019-04-01 Thread Eric Berger
You may be calling a function when you think you are referring to an array. You can reproduce this error message as follows: f <- function(x) {x} f[1] HTH, Eric On Mon, Apr 1, 2019 at 5:49 PM Simrit Rattan wrote: > hey everyone :), > Subject: Re: Error message: object of type 'closure' is not

Re: [R] Fwd: high p values

2019-03-19 Thread Jim Lemon
Hi Javed, Easy. A<-c(2000,2100,2300,2400,6900,7000,7040,7050,7060) median(A) [1] 6900 B<-c(3300,3350,3400,3450,3500,7000,7100,7200,7300) median(B) [1] 3500 wilcox.test(A,B,paired=FALSE) Wilcoxon rank sum test with continuity correction data: A and B W = 26.5, p-value = 0.233 alternative

Re: [R] Fwd: high p values

2019-03-19 Thread William Dunlap via R-help
Any reasonable test of whether two samples differ should be scale and location invariant. E.g., if you measure temperature it should not matter if you units are degrees Fahrenheit or micro-Kelvins. Thus saying the medians are 3500 and 6200 is equivalent to saying they are 100.035 and 100.062: it

Re: [R] Fwd: high p values

2019-03-19 Thread S Ellison
> This is my function: > > wilcox.test(A,B, data = data, paired = FALSE) > > It gives me high p value, though the median of A column is 6900 and B > column is 3500. > > Why it gives p value high if there is a difference in the median? Perhaps becuase a) because you are testing the wrong data or

Re: [R] Fwd: high p values

2019-03-19 Thread Patrick (Malone Quantitative)
We've had this conversation. A) This is off-topic for R-Help. Your question is about the statistical test, not about the R coding. B) A difference in sample statistics, whether or not it "looks" large, is not sufficient for statistical significance. On 3/19/19, 12:48 PM, "R-help on behalf of

Re: [R] Fwd: Overlapping legend in a circular dendrogram

2019-01-11 Thread Jim Lemon
Hi Meriam, I don't have the packages loaded that you use, but a first guess would be to start a wider device. For example, the default x11 device is 7x7, so: x11(width=10) would give you a rectangular output device that might move the columns of labels outward. The same applies for any other devi

Re: [R] Fwd: Overlapping legend in a circular dendrogram

2019-01-11 Thread N Meriam
Yes I know. Sorry if I reposted this but it's simply because I've received an email mentioning that the file was too big that's why I modified my question and reposted it. I don't want to oblige anyone to respond. I really thought the issue was my file (too big so nobody received it). Thanks for y

Re: [R] Fwd: Overlapping legend in a circular dendrogram

2019-01-11 Thread Bert Gunter
This is the 3rd time you've posted this. Please stop re-posting! Your question is specialized and involved, and you have failed to provide a reproducible example/data. We are not obliged to respond. You may do better contacting the maintainer, found by ?maintainer, as recommended by the posting g

Re: [R] Fwd: UPDATE

2018-12-26 Thread Caitlin
Is the file being saved as .xls, .xlsx, .csv, .tsv, or .txt? On Wed, Dec 26, 2018 at 10:14 PM Spencer Brackett < spbracket...@saintjosephhs.com> wrote: > Follow up, > > Would read.txt also work, as I am certain that I have both datasets in > .txt files? As to a previous users question concern th

Re: [R] Fwd: UPDATE

2018-12-26 Thread Spencer Brackett
Follow up, Would read.txt also work, as I am certain that I have both datasets in .txt files? As to a previous users question concern the .csv nature of the supposed excel file, I am uncertain as to how this was translated as such. The file is most certainly in excel. On Thu, Dec 27, 2018 at 12:

Re: [R] Fwd: UPDATE

2018-12-26 Thread Spencer Brackett
Caitlin, I tried your command in both RGui and RStudio but both came up as errors. I believe I made a mistake somewhere I labeling/downloading the files, which is the source of the confusion in R. I will re-examine the files saved on my desktop to determine the error. Regardless, would it be bet

Re: [R] Fwd: UPDATE

2018-12-26 Thread Caitlin Gibbons
Does this help Spencer? The read.delim() function assumes a tab character by default, but I specifically included it using the read.csv function. The downloaded file is NOT an Excel file so this should help. GBM_protein_expression <- read.csv("C:/Users/Spencer/Desktop/GBM protein_expression.tsv

Re: [R] Fwd: UPDATE

2018-12-26 Thread Richard M. Heiberger
this is wrong because the file is a csv file. read_excel is designed for xls files. GBM_protein_expression <- read_excel("C:/Users/Spencer/Desktop/GBM protein_expression.csv") How did you get a csv? it downloads as tsv. the statement you should use is in base, no library() statement is needed.

Re: [R] Fwd: UPDATE

2018-12-26 Thread Spencer Brackett
Sorry, my mistake. So I could still use read.table and should I try using a .txt version of the file to avoid the silent changes you described? Also, when I tried to simply this process by downloading the dataset onto RStudio opposed to R (Gui) I received the following... library(readxl) > GBM_p

Re: [R] Fwd: UPDATE

2018-12-26 Thread Jeff Newmiller
Please always reply-all to keep the list involved. If you used Save As to change the data format to Excel AND the file extension to xlsx, then yes, you should be able to read with readxl. I don't recommend it, though... Excel often changes data silently and in irregularly located places in your

Re: [R] Fwd: UPDATE

2018-12-26 Thread Jeff Newmiller
CSV and TSV are not Excel files. Yes, I know Excel will open them, but that does not make them Excel files. Read a TSV file with read.table or read.csv, setting the sep argument to "\t". On December 26, 2018 7:26:35 PM PST, Spencer Brackett wrote: >I tried importing the file without preview an

Re: [R] Fwd: Help with finalfit and knitr

2018-08-08 Thread Martin Maechler
> Bert Gunter > on Wed, 8 Aug 2018 08:21:05 -0700 writes: > (From Jeff Newmiller) "My advice is to enter one line of > each example at a time and study what it does before > proceeding to the next line. Copying whole swathes of code > and marveling at the result is exh

Re: [R] Fwd: Quadratic programming, for loop

2018-07-30 Thread Maija Sirkjärvi
Thanks a lot! I got the main part working (after a relaxing holiday). However I still have some problems with the conditions. The looping is not working properly, but this is not really an QP problem anymore. It's more about that R runs the loop differently than c++, I guess. Thanks a lot for help

Re: [R] Fwd: Question

2018-07-08 Thread Hasan Diwan
Farshad, On Sun, 8 Jul 2018 at 09:29, Farshad Fathian wrote: > > Thank you so much for your reply. But when I install the "RWinEdt" package, > the R unable to install it. I see the below warning: > > "Error: package or namespace load failed for ‘RWinEdt’: > package ‘RWinEdt’ was installed by an R

Re: [R] Fwd: Question

2018-07-08 Thread Jeff Newmiller
I recommend that you post the output of sessionInfo() and copy-paste the commands you attempted to use that failed. Note that I don't use this package or its associated non-free editor, but the CRAN installation check shows no significant problems, though the package hasn't been updated recentl

Re: [R] Fwd: Question

2018-07-08 Thread Farshad Fathian
Thank you so much for your reply. But when I install the "RWinEdt" package, the R unable to install it. I see the below warning: "Error: package or namespace load failed for ‘RWinEdt’: package ‘RWinEdt’ was installed by an R version with different internals; it needs to be reinstalled for use wit

Re: [R] Fwd: Question

2018-07-08 Thread Jeff Newmiller
Read the vignette at [1], which mentions the Read me.txt file [2]. I found both links using Google... you could too. [1] https://cran.r-project.org/web/packages/RWinEdt/index.html. [2] https://github.com/cran/RWinEdt/blob/master/inst/ReadMe.txt On July 8, 2018 7:08:53 AM PDT, Farshad Fathian w

Re: [R] Fwd: Quadratic programming, for loop

2018-06-29 Thread Berwin A Turlach
G'day Maija, On Wed, 27 Jun 2018 08:48:08 +0300 Maija Sirkjärvi wrote: > Thanks for your reply! Unfortunately something is still wrong. > > After the transpose, dvec and Amat are still incompatible. > > > d <- -hsmooth > > dvec <- t(d) > > c <- dvec*Amat > Error in dvec * Amat : non-conforma

Re: [R] Fwd: Quadratic programming, for loop

2018-06-26 Thread Maija Sirkjärvi
Thanks for your reply! Unfortunately something is still wrong. After the transpose, dvec and Amat are still incompatible. > d <- -hsmooth > dvec <- t(d) > c <- dvec*Amat Error in dvec * Amat : non-conformable arrays Moreover, I don't understand the following: > If dvec is of length *J*, then b

Re: [R] Fwd: Quadratic programming, for loop

2018-06-26 Thread Spencer Graves
  sos::findFn('{quadratic programming}') just identified 156 help pages in 68 packages containing the term "quadratic programming".  The function mentioned by Berwin Turlach, "solve.QP", is in package "quadprog", which has not been updated since 2016-12-20.  I've used qudprod successfully,

Re: [R] Fwd: Quadratic programming, for loop

2018-06-26 Thread Jeff Newmiller
The recommended (see the Posting Guide) way to resolve questions like this is to post a reproducible example so we can see the problem occur in our R session. There are a number of Internet resources that can help you get this right such as [1][2][3]. Note that one key to success is to learn ho

Re: [R] Fwd: Quadratic programming, for loop

2018-06-26 Thread Berwin A Turlach
G'day all, On Tue, 26 Jun 2018 11:16:55 +0300 Maija Sirkjärvi wrote: > It seems that my Amat and dvec are incompatible. Amat is a matrix of > zeros size: *2*J-3,J* and dvec is a vector of length *J*. There > should be no problem, but apparently there is. [...] solve.QP solves the quadratic prog

Re: [R] Fwd: Quadratic programming, for loop

2018-06-26 Thread Maija Sirkjärvi
Thanks for the reply! dvec, thus hsmooth, has the same length J. It shouldn't be the problem. 2018-06-26 11:24 GMT+03:00 Eric Berger : > The statement > > dvec <- -hsmooth > > looks like it might be the source of the problem, depending on what > hsmooth is. > > > On Tue, Jun 26, 2018 at 11:16 AM

Re: [R] Fwd: Quadratic programming, for loop

2018-06-26 Thread Eric Berger
The statement dvec <- -hsmooth looks like it might be the source of the problem, depending on what hsmooth is. On Tue, Jun 26, 2018 at 11:16 AM, Maija Sirkjärvi wrote: > Thanks for the reply! I got that figured out, but still have some problems > with the quadratic programming. > > It seems

Re: [R] Fwd: Quadratic programming, for loop

2018-06-26 Thread Maija Sirkjärvi
Thanks for the reply! I got that figured out, but still have some problems with the quadratic programming. It seems that my Amat and dvec are incompatible. Amat is a matrix of zeros size: *2*J-3,J* and dvec is a vector of length *J*. There should be no problem, but apparently there is. The piece o

Re: [R] Fwd: Quadratic programming, for loop

2018-06-14 Thread Boris Steipe
Keep replies on list please. You are not accessing a value from vector Q if you access the zero'th element! R > Q <- c(3, 5, 8) R > Q[0] numeric(0) R > Q[1] [1] 3 R > Q[2] [1] 5 In the first iteration of the loop j is 2 thus j-2 is 0 and that's the reason for the error message: you are trying to

Re: [R] Fwd: Quadratic programming, for loop

2018-06-13 Thread Boris Steipe
Q[j-2] gives you Q[0] in your first inner loop iteration. R arrays start at one. B. > On 2018-06-13, at 07:21, Maija Sirkjärvi wrote: > > Amat[J-1+j-2,j-1]= 1/(Q[j] - Q[j-1]) + 1/(Q[j-1] - Q[j-2]) __ R-help@r-project.org mailing list -- To UNSUBSC

Re: [R] Fwd: Help with R-Calling forth csv.

2018-04-16 Thread Jim Lemon
Hi Mohammad, The plot you attached suggests that the underlying distribution may be a mixture. Is there anything in your data that would explain this, such as laden/unladen, uphill/downhill, different road surface? Jim On Mon, Apr 16, 2018 at 11:31 PM, Mohammad Areida wrote: > Hi, I do not know

Re: [R] Fwd: Re: Reading xpt files into R

2018-04-14 Thread William Dunlap via R-help
> When I look at the SASxport::read.xport function code, it is in fact, _not_ the > same function. But it does have the R statement about what it thinks > qualifies as a SAS xprot file: > > xport.file.header <- "HEADER RECORD***LIBRARY HEADER > RECORD!!!00 " >

Re: [R] Fwd: Re: Reading xpt files into R

2018-04-14 Thread David Winsemius
> On Apr 14, 2018, at 12:18 PM, WRAY NICHOLAS via R-help > wrote: > > > Original Message -- > From: WRAY NICHOLAS > To: peter dalgaard > Date: 14 April 2018 at 20:18 > Subject: Re: [R] Reading xpt files into R > > > Well yesterday I'd downloaded the "foreign" package and t

Re: [R] Fwd: Re: Reading xpt files into R

2018-04-14 Thread William Dunlap via R-help
Does read.xport read both version 5 and version 8 xpt files? This link to the Library of Congress can get you started on how to interpret the header. (It states that Version 8 was introduced in 2012 but was not in wide use as of early 2017.) https://www.loc.gov/preservation/digital/formats/fdd/f

Re: [R] Fwd: R Timeseries tsoutliers:tso

2018-04-13 Thread William Dunlap via R-help
You can record the time to evaluate each line by wrapping each line in a call to system.time(). E.g., expressions <- quote({ # paste your commands here, or put them into a file and use exprs <- parse("thatFile") d.dir <- '/Users/darshanpandya/xx' FNAME <- 'my_data.csv' d.input <- fre

Re: [R] Fwd: Learning advanced R

2018-03-14 Thread Albrecht Kauffmann
I've found the solution to compile the adv-r-book from source: After doing some settings (see: https://travis-ci.org/hadley/adv-r/jobs/353347080/config ) and installation of netlify-cli, the command-line is: Rscript -e 'bookdown::render_book("index.Rmd","bookdown::pdf_book")' This works fine. T

Re: [R] Fwd: Learning advanced R

2018-03-14 Thread Albrecht Kauffmann
I've found two problems in interpreting adv-r-master/book/build-book.r: 1. All pathes in build-book.r refer to the starting-directory "adv-r-master". However, the script build-book.r is located in the directory "book", which is located in directory "adv-r-master". Therefore, pathes starting at "

Re: [R] Fwd: Learning advanced R

2018-03-14 Thread Rich Shepard
On Wed, 14 Mar 2018, Jeff Newmiller wrote: Nothing you have said tells me you have LaTeX working (a binary install of R does not depend on it), but if you actually know it is installed and available to R then that isn't the problem. Since you have not said what you actually did or what errors yo

  1   2   3   4   5   6   >