[R] saving to docx

2012-10-19 Thread javad bayat
hi all, how can i saving R output to docx or Jpeg format? [[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

[R] surface plot

2013-07-29 Thread javad bayat
Dear R users; I have a question about surface plot that show me spatial variability of parameter. I have a data frame with 6 variables and X and Y for coordinate system. X Y pH ..... ... so I want to create a surface plot for my data. please help me. many thanks.

[R] R function

2013-07-29 Thread javad bayat
Dear R users; I am MSc student and I want to write my own function, but it cant be completed. please help me for solve it. here is my code: pah1$P = (pah1$Fluoranthene/pah1$Pyrene) T = function(x){ for (i in 1:length(pah1$P)) if (i = 1) print(Combustion) if (i 1) print(Petroleum) }

[R] help

2014-01-05 Thread javad bayat
to the case. many thanks. all bests. -- Best Regards Javad Bayat M.Sc. Environment Engineering Shahid Beheshti (National) University (SBU) Alternative Mail: bayat...@yahoo.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] help

2014-01-05 Thread javad bayat
Dear all; many thanks for your answers. Hear is my data (not all row: the station was 8 station at 20 month) which I forward it as image. I hope some one can help me to do Neural network for prediction of next month. many thanks. all bests. -- Best Regards Javad Bayat M.Sc. Environment

Re: [R] help

2014-01-06 Thread javad bayat
Dear Saha thank you to reminding me. Here is the text file. On Mon, Jan 6, 2014 at 10:33 AM, Koushik Saha saha.koushik2...@gmail.comwrote: please don't send images . paste your data in a text file with .text extension and attach it On Mon, Jan 6, 2014 at 12:06 PM, javad bayat j.bayat

Re: [R] help

2014-01-06 Thread javad bayat
not be used without retyping. Redarding neural network, did you try e.g. nnet or neuralnet package. Petr -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- project.org] On Behalf Of javad bayat Sent: Monday, January 06, 2014 7:37 AM To: R-help@r

Re: [R] help

2014-01-07 Thread javad bayat
6 21 8.275635963 On Tue, Jan 7, 2014 at 2:12 PM, javad bayat j.bayat...@gmail.com wrote: Dear Pikal Petr; thanks for code. It was usefull. On Tue, Jan 7, 2014 at 11:30 AM, PIKAL Petr petr.pi...@precheza.czwrote: Hi and what is wrong with e.g. fit - neuralnet(pH

[R] Logistic Regression

2014-06-14 Thread javad bayat
data. Many thanks for your helps. -- Best Regards Javad Bayat M.Sc. Environment Engineering Shahid Beheshti (National) University (SBU) Alternative Mail: bayat...@yahoo.com [[alternative HTML version deleted]] __ R-help@r-project.org

[R] Biplot interpretation

2014-06-24 Thread javad bayat
Dear all; I did biplot in R. How can I interpret them in order that i can create two or more groups in each biplot. I wanna determine the variables that have the same origin. please help me. many thanks. -- Best Regards Javad Bayat M.Sc. Environment Engineering Shahid Beheshti (National

[R] spplot help

2014-07-20 Thread javad bayat
Dear all I am using spplot command to plot my raster. I make it but there is two problems with me. 1- I want to have no border or greater border around the raster 2- I want to insert a legend with a header aside from its legend. please help me. thanks in advance. -- Best Regards Javad Bayat

[R] N.network help

2014-11-19 Thread Javad Bayat
with original datalibrary(lattice)library(latticeExtra)xyplot(pH ~ Day|factor(station.2), data = bayat2, type = b, layout = c(3,2), xlim = c(0:1000))+xyplot(pH ~ Day|factor(station.2), data = predictions2, type = b, layout = c(4,2), col = red) Many thanks.  Best Regards Javad Bayat Alternative Mail

[R] CCA package

2015-06-25 Thread javad bayat
Dear R users; I am using CCA package to calculate the correlation between two data set. Every time that I run my codes, I get the following error; the leading minor of order 5 is not positive definite. Please help me to fix it. Many thanks. -- Best Regards Javad Bayat M.Sc. Environment

[R] correlation matricies: getting p-values?

2015-06-28 Thread JAVAD BAYAT
Dear Bill Venables; Hi, I am using cor command to get the correlation coefficients for my data frame. I found somthing in the following site: https://stat.ethz.ch/pipermail/r-help/2000-January/009758.html https://stat.ethz.ch/pipermail/r-help/2000-January/009758.html; . I used your functions to

[R] prediction with neural network

2015-11-13 Thread javad bayat
Hi all; I am working with a data set, pH of a lake water, and there is some gap in my data. I it possible to predict these gaps by neural network? If so please help to use the right code. Many thanks. -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat

[R] Prediction data gaps by "neuralnet" package

2015-11-19 Thread javad bayat
colorofil.A 1 Sp NA 2 Sp 10 > net.sqrt <- neuralnet(colorofil.A~Season,ss1, hidden=10, threshold=0.01) print(net.sqrt) -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.com [[

[R] How to get bathymetry data using R

2016-06-10 Thread javad bayat
Dear R users; I am searching for a package to extract bathymetry data from topography map to produce the control file for CE-Qual-w2 model. Is there anyone to know how to do it? many thanks. -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.com

Re: [R] How to get bathymetry data using R

2016-06-11 Thread javad bayat
om what you've asked though). > > > > (The best format when you get a choice generally is GeoTIFF, but it > depends > > who creates them. I tend to use the NetCDF files from Etopo). > > > > Raster uses rgdal for many formats, but ncdf4 exclusively for NetCDF - if &g

[R] Deleting a specific value in a column of a data frame

2018-06-23 Thread javad bayat
do nothing. Sincerely. -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.

[R] Calculating angle of a polyline

2018-01-30 Thread javad bayat
Dear R users I am trying to find a formula to calculate the angle of a polyline. Is there a way to do this? Many thanks. -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.com [[alternative HTML version deleted

[R] Extract the coordinates of a Polylines

2019-01-27 Thread javad bayat
variables? line = readOGR("E://Topo.shp") Z = line@data$Elevation Sincerely. -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.com [[alternative HTML version deleted]] __ R-help@r-p

[R] Problem with combining 2 data frame

2019-02-15 Thread javad bayat
ifelse(df1$x1 == df2$x1, df1$x2==df2$x2, "NA")} f(df1,df2) Error in Ops.factor(df1$x1, df2$x1) : level sets of factors are different Is there anyone to help me to solve this problem? Sincerely. -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternativ

Re: [R] Extract the coordinates of a Polylines

2019-01-31 Thread javad bayat
58.5 0 LWPolyline C-TOPO-MAJR 9 Continuous1258.5 0 LWPolyline C-TOPO-MAJR 9 Continuous1258.5 0 LWPolyline C-TOPO-MAJR 9 Continuous1258.5 How can I do this. Sincerely. On Sat, Jan 26, 2019 at 9:37 AM javad bayat wrote: > Dear R users; > I am trying to ext

[R] Read Unicode text (*.txt)

2019-07-01 Thread javad bayat
input > attach(d4) > dim(d4) [1] 1814394 1 " I opened the csv file in excel and I tried to make a new csv (delimited) file. I dont know why in the "save as type" box Unicode text (*.txt) is written. Why the format is txt while the file extension is .CSV? Please help me to r

Re: [R] Read Unicode text (*.txt)

2019-07-01 Thread javad bayat
> > [[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 > >ht

[R] Fwd: Create new polygon from a polygon

2021-04-21 Thread javad bayat
-- Forwarded message - From: javad bayat Date: Fri, Apr 16, 2021 at 9:00 AM Subject: Create new polygon from a polygon To: Dear all; I have a polygon and I want to divide it into 2 new polygons. The first one must be 54 percent of the initial polygon area and the remaining area

[R] Increasing the resolution of a raster

2021-03-23 Thread javad bayat
bayat3 <- raster(bayat) bayat3 <- interpolate(bayat3, tps) bayat3 <- mask(bayat3, bayat) plot(bayat3) Sincerely -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.com [[alternative HTML version deleted]] ___

[R] Split Dataframe into several

2021-03-08 Thread javad bayat
cannot use the data. Please help me to fix this problem. Sincerely -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To

[R] Satelit Image

2021-07-26 Thread javad bayat
Dear all; I want to extrac special wavelength of landsat8 image, 470nm and 570nm. Is there any way to do this? Sincerely -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.com [[alternative HTML version deleted

[R] High error made by Neural network in R

2022-07-30 Thread javad bayat
8.355812e+00 1layhid3.to.u 9.095662e+00 1layhid4.to.u 8.024959e+00 > results_met <- neuralnet::compute(n2, test_met[,1:3]) " I am confused why the error is so high ( 3.069188e+07). Is it a problem regarding my codes? Is the prediction made by this neural network accurate?

[R] Getting minimum value of a column according a factor column of a dataframe

2022-08-24 Thread javad bayat
but it did not give me what I wanted. > x[which(x$Q == min(x$Q)),] Sincerely -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.com [[alternative HTML version deleted]] __ R-help@r-project.org mailin

Re: [R] Write text file in Fortran format

2022-09-21 Thread javad bayat
Dear Rasmus; I have no knowledge of the FORTRAN language. The text file that has been attached is a model's output file and I know that the format is in FORTRAN. I want to write a text file exactly similar to the attached text file using R programming. The steps below explain my goal: 1- Read the

Re: [R] Write text file in Fortran format

2022-09-21 Thread javad bayat
t;- read.table(text = txt_table) Error in read.table(text = txt_table) : no lines available in input " The codes before the "df1 <- read.table(text = txt_table)" were run correctly. Sincerely On Thu, Sep 22, 2022 at 6:58 AM javad bayat wrote: > Dear all; > I apologise, I did

Re: [R] Write text file in Fortran format

2022-09-22 Thread javad bayat
the file? > > Rui Barradas > > Às 06:44 de 22/09/2022, javad bayat escreveu: > > Dear all; Many thanks for your useful comments and codes. > > I tried both Rui's and Jim's codes. > > Jim's codes gave an error as below: > > "Error in substr(inputline, 1, begincol3

Re: [R] Write text file in Fortran format

2022-09-21 Thread javad bayat
... written 3 times > > We can simplify 1X,F13.5 to F14.5 > Here's the sprintf() equivalent of the Fortran format, > except you'll need to change the dots to spaces. > > "%14.5f%14.5f%14.5f%9.2f%9.2f%9.2f...%5s..%8s..%5s.%8s%10d\n > > On Thu, 22 Sept 2022 at

Re: [R] Problem with filling dataframe's column

2023-06-13 Thread javad bayat
ved, > grep returns the positions of the matches. See an example below. > > > v <- c("abc", "bcd", "def") > > v > [1] "abc" "bcd" "def" > > grep("cd",v) > [1] 2 > > w <- v[-grep("c

Re: [R] Problem with filling dataframe's column

2023-06-12 Thread javad bayat
ws of the dataframe. I do not know the reason. On Mon, Jun 12, 2023 at 5:16 PM Rui Barradas wrote: > Às 23:13 de 12/06/2023, javad bayat escreveu: > > Dear Rui; > > Many thanks for the email. I tried your codes and found that the length > of > > the "Values&quo

Re: [R] Problem with filling dataframe's column

2023-06-11 Thread javad bayat
there any other way to expand the code in order to consider all of the levels simultaneously? Like the below code: data2$LU[which(data2$Layer == c("Level 1","Level 2", "Level 3", ...))] <- c("Park", "Agri", "GS", ...) Sincerely

[R] Problem with filling dataframe's column

2023-06-11 Thread javad bayat
n 1:nrow(data2$Layer)){ if (data2$Layer == "Level 12") { data2$LU == "Park" } } -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.com [[alternative HTML version deleted]] ___

[R] Linear model and approx function

2023-12-09 Thread javad bayat
Dear all; I have a dataframe with several columns. The columns are the elevation, volume and the area of the cells (which were placed inside a polygon). I have extracted them from DEM raster to calculate the volume under polygon and the elevation for a specific volume of the reservoir. >

[R] Volume of polygon

2023-12-05 Thread javad bayat
<- exact_extract(r, p, coverage_area = TRUE) x1 = as.data.frame(x[1]) head(x1) x1 = na.omit(x1) x1$Height = max(x1[,1]) - x1[,1] x1$Vol = x1[,2] * x1[,3] sum(x1$Vol) " -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.co

Re: [R] Volume of polygon

2023-12-05 Thread javad bayat
> more sensible approximations thereto. > > Cheers, > Bert > > On Tue, Dec 5, 2023, 20:13 javad bayat wrote: > >> Dear all; >> I am trying to calculate the volume of a polygon shapefile according to a >> DEM raster. I have provided some codes at the end of

[R] Calculating volume under polygons

2023-11-20 Thread javad bayat
#### -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative Mail: bayat...@yahoo.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, s

Re: [R] Question regarding reservoir volume and water level

2024-04-10 Thread javad bayat
e impossible to > answer without knowledge of the reservoir shape. E.g. in a cylindrical > reservoir halving the water level also halves the volume, but in a conical > reservoir, halving the level leaves only 1/8 of the volume. > > > > -pd > > > > > > > >>

[R] Reminder: Question regarding reservoir volume and water level

2024-04-15 Thread javad bayat
On Wed, Apr 10, 2024 at 11:05 PM javad bayat wrote: > Dear all; > Thank you for your reply. > David has explained an interesting method. > David I have DEM file of the region and I have extracted the xyz data from > that. > Also I can extract bathymetry data as xyz file. &

Re: [R] Problem when trying to install packages

2024-03-15 Thread javad bayat
ype 'application/x-gzip' length 1083217 bytes (1.0 MB)downloaded 1.0 > MB > trying URL ' https://cran.rstudio.com/src/contrib/purrr_1.0.2.tar.gz'Content > type 'application/x-gzip' length 220868 bytes (215 KB)downloaded 215 > KB > trying URL ' https://cran.rstudio.com/src/contri

Re: [R] Problem when trying to install packages

2024-03-16 Thread javad bayat
ebsite to proceed. > Just a guess obviously. > > Bert > > On Sat, Mar 16, 2024, 05:09 javad bayat wrote: > >> Dear Rui; >> Many thanks for your reply. I have installed Rtools (rtools43-5958-5975) >> on >> my PC and I have R version 4.3.3 and 4.3.2 to i

[R] Question regarding reservoir volume and water level

2024-04-07 Thread javad bayat
level if the volume rises to 1250 m? or what would be the water level if the volume doubled (14,000,000 m3)? Is there any way to write codes to do this in R? I would be more than happy if anyone could help me. Sincerely -- Best Regards Javad Bayat M.Sc. Environment Engineering Alternative

Re: [R] Question regarding reservoir volume and water level

2024-04-07 Thread javad bayat
d pour in if the level lowers or can > be > used to escape if the level rises. > > > -Original Message- > From: R-help On Behalf Of Sorkin, John > Sent: Sunday, April 7, 2024 3:08 PM > To: Rui Barradas ; javad bayat >; > R-help > Subject: Re: [R] Ques

[R] Neural Network

2015-01-20 Thread javad bayat via R-help
Dear all; I am the new user of R. I want to simulation or prediction the Eutrophication of a lake. I have weekly data(almost for two years) for Total phosphorus, Total N, pH, Chlorophyll a, Alkalinity, Silica. Can I predict the Eutrophication by Neural Network in R? How can I simulation the

Re: [R] Neural Network

2015-01-23 Thread javad bayat via R-help
(e.g nlme, lme4) as another  potential approach.  Regards,  On Tue, Jan 20, 2015 at  11:35 PM, javad bayat via R-help r-help@r-project.org  wrote:  Dear  all;  I am the new user of R. I want to simulation or prediction  the Eutrophication of a lake. I have weekly data(almost

Re: [R] Neural Network

2015-01-23 Thread javad bayat via R-help
your temporal data, you may want to look in  to mixed effects models (e.g nlme, lme4) as another  potential approach.  Regards,  On Tue, Jan 20, 2015 at  11:35 PM, javad bayat via R-help r-help@r-project.org  wrote:  Dear  all;  I am the new user of R. I want to simulation

[R] Convert poly line to polygon in R

2017-11-12 Thread Javad Bayat via R-help
I have a shape file as poly line and I want to convert it to polygon.Is it possible to do that in R?lake <-readShapeLines("./lake_main_utm.shp")proj4string(lake) <- CRS("+proj=utm +zone=39 +datum=WGS84") Sincerely. [[alternative HTML version deleted]]

[R] how to label station names on point

2017-11-12 Thread Javad Bayat via R-help
I have a shapefile point and I plot it over my polygon. Is it possible to label station names over points?Sincerely. S_Point = readOGR(".","point")plot(S_Point,add=TRUE,col="black",pch=20,cex=2) [[alternative HTML version deleted]] __