Displaying 20 results from an estimated 30000 matches similar to: "scatterplot but a little tricky"
2011 Nov 11
8
Help
Dear Contributors
I would like to perform this operation using a loop, instead of repeating
the same operation many times.
The numbers from 1 to 4 related to different groups that are in the
database and for which I have the same data.
    x<-c(1,3,7)
datiP1 <- datiP[datiP$city ==1,x];
datiP2 <- datiP[datiP$city ==2,x];
datiP3 <- datiP[datiP$city ==3,x]
datiP4 <-
2012 Dec 18
3
Regression line does not show on scatterplot
Hello,
I have done a scatterplot and now would like to add its regression line but it does not show.
Below, the code I have used. 
lm3 <- lm(data$S_pH_KCl2.5_BCx~data$B_OleicoPF_BCx_per)
plot(data$S_pH_KCl2.5_BCx, data$B_OleicoPF_BCx_per)
abline(lm3)
I have been able to do the complete operation using the software STATISTICA but it would be great to do it with R.
If you require more details
2005 Jun 02
4
plot/lm/abline
Hi,
when I run
> plot.default(z1, z2, xlab = "x", ylab = "y", main = "xxxx", pch = "+")
> abline(lm(z1 ~ z2))
then the plot is plotted perfectly (scatterplot), however, the lm()
function doesnt appear on the plot. What could be wrong?
(Yesterday it worked perfectly, with the lm() line.)
Running R 2 on OS X.
Mathias Hunsk??r Furevik
Norway
2009 Jan 09
3
Matrix: Problem with the code
Hi,
Can any one please explain why the following code doesn't work? Or can anyone suggest an alternative.
Suppose
      x<-c(23,67,2,87,9,63,8,2,35,6,91,41,22,3)
       mat<-0;
       for(j in 1:length(x))
       {    
          for(i in 1:p)       
               mat[i,j]<-x[j]^i;
       }
   Actually I want to have a matrix with p columns such that each column will have the
2009 May 01
1
Plotting extra lines on scatterplot
Hello Everyone-
I'm in the process of slowly learning R and am having a little bit of 
trouble plotting an extra line onto a scatterplot. I'm sure the answer 
is quite simple but I am stumped.
The code I am using is:
headways <- read.table("headways.csv", header=TRUE, sep=",", 
na.strings="", dec=".", strip.white=TRUE)
plot.new()
2011 Feb 01
2
Scatterplot Question
Hello,
I have some data where a number of events (the total amount varies)
occur at cumulating times,  I would like to create a scatterplot
(easily achieved using plot etc) of these events (the events can
either be times using poxist or I can convert them into just seconds
which is probably easier to work with), however I would like the
events/times to re-begin plotting every 10th occurrence and
2012 May 19
3
Q - scatterplot, plot function & trellis linear regressions???
Hi R-listers, 
Q1) What is the difference between the scatterplot and plot function? 
Q2) I am able to make a graph with the scatterplot function: 
scatterplot(DevelopIndex ~ Veg,
+             data = Turtle,
+             xlab = "Vegetation border (m)",
+             ylab = "Embryonic development index")
And have been successful. But I do not know if the lines are for:
2010 Jul 07
3
Boxplots over a Scatterplot
Hello- 
I'm new to R, coding and stats. (Oh no.) 
Anyway, I have about 12000 data points in a data.frame (dealing with
dimensions and geological stage information for fossil protists) and have
plotted them in a basic scatter plot. I also added a boxplot to overlay
these points. Each worked fine independently, but when I attempt to
superimpose them with add=true, I get a different scale for
2006 Jun 08
4
apologies if you aready received this ?
I am accessing my email account remotely so it
seems to be acting strangely so I am not sure
if this R question was received. I apologize if it was
and thanks for any help you can provide.
-----------------------------------------------------------------
Hi Everyone : As I mentioned earlier, I am taking a lot
of Splus code and turning into R and I've run into
another stumbling block that I
2010 Dec 07
1
please show me simple example how to plot "Distance-Weighted Least Squares" fitting
I got simple x,y pairs of data and simple scatterplot and just cannot figure
how to do it , there are many examples but always there is error popping out
please show me an example stripped with additional data just core of what I
need to do to get this damn line
-- 
View this message in context:
2007 Dec 18
9
Scatterplot Showing All Points
Hello all,
I'm trying to graph a scatterplot of a large (5,000 x,y coordinates) of data
with the caveat that many of the data points overlap with each other (share the
same x AND y coordinates).  In using the usual "plot" command,
> plot(education, xlab="etc", ylab="etc")
it seems that the overlap of points is not shown in the graph.  Namely, there
are
2009 Mar 31
1
error when going through Alan Lenarcic's package Tutorial
Hi Everyone: I've been going through Alan Lenarcic's package tutorial but
   when I did
   R CMD SHLIB Xdemo.cc Xdemo_main.cc -o Xdemo.dll
   I got the following error:
   XDemo_res.rc:15:38: warning: missing terminating " character
   XDemo_res.rc:23:34: warning: missing terminating ' character
   c:\mark\research\Rtools\MinGW\bin\windres.exe: XDemo_res.rc:16: syntax error
  
2018 Apr 22
3
Gantt Chart Using Plotrix
Hi Sarah
Thank you very much for your pointers.
Is there a way to specify the date string as POSIXct when reading in? 
I have tried the following (very inelegant way) and still have no luck.
--- Begin Code ---
# 1st read in the spreadsheet with stringsAsFactors set to FALSE
> abc <- read.csv("gntr1.csv", header=TRUE, stringsAsFactors=FALSE)
> abc
  code tasks.labels     
2009 Apr 26
4
Scatterplot of two groups side-by-side?
Dear all
I'm realy new to R, so I hope you can help me, as I didn't find any solution in the common books.
Since some days I'm trying to create the following plot: A scatterplott showning two different groups side-by-side with according regression lines. Both datasets only have the same five factors, so the scatters will form a kind of column at each factor. When I use
2010 Apr 25
1
categorical variable in scatterplot (car)
Hello R folks,
I am encountering a problem with the following scatterplot function from the
car package:
> scatterplot(y~x|z)
where y and x are continuous (interval) random variables and z is a
categorical variable.  When z is a categorical variable coded 1 or 2, I
(appropriately) get a scatterplot of y by x, coded by z.  Similarly, when z
is a categorical variable coded 1, 2, or 3, there is
2011 Jan 14
1
Question about scatterplot in package car
I am getting an error message from scatterplot:
> library(car)
> scatterplot(Prestige$income~Prestige$type)
Error in Summary.factor(c(2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L,  : 
  range not meaningful for factors
In addition: Warning message:
In Ops.factor(x[floor(d)], x[ceiling(d)]) : + not meaningful for factors
> 
The command does output the kind of graph that I want (boxplots).
2008 Sep 23
4
perl expression question
If I have the string below. does someone know a regular expression to 
just get the "BLC.NYSE". I bought the O'Reilley
book and read it when I can  and I study the solutions on the list but 
I'm still not self sufficient with these things. Thanks.
 
stock<-"/opt/limsrv/mark/research/equity/projects/testDL/stock_data/fhdb/US/BLC.NYSE"
2009 Aug 05
4
A question regarding R scoping
I have a question related to scoping. Suppose we have 2 functions:
f1 = function(i){i = 1}
f2 = function(n){ 
 i = length(n)
 f1(i)
}
In other words, I would like i=1 regardless of n. Is this possible without having f1 in the body of f2? Thanks in advance!
2007 Jan 21
1
Scatterplot help
Hi my friends,
I'm trying to make a scatterplot like this.
1) I have a 3-variable dataset.  They are ID, x, and y.
2) "x" is for the X-axis, "y" for the Y-axis, and "ID" is used to label all
the cases in the scatterplot.
3) After creating the scatterplot, I need to add both a X-axis  reference
line and a Y-axis reference line.  The X-axis reference line is a
2012 Aug 11
1
using eval to handle column names in function calling scatterplot graph function
I am running R version 2.15.1 in Windows XP
I am having problems with a function I'm trying to create to:
   1. subset a data.frame based on function arguments  (colname & parmname)
   2. rename the PARMVALUE column in the data.frame based on function
   argument (xvar)
   3. generate charts
  plotvar <- function(parentdf,colname, parmname,xvar,yvar ){
     subdf <-