Re: [R] Help needed! Pre-processing the dataset before splitting - model building - model tuning - performance evaluation

2024-09-25 Thread Rui Barradas
Às 06:04 de 24/09/2024, Bekzod Akhmuratov escreveu: Below is the link for a dataset on focus. I want to split the dataset into training and test set, use training set to build the model and model tune, use test set to evaluate performance. But before doing that I want to make sure that original d

Re: [R] Help needed with olsrr package

2023-08-24 Thread Ivan Krylov
On Thu, 24 Aug 2023 10:56:00 +0530 Ashim Kapoor wrote: > When I open a terminal, type R and run my code, it runs fine. When I > start Emacs, start an inferior R process using ESS, the error comes > back. Thankfully, in both of these cases you get an interactive R session. Compare sessionInfo()

Re: [R] Help needed with olsrr package

2023-08-22 Thread Eric Berger
I copied your data and ran your code. It worked fine for me. > sessionInfo() R version 4.3.1 (2023-06-16) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 22.04.2 LTS Matrix products: default BLAS: /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 LAPACK: /usr/lib/x86_64-linux

Re: [R] Help needed with olsrr package

2023-08-22 Thread Ivan Krylov
В Tue, 22 Aug 2023 16:06:22 +0530 Ashim Kapoor пишет: > Error in eval(predvars, data, env) : object 'Var.One' not found Use traceback() to find out in which function the error was raised. This looks like a bug in the olsrr package. Could be due to use of string manipulation in order to work with

Re: [R] Help needed to understand an error message produced from furrr and future packages

2021-11-25 Thread Jeff Newmiller
This question is off-topic here (see the Posting Guide, you are asking about a contributed package). Like walking down the street and asking this question, someone might know about it, but most will be puzzled. You should know that multicore is quite sensitive to which kinds of operations you p

Re: [R] Help needed with data visualization in R

2021-11-01 Thread Jim Lemon
Hi bharat, There are a number of ways to do this in R. One is: library(plotrix) example(size_n_color) Jim On Tue, Nov 2, 2021 at 6:43 AM bharat rawlley via R-help wrote: > > Thank you very much, for your time and response! > This did resolve my issue and I apologize if the question was a littl

Re: [R] Help needed with data visualization in R

2021-11-01 Thread bharat rawlley via R-help
Thank you very much, for your time and response!  This did resolve my issue and I apologize if the question was a little too straightforward - I did try to create bubble plots in excel but that did not work, hence, I asked here since it is more of a diagram and less of a plot. Thank you very mu

Re: [R] Help needed with data visualization in R

2021-11-01 Thread Bert Gunter
... a simple web search on "bubble plots R" (what else?) would have brought up many relevant hits. One should always try such obvious "homework" before posting here. Better and quicker info often results. Bert Gunter "The trouble with having an open mind is that people keep coming along and stick

Re: [R] Help needed with data visualization in R

2021-11-01 Thread Eric Berger
I have no experience with this but I did a search and found the following which looks close to what you are looking for https://stackoverflow.com/questions/69755844/is-it-possible-to-draw-the-following-diagram-in-r On Mon, Nov 1, 2021 at 5:06 PM bharat rawlley via R-help < r-help@r-project.org>

Re: [R] Help needed with getting a decent image of ggplot2 graph

2021-08-24 Thread Jim Lemon
If they can't work out how to resize an image, a 300 dpi resolution leaves you with an image a bit over 37 mm wide. Doesn't add up for me. Jim On Wed, Aug 25, 2021 at 10:00 AM bharat rawlley wrote: > > I tried doing that. > > So the real title of my graph is much longer than men and women and is

Re: [R] Help needed with getting a decent image of ggplot2 graph

2021-08-24 Thread bharat rawlley via R-help
I tried doing that.  So the real title of my graph is much longer than men and women and isn't not being incorporated in that width.  I think I'll have to settle for a smaller title  Sent from Yahoo Mail on Android On Tue, 24 Aug 2021 at 6:54 PM, Jim Lemon wrote: Ah, an _upper_ limit. Why

Re: [R] Help needed with getting a decent image of ggplot2 graph

2021-08-24 Thread Jim Lemon
Ah, an _upper_ limit. Why not let tiff() work out the resolution (res=NA - the default) and see if that passes muster. Jim On Wed, Aug 25, 2021 at 8:42 AM bharat rawlley wrote: > > I am able to change but the place where I have to submit a similar graph has > kept a fixed upper limit of 440 pix

Re: [R] Help needed with getting a decent image of ggplot2 graph

2021-08-24 Thread bharat rawlley via R-help
I am able to change but the place where I have to submit a similar graph has kept a fixed upper limit of 440 pixels for the width and an upper limit of 300 for the dpi. On Tuesday, 24 August, 2021, 06:36:16 pm GMT-4, Jim Lemon wrote: Hi bharat, I think there is a conflict between your

Re: [R] Help needed with getting a decent image of ggplot2 graph

2021-08-24 Thread Jim Lemon
Hi bharat, I think there is a conflict between your image size and resolution. You need a lot larger height and width in pixels to get 300 dpi resolution for the whole plot. tiff("test.tiff", units = "px", width = 2200, height = 1250, res = 300) would probably do it for you. How come you can't c

Re: [R] Help needed with ggplot2

2021-08-21 Thread Avi Gross via R-help
r issues but there are documented ways. Bold text is an example that can be changed in many places. In this case, note the addition to the following part from above: fontface="bold as in: geom_text(aes(label = percentage), size = 4, position = position_dodge(width = 1.1),

Re: [R] Help needed with ggplot2

2021-08-21 Thread bharat rawlley via R-help
Thank you, I have tried to do a better job here -  Data -  email <- structure(list(percentage = c(57.14, 29.76, 69.32, 28.41, 57.89,                                        34.21, 58.59, 33.33, 48.42, 42.11, 59.77, 29.89, 72.13, 18.03,                                        53.33, 33.33, 55.1,

Re: [R] Help needed with ggplot2

2021-08-21 Thread Bert Gunter
See ?dput for how to provide a reproducible example (a reprex). Or see here: https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example It will improve your chance of getting a helpful and quick response. Cheers, Bert Gunter "The trouble with having an open mind is th

Re: [R] Help needed in double bar plot made using ggplot2

2021-08-20 Thread ken
Thanks Dr. Burradas too. i also had the same question. regards August 20, 2021 6:02 AM, "bharat rawlley via R-help" wrote: > Thank you, Dr. Burradas! > That resolved my query > Have a great rest of your day > On Thursday, 19 August, 2021, 04:47:42 pm GMT-4, Rui Barradas > wrote: > __

Re: [R] Help needed in double bar plot made using ggplot2

2021-08-19 Thread bharat rawlley via R-help
Thank you, Dr. Burradas!  That resolved my query Have a great rest of your day On Thursday, 19 August, 2021, 04:47:42 pm GMT-4, Rui Barradas wrote: Hello, Glad it helped. As for making everything red, that only happens with the 2nd geom_text I posted. And this is because color = "red

Re: [R] Help needed in double bar plot made using ggplot2

2021-08-19 Thread Rui Barradas
Hello, Glad it helped. As for making everything red, that only happens with the 2nd geom_text I posted. And this is because color = "red" is not in aes(). In the 1st geom_text, I have aes( etc , color = gender) and this makes the color depend on gender. To make the text and bars colors the s

Re: [R] Help needed in double bar plot made using ggplot2

2021-08-19 Thread bharat rawlley via R-help
Thank you very much for the elaborate response, Dr. Barradas! It was extremely helpful!  This resolves all my queries except one; I am unable to assign aesthetic colors in a way that the bar and text colors remain the same. I am not sure how to exactly assign color outside of aes. I used the fo

Re: [R] Help needed in double bar plot made using ggplot2

2021-08-19 Thread Rui Barradas
Hello, First, sample data. set.seed(2021) year <- rep(2016:2019, 2) percentage <- runif(length(year), 0.25, 0.70) gender <- rep(c("M", "F"), each = 4) graph_text <- data.frame(year, percentage, gender) 1) You have expand = c(0,0). Like this there is no space above the greatest bar. In order t

Re: [R] Help needed with gender_df

2021-08-01 Thread bharat rawlley via R-help
That was helpful, thank you very much!  On Sunday, 1 August, 2021, 01:49:30 pm GMT-4, Rui Barradas wrote: Hello, According to the documentation, This function predicts the gender of a first name given a year or range of years in which the person was born. and your data does not in

Re: [R] Help needed with gender_df

2021-08-01 Thread Rui Barradas
Hello, According to the documentation, This function predicts the gender of a first name given a year or range of years in which the person was born. and your data does not include first names, only names in a form similar to Last First_name_initial. This function/package is not appropr

Re: [R] Help needed: gdal-configuration to install sf package in Mac OS Catalina

2020-04-07 Thread David Winsemius
On 4/5/20 9:27 PM, Bijesh Mishra wrote: Hi, I am using R in Mac. I was trying to install sf package but could not and got error. Detail message of error is under this email. It seems like I have to run gdal- configuration, but not sure what that means. Do you have any idea about that? GDAL i

Re: [R] Help needed: gdal-configuration to install sf package in Mac OS Catalina

2020-04-06 Thread Ivan Krylov
On Sun, 5 Apr 2020 23:27:08 -0500 Bijesh Mishra wrote: > configure: error: gdal-config not found or not executable. This would mean that gdal [1], which is a dependency of the sf package, is not installed (or not available on $PATH, or...). If you use Homebrew [2], try running 'brew install gdal

Re: [R] Help needed for one question (Urgent)

2019-11-05 Thread Chandeep Kaur
Dear All, Thanks for all the support and help and I think I was able to solve my problem. Thanks a ton. Best Regards, Chandeep Kaur On Tue, 5 Nov 2019, 8:57 pm Richard O'Keefe, wrote: > This looks vaguely like something from exercism. > Let's approach it logically. > xa xb xc ya yb zc > We s

Re: [R] Help needed for one question (Urgent)

2019-11-05 Thread Richard O'Keefe
This looks vaguely like something from exercism. Let's approach it logically. xa xb xc ya yb zc We see two patterns here: A: x x x y y z B: a b c a b c If only we had these two character vectors, we could use paste(A, B, sep = "") to get the desired result. So now we have reduced the problem to

Re: [R] Help needed for one question (Urgent)

2019-11-05 Thread Jeff Newmiller
In other words... read the Posting Guide. On November 5, 2019 2:52:34 AM PST, Jim Lemon wrote: >Homework Chandeep, homework. > >Jim > >On Tue, Nov 5, 2019 at 9:40 PM Chandeep Kaur >wrote: >> >> Dear Team, >> >> Could you please help me with the below question? How can I get the >desired >> outpu

Re: [R] Help needed for one question (Urgent)

2019-11-05 Thread Jim Lemon
Homework Chandeep, homework. Jim On Tue, Nov 5, 2019 at 9:40 PM Chandeep Kaur wrote: > > Dear Team, > > Could you please help me with the below question? How can I get the desired > output? > > Produce the following sequence using only rep(), seq() and potentially > other functions/operators. Yo

Re: [R] Help needed with eval parse

2019-09-18 Thread Huzefa Khalil
That worked! Thanks for the explanation. On Wed, Sep 18, 2019 at 10:06 AM Duncan Murdoch wrote: > > On 18/09/2019 8:43 a.m., Huzefa Khalil wrote: > > Hello R-users, > > > > I have been running a script which produces objects based on the > > column names of a data.frame. The column names are of t

Re: [R] Help needed with eval parse

2019-09-18 Thread Duncan Murdoch
On 18/09/2019 8:43 a.m., Huzefa Khalil wrote: Hello R-users, I have been running a script which produces objects based on the column names of a data.frame. The column names are of the form CB_1-1, CB_1-2, etc. Now this calculation was rather long and memory intensive, so I would rather not have

Re: [R] Help needed with my code for merging multiple xls files from google drive

2019-02-11 Thread Jeff Newmiller
Your example is not reproducible [1][2][3], you are reposting a copy of an email in a fresh thread (instead of replying to the first one), and you are using HTML email format on a text-only mailing list (what you see is really not what we see). Please read the Posting Guide to find out what the

Re: [R] help needed on RcppEigen....

2018-03-19 Thread Jeff Newmiller
For loops are not usually the primary cause of slow processing in R... poor memory handling is. But the closest you seem to come to asking a question in your email seems to be about Rcpp, which is off topic on this mailing list. Try reading all of the Rcpp vignettes, and then if needed ask on

Re: [R] help needed on quantmod....

2018-01-07 Thread Rui Barradas
Hello, How are you calling your function? Can you show us the actual code? I am testing it like the following. apnd(list("IBM")) Error in download.file(paste("https://finance.yahoo.com/d/quotes.csv?s=";, : cannot open URL 'https://finance.yahoo.com/d/quotes.csv?s=IBM&f=d1t1l1c1p2ohgv' In a

Re: [R] Help needed with aggregate or other solution

2017-10-26 Thread Anthoni, Peter (IMK)
Hi Thomas, Would this work: res1=aggregate(dta[,"fcst"],by=list(basistime=dta[,"basistime"]),FUN=max) mm=match(paste(res1[,"basistime"],res1[,"x"]),paste(dta[,"basistime"],dta[,"fcst"])) dta[mm,] > dta[mm,] date basistime fcst usgs 20 2012-01-30 12:00:00 2012-01-25 15:0

Re: [R] Help needed with aggregate or other solution

2017-10-26 Thread Daniel Nordlund
On 10/26/2017 4:58 AM, Thomas Adams wrote: Hi Jeff, Thank you for the suggestions -- I appreciate your help. Unfortunately, the result2 has two problems... (1) there are now 3 date columns (it looks like 2 cols are merged into 1 col) (2) the output rows should not have any of the basistime date

Re: [R] Help needed with aggregate or other solution

2017-10-26 Thread Jeff Newmiller
On Thu, 26 Oct 2017, Thomas Adams wrote: Hi Jeff, Thank you for the suggestions -- I appreciate your help. Unfortunately, the result2 has two problems... (1) there are now 3 date columns (it looks like 2 cols are merged into 1 col) No, there are two date columns. Result2 includes the groupin

Re: [R] Help needed with aggregate or other solution

2017-10-26 Thread Thomas Adams
Hi Jeff, Thank you for the suggestions -- I appreciate your help. Unfortunately, the result2 has two problems... (1) there are now 3 date columns (it looks like 2 cols are merged into 1 col) (2) the output rows should not have any of the basistime dates repeated (maybe I misstated the problem); I

Re: [R] Help needed with aggregate or other solution

2017-10-25 Thread Jeff Newmiller
Thanks for the dput... reproducible example of split-apply-combine ### dta <- structure(list(date = structure(c(1L, 2L, 3L, 4L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 5L, 6L, 7L, 8L, 9L, 10L, 11L, 12L, 13L, 14L, 15L, 16L, 17L, 18L, 19L, 20L, 21L, 22L, 23L

Re: [R] help needed for RInside with Qt

2017-06-29 Thread Santosh Kumar
Hi Bert and Jeff, Thanks a lot for pointing it out. It is a commercial application. I would be distributing it. This makes R out of consideration. Thanks again for saving much time and effort. On Thu, Jun 29, 2017 at 10:22 AM, Jeff Newmiller wrote: > If you adhere to the terms of the license f

Re: [R] help needed for RInside with Qt

2017-06-28 Thread Jeff Newmiller
If you adhere to the terms of the license for R you should be okay legally. If you use contributed packages they may have additional requirements. However, these terms are often overlooked by programmers targeting Windows, hence Bert's caution. As to the content of the original post itself, it

Re: [R] help needed for RInside with Qt

2017-06-28 Thread Bert Gunter
Is this application meant to be commercial? If so, R's open source license probably would forbid you to use it. I defer to those with real legal knowledge on this point, but you should check it. If it is not meant to be commercial, then ignore -- I have nothing useful to offer you. Cheers, Bert

Re: [R] Help needed to format data for boxplot time-series

2016-06-01 Thread Thomas Adams
Petr and David, Thank you so much! Both approaches do precisely what I need. I knew there had to be a very simple way to do this, but I am still very much a novice and struggle with data management at times. Also, thank you for the suggestion to use dput(yourdata) or dput(yourdata[1:20,]) -- I kne

Re: [R] Help needed to format data for boxplot time-series

2016-06-01 Thread PIKAL Petr
Hi It is preferable to use output of dput(yourdata) or dput(yourdata[1:20,]) so that we can use your data. From your description maybe boxplot(split(yourdata$value, yourdata$valid_time)) can give you what you want. Regards Petr > -Original Message- > From: R-help [mailto:r-help-boun

Re: [R] Help needed with successfully downloading and opening Agricolae package

2016-05-06 Thread Phillips,Douglas A
Thanks Sarah, downloaded the sp package separately and that resolved the error. > On May 6, 2016, at 5:43 PM, David Winsemius wrote: > > >> On May 6, 2016, at 1:41 PM, Sarah Goslee wrote: >> >> On Fri, May 6, 2016 at 4:33 PM, Jeff Newmiller >> wrote: >>> I am puzzled why the original insta

Re: [R] Help needed with successfully downloading and opening Agricolae package

2016-05-06 Thread David Winsemius
> On May 6, 2016, at 1:41 PM, Sarah Goslee wrote: > > On Fri, May 6, 2016 at 4:33 PM, Jeff Newmiller > wrote: >> I am puzzled why the original install.packages call did not also download >> the sp package, since the default argument dependencies = NA should have >> triggered installation of im

Re: [R] Help needed with successfully downloading and opening Agricolae package

2016-05-06 Thread Sarah Goslee
On Fri, May 6, 2016 at 4:33 PM, Jeff Newmiller wrote: > I am puzzled why the original install.packages call did not also download > the sp package, since the default argument dependencies = NA should have > triggered installation of imports including spDep, which should in turn have > installed th

Re: [R] Help needed with successfully downloading and opening Agricolae package

2016-05-06 Thread Jeff Newmiller
I am puzzled why the original install.packages call did not also download the sp package, since the default argument dependencies = NA should have triggered installation of imports including spDep, which should in turn have installed the dependencies including the sp package. Anyone have a theor

Re: [R] Help needed with successfully downloading and opening Agricolae package

2016-05-06 Thread Sarah Goslee
This is a plain-text email list, so your red doesn't show up, but since the error message said that the installer couldn't find the sp package, I'd start by installing that. Sarah On Fri, May 6, 2016 at 12:35 PM, Phillips,Douglas A wrote: > Hi, I just downloaded the Agricolae package and tried t

Re: [R] Help needed in data cleaning

2015-12-21 Thread Jim Lemon
Hi Nash, If I understand your question correctly, you want the "mice" package. Hopefully you have more data than your example. Jim On Sat, Dec 19, 2015 at 6:14 AM, Web Web wrote: > Hello, >I need some help in data cleaning using R. my CSV file looks as > follows. > > > "id","gender

Re: [R] Help needed in data cleaning

2015-12-20 Thread PIKAL Petr
Hi Your question posted in HTML is somewhat scrambled. Based on what I understand from it, maybe you shall inspect ?merge. Cheers Petr > -Original Message- > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Web Web > Sent: Friday, December 18, 2015 8:15 PM > To: r-help@r

Re: [R] Help needed in plotting 2d histogram

2015-12-17 Thread Jim Lemon
Hi Saikat, I don't know whether this can be done with ggplot, but if you don't get another answer, have a look at the second example for the "barp" function in the plotrix package. This shows how to get a specified range on the color legend using the "xrange" argument. Jim On Fri, Dec 18, 2015 a

Re: [R] help needed with printing multiple arguments as vectors, not matrices

2013-06-24 Thread Angel Russo
Awesome! Thanks so much for your help. I am able to get the format I was looking for. On Mon, Jun 24, 2013 at 2:50 PM, Adams, Jean wrote: > When sharing data, use dput() to output the data in a way that R-Help > readers can easily use. > > Give this code a try and see if it helps. > > Jean > >

Re: [R] help needed with printing multiple arguments as vectors, not matrices

2013-06-24 Thread Adams, Jean
When sharing data, use dput() to output the data in a way that R-Help readers can easily use. Give this code a try and see if it helps. Jean # read in the example data mat1 <- structure(list("GENE SYMBOL" = c("ADCK2", "ADCK3", "ADCK4", "ADCK5", "ADRBK1", "ADRBK2", "AKT1", "AKT2", "AKT3", "ALK

Re: [R] help needed with printing multiple arguments as vectors, not matrices

2013-06-24 Thread Angel Russo
Sample data is as follows (for simplicity assume mat1 and mat2 are the same matrices). Also attached as an excel file. I want to get the pairwise interaction fischer test results. Not just the pvalues but also want to wrote the n00, n01, n10 and n11 in the file as: ADCK2_mat1 ADCK3_mat2 n00 n01

Re: [R] help needed with printing multiple arguments as vectors, not matrices

2013-06-24 Thread Adams, Jean
Could you provide an example of mat1 and mat2 as well as an example of the output you would like from them. Your code is very difficult to follow as written. It will be easier for readers of the list to interpret if you use carriage returns rather than semi colons, for example ... fish <- functi

Re: [R] Help needed in feature extraction from two input files

2013-06-11 Thread arun
Hi, Try this: lines1<- readLines("file1.txt") lines1<- lines1[lines1!=""] #In "file2.txt", >or1|1234 ATCGGATTCAGG >or2|347 GAACCTATCAATTTA TATAA###this should be a single line >or3|56 ATCGGAGATATAACCAATC >or3|23 TTAACAAGAGAATAGACAAA >or4|793 ATCTCTCTCCTCTCTCTCTA >or7|1

Re: [R] Help needed in feature extraction from two input files

2013-06-11 Thread arun
Hi, Try this: lines1<- readLines(textConnection("gene1 or1|1234 or3|56 or4|793 gene4 or2|347 gene5 or3|23 or7|123456789")) lines2<-readLines(textConnection(">or1|1234 ATCGGATTCAGG >or2|347 GAACCTATCAATTTATATAA >or3|56 ATCGGAGATATAACCAATC >or3|23 TTAACAAGAGAATAGACAAA >or4|793

Re: [R] help needed! RMSE

2013-06-10 Thread Ben Bolker
mansor nad hotmail.com> writes: > i need HELPPP!! how do i calculate the RMSE value for two GEV > models?first GEV is where the three parameters are constant.2nd GEV > model a 4 parameter model with the location parameter is allowed to > vary linearly with respect to time while holding the othe

Re: [R] help needed in least square curve fit equation

2013-05-09 Thread Wu Gong
As I understand, it is an optimization problem. LeastSquare=sum[y-f(x)]^2 Minimize least square by solving equations about a, b, and c. An iterative method could be developed to get the result or some R functions might be found useful. Please refer http://r.789695.n4.nabble.com/Is-there-any-Gaus

Re: [R] Help needed on parallel processing

2012-09-26 Thread Milan Bouchet-Valat
Le mercredi 26 septembre 2012 à 13:04 +0530, Anindya Sankar Dey a écrit : > Hi All, > > If i have a vector say x<-1:10 and then use > > parLapply(cl,x,function(k){k=k*2; return(k);} > > it works and will also parallel process depending on the number of cores > and the number of clusters I've bu

Re: [R] Help needed in reading matlab files

2012-08-14 Thread Rui Barradas
Sorry, it's adj_con <- file(pathnames_adj, open = "rb") Rui Barradas Em 14-08-2012 19:12, Rui Barradas escreveu: Hello, I don't have MATLAB here so this is completely untested but the help page for readMat says: Arguments |con| Binary |connection

Re: [R] Help needed in reading matlab files

2012-08-14 Thread Rui Barradas
Hello, I don't have MATLAB here so this is completely untested but the help page for readMat says: Arguments |con| Binary |connection | to which the MAT file structure should be written to. A string is interpreted as file

Re: [R] Help needed to tackle multicollinearity problem in count data with the help of R

2012-07-11 Thread John Fox
Dear Umesh Khatri, The vif() function in the car package will compute (generalized) variance inflation factors for GLMs. What (if anything) to do about collinearity isn't in my opinion an answerable question without knowing the details of your research. In particular, ridge regression is not a

Re: [R] Help needed for this error

2012-05-30 Thread Peter Ehlers
On 2012-05-30 06:48, Sarah Goslee wrote: Hi, On Wed, May 30, 2012 at 7:48 AM, Dinesh Vakamudi wrote: results<- mra(x$w1mcp, filter = "d4", n.levels = 3, boundary = "periodic", method = "dwt") write.csv(results, "c:/mydata.csv") I have no idea what mra() is - from what package did it come?

Re: [R] Help needed for this error

2012-05-30 Thread Sarah Goslee
Hi, On Wed, May 30, 2012 at 7:48 AM, Dinesh Vakamudi wrote: >> results <- mra(x$w1mcp, filter = "d4", n.levels = 3, boundary = > "periodic", method = "dwt") >> write.csv(results, "c:/mydata.csv") I have no idea what mra() is - from what package did it come? I see there's a package named mra, but

Re: [R] Help needed in wavelet transformation

2012-05-29 Thread Jeff Newmiller
RSiteSearch("wavelet") at the R command line prompt, or http://rseek.org --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go...

Re: [R] Help needed for efficient way to loop through rows and columns

2012-05-17 Thread David L Carlson
ple[i, 5] == "B") { samplemod[i,j] <- switch(sample[i,j], AA = 0, AB = 1, BA = 1, BB = 2) } } } } } -- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4

Re: [R] Help needed for efficient way to loop through rows and columns

2012-05-16 Thread Priya Bhatt
Yes here it is. I actually convert them all as strings, initially using options(stringsAsFactors=F) at the top of my code. This what the initial dataframe looks like. Please note this is a toy dataset: namesXYZAorB S1BBBBBBA S2AABBBBA S3AB

Re: [R] Help needed for efficient way to loop through rows and columns

2012-05-16 Thread Rui Barradas
Hello, Your data.frame is composed exclusively of factors, but try this (I've changed the name to 'sampl', because 'sample' is an R function.) # logical index vectors iA <- sampl$AorB == "A" iB <- sampl$AorB == "B" new.sampl <- data.frame( apply(sampl, 2, function(x){ i

Re: [R] Help needed for efficient way to loop through rows and columns

2012-05-16 Thread David L Carlson
Can you show us what you want the final data.frame to look like? You've created five variables stored as factors and you seem to be trying to change those to numeric values? Is that correct? Since AB and BA are always set to 1, you could just replace those values globally rather than mess with th

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread Ivette
try setwd(choose.dir()) -- View this message in context: http://r.789695.n4.nabble.com/Help-needed-Error-in-setwd-newdir-cannot-change-working-directory-tp4421698p4422749.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-projec

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread Petr Savicky
On Sun, Feb 26, 2012 at 04:12:03PM -0500, ying chen wrote: > > Hi, > > I am sorry about the format it showed up. I do not know what happened as now > it looks worse even on my own machine. I do not know what to do, I just add > "\n" to the end of each line and hope it will come out OK this ti

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread jim holtman
right to read and write to the > directories. > > One more question, is there anyway to modify this script to make it work > on all data directories under /home/sean/Rtest by itself? > > Thanks a lot for the help! > > Ying > > sean@I7-3930K:~/Rtest$ ls -l > total 56 &g

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread Jeff Newmiller
ectories. >One more question, is there anyway to modify this script to make it >work on all data directories under /home/sean/Rtest by itself? >Thanks a lot for the help! >Ying >sean@I7-3930K:~/Rtest$ ls -ltotal 56drwx-- 3 sean sean 4096 >2012-02-25 20:39 Data01drwx-- 2 sea

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread ying chen
Rtest$ ls -l total 56 drwx-- 3 sean sean 4096 2012-02-25 20:39 Data01 drwx-- 2 sean sean 4096 2012-02-25 20:28 Data02 drwx-- 2 sean sean 4096 2012-02-26 07:41 Data03 drwx-- 2 sean sean 4096 2012-02-25 21:18 Data04 drwx------ 2 sean sean 4096 2012-02-25 20:27 Data05 -rw-r

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread ying chen
me/sean/Rtest by itself? Thanks a lot for the help! Ying sean@I7-3930K:~/Rtest$ ls -ltotal 56drwx-- 3 sean sean 4096 2012-02-25 20:39 Data01drwx-- 2 sean sean 4096 2012-02-25 20:28 Data02drwx-- 2 sean sean 4096 2012-02-26 07:41 Data03drwx-- 2 sean sean 4096 2012-02-25 21:18 Dat

Re: [R] Help needed! Error in setwd(newdir) : cannot change working directory

2012-02-26 Thread R. Michael Weylandt
This is a mess -- please resend in plain text. Also, there are not, to my knowledge, packages (not libraries) called "A", "B", or "C" so your script doesn't even begin to look reproducible were it legible. Do you have read/write access to the directories in question? Michael On Sat, Feb 25, 201

Re: [R] Help needed please

2012-02-25 Thread R. Michael Weylandt
Look at ?optim and example(optim) Michael On Sat, Feb 25, 2012 at 11:47 AM, Jaymin Shah wrote: > I was wondering how to make a function which minimises  a vector (a,b,c,d). > > I have an equation ( for simplicity) say its 5 -(3a+4b+6c+8d) and i want to > make this equation as small as possible.

Re: [R] Help needed please

2012-02-25 Thread Jaymin Shah
I was wondering how to make a function which minimises a vector (a,b,c,d). I have an equation ( for simplicity) say its 5 -(3a+4b+6c+8d) and i want to make this equation as small as possible. Thus need to find the values for a b c and d for which this happens. I know there is a function in r

Re: [R] Help needed please

2012-02-10 Thread ilai
Your script is rather inefficient with spurious cbind calls. Any particular reason not to use ?ar directly ? Call: ar.yw.default(x = simtimeseries, order.max = 4) Coefficients: 1234 1.9440 -1.9529 0.8450 -0.2154 Order selected 4 sigma^2 estimated as 15.29 To

Re: [R] Help needed in interpreting linear models

2012-01-13 Thread Petr PIKAL
I forgot to post it to r help. Petr Hi > > Hi Petr, > > thanks for your answer. > > First of all it's not homework I am a student and need to analyse cancer > data using linear models. > I looked into that topic since a week now and still struggling in > interpreting some of the R output that

Re: [R] Help needed in interpreting linear models

2012-01-13 Thread mails
Hi Petr, thanks for your answer. First of all it's not homework I am a student and need to analyse cancer data using linear models. I looked into that topic since a week now and still struggling in interpreting some of the R output that is why I was asking for help here. I don't quite understand

Re: [R] Help needed in interpreting linear models

2012-01-13 Thread Petr PIKAL
Hi It seems to me quite like a homework for which the policy of this list is not to respond. But far from being an expert in statistics I only express my opinion. It seems to me that your height variable behaves like a two level factor and the 190 value points to rather suspicious value in weig

Re: [R] Help needed in reproducing a plot

2011-11-29 Thread Dennis Murphy
Hi: This looks like the one: library('lattice') data(Oats, package = 'MEMSS') print(xyplot(yield ~ nitro | Block, Oats, groups = Variety, type = c("g", "b"), auto.key = list(lines = TRUE, space = 'top', columns = 3), xlab = "Nitrogen concentration (cwt/acre)",

Re: [R] Help needed in reproducing a plot

2011-11-29 Thread jim holtman
Looks like a typical plot produced using the 'lattice' package. There is plenty of documentation on the use of the package. Run some of the examples. On Tue, Nov 29, 2011 at 10:43 AM, syrvn wrote: > Hello, > > > can anybody tell me how to produce a plot like the one in > > http://cran.r-project

Re: [R] Help Needed on Merging Columns by Summation

2011-06-22 Thread Rita Carreira
I assume that you are working in package MatrixCalc. Let’s say you have a matrix X. You can call the columns of X this way: X[,1] for the first column X[,2] for the second column X[,3] for the third column Etc. So let’s say that you want to add the first and third column, then you would just

Re: [R] Help Needed on Merging Columns by Summation

2011-06-22 Thread Gabor Grothendieck
On Wed, Jun 22, 2011 at 2:35 AM, Nabila Binte Zahur wrote: > Dear Sirs/Madam, > > I am a beginner to R, and I am currently working on a data matrix which looks > like this: > >> head(oligo) > >        ko:K1 ko:K3 ko:K5 ko:K8 ko:K9 ko:K00010 ko:K00012 > AAA       370          6

Re: [R] Help Needed on Merging Columns by Summation

2011-06-22 Thread Dennis Murphy
Hi: Based on the information you provided, I would suggest looking into the transform() and within() functions in base R, and perhaps the mutate() function in package plyr. HTH, Dennis On Tue, Jun 21, 2011 at 11:35 PM, Nabila Binte Zahur wrote: > Dear Sirs/Madam, > > I am a beginner to R, and I

Re: [R] Help needed!

2011-04-25 Thread shuangyan
Hello, i got this package from the paper:" Nonparametric Covariance Function estimation for Functional and Longitudinal data". http://stat.wharton.upenn.edu/~tcai/paper/html/Covariance-Function.html. Thanks lot! -- View this message in context: http://r.789695.n4.nabble.com/Help-needed-tp3464470p

Re: [R] Help needed!

2011-04-20 Thread Peter Ehlers
On 2011-04-20 14:33, Shuangyan Xiong wrote: Hi everyone, I have a question. Now I am reading the resource code of the package "ssfcov". The resource code is as following. I cannot find the resource code of the function "myss2d" anywhere in the package. Can anyone give me a hint how to find it in

Re: [R] Help needed with plot axis labeling

2011-03-24 Thread Sarah Goslee
Thomas, You need to specify both the labels and the desired location: plot(1:10, xaxt = "n") axis(1, xaxp=c(2, 9, 7)) axis(4, labels=c("A", "B", "C", "D", "E"), at=seq(2, 10, by=2)) You want the labels at 2,4,6,8,10 so you need to specify that, not 1:5. Sarah On Thu, Mar 24, 2011 at 9:55 AM, T

Re: [R] help needed with histogram plotting

2011-03-06 Thread Scott Chamberlain
Does this seems like a good stand in for now: require(ggplot2) x <- runif(100,1,2) y <- runif(100,50,60) z <- runif(100,99,100) xyz <- melt(data.frame(x,y,z)) ggplot(xyz, aes(value)) + geom_histogram() + facet_grid(~ variable, scale="free") On Sunday, March 6, 2011 at 9:25 PM, cassie jones wr

Re: [R] help needed for strptime "000000" !

2011-02-17 Thread JESSICA
Hi thanks ! that works perfectly ! now I am wodering how to create a new table , I run the codes: x<-read.table("C:/R/DATA.txt",colClasses=c("Date","character","integer"), header=T) DateTime<-as.POSIXct(paste(x[,1],x[,2]),format="%Y-%m-%d%H%M%S") and get : "2004-11-01 23:33:11 GMT" "2004-11

Re: [R] help needed for strptime "000000" !

2011-02-16 Thread Dieter Menne
JESSICA wrote: > > > I have a text file stored in notepad: > > DATE TIME Q > 2004-11-01233311 1 > 2004-11-01234227 1 > ... > I run > > x<-read.table("C:/R/Sample.txt",header=T) > then get a table > > ... > I am trying to > > strptime(x$TIME,"%H%M%S"

Re: [R] Help needed

2011-01-28 Thread Gavin Simpson
On Thu, 2011-01-27 at 09:50 -0500, Thomas Stewart wrote: > For question 2, > > TTT <- rt(1000,3) > mean(TTT[rank(TTT) <= 975 & rank(TTT) >25]) mean(TTT, trim = 0.05) What you are doing is only removing 5% of observations in total, whilst the question asks for 5% removed off *each* end. G > >

Re: [R] Help needed

2011-01-27 Thread Peter Ehlers
On 2011-01-27 05:16, Ben Boyadjian wrote: Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only the negative integers. B)add elements until the

Re: [R] Help needed

2011-01-27 Thread Thomas Stewart
For question 2, TTT <- rt(1000,3) mean(TTT[rank(TTT) <= 975 & rank(TTT) >25]) On Thu, Jan 27, 2011 at 8:16 AM, Ben Boyadjian wrote: > Hello I am trying to solve these problems and I am not allowed to use loops > or ifs. > > 1st Question > My first question is that I have generated 100 random num

Re: [R] Help needed

2011-01-27 Thread Sascha Vieweg
On 11-01-27 15:12, Sascha Vieweg wrote: On 11-01-27 13:16, Ben Boyadjian wrote: Hello I am trying to solve these problems and I am not allowed to use loops or ifs. 1st Question My first question is that I have generated 100 random numbers from the uniform distribution then A)add only th

  1   2   >