Re: [R] Getting individual co-ordinate points in k medoids cluster

2024-09-17 Thread Sarah Goslee
re the percentage values in the axis labels come from: those are the variance explained by each of the first two PCA axes. Sarah On Tue, Sep 17, 2024 at 8:01 AM Nick Wray wrote: > > Hello I am using k medoids in R to generate sets of clusters for datasets > through time. I can plot the

Re: [R] Converting .grib to excel file

2024-06-25 Thread Sarah Goslee
you wish. GIven the multidimensional nature of the data, "straightforward" may require some fiddling to get the format and variables you want in the way you want them. Sarah On Tue, Jun 25, 2024 at 4:33 AM javad bayat wrote: > Dear all; > I have downloaded meteorolo

Re: [R] Issues with R's forecast function

2024-05-27 Thread Sarah Goslee
mismatched versions of packages with dependencies. Sarah On Mon, May 27, 2024 at 2:48 PM Paul Bernal wrote: > > Dear Sarah, > > Here is the sessionInfo() output, I forgot to include it in my reply. > > sessionInfo() > R version 4.3.2 (2023-10-31 ucrt) > Platform: x86_64-w64-mi

Re: [R] Issues with R's forecast function

2024-05-27 Thread Sarah Goslee
hem, so we need more information. Sarah On Mon, May 27, 2024 at 12:25 PM Paul Bernal wrote: > > Dear all, > > I am currently using R 4.3.2 and the data I am working with is the > following: > > ts_ingresos_reservas= ts(ingresos_reservaciones$RESERVACIONES, start = >

Re: [R] strange behavior in base::as.double

2024-05-01 Thread Sarah Goslee
Hi Carl, Not that strange: R thinks you're using scientific notation. Also not a Mac bug. > as.double('123e') [1] 123 > as.double('123e+0') [1] 123 > as.double('123e+1') [1] 1230 > as.double('123e-1') [1] 12.3 Can you explain what you&

Re: [R] Volume of polygon

2023-12-06 Thread Sarah Goslee
There's also an excellent discussion of various methods with R code here: https://dewey.dunnington.ca/post/2019/bathymetry-lake-volume-estimation-using-r/ On Wed, Dec 6, 2023 at 8:52 AM Sarah Goslee wrote: > > Hi, > > As already mentioned, this is a great topic for R-sig

Re: [R] Volume of polygon

2023-12-06 Thread Sarah Goslee
Hi, As already mentioned, this is a great topic for R-sig-geo, where you'd probably get specialist answers like the lake morphology package https://cran.r-project.org/web/packages/lakemorpho/index.html which is explicitly designed for this kind of question. Sarah On Tue, Dec 5, 2023 at 11:

Re: [R] Yext in parentheses.

2023-10-26 Thread Sarah Goslee
; cat.ref [1] "dilemma1(ref.)" "scigrn1(ref.)" I think we need a reproducible example showing the actual problem, or at least very clear explanation. For instance, what's dput(v$cat.ref) Is it the same as cat.ref, or is that where the alteration happens? Sarah On Thu, Oct 26, 2023

Re: [R] How to Calculate the Mean by Multiple Groups in R

2023-10-24 Thread Sarah Goslee
u: > aggregate(df[, c("OD", "ODnorm")], by = df[, c("Time", "Target", "Conc")], > data = df, FUN = "mean") Time Target Conc ODODnorm 11 BACT1 765. 108.3 21 BACT2 745. 88.3 31 BACT

Re: [R] OK, next Q - a sort of factorial on a vector

2023-06-20 Thread Sarah Goslee
4, 5) > unlist(sapply(seq(1, length(x) - 1), function(i){x[i] * x[seq(i + 1, > length(x))]})) [1] 2 NA 4 5 NA 8 10 NA NA 20 Sarah On Tue, Jun 20, 2023 at 1:15 PM Philip Rhoades via R-help wrote: > > People, > > What I mean is, is there an elegant way to do this: > >

Re: [R] environments: functions within functions

2023-05-26 Thread Sarah Goslee
Very nice, thank you! Sarah On Thu, May 25, 2023 at 8:20 PM Iris Simmons wrote: > > Hi, > > > I think there are two easy ways to fix this. The first is to use a `switch` > to call the intended function, this should not be a problem since there are a > small number

Re: [R] environments: functions within functions

2023-05-25 Thread Sarah Goslee
Thank you to both Duncan and Ivan for the detailed answers. I'll point the mixR maintainer at this thread in the list archive, because your suggestions were so clear, and I can't explain them as thoroughly. I'll keep using x as the argument name for now. Much appreciated, Sarah

[R] environments: functions within functions

2023-05-25 Thread Sarah Goslee
nctions to work? And what's the correct way to do what print.mixfitEM() is doing, so that it works regardless? I poked around for a while, but didn't find a clear (to me!) answer. Thanks, Sarah -- Sarah Goslee (she/her) http://www.numberwright.com __

Re: [R] error in exists.....

2022-12-27 Thread Sarah Goslee
E$L[[i]] <- list() E$L[[i]]$T1A1 <- Sys.time() exists("T1A1", where = E$L[[i]]) # returns: [1] TRUE > str(E$L) List of 1 $ :List of 1 ..$ T1A1: POSIXct[1:1], format: "2022-12-27 12:47:26" Sarah On Tue, Dec 27, 2022 at 12:36 PM akshay kulkarni wrote: > >

Re: [R] Question concerning side effects of treating invalid factor levels

2022-09-20 Thread Sarah Goslee
3 variables: $ P : Factor w/ 4 levels "mit","mittels",..: 2 1 2 3 1 1 4 $ ANSWER: Factor w/ 3 levels "OBJ>PP","PP>OBJ",..: 2 2 2 2 1 1 3 $ RT: num 10867 14808 11600 15881 8984 ... Sarah On Tue, Sep 20, 2022 at 8:45 AM Tibor Kiss via R-

Re: [R] extracting numeric values returned when using the by function to run the acf function

2022-05-10 Thread Sarah Goslee
- split(RecallSmall[["value"]], RecallSmall[["ID"]]) > result <- sapply(result, FUN=function(x){acf(x, > na.action=na.pass,plot=FALSE)$acf}) > result 1 2 [1,] 1.00 1.00 [2,] 0.15 0.15 [3,] -0.50 -0.50 [4,] -0.15 -0.15 Sarah On Tue, May 10, 2022 at 1:2

Re: [R] Pixel Image Reshaping using R

2022-02-24 Thread Sarah Goslee
Hi Paul, I may be missing something, but you can transform a vector to a matrix of any desired size by using matrix(). For more nuanced processing of images, you might look into one of the many image processing packages in R, or even the raster package (or the newer terra). Sarah On Thu, Feb

Re: [R] Problem with lm Giving Wrong Results

2021-12-03 Thread Sarah Goslee
: > [1] compiler_4.1.1 tools_4.1.1 > > > > Thomas R. LaBone > PhD student > Department of Epidemiology and Biostatistics > Arnold School of Public Health > University of South Carolina > Columbia, South Carolina USA > &g

Re: [R] Is 'temp' a reserved/key word in R?

2021-11-30 Thread Sarah Goslee
ge for read_csv, since not everyone uses tidyverse by default, although it isn't necessary for this question. Sarah On Tue, Nov 30, 2021 at 9:45 AM Andrew Simmons wrote: > > It seems like the headers are misnamed, that should be a comma between > sampdate and param, not a period &g

Re: [R] How to use ifelse without invoking warnings

2021-10-07 Thread Sarah Goslee
t; > PLEASE do read the posting guide > > http://www.R-project.org/posting-guide.html > > and provide commented, minimal, self-contained, reproducible code. > > > > [[alternative HTML version deleted]] > > __ &g

Re: [R] How to use ifelse without invoking warnings

2021-10-07 Thread Sarah Goslee
If you are positive the warnings don't matter for your application, you can disable them: see ?options for details of warn. But that can be dangerous, so be careful! Sarah On Thu, Oct 7, 2021 at 1:21 PM Ravi Varadhan via R-help wrote: > > Hi, > I would like to execute the follow

Re: [R] how to combine logic test on vectors in R?

2021-09-30 Thread Sarah Goslee
TRUE if all elements are TRUE, More on logical operators: https://stat.ethz.ch/R-manual/R-devel/library/base/html/Logic.html Sarah On Thu, Sep 30, 2021 at 9:07 AM Luigi Marongiu wrote: > > Hello, > I have two data frames, each with three rows: > ``` > df_a <- data.frame(a = letters

Re: [R] extraction of last observation date from many observations in each row/column

2021-04-02 Thread Sarah Goslee
Hi Marna, This very short function deletes everything before the last , if there is a comma. Some of your entries have comma-space and some just have comma, so it deletes the optional space as well. lastdate <- function(x) { sub("^.*, *", "", x) } data.frame(apply(da

Re: [R] FD package_dbFD error

2021-03-31 Thread Sarah Goslee
that doesn't help, take a look at the site and trait data frames used in the examples and see if you can figure out where you went wrong. If you can't, then try r-sig-ecology. Sarah On Wed, Mar 31, 2021 at 6:33 PM Vesna Gulin wrote: > > Hi everyone, > > I am trying to condu

Re: [R] About fviz_famd_ind()

2021-03-21 Thread Sarah Goslee
lower-level functions. If you go down far enough, you should be able to control everything. Sarah On Sun, Mar 21, 2021 at 1:12 PM Mahmood Naderan-Tahan wrote: > > Hi > > I use fviz_famd_ind() from factoextra and I would like to know > > 1) How can I decrease the font size?

Re: [R] Colorizing contribution of variables

2021-03-21 Thread Sarah Goslee
f documentation for the packages. Sarah On Sun, Mar 21, 2021 at 1:32 PM Mahmood Naderan-Tahan wrote: > > Hi > > I use the following function to plot the variables with their contributions. > > > fviz_famd_var(res.famd, "quanti.var", col.var = "contrib"

Re: [R] How to plot dates

2021-03-16 Thread Sarah Goslee
:17:02 2021-03-12 13:31:43 2021-03-12 22:00:32 2021-03-13 09:21:43", sep = ",", header = TRUE) myDat$datetime <- as.POSIXct(myDat$datetime, tz = "", format = "%Y-%M-%d %H:%M:%OS") Sarah On Tue, Mar 16, 2021 at 9:26 AM Gregory Coats via R-help wrote: &g

Re: [R] Col names in a data frame

2021-01-21 Thread Sarah Goslee
ctically valid variable names and are not duplicated. If necessary they are adjusted (by ‘make.names’) so that they are. Sarah On Thu, Jan 21, 2021 at 3:59 PM Bernard McGarvey wrote: > > Here is an example piece of code to illustrate an issue: > > rm(list=ls()) # Clear W

Re: [R] Help with changing date format in R

2021-01-20 Thread Sarah Goslee
Hi, If the date format is determined by observer, you could for instance use subset to divide it into two data frames, fix the dates and recombine, or use ifelse to use the correct format based on observer. This is a basic data manipulation task, and there are lots of ways approach it. Sarah On

Re: [R] Finance & R

2020-12-23 Thread Sarah Goslee
your taste. Sarah On Wed, Dec 23, 2020 at 12:58 PM Ben van den Anker via R-help wrote: > > > > Hello everyone, > Could anyonre recommend some good resources for finance applications in R? I > find the packages quantmod, TTR and PerformanceAnalytics a bit outdated. > There m

Re: [R] FInd packages in need of Update (like RStudio)

2020-12-23 Thread Sarah Goslee
Does update.packages() meet your needs? Sarah On Wed, Dec 23, 2020 at 9:39 AM Dr Eberhard W Lisse wrote: > > Hi, > > does anyone know how one would look which packages require an update > (like the Tools -> Update Packages) but can do it from R (ie Rscript) or > any other

Re: [R] How to correct my error message

2020-10-27 Thread Sarah Goslee
Hi, a is of length 60. b is of length 60. z is of length 57. What do you expect to have happen when you create y_model ? What happens to those other 3 observations? Sarah On Tue, Oct 27, 2020 at 3:07 PM varin sacha via R-help wrote: > > Dear R-experts, > > Here below my R code.

Re: [R] Help with strings

2020-09-29 Thread Sarah Goslee
be exactly what you're after, but should get you started. lapply(mylist, function(x){ x[grepl("alcohol", x[, 3]), 4] <- x[grepl("alcohol", x[, 3]), 3] x }) Sarah On Tue, Sep 29, 2020 at 4:24 PM André Luis Neves wrote: > > Dear all, > > I have had difficulties

Re: [R] date

2020-09-21 Thread Sarah Goslee
te2, decreasing=c(FALSE, TRUE), method="radix"),] ID date2 2 A1 2005-01-27 1 A1 2004-09-17 3 A1 2003-05-07 4 A2 2017-05-21 5 A2 2016-09-12 6 A3 2013-01-25 7 A4 2019-09-27 Sarah On Mon, Sep 21, 2020 at 2:41 PM Val wrote: > > Hi All, > > I am trying to sort dates within a

Re: [R] .grb2 Files

2020-09-02 Thread Sarah Goslee
GDAL supports GRIB2 so it should be easy using rgdal and raster packages. Sarah On Wed, Sep 2, 2020 at 8:32 PM Philip wrote: > > Any advise about how to get NOAA .grb2 files into R? > > Thanks. -- Sarah Goslee (she/her) http://www.numb

Re: [R] How to extract information from .Rdata format

2020-07-31 Thread Sarah Goslee
he objects, but the objects themselves are in your workspace. You should probably try a basic R tutorial; it will help you with this kind of thing. Sarah On Fri, Jul 31, 2020 at 10:18 PM Ana Marija wrote: > > Hello, > > I have this file: > > a=load("paired_example.Rdata&quo

Re: [R] Looping thorugh dataframe

2020-07-22 Thread Sarah Goslee
er is quite simple, though it's a bit unclear as you > did not provide a reprex (see the posting guide linked below for how to post > here). However, I see no purpose in my blurting it out when you do not seem > aware of even the most basic R constructs -- e.g. see ?while. Of course,

Re: [R] Estimate garch model by GMM

2020-07-08 Thread Sarah Goslee
Hi, The very useful search engine rseek.org lists a lot of packages, functions, and tutorials for Garch modeling in R. Perhaps some of those meet your requirements. Sarah On Wed, Jul 8, 2020 at 3:02 PM Osama Mostafa wrote: > > Dear Professors > > > > Hope this e-mail f

Re: [R] algorithms that cluster time series data

2020-07-06 Thread Sarah Goslee
ay be best served by looking at how others in your field have approached similar problems, and then look for R packages that perform the relevant analyses. Sarah On Mon, Jul 6, 2020 at 1:11 PM Bogdan Tanasa wrote: > > Dear all, > > please may I ask for a suggestion regarding the algo

Re: [R] argument "x" is missing in minpack.lm

2020-06-30 Thread Sarah Goslee
You create objects A, B, and K, but then use A, B, and X in the call to nls.lm(). I have no idea if nls.lm is the right tool for your job, but I do know that you need to use the same names. Sarah On Tue, Jun 30, 2020 at 6:01 AM Luigi Marongiu wrote: > Hello, > I am trying to opti

Re: [R] help with sqldf

2020-06-28 Thread Sarah Goslee
uot;select * from r where V1 like", markerinfo$flank1[1]) Sarah On Sun, Jun 28, 2020 at 4:35 PM Yuan Chun Ding wrote: > > Hi R Users, > > I tried to use sql in R; test1 works well, > library(sqldf) > test1 <- sqldf("select * from r where V1 like > '%GCC

Re: [R] Obtaining p values from t-test run with a by function

2020-06-12 Thread Sarah Goslee
Where you have result[1]$p.value result[2]$p.value You need result[[1]]$p.value result[[2]]$p.value to get the first component of the list. Sarah On Fri, Jun 12, 2020 at 5:35 PM Sorkin, John wrote: > > Colleagues, > I am trying to retrieve the p values produced by a Student

Re: [R] Automating package updates after major version change

2020-05-14 Thread Sarah Goslee
omating it, but I can't be sure what previous version you're upgrading from. I suspect you tried to run the code by copy and paste, and not by putting in your own path, but if so then I'd like to improve the directions. Sarah On Thu, May 14, 2020 at 2:19 PM Rich Shepard wrote:

Re: [R] Automating package updates after major version change

2020-05-14 Thread Sarah Goslee
that character vector there. Sarah On Thu, May 14, 2020 at 1:06 PM Rich Shepard wrote: > > On Sun, 26 Apr 2020, Sarah Goslee wrote: > > > Not so coincidentally, I just worked thru this for myself. > > http://numberwright.com/2020/04/clean-and-new/ > > Sarah, >

Re: [R] Convex hulls after nMDS or PCoA

2020-05-12 Thread Sarah Goslee
Hi, I use a modified version of dbscan::hullplot() but https://rseek.org turns up a bunch of possibilities. Sarah On Tue, May 12, 2020 at 2:11 AM Fernando Archuby wrote: > > Dear all. I need to build convex hulls around groups of points of an > ordination (nMDS or PCoA). The gr

Re: [R] Automating package updates after major version change

2020-04-26 Thread Sarah Goslee
: CRAN packages (easy), GitHub packages (less easy), and random other packages (require manual intervention). I'm sure there are other possible workflows. Sarah On Sun, Apr 26, 2020 at 12:00 PM Rich Shepard wrote: > > After upgrading from -3.6.2 to -4.0.0 I ran 'update.packages()&#

Re: [R] incidence_fit model for simulation

2020-04-24 Thread Sarah Goslee
terval): #> 2.5 % 97.5 % #> [1,] 18.45777 26.69823 #> #> $pred: data.frame of incidence predictions (20 rows, 5 columns) Sarah On Fri, Apr 24, 2020 at 11:52 AM wrote: > > Hello > > How can I make a prediction with object type incidence_fit. > incidence_fit

Re: [R] Problem with loop in folders

2020-04-24 Thread Sarah Goslee
quot;, sep = ".") would create a more usual file name. It's always a good idea to work thru your loop by hand once, and look at all the intermediate steps. Often that quickly shows you where you went wrong. Sarah On Fri, Apr 24, 2020 at 10:08 AM Shubhasmita Sahani wrote: > > Hi

Re: [R] Shape / Colour Configuration

2020-03-05 Thread Sarah Goslee
Without an actual question, it's hard to know what you want. But take a look at hullplot in the dbscan package. Sarah On Thu, Mar 5, 2020 at 3:54 PM Amber Kobes wrote: > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and mor

Re: [R] Isolating Distinct Dates between two data frames

2020-03-01 Thread Sarah Goslee
Look at the all arguments to merge() - you can keep the non-matching dates, and look for NA values in the data. Sarah On Sun, Mar 1, 2020 at 4:12 PM Ogbos Okike wrote: > > Dear Friends, > I have two data frame of the form: > 1997-11-2219 -2.54910135429339 > 1997-11- -2.668656

Re: [R] Text search

2020-01-25 Thread Sarah Goslee
05 54all 6 6 2006 7Short12 Short Assuming that no entries contain both Tall and Short. Sarah On Sat, Jan 25, 2020 at 6:23 PM Ashta wrote: > > Hi all, > From one of the columns of the data frame I want to search and > extract a text that contains Tall or Short and create

[R] Data Structure to Unnest_tokens in tidytext package

2019-12-10 Thread Sarah Payne
Hi--I'm fairly new to R and trying to do a text mining project on a novel using the tidytext package. The novel is saved as a plain text document and I can import it into RStudio just fine. For reference I'm trying to do something similar to section 1.3 of this tidy text tutorial

Re: [R] table and unique seems to behave differently

2019-12-10 Thread Sarah Goslee
character(f))’. You can't even get table() to do what you want by being explicit: > table(factor(x, levels = unique(x))) Error in `levels<-`(`*tmp*`, value = as.character(levels)) : factor level [2] is duplicated Sarah On Tue, Dec 10, 2019 at 9:18 AM Alain Guillet wrote: > > Hi

Re: [R] pairs.panels ()

2019-11-19 Thread Sarah Goslee
but if I understand your question, cex.labels is what you're looking for. ?par gives (possibly) more insight into controlling base graphics. Sarah On Tue, Nov 19, 2019 at 8:47 AM Medic wrote: > > Point me, please, the parameter for changing the font size for the

Re: [R] clusplot() and fviz_cluster() functions

2019-11-04 Thread Sarah Goslee
The orientation of a principal components axis is entirely arbitrary, and can vary with implementation. It doesn't matter at all. Your code was hugely mangled by posting in HTML - see below. Sarah On Mon, Nov 4, 2019 at 12:33 PM Marco Besozzi wrote: > > Can't understand why wit

Re: [R] my question is how to read pvcm file

2019-10-04 Thread Sarah Goslee
closed as too broad and not clear enough. Sarah On Fri, Oct 4, 2019 at 11:04 AM Jui-Kun Chiang via R-help wrote: > > Dear Sir, >I got a pvcm file. > My question is how to read it by R. > Gratefully > > Jui-Kun Chiang > > [[alternative HTML version deleted]

Re: [R] help

2019-09-09 Thread Sarah Goslee
structure, and may not return useful results with other clustering methods. Sarah On Mon, Sep 9, 2019 at 12:01 PM Nicola Fiedler wrote: > > Hi together, > > I’m new using R and have a question concerning the Silhouette coefficient. > I’ve clustered very easy objects with Affinity Pr

Re: [R] New Work Based on R

2019-08-29 Thread Sarah Goslee
cially, there are worse things to do than donate to the R Foundation. https://www.r-project.org/foundation/ Sarah --- Sarah Goslee http://www.numberwright.com __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/m

Re: [R] SVM - calculating values problem

2019-08-28 Thread Sarah Goslee
You could download the package code from CRAN and look yourself at what the predict function is doing. Sarah On Wed, Aug 28, 2019 at 6:35 AM PELE Benoît (Acoss) wrote: > Hello everybody, > > That is the first time that I am working on a SVM modeling and I would > like to calcula

Re: [R] File corrupted in R/magic number

2019-08-27 Thread Sarah Goslee
> 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://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code.

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

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

Re: [R] ski.mack test in R

2019-08-23 Thread Sarah Goslee
d this problem shows that you don't understand the very basics of how to use R, so you should familiarize yourself with it first. Best, Sarah On Fri, Aug 23, 2019 at 6:24 AM Sophie Bleke wrote: > > Dear Sarah, > > Thank you for you kind and quick response. > > I attach the

Re: [R] Cannot load vegan and vcd, "object vI not found"

2019-08-21 Thread Sarah Goslee
d also try reinstalling the packages that vegan requires, which seems to be where the error actually is. (lattice, perhaps, but I'd reinstall Sarah On Tue, Aug 20, 2019 at 6:27 PM Camilo Bernardo Garcia Ramirez wrote: > > Hi again: First at all, thanks for your answer. My problem is still there.

Re: [R] ski.mack test in R

2019-08-20 Thread Sarah Goslee
u get? We need specifics about what "doesn't work" means. We also need a reproducible example, possibly with toy data like the package authors used [.https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example] The output of str(a) would also be very helpf

Re: [R] reading in csv files, some of which have column names and some of which don't

2019-08-13 Thread Sarah Goslee
1,1,1 2,2,2 3,3,3 file hasheader.csv a,b,c 1,1,1 2,2,2 3,3,3 > readheader("noheader.csv") V1 V2 V3 1 1 1 1 2 2 2 2 3 3 3 3 > readheader("hasheader.csv") a b c 1 1 1 1 2 2 2 2 3 3 3 3 Sarah On Tue, Aug 13, 2019 at 2:

Re: [R] How to create a data set from object/data frame?

2019-07-19 Thread Sarah Goslee
seek out guidance, ideally from someone whose job it is to help you. Best, Sarah On Fri, Jul 19, 2019 at 1:47 PM Spencer Brackett wrote: > > Okay. I am a little confused as to how to proceed with that. The next part of > the procedure as seen below appears to be substituting inf

Re: [R] How to create a data set from object/data frame?

2019-07-19 Thread Sarah Goslee
need to analyze your own comparable data. Sarah On Fri, Jul 19, 2019 at 12:17 PM Spencer Brackett wrote: > > Sarah, > > Thank you for the reference to ?data. Upon further research into the matter, > I think I can provide a simpler explanation than the one previously provide

Re: [R] How to create a data set from object/data frame?

2019-07-19 Thread Sarah Goslee
er is appropriate for the data you have available. Or if you needed that exact dataset, data(Dilution) would get it into your R session. Do look at ?data if you haven't already. Sarah On Fri, Jul 19, 2019 at 10:46 AM Spencer Brackett wrote: > > Sarah, > > I am trying to extrac

Re: [R] How to create a data set from object/data frame?

2019-07-19 Thread Sarah Goslee
#x27;re trying to do. Sarah On Fri, Jul 19, 2019 at 10:18 AM Spencer Brackett wrote: > > Hello, > > I am trying to create a data set from an object called ‘anno’ in my > environment. I’ve tried arguments like saveRDS(anno, file = “”) and > save(anno, file “.RData”) to save th

Re: [R] bizarre color space conversion problem

2019-07-18 Thread Sarah Goslee
Peter, it appears to be the same as this bug: https://github.com/xianyi/OpenBLAS/issues/2168 I added my info to the discussion. Thanks for the reminder. And thank you again to Ivan for the help. Sarah On Thu, Jul 18, 2019 at 3:17 PM Peter Langfelder wrote: > > Sarah, if you haven

Re: [R] bizarre color space conversion problem

2019-07-18 Thread Sarah Goslee
0195385 [8,] 0.4168213 0.2149235 0.0195385 [9,] 0.4168213 0.2149235 0.0195385 [10,] 0.4168213 0.2149235 0.0195385 On Thu, Jul 18, 2019 at 1:59 PM Ivan Krylov wrote: > > On Thu, 18 Jul 2019 13:30:09 -0400 > Sarah Goslee wrote: > > > I'm not even remotely a hardwa

Re: [R] bizarre color space conversion problem

2019-07-18 Thread Sarah Goslee
U min MHz: 1200. BogoMIPS:6600.00 Virtualization: VT-x L1d cache: 32K L1i cache: 32K L2 cache:1024K L3 cache:14080K NUMA node0 CPU(s): 0-19 On Thu, Jul 18, 2019 at 1:05 PM Ivan Krylov wrote: > > On Thu, 18 Jul 2019

Re: [R] bizarre color space conversion problem

2019-07-18 Thread Sarah Goslee
67.38407 [4,] 53.48418 80.01027 67.38407 [5,] 53.48418 80.01027 67.38407 [6,] 53.48418 80.01027 67.38407 [7,] 53.48418 80.01027 67.38407 > > convertColor(red.lab, from = "Lab", to = "sRGB") [,1] [,2] [,3] [1,]100 [2,]100 [3,]100 [4,]

Re: [R] Dataframe columns are accessible by incomplete column names, is this a bug?

2019-07-18 Thread Sarah Goslee
, exact = FALSE]]’. Also, the partial matching behavior of ‘[[’ can be controlled using the ‘exact’ argument. You can avoid it by using [[]] instead: > swiss[['Ex']] NULL > head(swiss[['Examination']]) [1] 15 6 5 12 17 9 That's one of the major reasons us

[R] bizarre color space conversion problem

2019-07-18 Thread Sarah Goslee
.54720 [16,]0 0.54720 [17,]1 0.0 [18,]1 0.0 [19,]1 0.0 [20,]1 0.0 #-#-# I've gotten as far as locating the problem in this line from grDevices::convertColor() xyz <- from$toXYZ(color, from.ref.white) Packages are up to date on

[R] How to set scale of color scatterplot points relative to a third variable?

2019-07-05 Thread Flaherty, Sarah (NIH/NCI) [F] via R-help
"firebrick2", "white", "darkolivegreen3"))(1e3), xlab = "Radius (Microns)", ylab = "Time") ``` Thank you for reading! Your volunteer work is SO appreciated!! Best, Sarah Flaherty [[alternative HTML version deleted]] _

Re: [R] Subsetting Data from a Dataframe

2019-05-24 Thread Sarah Goslee
#x27;t any NA values in Var5. datos.new <- subset(datos, !(Var5 %in% c("0", "NULL")) & !is.na(Var5)) You can read the help for subset for more options, but basically you need to construct something that returns a logical value. Sarah On Fri, May 24, 2019 at 9:11 AM Paul

Re: [R] install R

2019-05-08 Thread Sarah Goslee
and-useful-other-programs-under-a-Unix_002dalike But your standard package installation method (like apt or dnf) probably can install a pre-built binary for you. If you aren't familiar with compiling software, that's the way to go. Sarah On Wed, May 8, 2019 at 9:37 AM yueli wrote: > >

Re: [R] Read_fwf in package readr, double vs. numeric

2019-04-24 Thread Sarah Goslee
And just for thoroughness, I meant that it works in readr 1.3.1, as my sessionInfo (but not what I typed myself) said. Sorry for the typo, but I'm glad it solved your problem nonetheless. Sarah On Wed, Apr 24, 2019 at 11:38 AM Doran, Harold wrote: > > Thank you, Sarah. Seems that up

Re: [R] Read_fwf in package readr, double vs. numeric

2019-04-24 Thread Sarah Goslee
Hi, I can't reproduce your problem: with readr 1.1.1 on linux, it works as expected. Letting read_fwf guess the types also works fine. (See below.) If you aren't running the current version of readr, update and retry. If you are, then we probably need more info, at least sessionInfo

Re: [R] plot (cox)

2019-04-15 Thread Sarah Goslee
uot;n") axis(1, at=seq(0, 48, by=12)) Or whatever axis values you actually want. Sarah On Mon, Apr 15, 2019 at 3:02 PM Medic wrote: > > Thanks, but too hard for me > > Sarah Goslee : > > You can presumably use xaxt="n" in your plot() statement (see ?par for >

Re: [R] plot (cox)

2019-04-15 Thread Sarah Goslee
You can presumably use xaxt="n" in your plot() statement (see ?par for details), and then use axis() to make anything you'd like (see ?axis for details). Sarah On Mon, Apr 15, 2019 at 12:51 PM Medic wrote: > > In this code: > > plot (cox, col=1:2, xscale=1, xl

Re: [R] Run time error with afex package

2019-04-14 Thread Sarah Goslee
Presumably you mean R versions by the 3.whatevers. The current version of afex no longer requires stringi, but earlier versions did. The best course is to update afex, but you could also just install the stringi, as the error message you're getting suggests. Sarah On Sun, Apr 14, 2019 at

Re: [R] String replace

2019-04-03 Thread Sarah Goslee
ould help with the reproducible example aspect, and make your question easier to answer. Sarah On Wed, Apr 3, 2019 at 1:24 PM Graham Leask via R-help wrote: > > > I’m attempting to replace a string variable that normally works fine. However > when trying to > do this with a st

Re: [R] Cluster analysis

2019-03-31 Thread Sarah Goslee
local statistician. Sarah On Sun, Mar 31, 2019 at 4:20 PM bienvenidoz...@gmail.com wrote: > > Hi, > I have data from farmers with different variables. I would like to classify > them according to some variables. Can you help me with "R" to find the best > variables to classify

Re: [R] Coding help for data frame.

2019-03-21 Thread Sarah Goslee
"Is there anyway of coding if I could arrange like this?" with absolutely no way to know what that was referring to. Please take a look at the posting guide for this list to better understand how to frame good questions, so people can help you. Sarah On Thu, Mar 21, 2019 at 11:

Re: [R] Coding help for data frame.

2019-03-21 Thread Sarah Goslee
esulting data frame to look like? I'm assuming that your sample data is the starting point. Or do you simply need to rbind the two columns together? Sarah > Anand > > Begin forwarded message: > > From: Sarah Goslee > Subject: Re: [R] Coding help for data frame. >

Re: [R] Question regarding the dcast function

2019-03-21 Thread Sarah Goslee
Hi, dcast() is a function, not a package, so R can't find it in the package archive. You need to install the package that contains it. Probably you want reshape2 install.packages("reshape2") Sarah On Thu, Mar 21, 2019 at 9:54 AM Marie-joe Kfoury wrote: > > Hi, > &

Re: [R] Coding help for data frame.

2019-03-21 Thread Sarah Goslee
I'm sorry, I don't understand what you're trying to do with your hypothetical data. Can you expand on what your question is? Sarah On Thu, Mar 21, 2019 at 9:54 AM Anaanthan Pillai wrote: > > Good day, > > #I’ve created hypothetical data for drug X and drug Y wh

Re: [R] Weather station data

2019-02-17 Thread Sarah Goslee
The VFS package has tools to process GHCN data (https://www.ncdc.noaa.gov/data-access/land-based-station-data/land-based-datasets/global-historical-climatology-network-ghcn). Sarah On Sun, Feb 17, 2019 at 10:02 AM Bernard Comcast wrote: > > Is anyone aware of any R capability to access d

Re: [R] R help

2019-02-14 Thread Sarah Goslee
There's a bibtex parser for R: you could adapt that for your use, rather than trying to reinvent the equivalent tool. https://cran.r-project.org/web/packages/bibtex/index.html Sarah On Thu, Feb 14, 2019 at 5:57 PM Gouresh Kamble via R-help wrote: > > Dear to whom it may concern on

Re: [R] periodicity

2019-01-30 Thread Sarah Goslee
Hi Nick, A quick look on rseek.org didn't turn anything up. It would help to know what websites you're referring to - they might be loading custom code. Sarah On Wed, Jan 30, 2019 at 2:17 PM Nick Wray via R-help wrote: > > I've found references on websites to an R functi

Re: [R] R help: fviz_nbclust’ is not available (for R version 3.5.2)

2019-01-16 Thread Sarah Goslee
o the fviz_nbclust function. Do take a look at ?fviz_nbclust for help and a working example. library(factoextra) library(NbClust) # Standardize the data load("df4.rda") fviz_nbclust(df4, FUNcluster, method = c("silhouette", "wss", "gap_stat")) Sarah On Wed, Jan 1

Re: [R] Question

2019-01-08 Thread Sarah Goslee
xyplot is not a package, it is a function within the lattice package, which should already be installed. library(lattice) # load the package from the R library ?xyplot # look at the help for the function The others are also functions, not packages. Sarah On Tue, Jan 8, 2019 at 9:15 AM S

Re: [R] you are making it far too difficult

2018-12-27 Thread Sarah Goslee
aping non-metacharacters with a backslash. Sarah On Thu, Dec 27, 2018 at 4:09 PM Spencer Brackett wrote: > > What is the significance of using / or \ ? > > On Thu, Dec 27, 2018 at 4:02 PM Sarah Goslee wrote: >> >> On Thu, Dec 27, 2018 at 2:03 PM Spencer Brackett >>

Re: [R] you are making it far too difficult

2018-12-27 Thread Sarah Goslee
da_rppa_core/protein_exp/mdanderson.org_BLCA.MDA_RPPA_Core.mage-tab.1.7.0/mdanderson.org_BLCA.MDA_RPPA_Core.idf.txt > > raw_data_repository raw_data_accession > > 1TCGA TCGA-19-5960-01A-13-1900-20 > > 2TCGA TCGA-19-5960-01A-13-1900-20 > > 3

Re: [R] Retrievable results in a procedure

2018-12-25 Thread Sarah Goslee
I'm a bit confused about what you actually want, but I think invisible() might be the answer. Note that there's already a base function try() so that's not a great name for test functions. Sarah On Tue, Dec 25, 2018 at 8:47 AM Steven Yen wrote: > I would like to supp

Re: [R] Problem with system() and source on linux

2018-12-20 Thread Sarah Goslee
Actually, here's another possibility: system('bash -c "source filename"') On Thu, Dec 20, 2018 at 10:13 AM Sarah Goslee wrote: > > Hi, > > I can tell you what the problem is: > > You're probably running bash at the terminal command line, as I am

Re: [R] Problem with system() and source on linux

2018-12-20 Thread Sarah Goslee
for a possible solution: https://stackoverflow.com/questions/4732200/replacement-for-source-in-sh I don't know if there's a way to specify bash shell in system(); a very cursory googling didn't find anything. If you find a way, please report back. Sarah On Thu, Dec 20, 2018 at 10:

Re: [R] extract hyperplan from e1071 model

2018-12-20 Thread Sarah Goslee
quot; is; I suggested two things you could try based on the help and my understanding of R. Sarah On Thu, Dec 20, 2018 at 9:07 AM Luigi Marongiu wrote: > > Dear Sarah, > I have looked at the tutorial but I did not find what I was looking > for. Essentially, I would like to extract th

  1   2   3   4   5   6   7   8   9   10   >