Re: [R] How to save output of multiple loops in a matrix

2020-03-21 Thread Ioanna Ioannou
ity <- matrix(apply(VC_t, 1, function(x) paste(x, collapse = ','))) Vul$Y_vals <- Vulnerability From: Jeff Newmiller Sent: 21 March 2020 16:27 To: r-help@r-project.org ; Ioanna Ioannou ; r-help@r-project.org Subject: Re: [R] How to save output of mult

[R] How to save output of multiple loops in a matrix

2020-03-21 Thread Ioanna Ioannou
) print(unique(VC )) } } } Vul <- distinct(d1[,c(65,4,3)]) dim(VC) <- c(length(unlist(str_split(as.character(d1[1,]$Y_vals), pattern = ","))),length(distinct(d1[,c(65,4,3)])$Name)) ## (rows, cols) VC VC_t <

[R] How to create a vector by searching information in multiple data.tables in r?

2020-01-31 Thread Ioanna Ioannou
NA) Any help much appreciated! Best, ioanna A<- data.frame( name1 = c('fields', 'fields', 'fields'), name2= c('category', 'asset', 'country'), value = c('Structure Class', 'Building', 'Colombia') B<- data.frame( name1 =

Re: [R] How to save multiple values of a variable in a json file in R

2020-01-16 Thread Ioanna Ioannou
ead and in some cases there will be one country reported and in some others multiple. How can i optimise the code? Best, From: Rainer M Krug Sent: 16 January 2020 14:47 To: Ioanna Ioannou Subject: Re: [R] How to save multiple values of a variable in a json file in R Ch

[R] How to save multiple values of a variable in a json file in R

2020-01-16 Thread Ioanna Ioannou
? See below for the json file. Best, ioanna { "pk": 670, "model": "vulnerability.generalinformation", "fields": { "category": "Structure class", "article_title": "A GLOBAL DATABASE OF VULNERABIL

Re: [R] How to create a new data.frame based on calculation of subsets of an existing data.frame

2019-12-21 Thread Ioannou, Ioanna
of the aforementioned two. In fact, the third is identical to the first. Could you please optimize? Thank you very much again, Best, ioanna -Original Message- From: Jim Lemon [mailto:drjimle...@gmail.com] Sent: Friday, December 20, 2019 9:04 PM To: Ioannou, Ioanna Cc: r-help mailing list Subject

Re: [R] How to create a new data.frame based on calculation of subsets of an existing data.frame

2019-12-20 Thread Ioannou, Ioanna
check the code I sent last and based on that give your solution? Many thanks. Get Outlook for Android<https://aka.ms/ghei36> From: Jim Lemon Sent: Friday, December 20, 2019 11:40:28 AM To: Ioannou, Ioanna Cc: r-help mailing list Subject: Re: [R] How to

Re: [R] How to create a new data.frame based on calculation of subsets of an existing data.frame

2019-12-20 Thread Ioannou, Ioanna
mp; DS2_rows,calc_vars] - D[calc_rows & DS3_rows,calc_vars]) + 0.43 * (D[calc_rows & DS3_rows,calc_vars] - D[calc_rows & DS4_rows,calc_vars]) + 1.0* D[calc_rows & DS4_rows,calc_vars] } } } -----Original Mes

[R] How to save output of multiple unique loops in R.

2019-12-20 Thread Ioanna Ioannou
Hello everyone, Could you please let me know how to create a new data.frame with the output of the 2 unique loops. Essentially i want a data.frame with the IM, Taxonomy and VC . MInd you VC is a vector with 33 elements. Any ideas? best, ioanna D<- data.frame(Ref.No = c(1622, 1623, 1624, 1

[R] How to create a new data.frame based on calculation of subsets of an existing data.frame

2019-12-17 Thread Ioannou, Ioanna
IM_2IM_3IM_4VC_1 VC_2VC_3VC_4 1622South America PGA ER+ETR_H1 1.00E-060.080.16 0.24 3.49e-294 3.449819e-05 0.002748889 0.01122911 Best, , ioanna __ R-help@r-project.org mai

[R] FW: How to create a new data.frame based on calculation of subsets of an existing data.frame

2019-12-17 Thread ioanna ioannou
IM_3IM_4VC_1 VC_2VC_3VC_4 1622South America PGA ER+ETR_H1 1.00E-060.080.16 0.24 3.49e-294 3.449819e-05 0.002748889 0.01122911 Best, , ioanna __ R-help@r-project.org mailing lis

Re: [R] How to create a new data.frame based on calculation of subsets of an existing data.frame

2019-12-17 Thread Ioanna Ioannou
0,0), Prob.of.exceedance_3 = c(0.26,0.001,0.00019,0.00573,0.04,0.00017,0.000215,0.000472), Prob.of.exceedance_4 = c(0.72,0.03,0.008,0.61,0.475,0.0007,0.00435,0.000405) ) From: R-help on behalf of Ioa

[R] FW: How to create a new data.frame based on calculation of subsets of an existing data.frame

2019-12-17 Thread Ioanna Ioannou
IM_1 IM_2 IM_3 IM_4 VC_1 VC_2 VC_3 VC_4 1622 South America PGA ER+ETR_H1 1.00E-06 0.08 0.16 0.24 3.49e-294 3.449819e-05 0.002748889 0.01122911 Thanks in advance, Best, , ioanna __ R-h

[R] How to create a new data.frame based on calculation of subsets of an existing data.frame

2019-12-17 Thread Ioanna Ioannou
IM_1 IM_2 IM_3 IM_4 VC_1 VC_2 VC_3 VC_4 1622 South America PGA ER+ETR_H1 1.00E-06 0.08 0.16 0.24 3.49e-294 3.449819e-05 0.002748889 0.01122911 Thanks in advance, Best, , ioanna __ R-h

Re: [R] Manipulation of data.frame into an array

2018-05-24 Thread Ioanna Ioannou
Hello everyone, Thank you for this. Nonetheless it is not exactly want i need. I need mydata[[1]] to provide the values for all 3 variables (Y, X1 and X2) of the first imputation only. As it stands it returns the whole database. Any ideas? Best, ioanna

[R] Manipulation of data.frame into an array

2018-05-24 Thread Ioanna Ioannou
. Can you help me please? Best, ioanna [[alternative HTML version deleted]] __ 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

[R] Change values of a column based on the values of a third

2015-10-05 Thread IOANNA IOANNOU
,'N','Y','N','Y','N','N') ) I want to add a column c which will change 'C' to 'D' if column b is 'Y'. > Dat a b c 1 A N A 2 A N A 3 C Y D 4 B N B 5 C Y D 6 C N C 7 B N B Any ideas? Best, ioanna [[alternative HTML version d

[R] FW: Completing Unordered Categorical missing variables using package mi

2015-06-18 Thread IOANNA IOANNOU
. Any idea how to fix the problem? Any help much appreciated, Best, Ioanna new-read(Sample.csv) new$Use-factor(new$Use) MissingData - missing_data.frame(new) MissingData - change(MissingData, y = DS, what = type, to = ordered-categorical) # STEP 3: look deeper summary(MissingData

[R] Completing Unordered Categorical missing variables using package mi

2015-06-18 Thread IOANNA IOANNOU
. Any idea how to fix the problem? Any help much appreciated, Best, Ioanna new-read(Sample.csv) new$Use-factor(new$Use) MissingData - missing_data.frame(new) MissingData - change(MissingData, y = DS, what = type, to = ordered-categorical) # STEP 3: look deeper summary(MissingData

[R] gaussian Kernel smoothing using Nadaraya-Watson estimator and confidence bands

2015-03-05 Thread IOANNA IOANNOU
for illustration purposes: d - data.frame(x = runif(N)) d$y - d$x^2 - d$x + 1 + (1+d$x)*rnorm(N, sd = 0.1) Any help much appreciated. Best, Ioanna __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman

[R] FW: FW: confidence intervals values in locpol

2015-03-04 Thread IOANNA IOANNOU
. Any ideas? For example N - 250 xeval - 0:100/100 ## ex1 d - data.frame(x = runif(N)) d$y - d$x^2 - d$x + 1 + rnorm(N, sd = 0.1) r - locpol(y~x,d) plot(r) Best, Ioanna - E-Mail: (Ted Harding) ted.hard

[R] LInes with types

2014-05-28 Thread ioanna ioannou
? Best IOanna [[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 and provide commented, minimal, self

[R] Legend having lines with different types

2014-05-28 Thread IOANNA
? Best IOanna [[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 and provide commented, minimal

[R] grf in geoR

2014-03-31 Thread ioanna ioannou
Hello all, A simple question. When I use grf from the package 'geoR' , I adopt the exponential model. For this model is the parameter range in m or km? Best ioanna [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] grf in geoR

2014-03-31 Thread ioanna ioannou
Hello all, A simple question. When I use grf from the package 'geoR' , I adopt the exponential model. For this model is the parameter phi in m or km? Best ioanna [[alternative HTML version deleted]] __ R-help@r-project.org

Re: [R] Data manipulation in a data.frame

2014-02-21 Thread ioanna ioannou
)) Thanks in advance, IOanna -Original Message- From: arun [mailto:smartpink...@yahoo.com] Sent: 21 February 2014 00:19 To: r-help@r-project.org Cc: ioanna ioannou Subject: Re: [R] Data manipulation in a data.frame Also, rownames(which(t(!!A[,-1]),arr.ind=TRUE)) A.K. On Thursday, February 20

[R] Data manipulation in a data.frame

2014-02-20 Thread ioanna ioannou
such that: A-data.frame(A=c(10,100,1000,30,50,60,300), B=c(0,1,1,1,0,0,0), C=c(0,0,0,0,1,1,0), D=c(1,0,0,0,0,0,1), Variable=c(D,B,B,B,C,C,D)) How can I do it? Best IOanna [[alternative HTML version deleted

Re: [R] Aggregating spatial data

2013-11-26 Thread IOANNA
Fantastic. Thanks very much! Is there an easy way to plot the points and the 4 areas? Best, Ioanna -Original Message- From: David Carlson [mailto:dcarl...@tamu.edu] Sent: 25 November 2013 15:21 To: 'IOANNA'; r-help@r-project.org Subject: RE: [R] Aggregating spatial data Something

[R] Aggregating spatial data

2013-11-25 Thread IOANNA
to these points. My question is how to divide this area in 4 sub-areas of equal points each and produce the counts of z1= '1', '2' , '3' in each quarter as well as mean values of z2 for each quarter. Best, Ioanna [[alternative HTML version deleted

[R] Error in grf using geoR

2013-11-12 Thread IOANNA
change the limits of the grid: sim2 - grf(nslon*nslat, grid=reg, nx=nslon, ny=nslat,cov.pars=c(1, range), nsim=N, cov.model = exponential, xlims=c(0.02,5.00),ylims=c(0.02,5.00) ) Any ideas? Best Ioanna __ R-help@r-project.org

Re: [R] Identifying the bin where a value is included.

2013-09-18 Thread ioanna ioannou
, IOanna __ 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, minimal, self-contained, reproducible code.

[R] FW: Kernel smoothing with bandwidth which varies with x

2013-05-23 Thread IOANNA
requiring a bandwidth that varies with x? How can I do that? Thanks in advance, Ioanna __ 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

[R] Reshaping a table

2013-04-08 Thread IOANNA
Hello all, I have data in the form of a table: X Y1Y2 0.1 3 2 0.2 2 1 And I would like to transform in the form: X Y 0.1 Y1 0.1 Y1 0.1 Y1 0.1 Y2 0.1 Y2 0.2 Y1 0.2 Y1 0.2 Y2 Any ideas how? Thanks in advance, IOanna

[R] Data manipulation

2013-03-15 Thread IOANNA
includes the zero values, i.e.: W Group.1 Group.2 x 1 1 0.1 4 2 2 0.1 7 3 3 0.1 1 4 1 0.2 3 2 0.2 0 5 3 0.2 4 10.3 0 20.3 0 6 3 0.3 4 How can I achieve what I want? Best regards, Ioanna

Re: [R] Data manipulation

2013-03-15 Thread IOANNA
Thanks a lot! -Original Message- From: John Kane [mailto:jrkrid...@inbox.com] Sent: 15 March 2013 13:41 To: Blaser Nello; IOANNA; r-help@r-project.org Subject: Re: [R] Data manipulation Nice. That does look like it. IOANNA? John Kane Kingston ON Canada -Original Message

Re: [R] Data manipulation

2013-03-15 Thread IOANNA
its clearer now. Ioanna -Original Message- From: John Kane [mailto:jrkrid...@inbox.com] Sent: 15 March 2013 12:51 To: IOANNA; r-help@r-project.org Subject: RE: [R] Data manipulation What zero values? And are they acutall zeros or are the NA's, that is, missing values? The code looks

[R] Issue with using geocode

2012-11-25 Thread ioanna ioannou
Afxentiou Ampelokipi Thessaloniki Greece, 4 Afxentiou Ampelokipi Thessaloniki Greece, 55 Agathonos Ampelokipi Thessaloniki Greece) For (i in 1:4){ Y-geocode('X') print Y[i] } Best wishes, Ioanna [[alternative HTML version deleted

[R] LOCFIT

2012-07-13 Thread Ioanna Ioannou
residuals for the nonparametric model? Thanks, Ioanna [[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

[R] Error: (subscript) logical subscript too long

2012-04-02 Thread IOANNA
=binomial(logit)) This works. However, if I change the family to Gaussian: ced.logr - glm(ced.del ~ cat + follows + factor(class), family=gaussian) I get the error: Error: (subscript) logical subscript too long I would like to use the probit function. Is this possible? Best regards, Ioanna

[R] Call the Standard Error and t-test probability in linear regression

2012-03-02 Thread IOANNA
I don't know how to do this. Any help? Regards, Ioanna __ 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, minimal, self

Re: [R] plotting confidence bands from predict.nls

2012-02-05 Thread ioanna
How do you use bootstrap to estimate the confidence as well as the prediction intervals in nonlinear regression ? -- View this message in context: http://r.789695.n4.nabble.com/plotting-confidence-bands-from-predict-nls-tp3505012p4358572.html Sent from the R help mailing list archive at

Re: [R] plotting confidence bands from predict.nls

2012-02-05 Thread ioanna
2012 03:42:05 -0800 From: ml-node+s789695n4358800...@n4.nabble.com To: ii54...@msn.com Subject: Re: plotting confidence bands from predict.nls On 05/02/2012 08:10, ioanna wrote: How do you use bootstrap to estimate the confidence as well as the prediction intervals in nonlinear

[R] R: sample size package

2012-02-03 Thread IOANNA
Hello, Lets assume I have an ordinal response variable representing the D-c(D0,D1,D2,D3,D4) where D0 is no damage and D4 is collapse which I want to correlate with a continuous predictor variable, wind speed at the location of each building. is there a function in R which I can use to

Re: [R] kernel smoothing of disease rates at locations

2012-02-02 Thread ioanna
Is it possible to apply a kernel smoothing regression whose estimator or indeed the confidence intervals cannot take negative values or values greater than 1? Best regards, Ioanna -- View this message in context: http://r.789695.n4.nabble.com/kernel-smoothing-of-disease-rates-at-locations