Re: [R] Output of tapply function as data frame: Problem Fixed

2024-03-28 Thread Ogbos Okike
This is great! Many thanks to all for helping to further resolve the problem. Best wishes Ogbos On Fri, Mar 29, 2024 at 6:39 AM Rui Barradas wrote: > Às 01:43 de 29/03/2024, Ogbos Okike escreveu: > > Dear Rui, > > Thanks again for resolving this. I have already started using the version > > that

Re: [R] Output of tapply function as data frame: Problem Fixed

2024-03-28 Thread Rui Barradas
Às 01:43 de 29/03/2024, Ogbos Okike escreveu: Dear Rui, Thanks again for resolving this. I have already started using the version that works for me. But to clarify the second part, please let me paste the what I did and the error message: set.seed(2024) data <- data.frame( +Date = sample(

Re: [R] Output of tapply function as data frame: Problem Fixed

2024-03-28 Thread Jeff Newmiller via R-help
I would guess your version of R is earlier than 4.1, when the built-in pipe was introduced to the language On March 28, 2024 6:43:05 PM PDT, Ogbos Okike wrote: >Dear Rui, >Thanks again for resolving this. I have already started using the version >that works for me. > >But to clarify the second p

Re: [R] Output of tapply function as data frame

2024-03-28 Thread Ogbos Okike
Dear Deepayan, Thanks for your kind response. Regards Ogbos On Thu, Mar 28, 2024 at 3:40 AM Deepayan Sarkar wrote: > For more complicated examples, the (relatively new) array2DF() > function is also useful: > > > with(data, tapply(count, Date, mean)) |> array2DF() > Var1Value > 1 202

Re: [R] Output of tapply function as data frame: Problem Fixed

2024-03-28 Thread Ogbos Okike
Dear Rui, Thanks again for resolving this. I have already started using the version that works for me. But to clarify the second part, please let me paste the what I did and the error message: > set.seed(2024) > data <- data.frame( +Date = sample(seq(Sys.Date() - 5, Sys.Date(), by = "1 days")

Re: [R] Output of tapply function as data frame

2024-03-27 Thread Deepayan Sarkar
For more complicated examples, the (relatively new) array2DF() function is also useful: > with(data, tapply(count, Date, mean)) |> array2DF() Var1Value 1 2024-03-23 5.416667 2 2024-03-24 5.50 3 2024-03-25 6.00 4 2024-03-26 4.476190 5 2024-03-27 6.538462 6 2024-03-28 5.20 o

Re: [R] Output of tapply function as data frame: Problem Fixed

2024-03-27 Thread Rui Barradas
Às 08:58 de 27/03/2024, Ogbos Okike escreveu: Dear Rui, Nice to hear from you! I am sorry for the omission and I have taken note. Many thanks for responding. The second solution looks elegant as it quickly resolved the problem. Please, take a second look at the first solution. It refused to ru

[R] Output of tapply function as data frame: Problem Fixed

2024-03-27 Thread Ogbos Okike
Dear Rui, Nice to hear from you! I am sorry for the omission and I have taken note. Many thanks for responding. The second solution looks elegant as it quickly resolved the problem. Please, take a second look at the first solution. It refused to run. Looks as if the pipe is not properly position

Re: [R] Output of tapply function as data frame

2024-03-27 Thread Rui Barradas
Às 04:30 de 27/03/2024, Ogbos Okike escreveu: Warm greetings to you all. Using the tapply function below: data<-read.table("FD1month",col.names = c("Dates","count")) x=data$count f<-factor(data$Dates) AB<- tapply(x,f,mean) I made a simple calculation. The result, stored in AB, is of the form

[R] Output of tapply function as data frame

2024-03-26 Thread Ogbos Okike
Warm greetings to you all. Using the tapply function below: data<-read.table("FD1month",col.names = c("Dates","count")) x=data$count f<-factor(data$Dates) AB<- tapply(x,f,mean) I made a simple calculation. The result, stored in AB, is of the form below. But an effort to write AB to a file as a

Re: [R] output from R to simple html

2020-07-09 Thread Jim Lemon
Hi Marc, The "htmlize" function in the prettyR package might be what you are looking for. Jim On Thu, Jul 9, 2020 at 5:02 AM Marc Roos wrote: > > > > I would like to parse some input to an R script and use its result > output (maybe in json) on a web page. I think this shiny framework is a > bit

Re: [R] output from R to simple html

2020-07-08 Thread Jeff Newmiller
Perhaps an answer as simple as using the rmarkdown package to generate a standalone html file is all the OP needs? On July 8, 2020 4:19:37 PM PDT, Michael Hannon wrote: >I can't tell what kind of structure you want to output, but one simple >thing that I've done along these lines is to use knit

Re: [R] output from R to simple html

2020-07-08 Thread Michael Hannon
I can't tell what kind of structure you want to output, but one simple thing that I've done along these lines is to use knitr::kable to output a dataframe in either HTML or LaTeX format (for direct inclusion on a web page or to convert to PDF for other uses). -- Mike On Wed, Jul 8, 2020 at 12:02

Re: [R] output from R to simple html

2020-07-08 Thread Bert Gunter
This might be helpful: https://cran.r-project.org/web/views/WebTechnologies.html Cheers, Bert On Wed, Jul 8, 2020 at 12:02 PM Marc Roos wrote: > > > I would like to parse some input to an R script and use its result > output (maybe in json) on a web page. I think this shiny framework is a > bi

[R] output from R to simple html

2020-07-08 Thread Marc Roos
I would like to parse some input to an R script and use its result output (maybe in json) on a web page. I think this shiny framework is a bit over kill. What is the simplest to implement this? __ R-help@r-project.org mailing list -- To UNSUBSCRIBE

Re: [R] Output multiple sheets to Excel files with openxlsx::write.xlsx

2020-05-27 Thread Jeff Newmiller
give the function a list of data frames. On May 26, 2020 11:21:58 PM PDT, John wrote: >Hi, > >This is my code a few years ago. I was able to output multiple sheet to >an excel file. Nevertheless, the "append" argument appears to be >obsolete. >Now I see only one sheet, the latest added sheet, in

Re: [R] Output multiple sheets to Excel files with openxlsx::write.xlsx

2020-05-27 Thread Ivan Calandra
Hi, Rather than creating a workbook as suggested by Enrico, you can simply supply a list to write.xlsx(); each element will be saved in a separate sheet: write.xlsx(list(a = df1, b = df2), file = fl_out) That is not really appending, but that might work for you. HTH, Ivan -- Dr. Ivan Calandra T

Re: [R] Output multiple sheets to Excel files with openxlsx::write.xlsx

2020-05-27 Thread Enrico Schumann
On Wed, 27 May 2020, John writes: > Hi, > >This is my code a few years ago. I was able to output multiple sheet to > an excel file. Nevertheless, the "append" argument appears to be obsolete. > Now I see only one sheet, the latest added sheet, in the output. Is there > any other way to do it w

[R] Output multiple sheets to Excel files with openxlsx::write.xlsx

2020-05-26 Thread John
Hi, This is my code a few years ago. I was able to output multiple sheet to an excel file. Nevertheless, the "append" argument appears to be obsolete. Now I see only one sheet, the latest added sheet, in the output. Is there any other way to do it with openxlsx::write.xlsx or other functions/pa

[R] output of bounds function (ldbounds package)

2020-03-13 Thread Sorkin, John
I am trying to get information about the output produced by the bounds function. Code that runs the package along with sample output is below. Questions (1) Do the values given under boundaries, lower and upper (Boundaries: TimeLower UpperExit pr. Diff. pr. 1 0.10 -6.9913 6.9913

Re: [R] Output for pasting multiple vectors

2019-06-27 Thread Spencer Brackett
On Thu, Jun 27, 2019 at 10:48 AM Spencer Brackett < spbracket...@saintjosephhs.com> wrote: > Hello, > > Was that helpful in clarifying? > > Best, > > Spencer > > On Tue, Jun 25, 2019 at 5:14 PM Spencer Brackett < > spbracket...@saintjosephhs.com> wrote: > >> Thank you! The following is the result

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Spencer Brackett
Noted. Thank you as well! :) On Tue, Jun 25, 2019 at 5:05 PM Richard O'Keefe wrote: > This has nothing to do with your problem, but given the heavy use of "=" > to bind keyword parameters in R, I find the use of "=" for assignment as > well confusing. It makes code harder to read than it needs

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Spencer Brackett
Thank you! The following is the result of the corrected code using >cnames > cnames [1] "sample.NA.NA.NANA" "TCGA.27.1832.01.NA.NA.NANA" "TCGA.27.1831.01.NA.NA.NANA" [4] "TCGA.28.5216.01.NA.NA.NANA" "TCGA.16.0846.01.NA.NA.NANA" "TCGA.28.5218.01.NA.NA.NANA" [7] "TCGA.06.0178.01.NA.

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Richard O'Keefe
This has nothing to do with your problem, but given the heavy use of "=" to bind keyword parameters in R, I find the use of "=" for assignment as well confusing. It makes code harder to read than it needs to be. The historic " <- " assignment makes the distinction obvious. On Wed, 26 Jun 2019 at

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Rui Barradas
Hello, The following works. First, get the colnames you have posted in a format that R can process. in your code you would skip this. cnames <- scan(what = character(), text = ' "sample.NA.NA.NANA" "TCGA.27.1832.01.NA.NA.NANA" "TCGA.27.1831.01.NA.NA.NANA" "TCGA.28.5216.01.NA.NA.NANA" "TCGA.16.

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Spencer Brackett
Doing so results in the following subset of my data... >colnames(meth)[1:10] [1] "sample.NA.NA.NANA" "TCGA.27.1832.01.NA.NA.NANA" "TCGA.27.1831.01.NA.NA.NANA" [4] "TCGA.28.5216.01.NA.NA.NANA" "TCGA.16.0846.01.NA.NA.NANA" "TCGA.28.5218.01.NA.NA.NANA" [7] "TCGA.06.0178.01.NA.NA.NANA" "TC

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Spencer Brackett
So I can run the suggested `stringsAsFactors=FALSE` argument following the 'colnames(meth)[1:10]' one I just used? Best, Spencer On Tue, Jun 25, 2019 at 3:28 PM Jeff Newmiller wrote: > A "very large" output from dput(head(meth)) may just mean that"meth" has > factors instead of character colum

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Jeff Newmiller
A "very large" output from dput(head(meth)) may just mean that"meth" has factors instead of character columns. I recommend using the `stringsAsFactors=FALSE` argument if the data frame is being loaded using read.table or one of its variants. It almost always makes better sense to create factors

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Spencer Brackett
Mr. Barradas, Oh haha my mistake. The following is the output you requested [1] "sample.NA.NA.NANA" [2] "TCGA.27.1832.01.NA.NA.NANA" [3] "TCGA.27.1831.01.NA.NA.NANA" [4] "TCGA.28.5216.01.NA.NA.NANA" [5] "TCGA.16.0846.01.NA.NA.NANA" [6] "TCGA.28.5218.01.NA.NA.NANA" [7] "TCGA.06.0178.01.N

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Rui Barradas
Hello, No, you have not understood, post the colnames, not the row.names. Run colnames(meth)[1:10] and post the output of that code line. Hope this helps, Rui Barradas Às 19:31 de 25/06/19, Spencer Brackett escreveu: The requested reprex Rendering reprex... Error in parse(text = x, ke

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Spencer Brackett
The requested reprex Rendering reprex... Error in parse(text = x, keep.source = TRUE) : :26:2: unexpected ')' 25: 26: 2) ^ And the subset of the data row.names = c(NA, 6L), class = "data.frame") Best, Spencer On Tue, Jun 25, 2019 at 2:25 PM Rui Barradas wrote: > Hello, > >

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Rui Barradas
Hello, No I wasn't expecting a very large file. Try to make a reproducible example. If the problem seems to be with the sapply/strsplit post a subset of the data like just some of the colnames: colnames(meth)[1:10] This would allow us to run the code you are having trouble with. Hope this

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Spencer Brackett
The result of dput(head(meth)) is a very large data table/listing of data by category of what I presume to be the data from the two TCGA .txt files I referenced previously. Is this the output you were expecting? On Tue, Jun 25, 2019 at 12:19 PM Rui Barradas wrote: > Hello, > > 1) That error com

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Rui Barradas
Hello, 1) That error comes from not closing }) after the paste() instruction. The complete statement would be colnames(meth) = sapply(colnames(meth), function(i){ c1 = strsplit(i, split ='\\', fixed = T)[[1]] c1[4] = paste(strsplit(c1[4],split = "",fixed = T)[[1]][1:2],collapse = "") p

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Spencer Brackett
The following is what I have implemented thus far... The file object for the two files listed in lines 1-2 was set in my working directory, and are under the folder "Vakul's GBM Code"... hence the source of the odd 'prefix' for .txt files shown >library(data.table)>.anno = as.data.frame(fread(fil

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Spencer Brackett
Mr. Barradas, I got the same "output" as before, which is the + indicating that the expression is incomplete (according to some R users response in this chain). Should the argument perhaps be c1 = strsplit(i, split = '\\', fixed = T)[[1]] thereby eliminating the "." ? The reprex and error me

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Rui Barradas
Hello, Maybe with c1 = strsplit(i, split = '\\.', fixed = T)[[1]] instead of split = '.' The dot is a metacharacter that matches any character so it has to be escaped. Hope this helps, Rui Barradas Às 16:11 de 25/06/19, Spencer Brackett escreveu: c1 = strsplit(i,split ='.', fixed = T)[[1

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread David Winsemius
On 6/25/19 6:29 AM, Spencer Brackett wrote: Mr. Barradas, My apologies for the delayed response. No, (meth) is not a dataset within CRAN. I’m not sure why my supervisor wrote that in as the object for the bit of script I shared previously. Assuming that the correct object for this particula

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Spencer Brackett
Hello, The following is the bit of code I was having trouble with reproducing; (meth) being the set matrix of the dataset I am working within R... colnames(meth) = sapply(colnames(meth), function(i){ c1 = strsplit(i,split ='.', fixed = T)[[1]] c1[4] = paste(strsplit(c1[4],split = "",fixed = T

Re: [R] Output for pasting multiple vectors

2019-06-25 Thread Spencer Brackett
Mr. Barradas, My apologies for the delayed response. No, (meth) is not a dataset within CRAN. I’m not sure why my supervisor wrote that in as the object for the bit of script I shared previously. Assuming that the correct object for this particular command is to be a data, the one with which we

Re: [R] Output for pasting multiple vectors

2019-06-22 Thread Rui Barradas
Hello, I cannot find the dataset. meth is a (CRAN) package dataset? Rui barradas Às 02:11 de 22/06/19, Spencer Brackett escreveu: Hello, I am attempting to paste multiple vectors using the paste() function for a dataset that I'm working with. Shouldn't I be receiving some kind of output as a

Re: [R] Output for pasting multiple vectors

2019-06-21 Thread Jeff Newmiller
Note that just editing in R (or RStudio, or Notepad, or whatever) will not solve the problem... you MUST learn how to use your email client to set the format to send at least your R-help emails in plain text. If you don't do that, the email program will just screw up your hard work. I do think

Re: [R] Output for pasting multiple vectors

2019-06-21 Thread David Winsemius
Sent from my iPhone > On Jun 21, 2019, at 6:48 PM, Spencer Brackett > wrote: > > My apologies. Is there a way to edit this within R? Most people use an editor or an IDE to work on their code. The code you presented didn’t seem be doing what you were describing. You should put together a

Re: [R] Output for pasting multiple vectors

2019-06-21 Thread David Winsemius
All the +-signs are telling you that the expression is not complete. Please read the posting guide. I’m pretty sure you’ve already been warned NOT to use html. — David. Sent from my iPhone > On Jun 21, 2019, at 6:11 PM, Spencer Brackett > wrote: > > Hello, > > I am attempting to paste m

Re: [R] Output for pasting multiple vectors

2019-06-21 Thread Spencer Brackett
My apologies. Is there a way to edit this within R? On Fri, Jun 21, 2019 at 9:47 PM David Winsemius wrote: > All the +-signs are telling you that the expression is not complete. > Please read the posting guide. I’m pretty sure you’ve already been warned > NOT to use html. > > — > David. > > Sent

Re: [R] Output for pasting multiple vectors

2019-06-21 Thread Spencer Brackett
Would output <-paste() be part of the solution perhaps? Reading up on the matter now. Best, Spencer On Fri, Jun 21, 2019 at 9:11 PM Spencer Brackett < spbracket...@saintjosephhs.com> wrote: > Hello, > > I am attempting to paste multiple vectors using the paste() function for a > dataset that I

[R] Output for pasting multiple vectors

2019-06-21 Thread Spencer Brackett
Hello, I am attempting to paste multiple vectors using the paste() function for a dataset that I'm working with. Shouldn't I be receiving some kind of output as a result of the following? meth=as.matrix(meth) > colnames(meth) = sapply(colnames(meth), function(i){ + c1 = strsplit(i,split ='.', f

Re: [R] interpretation of R output for exact permutation test

2019-06-07 Thread Patrick (Malone Quantitative)
I suspect Massimo meant to refer to the output z as "critical ratio," vs. "critical value." But I agree with Massimo there's no interpretation of it with an exact test. The p-value is the meaningful output. Pat On Fri, Jun 7, 2019 at 5:40 AM Duncan Murdoch wrote: > > On 07/06/2019 3:08 a.m., ma

Re: [R] interpretation of R output for exact permutation test

2019-06-07 Thread Duncan Murdoch
On 07/06/2019 3:08 a.m., massimo bressan wrote: given this reproucible example library(coin) independence_test(asat ~ group, data = asat, ## exact null distribution distribution = "exact") I'm wondering why the default results are reporting also the critical value Z by considering that this me

[R] interpretation of R output for exact permutation test

2019-06-07 Thread massimo bressan
given this reproucible example library(coin) independence_test(asat ~ group, data = asat, ## exact null distribution distribution = "exact") I'm wondering why the default results are reporting also the critical value Z by considering that this method is supposed to be "exact", i.e. computing the

Re: [R] Output of arima

2018-11-14 Thread Ashim Kapoor
Dear Eric, Many thanks for your reply. Best Regards, Ashim On Wed, Nov 14, 2018 at 4:05 PM Eric Berger wrote: > Hi Ashim, > Per the help page for arima(), it fits an ARIMA model to the specified > time series - but the caller has to specify the order - i.e. (p,d,q) - of > the model. > The defa

Re: [R] Output of arima

2018-11-14 Thread Eric Berger
Hi Ashim, Per the help page for arima(), it fits an ARIMA model to the specified time series - but the caller has to specify the order - i.e. (p,d,q) - of the model. The default order is (0,0,0) (per the help page). Hence your two calls are different. The first call is equivalent to order=c(0,0,0)

Re: [R] Output of arima

2018-11-14 Thread Ashim Kapoor
Dear Eric and William, Why do the 1st and 2nd incantation of arima return sigma^2 as 5.233 vs .? The help for arima says ---> sigma2: the MLE of the innovations variance. By that account the 1st result is incorrect. I am a little confused. set.seed(123) b <- arima.sim(list(order = c(1,0,0),

Re: [R] Output of arima

2018-11-13 Thread William Dunlap via R-help
Try supplying the order argument to arima. It looks like the default is to estimate only the mean. > arima(b, order=c(1,0,0)) Call: arima(x = b, order = c(1, 0, 0)) Coefficients: ar1 intercept 0.8871 0.2369 s.e. 0.0145 0.2783 sigma^2 estimated as 1.002: log likelihood

Re: [R] Output of arima

2018-11-13 Thread Eric Berger
Try google'ing for 'variance of an AR(1) process'. With the same seed, if you set n=100, you will get something that will compare well with what you discover from your search. On Tue, Nov 13, 2018 at 2:04 PM Ashim Kapoor wrote: > Dear All, > > Here is a reprex: > > set.seed(123) > b <- arima

[R] Output of arima

2018-11-13 Thread Ashim Kapoor
Dear All, Here is a reprex: set.seed(123) b <- arima.sim(list(order = c(1,0,0),ar= .9),n=1000,sd=1) arima(b) Call: arima(x = b) Coefficients: intercept 0.2250 s.e. 0.0688 sigma^2 estimated as 4.735: log likelihood = -2196.4, aic = 4396.81 > Should sigma^2 not be equal to

Re: [R] [FORGED] How to write an estimated seasonal ARIMA model from R output?

2017-06-20 Thread Rolf Turner
On 20/06/17 17:21, Y S wrote: I'm trying to use the following command. arima (x, order = c(p,d,q), seasonal =list(order=c(P,D,Q), period=s) How can I write an estimated seasonal ARIMA model from the outputs. To be specifically, which sign to use? I know R uses a different signs from S plus. Is

[R] How to write an estimated seasonal ARIMA model from R output?

2017-06-20 Thread Y S
I'm trying to use the following command. arima (x, order = c(p,d,q), seasonal =list(order=c(P,D,Q), period=s) How can I write an estimated seasonal ARIMA model from the outputs. To be specifically, which sign to use? I know R uses a different signs from S plus. Is it correct that the model is: (

[R] output of filled.contour

2017-04-15 Thread 宓辰羲
Dear all: I used the argument of filled.contour for drawing. I just wonder how to shorten the spacing between the key and the picture? Attached below is the output. Thanks very much for the kind help! Best Cheers Chenxi __ R-help@r-pro

Re: [R] output

2017-01-17 Thread Marc Schwartz
Hi Val, Presuming that the Excel file that you are trying to read has a second worksheet, which is what the read.xls() command you are using is trying to do, the problem may be that XLSX file support has not been installed for the gdata package, which is what I presume you are using. You do not

Re: [R] output

2017-01-17 Thread Val
Hi Marc and all, Last time you suggest me to use WriteXLS function to write more than 65,000 row in excel. Creating the file worked fine. Now I wanted to read it using the WriteXLS function but have a problem,. The file has more than one sheets. Here is the script and the error message.

Re: [R] [FORGED] Export R output in Excel

2016-12-30 Thread John McKown
On Thu, Dec 29, 2016 at 4:32 PM, Erich Subscriptions < erich.s...@neuwirth.priv.at> wrote: > Just a very brief footnote. > I is easy to write badly structured spreadsheets. > But if people dong this would not have spreadsheets > and be forded to write code, they probably also > would write badly s

Re: [R] [FORGED] Export R output in Excel

2016-12-29 Thread Erich Subscriptions
Just a very brief footnote. I is easy to write badly structured spreadsheets. But if people dong this would not have spreadsheets and be forded to write code, they probably also would write badly structured code. There is a lot of bad R code around also! > On Dec 29, 2016, at 15:40, Bert Gunte

Re: [R] Export R output in Excel

2016-12-29 Thread William Michels via R-help
Courier New with monospaced letters > > Cheers > Petr > > >> -Original Message- >> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Bryan Mac >> Sent: Wednesday, December 28, 2016 10:45 PM >> To: R-help@r-project.org >> Subject

Re: [R] [FORGED] Export R output in Excel

2016-12-29 Thread Bert Gunter
Oh nuts! I replied all. I apologize for the noise! Cheers, Bert 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 Thu, Dec 29, 2016 at 6:40 AM, Bert Gunter wro

Re: [R] [FORGED] Export R output in Excel

2016-12-29 Thread Bert Gunter
(Private -- as this is just my personal opinion and not really helpful). I found your comments informative. Thank you. My own experience with scientific colleagues -- biologists mostly -- who use Excel in the way that you describe is that the "haptic" (great word!) ease with which they manipulate

Re: [R] Export R output in Excel

2016-12-29 Thread Bryan Mac
Hi Jim, Your assumption is correct. When running the analyses in R and want to export the output that appears in the console window to Excel(.csv) file. I believe it is easier to do if the export it done to an Excel (.CSV) file. So is there a way to export the analyses in the console window to a

Re: [R] Export R output in Excel

2016-12-29 Thread Spencer Graves
writes an Excel workbook with 3 sheets. That may not be what you want, but it might provide other options. Spencer Graves On 2016-12-29 3:19 AM, Jim Lemon wrote: Hi Bryan, What functions like "htmlize" (prettyR) do is format the basic R output into HTML tables with the option of i

Re: [R] [FORGED] Export R output in Excel

2016-12-29 Thread peter dalgaard
the linear regression. > > This makes little to no sense to me. Spreadsheets are for use in storing > data, not for displaying the output of analyses. (I know that Excel users do > this sort of thing, but then people do all sorts of irrational things.) > >> I googled “Expo

Re: [R] [FORGED] Export R output in Excel

2016-12-29 Thread Erich Subscriptions
Well, my few cents again. the packages openxslx and xlsx allow to write dataframes as Excel sheets. (xlsx is Java based, so it has more requirements to run than openxlsx, which is just C++ based) On Windows, R tools for Visual Studio allows Excel export. For Windows, there also is our Excel add-in

Re: [R] Export R output in Excel

2016-12-29 Thread Jim Lemon
Hi Bryan, What functions like "htmlize" (prettyR) do is format the basic R output into HTML tables with the option of interspersed graphics. While I usually stop at the HTML stage, the output files can be imported into Word for those who cannot work out how to open them with an HTML

Re: [R] Export R output in Excel

2016-12-29 Thread John Dougherty
mail.com > Your purpose is not clear. If you are planning to do MORE statistical work with excel using R output, don't do it. Learn the R equivalents. There's nothing that you can do in Excel that can't be done in R. And, while Microsoft has made great strides in the reliability

Re: [R] Export R output in Excel

2016-12-28 Thread PIKAL Petr
e font like Courier New with monospaced letters Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Bryan Mac > Sent: Wednesday, December 28, 2016 10:45 PM > To: R-help@r-project.org > Subject: [R] Export R output in Excel &

Re: [R] Export R output in Excel

2016-12-28 Thread Omar André Gonzáles Díaz
use "write.csv("you-df", "name-of-file.csv", row.names = FALSE). And Google please, as others have suggested. 2016-12-28 21:33 GMT-05:00 Jim Lemon : > Hi Bryan, > When I have to do something like this, I usually go through HTML > output and import it into MS Word. I am not suggesting that this i

Re: [R] Export R output in Excel

2016-12-28 Thread Jim Lemon
Hi Bryan, When I have to do something like this, I usually go through HTML output and import it into MS Word. I am not suggesting that this is the best thing to do, but it might get you out of trouble. I'm not sure whether importing HTML into Excel will work as well. I assume that you are running a

Re: [R] [FORGED] Export R output in Excel

2016-12-28 Thread Bryan Mac
Hi Rolf, I wanted to export the output/results of R to an Excel file for easier comparisons/reporting. When I tried to copy and paste my output to an excel file the formatting was off. I want to export my descriptive stats and the linear regression. I googled “Export R output to excel” but did

Re: [R] [FORGED] Export R output in Excel

2016-12-28 Thread Rolf Turner
makes little to no sense to me. Spreadsheets are for use in storing data, not for displaying the output of analyses. (I know that Excel users do this sort of thing, but then people do all sorts of irrational things.) I googled “Export R output to excel” but did not find most of the hints

Re: [R] [FORGED] Export R output in Excel

2016-12-28 Thread Rolf Turner
On 29/12/16 10:45, Bryan Mac wrote: Hi, How do I export results from R to Excel in a format-friendly way? For example, when I copy and paste my results into excel, the formatting is messed up. Short answer: *Don't*. ("Friends don't let friends use excel for statistics.") Longer answer:

[R] Export R output in Excel

2016-12-28 Thread Bryan Mac
Hi, How do I export results from R to Excel in a format-friendly way? For example, when I copy and paste my results into excel, the formatting is messed up. Thanks. Bryan Mac bryanmac...@gmail.com __ R-help@r-project.org mailing list -- To UNSUBSCRI

Re: [R] output

2016-12-12 Thread Marc Schwartz
Hi, With the WriteXLS() function, from the package of the same name, if you specify '.xlsx' for the file name extension, the function will create an Excel 2007 compatible file, which can handle worksheets of up to 1,048,576 rows by 16,384 columns. Thus: WriteXLS(dat, "test4.xlsx", row.names

Re: [R] output

2016-12-12 Thread Jeff Newmiller
1) I recommend against using xls for very large data sets. (Not that xlsx is really that much better.) If you really think this is necessary you will probably need to split the data frame and write each element of the resulting list. See ?split. 2) Google tells me (as it could have told you) th

[R] output

2016-12-12 Thread Val
Hi all, I have a data frame with more than 100,000 rows. datx <- function(n,mean,sd) { mean+sd*scale(rnorm(n)) } dat <- datx(11,10,2) 1) WriteXLS(dat, "test4.xls", row.names=FALSE) Error in WriteXLS(dat, "test4.xls", row.names = FALSE) : One or more of the data frames named in 'x' exceeds

Re: [R] Output formatting in PDF

2016-10-11 Thread Duncan Mackay
lp-boun...@r-project.org] On Behalf Of Preetam Pal Sent: Tuesday, 11 October 2016 19:14 To: r-help@r-project.org Subject: [R] Output formatting in PDF Hi, Can you please help me with the following output formatting: I am planning to include 2 plots and some general description in a one-page PDF

Re: [R] Output formatting in PDF

2016-10-11 Thread Dominik Schneider
You may be able to do everything you need with the cowplot package. On Tue, Oct 11, 2016 at 4:26 AM, Preetam Pal wrote: > Hey Enrico, > LaTex is not possible actually. > > On Tue, Oct 11, 2016 at 2:29 PM, Enrico Schumann > wrote: > > > On Tue, 11 Oct 2016, Preetam Pal writes: > > > > > Hi, > >

Re: [R] Output formatting in PDF

2016-10-11 Thread Preetam Pal
Hey Enrico, LaTex is not possible actually. On Tue, Oct 11, 2016 at 2:29 PM, Enrico Schumann wrote: > On Tue, 11 Oct 2016, Preetam Pal writes: > > > Hi, > > > > Can you please help me with the following output formatting: > > I am planning to include 2 plots and some general description in a >

Re: [R] Output formatting in PDF

2016-10-11 Thread Jeff Newmiller
Or package "knitr". Note that knitr can be used with LaTeX or markdown syntax, but from your description the former would be advised. -- Sent from my phone. Please excuse my brevity. On October 11, 2016 1:59:59 AM PDT, Enrico Schumann wrote: >On Tue, 11 Oct 2016, Preetam Pal writes: > >> Hi,

Re: [R] Output formatting in PDF

2016-10-11 Thread Enrico Schumann
On Tue, 11 Oct 2016, Preetam Pal writes: > Hi, > > Can you please help me with the following output formatting: > I am planning to include 2 plots and some general description in a one-page > PDF document, such that > >- I'll leave some appropriate margin on the PDF- say, 1.5 inches >top,

[R] Output formatting in PDF

2016-10-11 Thread Preetam Pal
Hi, Can you please help me with the following output formatting: I am planning to include 2 plots and some general description in a one-page PDF document, such that - I'll leave some appropriate margin on the PDF- say, 1.5 inches top,right, bottom and left (will decide based on overall appe

Re: [R] output my results into Excel

2016-03-02 Thread Dalthorp, Daniel
alue, not a data frame. However, I am not > sure. Any advice? > > > Thanks for your help. > > > Mike > > > -- > *From:* Dalthorp, Daniel > *Sent:* Wednesday, March 2, 2016 3:50 PM > *To:* Michael > *Cc:* r-help@r-project.org > *Sub

Re: [R] output my results into Excel

2016-03-02 Thread Dalthorp, Daniel
Hi Michael, If you are working in Windows: # You can put the matrix directly into the clipboard write.table(PRdist, file = 'clipboard', sep = '\t', row.names = F, col.names = F) The "sep" argument tells what character to use for separating columns. Default for Excel is tab (i.e. '\t') Default fo

Re: [R] output my results into Excel

2016-03-02 Thread Sarah Goslee
Hi Michael, Googling "export R data to Excel" gives LOTS of advice, including packages that can write your data directly to Excel spreadsheets. I don't use Excel, so I haven't tried any of those, but using write.csv() to export your data will create something that my colleagues who use Excel have

[R] output my results into Excel

2016-03-02 Thread Michael
I can get R to calculate the distance that I want between my data points. However, I am stuck trying to get R to output the data so I can paste it into Excel. Instead, R outputs a matrix mess in the console. Below are the steps I am taking to calculate the distance between my data. Also, I h

Re: [R] r output as html or pdf without rstudio

2016-01-08 Thread Greg Snow
Yes, you can use the knitr package directly (that is what Rstudio uses, but it is its own package). On Fri, Jan 8, 2016 at 1:16 PM, Ragia . wrote: > dear group, > is there a way to write my outputs to any kind of files ( the output contains > text and graph) using R only without installing rstud

[R] r output as html or pdf without rstudio

2016-01-08 Thread Ragia .
dear group, is there a way to write my outputs to any kind of files ( the output contains text and graph) using R only without installing rstudio and using rmd  files. thanks in advance Ragia __ R-help@r-project.org m

Re: [R] Johansen Test of Cointegration:How to access rows in R output

2015-10-05 Thread Pfaff, Bernhard Dr.
p [mailto:r-help-boun...@r-project.org] Im Auftrag von Preetam Pal Gesendet: Sonntag, 4. Oktober 2015 18:43 An: r-help@r-project.org Betreff: [R] Johansen Test of Cointegration:How to access rows in R output Hi guys, I ran ca.jo(data,type="trace", ecdet="none",k=2) i.e. Johans

[R] Johansen Test of Cointegration:How to access rows in R output

2015-10-04 Thread Preetam Pal
Hi guys, I ran ca.jo(data,type="trace", ecdet="none",k=2) i.e. Johansen's Trace test on R-Studio (package: "urca")and got the output below: I have 3 questions about this: A> How do I programmatically access the columns("test", "10pct" etc) in any row corresponding to, say, r < = 1 in the output?

Re: [R] Output In R

2015-08-22 Thread John Kane
nd=== John Kane Kingston ON Canada > -Original Message- > From: jrkrid...@inbox.com > Sent: Sat, 22 Aug 2015 05:49:32 -0800 > To: shivibha...@ymail.com, r-help@r-project.org > Subject: Re: [R] Output In R > > We are talking at cross-purposes here bec

Re: [R] Output In R

2015-08-22 Thread Marc Schwartz
> dat1 <- data.frame(matrix( rnorm(100), ncol = 5)) > dat1.table <- xtable(dat1) > print(dat1.table, > include.rownames=FALSE, > booktabs = TRUE) > @ > > \end{document} > > End Latex file > > John Kane > Kingston

Re: [R] Output In R

2015-08-22 Thread John Kane
clude.rownames=FALSE, booktabs = TRUE) @ \end{document} End Latex file John Kane Kingston ON Canada > -Original Message- > From: shivibha...@ymail.com > Sent: Fri, 21 Aug 2015 12:26:50 -0700 (PDT) > To: r-help@r-project.org > Subject: Re: [R

Re: [R] Output In R

2015-08-21 Thread Shivi82
Thanks Jeff, this is helpful. The reason i am curious to know this is because I have worked for a long duration in SAS where in it gives us the flexibility to create a data set of our analysis and then we can easily detail out the same to the end user. In R seems like View or Sweave or Shiny are

  1   2   3   4   >