similar to: Lattice question: plotting two sets of data, defining groups for the second set

Displaying 20 results from an estimated 2000 matches similar to: "Lattice question: plotting two sets of data, defining groups for the second set"

2008 Oct 10
3
predicting from a local regression and plotting in lattice
Hi R community, I'm running R 2.7.2 on Windows XP SP2. I'm trying to (1) plot loess lines for each of my groupings using the same color for each group; (2) plot loess predicted values. The first part is easy: data1 <- data.frame(Names=c(rep("Jon",9),rep("Karl",9)),Measurements=c(2,4,16,25,36,49,64,81,100,1,2,5,12,17,21,45,54,67),PlotAt=c(1:9,1:9)) data2 <-
2008 Aug 26
1
lattice: plotting an arbitrary number of panels, defining arbitrary groups
R Friends, I'm running R2.7.1 on Windows XP. I'm trying to get some lattice functionality which I have not seen previously documented--I'd like to plot the exact same data in multiple panels but changing the grouping variable each time so that each panel highlights a different feature of the data set. The following code does exactly that with a simple and fabricated air quality data
2011 Nov 14
1
Problem with edit()
Since installing R 2.14.0 on my Mac (a Mac Pro running 10.6.8) an issue has arisen when using the vi editor in conjunction with the edit() command. More specifically, commented lines disappear from edited functions when using [functionname.R] <- edit(). That is, if you have created a function called “test.func” as such: function () { # This is a test ex _ 4 duh <- seq(1, 10) fuh
2011 Oct 13
1
Legend symbols (line, points) in one column.
Dear R users: I want to have in the same column both symbols, line and points, one for a data, and the other for the model. How can I do that? Or is there other better form to show both data and model in the same graphic? I need to make the difference on time of the same subject (repeated measurements on time) Problem example: ###########################################################
2009 Nov 13
2
why the same values cannot be judged to be the same in R
Hi Rusers, I found sometimes that the same values cannot be judged to be the same in R. Anybody knows the probelm? I think i ignored some minor detail. Thanks. Here is the example. ############ data1<-matrix(data=c(1,1.2,1.3,"3/23/2004",1,1.5,2.3,"3/22/2004",2,0.2,3.3,"4/23/2004",3,1.5,1.3,"5/22/2004"),nrow=4,ncol=4,byrow=TRUE)
2023 Jun 11
1
Problem with filling dataframe's column
Dear Rui; Many thanks for your email. I used one of your codes, "data2$LU[which(data2$Layer == "Level 12")] <- "Park"", and it works correctly for me. Actually I need to expand the codes so as to consider all "Levels" in the "Layer" column. There are more than hundred levels in the Layer column. If I use your provided code, I have to write it
2023 Jun 11
1
Problem with filling dataframe's column
?s 21:05 de 11/06/2023, javad bayat escreveu: > Dear R users; > I am trying to fill a column based on a specific value in another column of > a dataframe, but it seems there is a problem with the codes! > The "Layer" and the "LU" are two different columns of the dataframe. > How can I fix this? > Sincerely > > > for (i in 1:nrow(data2$Layer)){ >
2023 Jun 11
1
Problem with filling dataframe's column
?s 22:54 de 11/06/2023, javad bayat escreveu: > Dear Rui; > Many thanks for your email. I used one of your codes, > "data2$LU[which(data2$Layer == "Level 12")] <- "Park"", and it works > correctly for me. > Actually I need to expand the codes so as to consider all "Levels" in the > "Layer" column. There are more than hundred
2008 Nov 05
2
how can I save the estimates of a regression model in a file?
Dear all I need some help with R. How can I save the estimates of a regression model in a file? here is what I did: 1) this is my regression model: fit1 <- lm(logmilk ~ logdays + days, data=data2) 2) however, I want to get the parameters estimates for each individual (by group): so i did the following: by(data2, list(data2$V2),function(.data2) lm(logmilk ~ logdays + days, data= .data2)) 3)
2004 Feb 04
5
Date Time Conversion problems...
At one time (version 1.7), the code below used to work for converting and extracting based on the Date Time. In version 1.8.1, something changed I know, but I cannot for the life of me figure out what... Data: UserName,RequestDate,PO,OrderDate,ExpDelivDate,Vendor,Total "Woody, Jim",12/19/2002,AP15063,1/7/2003,2/10/2003,Ames ,8570 "Harrold,
2011 Nov 16
3
plotting a double y axis when x and y lengths differ
Hello All, Many thanks to the help I have received so far. Here is an example data set I hope to plot Data1 Year Data SE 1 2005 2 0.01 2 2006 4 0.01 3 2007 5 0.01 4 2008 2 0.01 5 2009 3 0.01 6 2010 6 0.01 Data2 Year Data SE 1 2006 32 1 2 2007 100 2 3 2008 60 4 4 2009 67 3 5 2010 8 1 Notice Data2 has one less years worth of data than Data1 (which is my
2023 Jun 11
2
Problem with filling dataframe's column
Dear R users; I am trying to fill a column based on a specific value in another column of a dataframe, but it seems there is a problem with the codes! The "Layer" and the "LU" are two different columns of the dataframe. How can I fix this? Sincerely for (i in 1:nrow(data2$Layer)){ if (data2$Layer == "Level 12") { data2$LU == "Park"
2008 Aug 21
1
problem merging two data sets ( one with a header and one without)
I have two set of data, Data1 and Data2 . Data1 has a header and Data2 does not. I would like to merge the two data sets after removing some columns from data2 . I am having a problem merging so I had to write and read final data and specify the ?header=F? so the merge can be done by?V1?. Is there a way to avoid this step. The problem is when I do cbind the FinalData has different column names
2009 Nov 27
2
If condition using accessors
Hi, I'm quite new using R and have got no one to help me get through it. Hopefully someone can help me with one problem I've been struggling with for the last hours!! (Sorry if I'm using the wrong terminology as well!) I have a data matrix in which SIE is one of my variables. What I need to do now is to create a new variable (group) if a certain condition in SIE is met. I tried:
2013 Jun 10
4
Combining CSV data
Hello R community, I am trying to combine two CSV files that look like this: File A Row_ID_CR, Data1, Data2, Data3 1, aa, bb, cc 2, dd, ee, ff File B Row_ID_N, Src_Row_ID, DataN1 1a, 1, This is comment 1 2a, 1, This is comment 2 3a,
2011 Jul 16
1
Fwd: construct boxplots from data with varying column widths
From: David Winsemius <dwinsemius at comcast.net> On Jul 16, 2011, at 12:15 PM, Rory Campbell-Lange wrote: > On 16/07/11, David Winsemius (dwinsemius at comcast.net) wrote: >> >> On Jul 16, 2011, at 11:19 AM, Rory Campbell-Lange wrote: >> >>> I'm an R beginner, and I would like to construct a set of boxplots >>> showing database function runtimes.
2009 Nov 12
2
redundant factor levels after subsetting a dataset
#I have a data frame with a numeric and a character variable. x=c(1,2,3,2,0,2,-1,-2,-4) md=c(rep("Miller",3), rep("Richard",3),rep("Smith",3)) data1=data.frame(x,md) #I subset this data.frame in a way such that one level of the character variable does not appear in the new dataset. data2=data1[x>0,] data3=subset(data1,x>0) #However, when I check the levels
2008 May 14
4
Accessing items in a list of lists
Using R 2.6.2, say I have the following list of lists, "comb": data1 <- list(a = 1, b = 2, c = 3) data2 <- list(a = 4, b = 5, c = 6) data3 <- list(a = 3, b = 6, c = 9) comb <- list(data1 = data1, data2 = data2, data3 = data3) So that all names for the lowest level list are common. How can I most efficiently access all of the sublist items "a" indexed by the outer
2010 Jan 05
3
R matching lat/lon pairs from two datasets?
Hello, I am trying to match lat/lon from one dataset with the lat/lon from a second dataset and use that rows data for calculations. I am using match, but this is finding the first match and not comparing the pair, how can I determine if the lat/lon are the same? See example below. Is there a better way to determine to a matching pair of lat/lon values? Example Datasets: > data2
2010 Nov 13
1
StorNext CVFS
Morning All! Anyone ever tried exporting a StorNext CVFS filesystem from a Linux box??? I?ve got this Samba server (3.5.6) running on CentOS 5.4 and it?s working fine, exporting ext3, nfs and an IBM GPFS filesystem just fine. So I know Samba is good an my configuration is working. I tried to add the exportation of a StorNext CVFS volume and that doesn?t work. All the other volumes still work