Re: [R] split a factor into single elements

2024-03-28 Thread Fabio D'Agostino
(myfactor)[3]) # Print the results first_element [1] 2024 second_element [1] 2 third_element [1] 1 # Check the type of the object typeof(first_element) [1] "integer" Fabio Il giorno gio 28 mar 2024 alle ore 11:29 Stefano Sofia < stefano.so...@regione.marche.it> ha scritto: > De

[R] '[' vs subset() behaviors when filtering a dataframe with NA values

2022-02-19 Thread Fabio D'Agostino
mn 'weight_rec' I found that sum(is.na(weight$weight_rec)) [1] 15 #15 values are NA My two questions are: 1) Why are NA values considered when using '[' ? I only filtered for a condition of numeric values (i.e., >=0 & <=24)... and subset() did what I expected. 2)

Re: [R] how to remove factors from whole dataframe?

2021-09-19 Thread Fabio D'Agostino
Hi Luigi, try this library(taRifx) df_noFact <- remove.factors(df) str(df_noFact) 'data.frame': 5 obs. of 3 variables: $ region : chr "A" "B" "C" "D" ... $ sales : num 13 16 22 27 34 $ country: chr "a" "b" "c&qu

[R] gls() error after R upgrade

2019-03-07 Thread Fabio Fanoni
r attached packages: [1] nlme_3.1-137 loaded via a namespace (and not attached): [1] compiler_3.5.2 grid_3.5.2 lattice_0.20-38 The data used are shown below I wonder if someone could help me to solve this problem. Best regards, Fabio Fanoni DELTA_INVNORM_STD;ITOD;EU_CH -

[R] Correlation between package output

2016-04-11 Thread Fabio Monteiro
Hello I'm currently using the dbFD function of the FD package and i'm having some things that I can't do. Is there any way to check the relations between dbFD indexes? Function cor for example? I can't manage to put the informations correctly dbFD function gives a lot of output (indexes - nbsp,

Re: [R] package FD

2016-03-24 Thread Fabio Monteiro
Hi again Is there any way to check the relations between dbFD indexes? Function cor for example? I can't manage to put the informations correctly I want to see the relationships between the dbFD output (nbsp, sing.sp, FRic, FEve, FDiv, FDis and RaoQ) How should I type it? Thank you Fábio 201

Re: [R] package FD

2016-03-06 Thread Fabio Monteiro
60.0 70.0 70.0 60.0 20.0 [40] 21.0 50.0 35.0 46.0 Fábio 2016-03-05 9:38 GMT+00:00 Jim Lemon : > Hi Fabio, > What has probably happened is that ft$trait3 looks like numbers but > when it was read in at least one value could not be read as a number. > The default behavior in R is

Re: [R] package FD

2016-03-03 Thread Fabio Monteiro
i just called trait3 to my variable. Is this what i'm suppose to wright? class(trait3), or class (my_trait3_variable? both give error 2016-03-03 23:42 GMT+00:00 Jim Lemon : > Hi Fabio, > It is possible that your remaining "numeric" variable is a factor. W

[R] package FD

2016-03-03 Thread Fabio Monteiro
Hello, my name is Fábio and I'm a Marine Ecology student in Portugal. I'm currently using the FD package for my work and yesterday one message appeared that I wasn't expecting and I really need your help to try to figure out what's happening. I'm using the dbFD function and the following message a

[R] Scaling x axis

2016-02-25 Thread Fabio Monteiro
Hi i'm trying to plot my data in R and i can't manage to scale the x axis. My x axis are dates, months and years, and when I plot I only have the x axis like this (2002, 2004, 2006, 2008, 2010). I whant every date in the axis not only those years, i want to see every point with the respectively

Re: [R] FD package

2016-02-22 Thread Fabio Monteiro
ame you > were actually using. > > > http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example > > > On Mon, 22 Feb 2016, Fabio Monteiro wrote: > > hist(data$FRic) >>> >> Error in data$FRic : object of type 'closure'

Re: [R] FD package

2016-02-22 Thread Fabio Monteiro
g to plot? hist(data$FRic) will plot your > data. I guess we need more information to be helpful. > > > On Mon, Feb 22, 2016 at 8:03 AM, Fabio Monteiro < > fabio.monteiro1...@gmail.com> wrote: > >> This is the output. >> >> I want to plot, for example FRic &

Re: [R] FD package

2016-02-22 Thread Fabio Monteiro
00:00 stephen sefick : > If memory serves me, dbFD returns a lot of output. What do you want to > plot? Also, please provide reproducible examples, so that we can help you > solve your R related queries. > kindest regards, > > Stephen > > On Mon, Feb 22, 2016 at 7:0

Re: [R] FD package

2016-02-22 Thread Fabio Monteiro
Petr : > Hi > > comments inline > > > -Original Message- > > From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Fabio > > Monteiro > > Sent: Monday, February 22, 2016 11:51 AM > > To: r-help@r-project.org > > Subject: [R] FD packa

[R] FD package

2016-02-22 Thread Fabio Monteiro
Hi. First i would like to say that i'm really new in R. I recently started working with R and i'm using the FD package. I'm having some errors that doesn't make any sense. I have 2 matrix, one is the species with functional traits and the second one is the species and abundances. When I try to

[R] setup file corrupted

2014-11-28 Thread Fabio
noaded the file from both mirror: http://cran.mirror.garr.it/mirrors/CRAN/ http://cran.at.r-project.org/ Can anyone help me? Thanks, Fabio [[alternative HTML version deleted]] __ R-help@r-project.o

[R] Problem with R

2014-03-26 Thread Campaner, Fabio
ge the program would tell me it is missing but it seems that the packages needed are infinite since it does not stop asking for more packages. Please help me if you can, the submission for my project is next week and I still have not figured out how to use this program. Thank you, Rega

[R] stack object layer names not visible

2013-05-15 Thread Fabio Berzaghi
I use to be able to see the layer names of a RasterStack by just typing its name but now I only get this class : RasterStack dimensions : 70, 180, 12600 (nrow, ncol, ncell) resolution : 0.5, 0.5 (x, y) extent : -80, 10, 50, 85 (xmin, xmax, ymin, ymax) coord. ref. : NA If I do pl

[R] Select rasters in stack based on layer partial name match

2013-05-13 Thread Fabio Berzaghi
I have a stack of rasters (one per species) and then I have a data frame with lat/long columns along with a species name. |fls= list.files(pattern="median") s<- stack(fls) df<-c("x","y","species name")| I want to be able to just select one raster at a time to use with an extract function. I w

Re: [R] task percentage completion

2013-05-01 Thread Fabio Berzaghi
so in other words there is no easy way of doing this? I don't want to spend too much time figure out how this progress bar works. I am not clear if the code should run in the main R or where. On 4/30/2013 13:11, R. Michael Weylandt wrote: On Tue, Apr 30, 2013 at 10:40 AM, Fabio Berzaghi

[R] task percentage completion

2013-04-30 Thread Fabio Berzaghi
Dear All, Is it possible to add a percentage completion bar to R? I find it frustrating when running long calculations that I don't know at what point the process is. It would be very helpful so I am not guessing if I should wait a few minutes or hours. __

[R] Problem with raster function with values lower than -9999

2013-04-24 Thread Fabio Berzaghi
As I have reported in a previous thread, I have been having problems importing a ASCII raster that has values that go from Min. :-69826220 to Max. :167780500. The problem I am encountering is that when I use the raster function to import the ASCII file then every value smaller than - is

Re: [R] extract function extracting only NA values

2013-04-24 Thread Fabio Berzaghi
ok so i imported the raster as a dataframe and everything is fine Min. :-69826220 Max. :167780500 so it's something with values lower than - that are interpreted as NA by the raster function On 4/24/2013 13:52, Fabio Berzaghi wrote: So I think I might have found what is ca

Re: [R] extract function extracting only NA values

2013-04-24 Thread Fabio Berzaghi
gh I get different values min -69826224 and max 167780496 So maybe when I am importing the rest are in R something goes wrong and all the values below a certain threshold are considered NA. Is this a bug or do I get to use a specific parameter for the raster function? On 4/24/2013 13:10, Fabio

[R] extract function extracting only NA values

2013-04-24 Thread Fabio Berzaghi
Hello, I have five raster files in ASCII format. With four of them I have no problem extracting values based on a set of X and Y coordinates. Unfortunately with one of the files all I managed to extract is NA values. To verify the problem I have opened the raster with ArcMap and there are no

[R] find lowest AIC of a LM

2013-04-18 Thread Fabio Berzaghi
hello all, I have a simple linear model with 4/5 variables that I am trying to fit. I would like to find the lowest AIC value with any combination of all the variables. I would like to implement this with a while/for loop. Possibly I would like to generalize this so then I can use it when I h

Re: [R] How to copy current line in Tinn-R

2013-03-28 Thread Fabio Berzaghi
Thanks, that works, however I was hoping for a keyboard shortcut. On 3/26/2013 11:43, John Kane wrote: I hve not used Tinn-R in a while (I'm currently running Ubuntu) but I think that you can just click in the left margin to select the line. John Kane Kingston ON Canada -Original Messa

[R] How to copy current line in Tinn-R

2013-03-25 Thread Fabio Berzaghi
Hello All, A very simple question about Tinn-R. I am able to use the send line shortcut, but I want to be able to just copy the current line to the clipboard and then paste in the current document or somewhere else. It's so tedious to select the whole line and then copy it. Thanks _

[R] How to copy current line in Tinn-R

2013-03-14 Thread Fabio Berzaghi
Hello All, A very simple question about Tinn-R. I am able to use the send line shortcut, but I want to be able to just copy the current line to the clipboard and then paste in the current document or somewhere else. It's so tedious to select the whole line and then copy it. Thanks _

[R] R script .bat file from Python

2013-02-14 Thread Fabio Veronesi
one had a similar problem? Many thanks, Fabio [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html a

[R] Simple AR(2)

2011-04-01 Thread Fabio Ciotola
305 * *Order selected 1 sigma^2 estimated as 5.368* Please can anybody help us telling how to get a reasonable good fit with YW, Burg and MLE, reporting also the code that needs to be used and commenting the coefficients obtained by comparing those with the ones obtained with OLS. Thanks i

[R] Simple AR(2)

2011-03-29 Thread fabio
Hi there, we are beginners in R and we are trying to fit the following time series using ar(2): > x <- c(1.89, 2.46, 3.23, 3.95, 4.56, 5.07, 5.62, 6.16, 6.26, 6.56, 6.98, > 7.36, 7.53, 7.84, 8.09) The reason of choosing the present time series is that the we have previously calculated analiticall

Re: [R] as.Date

2011-02-09 Thread Valeri Fabio
as.Date(36525, origin="1900-01-01") [1] "2000-01-02" @Philipp: I assume that Epi will have the same affect on Linux. Maybe you have the same library or another which conflicts with as.Date(). Fabio -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bo

Re: [R] as.Date

2011-02-08 Thread Valeri Fabio
fter loading several libraries I got [1] "2070-01-01" I assume there is a conflict with a package. I will try to find the one and let you know. Fabio -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Prof Brian Ripley

[R] as.Date

2011-02-08 Thread Valeri Fabio
eems that the origin does not apply and remains 1970-01-01. Does anyone can give me a hint how to solve this problem? Thanks very much. Fabio ---- --- Fabio Valeri, MSc University of Bern Institute

[R] R syntax for 95% prediction interval on a left-truncated normal variable

2011-01-12 Thread Fabio Colombo
-log-transformed variable is left truncated from 0 and I think that it is expected to be normal; anyone can help? ThankYou, Fabio Dott. Fabio Colombo Coordinatore tecnico Università degli Studi di Milano, Dipartimento di Scienze e Tecnologie Veterinarie per la Sicurezza Alimentare, Laboratorio di

[R] How can I change the longitude scale on the plotMap() PBSmapping package

2010-12-07 Thread Fabio Caltabellotta
that goes from the latitude -26.0°S to -21.0°S and longitude from -48.0°W to -45.0°W. However how can I change the scale value of xlim ranging from 312.0 to 315.0 for the scale of longitude 48.0W-and-45.0W to the same area?. Can anyone help me? Thanks, -- Fabio Prior Caltabellotta, M.Sc

[R] Fitting Weibull Model with Levenberg-Marquardt regression method

2010-08-23 Thread Veronesi, Fabio
can't obtain the same results? Many thanks in advance, Fabio Mr. Fabio Veronesi Ph.D. student Cranfield University e-mail: f.veron...@cranfield.ac.uk [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat

[R] BRugs dwwinn.exe error

2010-05-06 Thread Fabio Valeri
ybe there is something I missed. I would be very happy if somebody could give me a hint. I could use the stand alone versions but working with R is so comfortable. Thank you Fabio content of log-Window (WinBUGS) *** display(log) check(C:/DOKUME~1/Fabio/LOKALE~

[R] Help with arguments in .Script

2009-12-19 Thread Veronesi, Fabio
he last line I basically want to run the script ("script.R), with the created dataset and, at the end of the script, I need to write the table, created inside the script, in a csv file. Obviously it does not work. Do you have some suggestion to solve a

[R] "R CMD BATCH" continue after an error in the script

2009-12-05 Thread Veronesi, Fabio
y the error message, I just want that the script continue. If I use the R windows GUI the script show the error message but it continue till the very end. I want that the script continue to run also in BATCH mode, How can I do that? Many thanks in advance,

[R] Substitute "Object not found" with NA

2009-12-04 Thread Veronesi, Fabio
consequence R return an error like this: "object 'MAD4' not found" Is it possible to say to R that if it does not find an object it must substitute that object with NA in the vector? Many Thanks, Fabio Mr. Fabio Veronesi Ph.D. student Cranfield University, Bld.37 School of Ap

[R] Calculating the percentage of explained deviance in lmer

2009-11-10 Thread Fabio Bulleri
explained deviance is a common measure. How can I calculate it? Thanks a lot for your help, I hope this is not too shallow. Best Fabio -- Fabio Bulleri, PhD Dipartimento di Biologia Università di Pisa Via A. Volta 6, I-5612

[R] Categorizing Lines

2009-08-11 Thread Fabio Murtas
Hi all, i have a dataset of 3D coordinates and can't figure out how to' tell R which One Are the individuals: I have 3 columns which i named x,y and z And then i have 2607 Lines, but each specimen is 33 Lines (79 specimens) How can i tell R to' categorize individuals every 33 Lines? Thanks

[R] problem adding columns to matrix

2009-08-09 Thread Fabio Murtas
m > cbind(m,s) size head pectoral area weight s ind1 27.32586 28.32586 29.32586 27.32586 28.32586 2 ind2 28.32586 29.32586 27.32586 28.32586 29.32586 2 ind3 29.32586 27.32586 28.32586 29.32586 27.32586 1 ind4 27.32586 28.32586 29.32586 27.32586 28.32586 1 > --

[R] rateratio

2009-07-09 Thread Fabio Luciani
Hello I am having problems with the function rateratio in epitools I getthe following error Error in ratetable(x, rev = rev) : All arguments to ratetable() must be the same length I checked that x is a 2x2 matrix. any idea? thanks Fabio Fabio Luciani Postdoctoral NHMRC research fellow

Re: [R] Drawing from an empirical distribution

2009-01-06 Thread Antonio, Fabio Di Narzo
.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. > -- Antonio, Fabio Di Narzo Ph.D. student at Department of Statistical Sciences University of Bologna,

Re: [R] understanding lexical scope

2008-12-18 Thread Antonio, Fabio Di Narzo
ernative HTML version deleted]] > > __ > R-help@r-project.org mailing list > 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, minim

Re: [R] Transforming a string to a variable's name? help me newbie...

2008-12-09 Thread Antonio, Fabio Di Narzo
;>> >> >> The name of the dataframe / variable of an individual trial can >>> be >>> >> >> obtained using: >>> >> >> paste("t",tmptrialinfo[1,2],tmptrialinfo[1,16],".gz",sep="") >>> >> >> Then I get a string: >>&g

Re: [R] unexpected scoping behavior with functions created in a loop

2008-12-06 Thread Antonio, Fabio Di Narzo
ated) for me:D bests, a. > > > On Sat, Dec 6, 2008 at 9:22 PM, Antonio, Fabio Di Narzo > <[EMAIL PROTECTED]> wrote: >> Hi guys. >> I recently stumbled on an unexpected behavior of R when using >> functions created in a loop. >> The problem is silly enough

[R] unexpected scoping behavior with functions created in a loop

2008-12-06 Thread Antonio, Fabio Di Narzo
tring R version 2.8.0 Patched (2008-12-04 r47063) -- Antonio, Fabio Di Narzo Ph.D. student at Department of Statistical Sciences University of Bologna, Italy __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Help With Permutations

2008-11-24 Thread Mulazzani Fabio (Student Com06)
ns=1e5) cmat <- combinations(300,2) dim(cmat) # 44850 by 2 >permutations(n=100, r=100) Unfortunately at a certain point (after few minutes) I get the following Error: Error: cannot allocate vector of size 609.1 Mb What can I do? Thanks Fabio [[alternative HTML ver

Re: [R] par() function does not work

2008-07-23 Thread Fabio Sanchez
Thank you all, I accidentally loaded a variable named "c". All the best, Fabio On Wed, Jul 23, 2008 at 1:08 PM, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: > Did you start R with --vanilla to check that this is not something you have > done? It is good practice, and I

[R] par() function does not work

2008-07-23 Thread Fabio Sanchez
Dear R-nautes, I installed the 2.7.1 version of R and found it is not possible to modify graphical parameters with par(). for example; > par(mfrow=c(2,2)) Error in c(2, 2) : unused argument(s) (2) > par$mfrow NULL Does any one know what is the cause of this problem? Regards, Fabio --

[R] select.list() cannot be used non-interactively

2008-07-01 Thread Fabio Fanoni
Error in select.list(list = c("Type 1", "Type 2", "Type 3"): select.list() cannot be used non-interactivelyExecution halted Why? How can I solve my problem? winDialog and winDialogString work correctly! Many thanks! Fabio

Re: [R] change column names of several data frames

2008-04-21 Thread Antonio, Fabio Di Narzo
"natal", i, sep = > "."))) <- "y1") > > Thanks in advance! > > / Henrik Pärn > > __ > R-help r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting

Re: [R] Working with time series class object

2007-11-29 Thread Antonio , Fabio Di Narzo
tendencias.com.br> writes: > > > Hi > > I have a daily time series dataset, witch is very irregular spaced. Take a look at package zoo, which has detailed vignette. HTH, Antonio. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailm