Displaying 20 results from an estimated 80000 matches similar to: "How to save an object list as txt?"
2005 Dec 22
1
panel order in xyplot
Hi all,
I have a question concerning xyplot. My data is a data.frame looking like that:
In the first column I have numbers from 0 to 23 (hours of a day), the second column contains the name of a weekday (Day as factor) and the third column contains the number I am interested in. So as an example, the first five rows look like that:
Hour Day Freq
1 0 Mo 23
2 1 Mo
2005 Nov 21
3
Comparing rows of matrices with different dimensions
Hi there,
I have a question, which I thought is very easy to solve, but somehow I can't find a solution. Probably someone could help me quickly?
Here it is:
I have two matrices:
a
[,1] [,2] [,3]
[1,] 1 4 9
[2,] 2 6 10
[3,] 3 6 11
[4,] 4 8 12
b
[,1] [,2]
[1,] 1 4
[2,] 2 5
[3,] 3 6
Now I want to find
2006 Jan 09
3
two y-axis in xy-plot
Hi there,
I am wondering if it is possible to do an xyplot with two y-axes. I'd like to print two parameters in a time series but they both have different scales.
Which parameter in xyplot can I add to achieve this result?
Thanks a lot for any help.
Antje
[[alternative HTML version deleted]]
2009 Nov 20
1
boxplot question
Hi there,
I was wondering if anybody can explain to me why the boxplot ends up
with different results in the following case:
I have some integer data as a vector and I compare the stats of boxplot
with the same data divided by a factor.
I've attached a csv file with both data present (d1, d2). The factor is
34.16667.
If I run the boxplot function on d1 I get the following stats:
2007 Jan 07
0
Multiple plots via sapply or lapply?
Hi all,
I've got the following problem. I have a vector containing file names. I
want to read these files as csv and calculate the density-function for
each file (has just one column with data). Then, I'd like to plot all
density functions into one window. I did the following to calculate the
density data:
s <- sapply(filelist, function(x) {
if(file.exists(x))
{
file <-
2008 Sep 22
2
paste with list
Hello,
I guess the solution is rather simple but whatever I tried, I don't manage to
get the result as I want to have it:
I have several vectors of equal length in a list and I'd like to combine all
first elements to a single string, all second elements to a single string, ...,
all n-th elements to a single string.
# Example code (how it should look like):
t1 <- c(1,2,3)
t2 <-
2006 Aug 03
2
run self written functions
Hello,
I'm not sure if I'm in the right place with my question...
I'm running R on Windows and wrote a function and saved it as .R file.
It looks like this:
bmi <- function(weight, height) {
bmi <- weight / height^2
bmi
}
If I want to use this function, I have to mark everything and then press
Ctrl-R. But then everything single line is executed on the command line,
2006 Jan 16
1
label of second y-axis in xyplot (lattice)
Dear group,
First I provide you with an example, I found in the newsgroup. Then I'd like to explain my problem to you by means of the output.
enviro <-
data.frame(Year = rep(2001:2002, each = 365),
Day = rep(1:365, 2),
Precip = pmax(0, rnorm(365 * 2)),
Temp = 2 + 0.2 * rnorm(365 * 2))
xyplot(Precip + Temp ~ Day | Year,
2012 Aug 07
1
Save & reload list objects
Hi,
I think this is probably (& hopefully) very easy but I the ideas I have
tried don't work.
Simply, I have 2 very large lists in my workspace which take an awfully long
time to make, each containing the information from 12500+ lmer models.
I would like to now save these lists as files (txt, csv... whatever suits
best) on to my computer/usb.
Then I would like to be able to reload them in
2010 May 04
1
Objective: to create a Joint Probability Table and save as a csv file (with headers).Input: A csv file (with headers) containing raw data, arranged by columns.Variable: number of bins for each column of data, default to 5 bins per column.Data
Hi Roscoe,
I couldn't make it though that excel worksheet without my eyes glazing
over... but do you want something like
data(mtcars)
tab <- xtabs(~cyl + gear, data=mtcars)
tab/sum(tab)
?
Best,
Isat
On Mon, May 3, 2010 at 10:08 PM, Roscoe <Roscoe at exemail.com.au> wrote:
> Dear R-Help,
>
> First post, be gentle...
>
> I am new to R: I can perform basic functions
2010 Feb 20
1
coerce (list) object to type 'double'
Dear all,
I am really new to R, and I have problem here. I searched around, but did
not get a solution.
I have a numetrix matrix (20 by 25) saved in .csv. I read it as
>sx<-read.csv("sx.csv",header=F)
Then I try to convert it to numeric using
>sx<-as.numeric(sx)
Error: (list) object cannot be coerced to type 'double'
The class of sx is "data.frame".
I
2012 Sep 12
2
How to resolve the following error: (list) object cannot be coerced to type 'double'
Hello,
I'd like to test a significance of two variables in their correlation using
rcorr, which gave me an error of format incompatibility.
Below are the lines that I typed in the R window and let me know if anyone
knows how to resolve this.
Var=read.csv("03apr10ab_corr_matrix_in_overlaps.csv",header=F)
colnames(Var)=c("D Prime","T statistics")
D Prime
2008 Sep 22
1
how to set rownames / colnames for matrices in a list
Hello,
I have another stupid question. I hope you can give me a hint how to solve this:
I have a list and one element is again a list containing matrices, all of the
same dimensions. Now, I'd like to set the dimnames for all matrices:
example code:
m1 <- matrix(1:25, nrow=5)
m2 <- matrix(26:50, nrow=5)
# ... there can be much more than two matrices
l <- list()
l[[1]] <-
2012 Jul 17
1
How to use a text in an object of class character position to create a vector with the text as name
Hello,
>titletool<-read.csv("TotalCSVData.csv",header=FALSE,sep=",")
> class(titletool)
[1] "data.frame"
>titletool[1,1]
[1] Experiment name : CONTROL DB AD_1
>t<-titletootl[1,1]
>t
[1] Experiment name : CONTROL DB AD_1
>class(t)
[1] "character"
now i want to create an object (vector) with the name "Experiment name :
2012 Apr 01
1
Error in xy.coords(x, NULL, log = log) : (list) object cannot be coerced to type 'double'
Hi there,
When I run the code below I get the error
Error in xy.coords(x, NULL, log = log) :(list) object cannot be coerced to
type 'double'
Any tips how I can resolve this?
>
> library("waveslim")
>
> vols=read.csv(file="C:/Users/ocuk/My Documents/Abs Vol.csv", header=TRUE,
> sep=",")
> x<-c(vols[,1])
> #x
> #data(ibm)
>
2007 Jul 30
4
how to combine data of several csv-files
Hello,
I'm looking for a solution for the following problem:
1) I have a folder with several csv files; each contains a set of
measurement values
2) The measurements of each file belong to a position in a two
dimensional matrix (lets say "B02.csv" belongs to position 2,2
3) The size of the matrix is fix
4) I cannot assure to have a csv file for each position
5) Each position
2010 Mar 22
1
Error while trying to save summary() output as csv
Hi,
I need to save output of summary() procedure to a csv file. It's all
OK when it's applied to a 'factor' class variable, but when I try to
save a 'integer' class summary to csv it gives me :
> summary(rnorm(100, 10)) -> object
> write.csv2(object, file='name.csv')
Error in do.call("expand.grid", c(dimnames(x), stringsAsFactors =
2008 Nov 16
4
duplicate values
Hei R Users,
i have the following dataframe:
Datetime Temperature and many more collumns
1 2008-6-1 00:00:00 5
2 2008-6-1 02:00:00 5
3 2008-6-1 03:00:00 6
4 2008-6-1 03:00:00 0
5 2008-6-1 04:00:00 6
6 2008-6-1 04:00:00 0
7 2008-6-1 05:00:00 7
8 2008-6-1 06:00:00
2013 Jan 11
0
Error with looping through a list of strings as variables
Dear R users:
I have been trying to figure out how to include string variables in a for
loop to run multiple random forests with little success. The current code
returns the following error:
Error in trafo(data = data, numeric_trafo = numeric_trafo, factor_trafo =
factor_trafo, :
data class character is not supported
In addition: Warning message:
In storage.mode(RET@predict_trafo) <-
2009 May 05
1
self organizing map advice for categorical data
Hello,
Could anybody offer any advice about implementing a Kohonen self organizing map for categorical data? Specifically I am wondering if there are any pre-existent packages that can deal with categorical data and/or how one would compare the input vector of categoricals with the self organizing map nodes.
Thanks in advance.
George Chen
----- Original Message -----
From: r-help-request at