similar to: Setting NA

Displaying 20 results from an estimated 20000 matches similar to: "Setting NA"

2006 Sep 26
2
colClasses: supressed 'NA'
Hi, The colClasses seem to be supressing 'NA' vlaues. How do I fix this? R script and first 5 lines of output is below. File "test2.dat" has blanks that are read as "NA" when I do not use 'colClasses', but as blanks when I use 'colClasses'. temp.df <- read.fwf("test2.dat", width=c(10,1,1,1,1,2,2,3,3,1),
2023 Jul 07
1
Plotting factors in graph panel
Thanks! You are correct, the graphs look very similar, except ggplot is scaling the text font to make it more readable. Is there a way to scale down the x-axis labels, so they are readable? On Fri, 7 Jul 2023 at 12:02, PIKAL Petr <petr.pikal at precheza.cz> wrote: > Hallo Anupam > > I do not see much difference in ggplot or lattice, they seems to me > provide almost identical
2023 Jun 29
2
Plotting factors in graph panel
Okay. Here is a modification that does four single line plots. at_df<-read.table(text= "Income MF MF_None MF_Equity MF_Debt MF_Hybrid Bank_None Bank_Current Bank_Savings Bank_NA $10 1 3.05 29.76 31.18 36.0 46.54 24.75 25.4 3.307 $25 2 2.29 28.79 32.64 36.27 54.01 24.4 18.7 2.891 $40 3 2.24 29.51 34.31 33.94 59.1 25.0 29 13.4 $75 4 1.71 28.90 35.65 33.74 62.17 24.61 11.48 1.746
2023 Jul 06
2
Plotting factors in graph panel
On Thu, 6 Jul 2023 at 15:21, Anupam Tyagi <anuptyagi at gmail.com> wrote: > > Btw, I think "lattice" graphics will provide a better solution than > "ggplot", because it puts appropriate (space saving) markers on the axes > and does axes labels well. However, I cannot figure out how to do it in > "lattice". You will need to convert Income to a
2023 Jul 07
1
Plotting factors in graph panel
Hallo Anupam I do not see much difference in ggplot or lattice, they seems to me provide almost identical results when removing theme part from ggplot. library(ggplot2) library(lattice) ggplot(TrialData4, aes(x=Income, y=Percent, group=Measure)) + geom_point() + geom_line() + facet_wrap(~Measure) xyplot(Percent ~ Income | Measure, TrialData4, type = "o", pch = 16, as.table =
2023 Jun 29
3
Plotting factors in graph panel
Thanks, Pikal and Jim. Yes, it has been a long time Jim. I hope you have been well. Pikal, thanks. Your solution may be close to what I want. I did not know that I was posting in HTML. I just copied the data from Excel and posted in the email in Gmail. The data is still in Excel, because I have not yet figured out what is a good way to organize it in R. I am posting it again below as text. These
2023 Mar 23
2
loess plotting problem
For some reason the following code is not plotting as I want it to. I want to plot a "loess" line plotted over a scatter plot. I get a jumble, with lines connecting all the points. I had a similar problem with "lowess". I solved that by dropping "NA" rows from the data columns. Please help. library(stats) attach(gini_pci_wdi_narm) plot(ny_gnp_pcap_pp_kd, si_pov_gini)
2023 Jul 06
1
Plotting factors in graph panel
Btw, I think "lattice" graphics will provide a better solution than "ggplot", because it puts appropriate (space saving) markers on the axes and does axes labels well. However, I cannot figure out how to do it in "lattice". On Thu, 6 Jul 2023 at 15:11, Anupam Tyagi <anuptyagi at gmail.com> wrote: > Hi John: > > Thanks! Below is the data using your
2006 Sep 11
9
rename cols
A quick question please! How do you rename column names? i.e. V1 --> Apple; V2 --> Orange, etc. thx much ej [[alternative HTML version deleted]]
2023 Jun 28
1
Plotting factors in graph panel
Hi Anupam, Haven't heard from you in a long time. Perhaps you want something like this: at_df<-read.table(text= "Income MF MF_None MF_Equity MF_Debt MF_Hybrid Bank_None Bank_Current Bank_Savings Bank_NA $10 1 3.05 29.76 31.18 36.0 46.54 24.75 25.4 3.307 $25 2 2.29 28.79 32.64 36.27 54.01 24.4 18.7 2.891 $40 3 2.24 29.51 34.31 33.94 59.1 25.0 29 13.4 $75 4 1.71 28.90 35.65 33.74
2023 Jun 29
1
Plotting factors in graph panel
Reposting the data did not help. We do not like to guess, and doing so takes a great deal of time that is likely wasted. Rows are observations. Columns are variables. In Excel, the first row will be variable names and all subsequent rows will be observations. Income is the first variable. It has seven states: $10, $25, $40, $75, >$75, "No", "Answer" MF is the second
2023 Jun 28
2
Plotting factors in graph panel
Hello, I want to plot the following kind of data (percentage of respondents from a survey) that varies by Income into many small *line* graphs in a panel of graphs. I want to omit "No Answer" categories. I want to see how each one of the categories (percentages), "None", " Equity", etc. varies by Income. How can I do this? How to organize the data well and how to
2023 Jul 06
1
Plotting factors in graph panel
Hi John: Thanks! Below is the data using your suggestion. I used "ggplot" to make a graph. I am not too happy with it. I am looking for something simpler and cleaner. Plot is attached. I also tried "lattice" package, but nothing got plotted with "xyplot" command, because it is looking for a numeric variable on x-axis. ggplot(TrialData4, aes(x=Income, y=Percent,
2006 Sep 30
1
plotting
Is there something in R that will display both observed values and their influence on calculated statistics? Anupam.
2006 Sep 09
1
reading and formating irregular time series for VaR
Hi, I am trying to read the following type of data from a .csv file to form an irregular time series object. I want to use it with the VaR package. How do I read it in correctly to an irregular time series object? Anupam. date,Open,High,Low,Close,Volume,OpenInterest,Contract 1972-08-16,54.25,54.25,54.25,54.25,1,1,KC1973H 1972-08-17,54.25,54.25,54.25,54.25,0,1,KC1973H
2006 Sep 25
1
Passing R connection as argument to a shell command on Windows
Hello, is there a way to pass a connection to a file in a zipped archive as argument (instead of a file name of unzipped file) to shell command "cut". In general, is it possible to pipe output of a R function to a shell command? How? I want to do something like: z = unz("zipArchive.zip", "fileASCII.ASC") # open connection open(z) # cut lines of the ASCII file in
2006 Oct 04
5
R Graphics: Saving PDF and other formats from Windows Graphic Device for LaTeX
Hello, I can't seem to save (or find the default location) when I use the Window Graphic Device's pull down menu. It does not seem to save to the directory I have set using "setwd(...)". How do I make the pull down menu's work? What is the best format to save R graphics for inclusion into a LaTeX documents? I will use PdfTex, or LaTeX -> PS -> PsToPdf to generate the
2023 Jun 29
1
Plotting factors in graph panel
Anupa, I think your best bet with your data would be to tidy it up in Excel, read it into R using something like the readxl package and then supply some sample data is the dput() function. In the case of a large dataset something like dput(head(mydata, 100)) should supply the data we need. Just do dput(mydata) where *mydata* is your data. Copy the output and paste it here. On Thu, 29 Jun 2023
2023 Mar 23
1
loess plotting problem
Thanks, John. However, loess.smooth() is producing a very different curve compared to the one that results from applying predict() on a loess(). I am guessing they are using different defaults. Correct? On Thu, 23 Mar 2023 at 20:20, John Fox <jfox at mcmaster.ca> wrote: > Dear Anupam Tyagi, > > You didn't include your data, so it's not possible to see exactly what >
2023 Mar 23
1
loess plotting problem
Dear Anupam Tyagi, You didn't include your data, so it's not possible to see exactly what happened, but I think that you misunderstand the object that loess() returns. It returns a "loess" object with several components, including the original data in x and y. So if pass the object to lines(), you'll simply connect the points, and if x isn't sorted, the points