[R] Sprintf to call data frame from environment

2016-05-24 Thread Beatriz
In my environment I have a data frame called Samples_1.txt. From this data frame I need to get variable V1. My code doesn't work. Thanks! sprintf("Samples_%s.txt", 1)$V1 Note: I need to do it in this way because I have the code into a for loop.

[R] Sprintf to call data frame from environment

2016-05-24 Thread Beatriz
In my environment I have a data frame called Samples_1.txt. From this data frame I need to get variable V1. My code doesn't work. Note: I need to do it in this way because I have the code into a for loop. sprintf("Samples_%s.txt", 1)$V1 __ R-help@r-pr

Re: [R] How to include factor levels into plot title?

2014-07-09 Thread Beatriz
@ Sarah Thanks a lot, paste does the job perfectly! On 09/07/2014 17:46, Sarah Goslee wrote: How about: plot(dd$Sepal.Length, dd$Petal.Length, main=paste("These are the levels:", paste(levels(dd$Species), collapse=", "))) Thanks for the actual reproducible example! Sarah On Wed, Jul 9, 20

Re: [R] Scatter plot selection points

2014-05-30 Thread Beatriz
(iris$Code %in% sel, "red", "black"), pch=ifelse(iris$Code %in% sel, 17, 1)) Cheers On 30/05/2014 17:38, PIKAL Petr wrote: Hi -Original Message- From: Beatriz [mailto:aguitatie...@hotmail.com] Sent: Friday, May 30, 2014 10:08 AM To: PIKAL Petr; R Help Subject: Re:

Re: [R] Scatter plot selection points

2014-05-30 Thread Beatriz
ct.org] On Behalf Of Beatriz Sent: Friday, May 30, 2014 9:37 AM To: R Help Subject: [R] Scatter plot selection points Hi all, I'd like to do a scatterplot where some of the values, out of a subset, are plotted differently in color and shape. I've worked around the following code but I don

[R] Scatter plot selection points

2014-05-30 Thread Beatriz
Hi all, I'd like to do a scatterplot where some of the values, out of a subset, are plotted differently in color and shape. I've worked around the following code but I don't manage to make it right. Any help greatly appreciated! # My data dd <- iris iris$Code <- 1:150 # A selection of my data

[R] Combine factorial column intp a new column

2014-05-22 Thread Beatriz R. Gonzalez Dominguez
Dear R-users, I'd be very greatful if you could help me with the following as after a few tests I haven't still been able to get the right outcome. I've got this data: dd_1 <- data.frame(ID = c("1","2", "3", "4", "5"), Class_a = c("a",NA, "a", NA, NA), Class_b

Re: [R] Loop to extract from variables in the workspace

2014-04-21 Thread Beatriz R. Gonzalez Dominguez
ould be clarified. Best wishes, Bea On 21/04/2014 15:17, Frede Aakmann Tøgersen wrote: Hi Beatriz Did you read the help for extract{raster} carefully? Several things can be wrong. 1) First argument to extract is not a file name but a raster object. 2) In the loop you name an object extract as

[R] Loop to extract from variables in the workspace

2014-04-21 Thread Beatriz R. Gonzalez Dominguez
Dear all, I'm starting to work with loops and I'm stucked on something. I've been searching and trying different possibilities but I don't get to the solution. I'd be very grateful if you could share any ideas that you think may help. library("raster") # All my variables are in the workspace

Re: [R] for loop to list files

2014-04-21 Thread Beatriz R. Gonzalez Dominguez
Hi Jorge, Thanks so much! Exactly what I wanted. Finally I wrote: for(i in 1976:1981){ PE.files_01_7681 <- paste("val_mapped_petpe_", 1976:i, "01.txt", sep="") } Cheers, Bea On 21/04/2014 10:46, Jorge I Velez wrote: > Hi Beatriz, > > Try > &g

[R] for loop to list files

2014-04-21 Thread Beatriz R. Gonzalez Dominguez
Dear all, I'm trying to create a loop to select a series of files into my computer but I haven't been successful until now. I've looked into different possibilities but none has worked. I'd appretiate if you could help me by providing me with some ideas. Basically what I'd like to do is to

[R] netCDF to raster and spatial projection

2014-04-15 Thread Beatriz R. Gonzalez Dominguez
I've recently started using R for spatial data. I'd be really grateful if you could could help me with this. Thanks! Sorry I don't provide a reproducible example. Please ask me if you have any questions about the data. I've extracted data from a multidimensional netCDF file. This file had lo

[R] aggregate()?

2014-02-02 Thread Beatriz R. Gonzalez Dominguez
Hi all, I'm trying to compute a mean on my data but I'm struggling with 2 things: 1. getting the right layout and 2. including the missing values in the outcome. #Input data: Stock <- c("A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B") Soil <- c("Blank", "Blank", "Control", "Control

[R] Boxplot Labels solved

2013-04-10 Thread Beatriz González Domínguez
ea -Original Message- From: Jose Iparraguirre Sent: Wednesday, April 10, 2013 10:19 AM To: Beatriz González Domínguez ; r-help-ow...@r-project.org ; R Help 1 ; R Help 2 Subject: RE: [R] Boxplot Labels OK Beatriz, In this case, use the car package and run the following: bp <- Box

[R] Boxplot Labels OK

2013-04-09 Thread Beatriz González Domínguez
Dear all, I have just sent an enquiry but probably I hadn’t expressed myself properly. Could anyone help me with the following? When I run the code on my data I get a boxplot with outliers identified by numbers 200 & 201. However, what I would like is to label these outliers with their corre

[R] Boxplot Labels

2013-04-09 Thread Beatriz González Domínguez
#Dear all, #Could anyone help me with the following? #DATA num <- as.numeric(seq(100:125)) ave <- c(0.5, 1, 1.6, 2, 2, 2.3, 2.5, 2.4, 3, 3.2, 3.3, 4, 4.8, 3.5, 2.7, 3.1, 2.8, 3.5, 4.1, 2.0, 2.5, 2.1, 3.4, 2.5, 2.6, 7) DATA <- data.frame(cbind(num, ave)) rm(num, ave) #BOXPLOT x11() bp <- boxplot(

[R] Boxplot Labels

2013-04-09 Thread Beatriz González Domínguez
#Dear all, #Could anyone help me with the following? #DATA num <- as.numeric(seq(100:125)) ave <- c(0.5, 1, 1.6, 2, 2, 2.3, 2.5, 2.4, 3, 3.2, 3.3, 4, 4.8, 3.5, 2.7, 3.1, 2.8, 3.5, 4.1, 2.0, 2.5, 2.1, 3.4, 2.5, 2.6, 7) DATA <- data.frame(cbind(num, ave)) rm(num, ave) #BOXPLOT x11() bp <- boxplot(

[R] Remove a row containing a specific value for a column

2013-04-07 Thread Beatriz González Domínguez
Dear all, Could anyone help me with the following? DATA <- data.frame(rbind(c("Red1", 1, 1, 1), c("Blue1", 1, 1, 1), c("Red2", 1, 1, 1), c("Red3", 1, 1, 1))) colnames(DATA) <- c("A", "B","C", "D") #Option 1 DATA <- DATA[-2, ] #Same result I would like to achieve with Option 2 #Option 2 - I wou

[R] Data normalization

2013-04-06 Thread Beatriz González Domínguez
Dear all, I’m finding difficulties to normalize this data. Could you provide some input? DATA: c(0.000103113, 0.000102948, 0.000104001, 0.000103794, 0.000104628, 9.2765e-05, 9.4296e-05, 9.5025e-05, 9.4978e-05, 9.8821e-05, 9.7586e-05, 9.6285e-05, 0.00010158, 0.000100919, 0.000103535, 0.00010332

[R] Fw: Reversing data transformation

2013-04-06 Thread Beatriz González Domínguez
From: aguitatie...@hotmail.com Sent: Friday, April 05, 2013 11:47 PM To: r-help@r-project.org ; R Help Subject: Reversing data transformation Hi everybody, I would be very grateful if you could give me your thoughts on the following issue. I need to perform Box-Cox (bcPower€) transform

[R] Reversing data transformation

2013-04-05 Thread Beatriz González Domínguez
Hi everybody, I would be very grateful if you could give me your thoughts on the following issue. I need to perform Box-Cox (bcPower€) transformation on my data. To do this, I calculated lambda using the function '€powerTransform'€. powerTransform(data) However, I got an error mes

[R] Please, problem using “bcPower”

2013-01-30 Thread Beatriz González
Hello, I would like to perform a Box-Cox (“bcPower”) transformation on my data. For this, I am determining lambda using the “powerTransform” function. However, with one of my variables I get the following Warning Message: In estimateTransform(x, y, NULL, ...) : Convergence failure: r

[R] powerTransform Warning Message

2013-01-17 Thread Beatriz González
Hello, I would like to perform a Box-Cox (“bcPower”) transformation on my data. For this, I am determining lambda using the “powerTransform” function. However, with one of my variables I get the following Warning Message: In estimateTransform(x, y, NULL, ...) : Convergence failure: ret

[R] Regression line does not show on scatterplot

2012-12-18 Thread Beatriz González Domínguez
Hello, I have done a scatterplot and now would like to add its regression line but it does not show. Below, the code I have used. lm3 <- lm(data$S_pH_KCl2.5_BCx~data$B_OleicoPF_BCx_per) plot(data$S_pH_KCl2.5_BCx, data$B_OleicoPF_BCx_per) abline(lm3) I have been able to do the complete operatio

[R] Cook's distance for lme?

2012-05-11 Thread Beatriz De Francisco
Hi Is there any function that I can use to calculate Cook's distance for an lme? Beatriz de Francisco Mora PhD Student The Scottish Association for Marine Science Scottish Marine Institute Oban PA37 1QA Tel: 06131 559000 (switchboard) Fax: 01631559001 E. beatriz.defranci...@sams.

[R] How can I brake a label in two lines when using expression()?

2012-05-07 Thread Beatriz De Francisco
, y,...){ panel.errbars(x,y,make.grid="none",ewidth=0.2,type="p",...) panel.loess(x[resp.week.mean.rate$Treat=="8-380"],y[resp.week.mean.rate$Treat=="8-380"],span = 5, degree = 1,lwd=2,...) panel.loess(x[resp.week.mean.rate

[R] braking a label in two lines when using expression()

2012-05-03 Thread Beatriz De Francisco
, y,...){ panel.errbars(x,y,make.grid="none",ewidth=0.2,type="p",...) panel.loess(x[resp.week.mean.rate$Treat=="8-380"],y[resp.week.mean.rate$Treat=="8-380"],span = 5, degree = 1,lwd=2,...) panel.loess(x[resp.week.mean.rate

Re: [R] error bars for a barchart

2012-05-02 Thread Beatriz De Francisco
ctually do? this is just for me to understand and later maybe make my own functions. I am assuming that g centers the error bars? but d? Regards Beatriz de Francisco Mora PhD Student The Scottish Association for Marine Science Scottish Marine Institute Oban PA37 1QA Tel: 06131 559000 (swit

[R] error bars for a barchart

2012-05-01 Thread Beatriz De Francisco
704), lower = c(-52.86120694, -40.87446411, 10.57421563, 8.822042178, -26.03144161, -66.60447035, -29.30563327, -110.3973761), fTreat = structure(c(1L, 2L, 3L, 4L, 1L, 2L, 3L, 4L), .Label = c("8-380", "8-750", "12-380", "12-750"), cla

[R] error bars for a barchart

2012-05-01 Thread Beatriz De Francisco
704), lower = c(-52.86120694, -40.87446411, 10.57421563, 8.822042178, -26.03144161, -66.60447035, -29.30563327, -110.3973761), fTreat = structure(c(1L, 2L, 3L, 4L, 1L, 2L, 3L, 4L), .Label = c("8-380", "8-750", "12-380", "12-750"), cla

[R] bootstrapping: multilevel and multiple mediation

2010-07-08 Thread Beatriz Sora Miana
Hello, Have someone performed a bootstrap in a multiple-mediator model? I am trying to compute a bootstrap in a multiple and multilevel mediation. Up top now, I have developed bootstraps in random coeffient models, but I am very lost concerning the mediation. Could someone to provide me some i

[R] discriminant analysis

2009-08-21 Thread Beatriz Yannicelli
Dear all: Is it possible to conduct a discriminant analysis in R with categorical and continuous variables as predictors? Beatriz [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] alpha shape function

2009-04-13 Thread beatriz . pateiro
Hi, on response to the thread of february, I recently uploaded the package alphahull, that computes the alpha-shape of a given sample of points in the plane. Regrets, Bea __ Beatriz Pateiro López Departamento de Estatística e IO Universidad de Santiago