[R] Extracting data and saving in excel

2020-10-23 Thread bgnumis bgnum
Hi all, I have a dataframe call "data", and have lots of rows. One of them is data$`birth` my data has been imported from an excel file in RSTUDIO I want to obtain in a function all rows (with the names) where data$`birth` is bigger than 1979/01/01 and extract in a excel file as an output (a sub

Re: [R] extracting all different items in a matrix colum or vector

2016-11-15 Thread bgnumis bgnum
ide to R. > > But the answer to your specific question is the unique() function. > > Sarah > > On Tue, Nov 15, 2016 at 7:33 AM, bgnumis bgnum wrote: > > Hi all, > > > > > > >From many time ago, I have return to R, I have a matrix with this > values. &

[R] extracting all different items in a matrix colum or vector

2016-11-15 Thread bgnumis bgnum
Hi all, >From many time ago, I have return to R, I have a matrix with this values. C(jose, pepe, jose, luis, pepe, raul) I want to "read" this matrix or element and extract all different values, so the output matrix (that I want to download is: c(jose, pepe, luis, raul). There is a function t

[R] Quantmod abline and axis configuration

2016-04-09 Thread bgnumis bgnum
Hi all, I have this code I want to add two ablines like this abline(h=2400, lty=3, col="lightgrey") abline(h=400, lty=3, col="lightgrey") But doesnt wotk. I alo try to set ylim from 0 to max "Foa"+1000 but I´m not able ¿Is it posible? require(latticeExtra) require(ggplot2) require(reshape

[R] Distribution hist

2015-10-27 Thread bgnumis bgnum
Hi all, I have this data on "sim" variable 10403.000NANANANA 11178.000NANANANA 11521.000NANANANA 11385.000NANANANA 10102.000NANANANA

[R] Scope of Axes

2015-10-20 Thread bgnumis bgnum
Hi all, I want to plot two graphs and I use this : par(mar=c(10,6,6,6)) matplot(Simulation,type="l") abline(h = 0, lwd = 2, col = "black") fhist<-hist(Simulation,plot=FALSE) par(mar=c(6,0,6,6)) barplot(fhist$counts,axes=FALSE, space=0,horiz=TRUE,col="lightgray") The question is, that the legt

[R] Bollinger Band quantmod

2015-10-19 Thread bgnumis bgnum
Hi all, When I plot Bollinger bands with chartSeries( IBEX,theme="white", TA = c(addBBands(50,2)) ) There is a "no" shadow area that it is used to obtain the levels. How can I plot with charSeries so that the plot start on the shadow area? I mean, ¿How can I say to de axis start plotting f.i

[R] Smoth matplot

2015-10-08 Thread bgnumis bgnum
Hi all, I have a matrix data and I use to plot matplot, it is suposed each column is a temporal series. As you see in the example the matrix o data have "peaks" I want to plot (using matplot or what yoy can say me) this matrix but with and smoothed line envoloving the values of the matrix so wh

[R] Polygon shade

2015-10-06 Thread bgnumis bgnum
Hi All, I want to shade the area below "f" variable and it doesn´t draw: plot(z$Dateh[nn:length(z$Dateh)],f,type="l",col="black", xlab="Time", ylab="Line") grid() polygon(c(1, 1:st, st),c(0, f, 0), col = "blue") st is the length of f. But if I plot plot(f,type="l",col="black", xlab="Time", yla

[R] Hide Legend

2015-09-28 Thread bgnumis bgnum
Hi all, I want to plot with quantmode but I want to ommit levels on Lavel, showing only Last Price, not the bands (in the case f.e. in Bollinger Bands) ¿Is it Possible? And to ommit hide all legend? I dont find docutmentation or example. [[alternative HTML version deleted]]

[R] Theme white bands blue and grey or other color

2015-09-27 Thread bgnumis bgnum
Hi all, I want to plot two bands in quant mod but with white theme, chartSeries(Fond,theme="white",TA = c(addBBands(50,2), addBBands(100,2) ) ) The thing is if I put this "t" it plot with black but two bands can be shown, ¿Is it psiible to put the two different bands with white theme¿? t=chartT

Re: [R] Line in hist count

2015-09-27 Thread bgnumis bgnum
ibution CDS vs. Ibex",font=4) abline(h=dataf,col="red") The thing is: ¿How can I display the associated fhist$counts/ sum(fhist$counts on the last value of f? 2015-09-26 23:31 GMT+02:00 bgnumis bgnum : > Hi all, > > Several time ago I used to work with R, now I´m returning to

[R] Line in hist count

2015-09-26 Thread bgnumis bgnum
Hi all, Several time ago I used to work with R, now I´m returning to study and work and searching old file I see that I used this code: gfhist<-hist(gf,plot=FALSE) par(mar=c(6,0,6,6)) barplot(gfhist$counts,axes=FALSE, space=0,horiz=TRUE,col="lightgray") grid() title("Marginal Distribution La

[R] Quantmod several indicators

2015-09-24 Thread bgnumis bgnum
Hi all, I´m trying to use quantmod and to display plot of Bollinger bands is working properly. ¿How should I add for instance addWPR(n =300 ) below the main plot? Could it would be plotted independently? chartSeries( IB,theme="white",TA = c(addBBands(200,2) ) Thanks in advance. [[alte

[R] Loading data chartseries

2015-09-22 Thread bgnumis bgnum
Hi all, I want to plot this data on file.txt that has this format 01/01/2000;970,1877 02/01/2000;970,2224 03/01/2000;969,0336 04/01/2000;958,3023 05/01/2000;952,8527 I´m trying to plot with quantmode with this code but it is not working X<-read.table("file.txt", col.names=c("Date","LAST"), sep

[R] Running R on a hosting o server

2015-09-22 Thread bgnumis bgnum
Hi all, Hope I can Explain: I want to "run" online some function (code written by me) so that this code "saves" an output file on my server and my html webpage read the file R plots and save (really manually I would run R function, open Filezilla, and pass the output png o jpg file). Is it possi

[R] Plot with R un html5

2015-09-19 Thread bgnumis bgnum
Hi al, I want to put a graph in a html5 webpage plotted with R (I want to get dar from Google finance). Is it posible? F.e NYSE:C Does everybody know how to plot (with code) un html5 to plot trough R o directly plot the sale plot with monthly data? I Hope you can help me explosing an example.

Re: [R] Counting Words

2015-01-22 Thread bgnumis bgnum
t you are looking for? I hope this helps. > > Chel Hee Lee > > On 1/22/2015 8:25 AM, bgnumis bgnum wrote: > >> Hi all, >> >> I want to cout the different words in a text. >> >> You see if the text is: "hola mundo mundo" the program will count:

[R] Counting Words

2015-01-22 Thread bgnumis bgnum
Hi all, I want to cout the different words in a text. You see if the text is: "hola mundo mundo" the program will count: hola 1 mundo 2 Is posible that Cran r have a similar function? [[alternative HTML version deleted]] __ R-help@r-project.

[R] Likelihood ratio

2012-11-10 Thread bgnumis bgnum
Hi All I have to run multiple stimations and to compute Likelihhod ratio. If I compute ls function with coef and summary I can extract "outputs" that I need. I am not able to find something similar to log liklihood Can you pease tell me running a ls function x on y how to extract if posib