Displaying 20 results from an estimated 3000 matches similar to: "relating data in two data frames"
2012 Aug 16
8
How to extract from a column in a table?
Hi,
I have a table in which one column has the name of the objects as shown below.
Name
Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15)
Budlamp-Woodcutter Complex - 15 to 60% slope (60/25/15)
Terrarossa-Blacktail-Pyeatt Complex - 1 to 40% slope (40/35/15/10)
Terrarossa-Blacktail-Pyeatt Complex - 1 to 40% slope (40/35/15/10)
How can I split the single column into three columns
2012 Aug 31
7
splits with 0s in middle columns
Hi,
A column of my df looks like
A
10/20/30
40/20
60/10/10/5
80/10
I want to split it such that the last column has the last composition and if there are not enough the middle columns get the 0s. That way my df would look like
A1 A2 A3 A4
10 20 0 30
40 0 0 20
60 10 10 5
80 0 0 10
How can I do that ??
[[alternative HTML version deleted]]
2005 May 27
3
Soil texture triangle in R?
Dear R users,
has anybody made an attempt to create the soil texture triangle graph in
R? For an example see here:
http://www.teachingkate.org/images/soiltria.gif
I would like to get the lines in black and texture labels in gray to
allow for plotting my texture results on top.
Any examples or suggestions are very welcome!
Thanks in advance,
Sander.
--
2012 Aug 28
7
check and verify
Hi,
I have 6 columns in my dataframe (test)
A B C D E F
a b c d 40 30
a f a b 20 10
x m y m 50 30
If character value in column A matches with that in column C, it gets the percentage in column E, similarly if value in column B matches the value in D, it gets the percentage in F column. If it doesn't match, it gets 0 percentage.
How can I do that ?
thanks
[[alternative HTML version
2012 Aug 27
6
find and replace
I have 5 (A,B,C,D,E) columns in my dataframe. I want to replace all "x" with "y" and all "a" with "b" within these 5 columns. Can I do it in one step?
Thanks
[[alternative HTML version deleted]]
2012 Oct 02
2
add values in one column getting range from other column
Hi,
My dataframe has two columns one with area and other with percent. How can i add the areas that are within a range of percentage??
My dataframe looks like
Area Percent
456 0
3400 10
79 25
56 18
467 0
67 67
839 85
1120 0
3482 85
I want to add the area for values whose percent is <0, 0-25, 25-50, 50-75, >75. How
2012 Aug 29
4
Use or ??
Hi, My data frame looks like
A B C
a b a
x y z
I want to add a new column which says "y" if either A or B matches with C and "n" if there is no match. How can I do that?
Thanks
[[alternative HTML version deleted]]
2012 Aug 27
4
?nchar ?strsplit
Hi, my data frame is
x<-data.frame(ID=c("abc/def","abc/def/ghi","abc","mno/pqr/st/ab"))
I want to split my column ID using "/" as the place to split. How can I do that without telling the code how many sub-columns. I could use nchar(gsub("[^/]","",x$ID)) to get how many "/" are in each row of the column, but could
2005 Mar 10
2
Logistic regression goodness of fit tests
I was unsure of what suitable goodness-of-fit tests existed in R for logistic regression. After searching the R-help archive I found that using the Design models and resid, could be used to calculate this as follows:
d <- datadist(mydataframe)
options(datadist = 'd')
fit <- lrm(response ~ predictor1 + predictor2..., data=mydataframe, x =T, y=T)
resid(fit, 'gof').
I set up a
2011 Feb 20
2
Same color key for multiple lattice contour plots
Hi all,
I'm trying to make multiple lattice contour plots which have the same color
key, to allow good comparisons. However, I run into some problems when
fitting the plots to the color key. Basically my strategy to tackle this
problem was:
1) define a color key for all plots;
2) calculate the variable range for each plot;
3) calculate the range of colors from the color key that correspond
2009 Jun 24
5
How to avoid ifelse statement converting factor to character
Hi R-helpers,
Please see the below R output.
The problem is that after running the ifelse statement, data$SOCIAL_STATUS
is converted from a factor to a character.
Is there some way I can avoid this conversion?
Thanks in advance, Mark Na
> str(data)
'data.frame': 2100 obs. of 11 variables:
$ DATE : Factor w/ 5 levels "4-Jun-09","7-May-09",..: 1 1 1 1 1
2018 Aug 13
4
Call for testing: OpenSSH 7.8
On Thu, Aug 09, 2018 at 08:16:34PM CDT, Damien Miller wrote:
>Hi,
>
>OpenSSH 7.8p1 is almost ready for release, so we would appreciate testing
>on as many platforms and systems as possible. This is a bugfix release.
AIX 7.1 TL5, C compiler 11.1.0.23 - error in "test_utf8":
test_sshbuf:
2011 Oct 04
2
Adonis and nmds help and questions for a novice.
Hi,
forgive me if someone has already posted about this but I have had a look and cannot find the answer, also I am very new to R and been getting the grips with this.
I have been trying to use Adonis to find out if there are significant difference between groups on data that I have analyses with NMDS, and have been struggling with getting this to work and understanding what is going on. I am
2010 Dec 15
1
pmnorm: probabilites don't sum up to 1
Dear list member,
I struggle with the problem, why the probabilities of choosing one of
three mutually exclusive alternatives don?t sum up to 1!
Let?s assume we have three alternatives X, Y, and Z. Let?s further
assume we know their respective utilities:
uX, uY, uZ. I?m interested in calculating the probability of choosing
X, Y, and Z.
Since I assume that the alternatives are mutually
2023 Nov 06
1
c(NA, 0+1i) not the same as c(as.complex(NA), 0+1i)?
Hmm, it is not actually at odds with help(c), it is just that the autocoercion works different that it used to, so that
as.complex(NA) == as.complex(NA_real) == NA_real_+0i)
which now differs from
NA_complex
although both print as NA.
I haven't been quite alert when this change was discussed, but it does look a bit unfortunate that usage patterns like c(NA, 0+1i) does not give complex NA
2016 Mar 24
3
summary( prcomp(*, tol = .) ) -- and 'rank.'
Following from the R-help thread of March 22 on "Memory usage in prcomp",
I've started looking into adding an optional 'rank.' argument
to prcomp allowing to more efficiently get only a few PCs
instead of the full p PCs, say when p = 1000 and you know you
only want 5 PCs.
(https://stat.ethz.ch/pipermail/r-help/2016-March/437228.html
As it was mentioned, we already
2005 May 17
6
RPC error logging in to PDC on Win-64
I've upgraded one of my client boxes to Windows 64 bit edition but now it cannot login to the Samba PDC, instead it gives a RPC error after entering the password. The Win32 boxes can still login fine.
I can get accounts without admin rights to login but those with the rights are given a message stating "The system cannot log you on due to the following error:
A remote procedure call
2010 Oct 20
2
histograms resulting from call to soil.texture
Hello,
Using the dataset below I produce a soil.texture plot (R code for this
included at the end). One will notice I have plotted the points based on
whether or not they are in a region called 'upstream' or 'downstream'. I'm
curious if there is a way to somehow extract counts of the number of points
(red points and blue points) falling within each classification (e.g. silty
2009 Jun 23
2
Problem with ifelse statement
Hi R-helpers,
I am trying to use this ifelse statement to recode a variable:
> data$SOCIAL_STATUS<-ifelse(data$SOCIAL_STATUS=="B" & data$MALE>4, "C", "B")
(i.e., if social status is B and there are more than 4 males, then
recode social status to C; otherwise, leave it B)
But, it's not working. See the below R output. Notice that there were
71
2008 Aug 12
1
Powernow Failure with Xen Kernel
Sorry to have so many questions but I seem to have quite a few mini
problems with my first Xen setup. My xen server works fine with Powernow
on the standard Kernel but with the Xen kernel it fails. Does anyone
know why? Details below.
With Standard Kernel
powernow-k8: Found 2 Quad-Core AMD Opteron(tm) Processor 8350 processors
(8 cpu cores) (version 2.20.00)
powernow-k8: 0 : fid 0x0