Displaying 20 results from an estimated 1500 matches similar to: "referencing last row in a column"
2010 Oct 20
3
combine vectors in an alternating way
I have two vectors
min
0.2, 0.3, 0.6, 0.1
max
0.4,0.5,0.7,0.4
Is there a way to combine these two vector so that the values will be taken
from the vectors alternating so that I will get a new
minmaxminmaxminmax-vector?
minmax
0.2,0.4,0.3,0.5,0.6,0.7,0.1,0.4
Any help is much appreciated
--
View this message in context:
2010 Nov 09
2
new column from column in another df
If I have a data frame where a species occupies several rows with different
phases such as (both col's ar factors):
species,phase
Populus tremula,1
Populus tremula,2
Populus tremula,3
Calluna vulgaris,1
Calluna vulgaris,2
Betula alba,1
Betula alba,2
Betula alba,3
Primula veris,1
Primula veris,2
and another df where each species only have one row:
species,growth_form
Populus tremula,tree
Acer
2010 Sep 16
2
shuffling of data
I have a file that reads like this:
Species,Year,Julian_day
Alnus_glutinosa, 1873, 123
Sorbus_aucuparia, 1873, 122
....(more species...)
Alnus_glutinosa, 1874, 134
Sorbus_aucuparia, 1874, 143
....(more species and years)
Is there a way to plot this as julian day over years so that each species
get a different color?
Also is it possible to convert this data into the format:
Alnus_glutinosa,
2010 Nov 05
3
table with values as dots in increasing sizes
I was just thinking of a way to present data and if it is possible in R.
I have a data frame that looks as follows (this is just mockup data).
df
location,"species1","species2","species3","species4","species5"
"loc1",0.44,0.28,0.37,-0.24,0.41
"loc2",0.54,0.62,0.34,0.52,0.71
"loc3",-0.33,0.75,-0.34,0.48,0.61
location
2007 Jan 05
4
Fast Removing Duplicates from Every Column
Hi,
I'm looking for some lines of code that does the following:
I have a dataframe with 160 Columns and a number of rows (max 30):
Col1 Col2 Col3 ... Col 159 Col 160
Row 1 0 0 LD ... 0 VD
Row 2 HD 0 0 0 MD
Row 3 0 HD HD 0 LD
Row 4 LD HD HD 0 LD
... ...
LastRow HD HD LD 0 MD
Now I want a dataframe that looks like this. As you see
2013 Mar 12
5
extract values
Hello all!
I have a problem to extract values greater that for example 1820.
I try this code: x[x[,1]>1820,]->x1
Please help me!
Thank you!
The data structure is:
structure(c(2.576, 1.728, 3.434, 2.187, 1.928, 1.886, 1.2425,
1.23, 1.075, 1.1785, 1.186, 1.165, 1.732, 1.517, 1.4095, 1.074,
1.618, 1.677, 1.845, 1.594, 1.6655, 1.1605, 1.425, 1.099, 1.007,
1.1795, 1.3855, 1.4065, 1.138, 1.514,
2013 Mar 13
2
merge datas
Hello all!
I have a problem with R. I try to merge data like this:
structure(c(2.1785, 1.868, 2.1855, 2.5175, 2.025, 2.435, 1.809,
1.628, 1.327, 1.3485, 1.4335, 2.052, 2.2465, 2.151, 1.7945, 1.79,
1.6055, 1.616, 1.633, 1.665, 2.002, 2.152, 1.736, 1.7985, 1.9155,
1.7135, 1.548, 1.568, 1.713, 2.079, 1.875, 2.12, 2.072, 1.906,
1.4645, 1.3025, 1.407, 1.5445, 1.437, 1.463, 1.5235, 1.609, 1.738,
1.478,
2013 Apr 07
2
group data in classes
Hello all!
I have a problem to group my data (years) in 10 years classes. For example
for year
year decade
1598 1590-1600
1599 1590-1600
1600 1590-1600
1601 1600-1610
---
my is like this>
[1] 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611
1612
[16] 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626
1627
[31] 1628 1629 1630 1631 1632 1633
2007 Jun 26
1
A really simple data manipulation example
In response to those who asked for a better explanation of what the
Vilno software does, here's a simple example that gives some idea of
what it does.
LABRESULTS is a dataset with multiple rows per patient , with lab
sodium measurements. It has columns: PATIENT_ID, VISIT_NUM, and
SODIUM.
DEMO is a dataset with one row per patient, with demographic data.
It has columns: PATIENT_ID, GENDER.
2005 Jul 06
3
plotting on a reverse log scale
I'd like to do some plots of historical event data on a reverse log
scale, started, say at the year 2000 and going
backwards in time, with tick marks spaced according to log(2000-year).
For example, see:
http://euclid.psych.yorku.ca/SCS/Gallery/images/log-timeline.gif
As an example, I'd like to create a density plot of such data with the
horizontal axis reverse-logged,
a
2008 Nov 06
0
problems executing a bulk load with SQL server
Hello,
New to this forum so I hope the content is appropriate...
I was building a some code to maniputlate some data. Given the bulk of it
(the csv is about a GB), I opted to use a database.
The setup, which may be part of the issue is that the SQL is one remote
machine (call it 'A'), the disk that contains the data is on some other
remote drive - call it 'B' and the server on
2011 Jan 11
1
how to use "apply" function partial to each vector of a matrix
Hello
Suppose I have a matrix mat=(1:16,2)
[,1] [,2] [,3] [,4]
[1,] 1 5 9 13
[2,] 2 6 10 14
[3,] 3 7 11 15
[4,] 4 8 12 16
I just want to use the "apply" function to the matrix partially
there is a vector end=c(2,3,1,3)
#sum the 1st 2 numbers of the 1st column
#sum the 1st 3 numbers of the 2nd column
#sum the 1st number of the 3rd column
2010 Sep 27
3
calculating mean and s.d. from a two-column table
I have a two-column table as follows where age is in the 1st column and
the number of individuals is in the 2nd.
age;no
1;21
2;31
3;9
4;12
5;6
Can I use mean() and sd() to calculate the mean and standard deviation
from this or do I have to manually multiplicate 21*1+31*2 etc. / N?
2010 Oct 04
3
Loop too slow for Bid calc - BUT cannot figure out how to do with matrix
Hi,
I am trying to create Bid/Ask for each second from a high volume stock and
the only way I have been able to solve this is using loops to create the
target matrix from the source tick data matrix. Looping is too slow and
not practical to use on multiple stocks. For example:
Bids Matrix (a real one is 400,000++ length):
Bid Time
10.03 11:05:03.124
10.04 11:05:03.348
10.05
2012 Nov 02
1
rgl package and animation
I am trying to figure out how to use rgl package for animation. It
appears that this is done using the play3d() function. Below I have
some sample code that plots a 3D path and puts a sphere at the point
farthest from the origin (which in this case also appears to be at the
end of the path). What I would like to do is animate the movement of
another sphere along the length of the path
2010 Feb 22
2
(Somewhat) broken EPS files produced
Hello.
I'm writing some simple text using sweave, and faced a strange problem
with eps files produced for my plots (one example attached).
Individual eps files are interpreted by ghostscript just fine, and
show up without errors. But once I try to include them into main
LaTeX/Sweave document (using regular \includegraphics, produced by
Sweave),
ghostscript gives me this error on those files:
2010 Oct 22
1
Display list redraw incomplete when exporting plots
I was just wondering if anyone knows what could be the problem with my
exporting of plots.
Below is the error messages I get when trying to export my plots (all error
messages at the same time).
I do get a file produced which works but I don't know why these messages
appear. Doesn't matter if it is a pdf or a png or any other format I export
to.
Also, when exporting to png I get
2002 Dec 26
1
Questions about multiple Tinc daemons
Hi,
I have some questions about running multiple tinc deamons. The docs
say you can do it to support separate VPNs, but I don't see any
examples.
I have been running a single tinc vpn for months with no problems, now
I'm trying to add a second separate vpn. I'm running the static tinc
version 1.0pre7 (built Apr 9 2002 14:00:34, protocol 14) on Debian
potato. I did not want to go
2007 Jul 14
10
[Bug 1340] New: Support for Camellia block cipher to OpenSSH-portable.
http://bugzilla.mindrot.org/show_bug.cgi?id=1340
Summary: Support for Camellia block cipher to OpenSSH-portable.
Product: Portable OpenSSH
Version: -current
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: Miscellaneous
AssignedTo: bitbucket at mindrot.org
2009 Nov 16
8
extracting the last row of each group in a data frame
Hi,
I would like to extract the last row of each group in a data frame.
The data frame is as follows
Name Value
A 1
A 2
A 3
B 4
B 8
C 2
D 3
I would like to get a data frame as
Name Value
A 3
B 8
C 2
D 3
Thank you for your suggestions in advance
Jeff