Displaying 20 results from an estimated 100 matches similar to: "Extract letters from a column"
2010 Oct 13
4
Change global env variables from within a function
Hi,
I've looked all over for a solution to this, but haven't had much look
in specifying what I want to do with appropriate search terms. Thus I'm
turning to R-help.
In the process of trying to write a simple function to rename individual
column names in a data frame, I ran into the following problem: When I
rename the columns within my function, I can't seem to get it to
2011 Jun 28
1
lattice multiple y-scale possible?
Hi
I am attempting to use the lattice bwplot function to generate boxplots
of numerous parameters (1-panel/parameter) by site (x-axis). The
parameters have quite different ranges of values, so it would be best to
have a separate y-axis range for each panel. Below is a basic example of
what I am trying to do. As is seen, the y-axes need to be scaled
individually to make this useful. Any
2011 May 19
1
Creating a "shifted" month (one that starts not on the first of each month but on another date)
Hello!
I have a data frame with dates. I need to create a new "month" that
starts on the 20th of each month - because I'll need to aggregate my
data later by that "shifted" month.
I wrote the code below and it works. However, I was wondering if there
is some ready-made function in some package - that makes it
easier/more elegant?
Thanks a lot!
# Example data:
2007 May 12
1
function similar to "get" that works for both an object, and elements of an object?
#Is there a single function similar to "get" that works for both an object, and elements of an object ?
#(I want the function to be able to return objects, and/or the deeper elements of an object.)
#(i.e. elements of a dataframe and/or list)?
#e.g.
tempdf = data.frame(a=c(4,5,6) , b=c(10,11,12) )
templist= list(x=tempdf, y=c(1,2))
get('tempdf') #works as desired
2012 Aug 03
2
Recursive function calls
My apologies, I know that this is not a new problem, but I'm not sure how
to find the answer
I want to recursively loop over an object and trim trailing white space.
When I use this function on a list of data.frame I get output like this:
[1] "c(\" many spaces \", \" many spaces \")" "c(\" many spaces
\", \" many spaces
2009 Dec 08
1
Printing 'k' levels of factors 'n' times each, but 'n' is unequal for all levels ?
Dear List,
I need to print out each of 'k' levels of a factor 'n' times each, where
'n' is the number of elements belonging to each factor.
I know that this can normally be done using the gl() command,
but in my case, each level 'k' has an unequal number of elements.
Example with code is as below:
vc<-read.table("P:\\Transit\\CORRECT
2016 Jan 14
2
JDataFrame API
Hi Folks,
If you need to send data from Java to R you may consider using the
JDataFrame API -- which is used to convert data into JSON which then
can be converted into a data frame in R.
Here's the project page:
https://coherentlogic.com/middleware-development/jdataframe/
and here's a partial example which demonstrates what the API looks like:
String result = new JDataFrameBuilder()
2016 Jan 15
2
JDataFrame API
Hi Simon,
Thanks for your feedback. -- this is an observation that I wasn't
considering when I wrote this mainly because I am, in fact, working
with rather small data sets. BTW: There is code there, it's under the
bitbucket link -- here's the direct link if you'd still like to look
at it:
https://bitbucket.org/CoherentLogic/jdataframe
Re "for practical purposes is
2011 Jan 14
4
test
Hi, i have that table
Thesis Day A B C
1 0 83.43 90.15 22.97
1 0 85.50 94.97 16.62
1 0 83.36 95.38 20.70
1 0 84.47 92.16 23.58
1 0 83.98 95.33 19.39
1 0 82.86 93.78 24.55
1 0 83.39 92.67 19.56
1 0 85.17 95.24 17.95
1 0 81.62 93.32 28.49
1 0 82.99 92.85 19.73
1 0 81.11 95.67 27.20
1 0 83.39 94.69 16.51
1 0 79.56 89.87 30.39
1 0 80.54 93.32 21.76
1 0 82.11 92.58 22.17
1 14 85.65 94.00 19.19
1 14
2007 Jul 15
1
Looping through a series of (csv) files
Dear Colleagues.
This should be a very common operation and I believe there should be a nice
way in R to handle it. I couldn't find it in the manual or by searching
online. I am wondering if I could ask for some help in this community.
I have 48 csv files; each stores the data for a specific month. The 48
corresponding months are consecutively from January, 2001 to December, 2004.
I name
2013 Aug 21
3
data import: strange experience
Dear List:
I had some strange experience in importing data. I wonder if anyone of you
had the same problem before and would greatly appreciate your suggestion in
advance.
The original data set in excel format.
Here is a brief summary of the procedure I did:
1. I saved the original excel data as csv and txt formats, separately.
2. I imported two data using the following codes. There were no
2016 Jan 15
0
JDataFrame API
Tom,
this may be good for embedding small data sets, but for practical purposes is doesn't seem like the most efficient solution.
Since you didn't provide any code, I built a test case using the build-in Java JSON API to build a medium-sized dataset (1e6 rows) and read it in just to get a ballpark (see
https://gist.github.com/s-u/4efb284e3c15c6a2db16
# generate:
time java -cp
2010 Oct 15
0
nomianl response model
Is there a way to estimate a nominal response model?
To be more specific let's say I want to calibrate:
\pi_{v}(\theta_j)=\frac{e^{\xi_{v}+\lambda_{v}\theta_j}}{\sum_{h=1}^m
e^{\xi_{h}+\lambda_{h}\theta_j}}
Where $\theta_j$ is a the dependent variable and I need to estimate
$\xi_{h}$ and $\lambda_{h}$ for $h \in {1...,m}$.
Thank you,
Mauricio Romero
Quantil S.A.S.
Cel: 3112231150
2016 Jan 15
0
JDataFrame API
> On Jan 15, 2016, at 12:35 PM, Thomas Fuller <thomas.fuller at coherentlogic.com> wrote:
>
> Hi Simon,
>
> Thanks for your feedback. -- this is an observation that I wasn't
> considering when I wrote this mainly because I am, in fact, working
> with rather small data sets. BTW: There is code there, it's under the
> bitbucket link -- here's the direct
2011 Mar 04
1
grouping data
Hi R-list,
I have a data set with plot locations and observations and want to label
them based on locations. For example, I have GPS information (x and y) as
follows:
> x
[1] -87.85092 -87.85092 -87.85092 -87.85093 -87.85093 -87.85093 -87.85094
[8] -87.85094 -87.85094 -87.85096 -87.85095 -87.85095 -87.85095 -87.85096
[15] -87.85096 -87.85096 -87.85096 -87.85088 -87.85088 -87.85087
2024 Mar 08
0
The urban cruiser 20-inch fat tire e-Bike
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-xen-devel/attachments/20240308/03b0c45d/attachment.htm>
2004 May 26
1
Same Problem.... RE: Can see server, but can't see shares. Whazzup?
ok
I did it, but *@ no success...
I used Smb with W2K for years without Problems, but now with this
eXPerimental OS....
Here comes my smb.conf I do not see an error... :
Samba config file created using SWAT
# from 0.0.0.0 (0.0.0.0)
# Date: 2004/05/27 13:56:58
# Global parameters
[global]
workgroup = RESULT-THALIS
netbios name = MASTER
server string = Result-Thalis Server
encrypt passwords =
2004 Aug 06
0
Live from Mongolia
FYI... A recent article I wrote regarding my streaming adventures.
===================
Hoov's Musings
===================
volume 6, number 7
Source: http://www.acuitive.com/musings/
Live From Mongolia
Introduction from Mark Hoover
Acuitive people have all kinds of interesting hobbies, a few of which I can
actually talk about. In the case of Roy Harvey, his hobby is providing
live or
2009 Jul 15
1
Error in simulation R-code
Dear List,
I have got error message when I run the R-code. Can anyone has a suggestion?
v.code <- df.bm7[,c(10:31)]; v.code[1:3,]
names(v.code)
CM = v.code # variable binomial code
sim.sp <- function(data,CM,n,N)
{
C <- matrix(rep(NA,N),ncol=1)
for(i in 1:N)
{
j <- n
xx <- which(colSums(CM[j,])==1)
V <- names(xx)
V <- paste(V,
2009 Jul 15
1
Simulation code error
Dear List,
I have some problem with my simulation code. Here is output from R:
> sim.sp <- function(data,CM,n,N)
+ {
+ C <- matrix(rep(NA,N),ncol=1)
+ for(i in 1:N)
+ {
+ j <- n
+ xx <- which(colSums(CM[j,])==1)
+ V <- names(xx)
+ V <- paste(V, collapse="+")
+ V <- paste("SBA~", V)
+ rd <- round(nrow(data)*(2/3))
+ d <-